* @param log String
* @return boolean
*/
public boolean pickupItem(ItemInstance item, String log)
{
PickableAttachment attachment = item.getAttachment() instanceof PickableAttachment ? (PickableAttachment) item.getAttachment() : null;
if (!ItemFunctions.canAddItem(this, item))
{
return false;
}
if ((item.getItemId() == ItemTemplate.ITEM_ID_ADENA) || (item.getItemId() == 6353))
{
Quest q = QuestManager.getQuest(255);
if (q != null)
{
processQuestEvent(q.getName(), "CE" + item.getItemId(), null);
}
}
if ((item.getItemId() == ItemTemplate.ITEM_ID_ADENA))
{
if (item.getOwnerId() == 0)
{
WorldStatisticsManager.getInstance().updateStat(this, CategoryType.ADENA_ADDED, item.getCount());
}
}
Log.LogItem(this, log, item);
sendPacket(SystemMessage2.obtainItems(item));
getInventory().addItem(item);
if (attachment != null)
{
attachment.pickUp(this);
}
sendChanges();
return true;
}