|
|
@ -96,10 +96,7 @@ public class Item extends AbstractWorldObject { |
|
|
|
this.customName = name; |
|
|
|
this.customName = name; |
|
|
|
|
|
|
|
|
|
|
|
loadEnchantments(); |
|
|
|
loadEnchantments(); |
|
|
|
if(this.getItemBase().isVorg() == false) |
|
|
|
|
|
|
|
bakeInStats(); |
|
|
|
bakeInStats(); |
|
|
|
else |
|
|
|
|
|
|
|
Item.BakeVorgStats(this); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Item(ItemBase itemBase, int ownerID, |
|
|
|
public Item(ItemBase itemBase, int ownerID, |
|
|
@ -131,8 +128,6 @@ public class Item extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
|
|
loadEnchantments(); |
|
|
|
loadEnchantments(); |
|
|
|
bakeInStats(); |
|
|
|
bakeInStats(); |
|
|
|
if(this.getItemBase().isVorg()) |
|
|
|
|
|
|
|
Item.BakeVorgStats(this); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -165,8 +160,6 @@ public class Item extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
|
|
loadEnchantments(); |
|
|
|
loadEnchantments(); |
|
|
|
bakeInStats(); |
|
|
|
bakeInStats(); |
|
|
|
if(this.getItemBase().isVorg()) |
|
|
|
|
|
|
|
Item.BakeVorgStats(this); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -240,8 +233,6 @@ public class Item extends AbstractWorldObject { |
|
|
|
this.value = rs.getInt("item_value"); |
|
|
|
this.value = rs.getInt("item_value"); |
|
|
|
this.customName = rs.getString("item_name"); |
|
|
|
this.customName = rs.getString("item_name"); |
|
|
|
|
|
|
|
|
|
|
|
if(this.getItemBase().isVorg()) |
|
|
|
|
|
|
|
Item.BakeVorgStats(this); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void _serializeForClientMsg(Item item, ByteBufferWriter writer) |
|
|
|
public static void _serializeForClientMsg(Item item, ByteBufferWriter writer) |
|
|
@ -634,8 +625,6 @@ public class Item extends AbstractWorldObject { |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
Logger.error(e); |
|
|
|
Logger.error(e); |
|
|
|
} |
|
|
|
} |
|
|
|
if(item.getItemBase().isVorg()) |
|
|
|
|
|
|
|
Item.BakeVorgStats(item); |
|
|
|
|
|
|
|
return item; |
|
|
|
return item; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -676,21 +665,6 @@ public class Item extends AbstractWorldObject { |
|
|
|
} |
|
|
|
} |
|
|
|
return item; |
|
|
|
return item; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void BakeVorgStats(Item item){ |
|
|
|
|
|
|
|
if (item.getItemBase().isVorg()) { |
|
|
|
|
|
|
|
item.getEnchants().clear(); |
|
|
|
|
|
|
|
for (String powerString : item.getItemBase().getVorgStats()) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
item.addPermanentEnchantment(powerString, 0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch(Exception e){ |
|
|
|
|
|
|
|
Logger.error("Couldn't find enchantment for: " + powerString); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
item.setName(item.getItemBase().getName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static Item getFromCache(int id) { |
|
|
|
public static Item getFromCache(int id) { |
|
|
|
return (Item) DbManager.getFromCache(GameObjectType.Item, id); |
|
|
|
return (Item) DbManager.getFromCache(GameObjectType.Item, id); |
|
|
|
} |
|
|
|
} |
|
|
|