forked from MagicBane/Server
Bonus code removed.
This commit is contained in:
@@ -166,50 +166,6 @@ public final class MobLoot extends Item {
|
||||
return item;
|
||||
}
|
||||
|
||||
public synchronized Item promoteToItemForNPC(NPC looter) {
|
||||
|
||||
if (looter == null)
|
||||
return null;
|
||||
|
||||
if (isDeleted)
|
||||
return null;
|
||||
|
||||
if (this.getItemBase().getType().equals(ItemType.GOLD))
|
||||
return null;
|
||||
|
||||
Item item = this;
|
||||
item.setOwner(looter);
|
||||
item.containerType = Enum.ItemContainerType.INVENTORY;
|
||||
item.setIsID(true);
|
||||
|
||||
if (this.getNumOfItems() > 1)
|
||||
item.setNumOfItems(this.getNumOfItems());
|
||||
|
||||
try {
|
||||
item = DbManager.ItemQueries.PERSIST(item);
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
item.containerType = Enum.ItemContainerType.INVENTORY;
|
||||
|
||||
// for (String effectName : this.effectNames)
|
||||
// item.addPermanentEnchantment(effectName, 0);
|
||||
//transfer enchantments to item
|
||||
try {
|
||||
for (String enchant : this.getEffectNames()) {
|
||||
item.addPermanentEnchantment(enchant, 0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Logger.error(e.getMessage());
|
||||
}
|
||||
|
||||
DbManager.NPCQueries.REMOVE_FROM_PRODUCTION_LIST(this.getObjectUUID(), looter.getObjectUUID());
|
||||
looter.removeItemFromForge(this);
|
||||
this.junk();
|
||||
return item;
|
||||
}
|
||||
|
||||
public synchronized void recycle(NPC vendor) {
|
||||
|
||||
//remove from production list for npc in db
|
||||
|
||||
Reference in New Issue
Block a user