|
|
@ -98,6 +98,8 @@ public class Item extends AbstractWorldObject { |
|
|
|
loadEnchantments(); |
|
|
|
loadEnchantments(); |
|
|
|
if(this.getItemBase().isVorg() == false) |
|
|
|
if(this.getItemBase().isVorg() == false) |
|
|
|
bakeInStats(); |
|
|
|
bakeInStats(); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
Item.BakeVorgStats(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Item(ItemBase itemBase, int ownerID, |
|
|
|
public Item(ItemBase itemBase, int ownerID, |
|
|
@ -129,6 +131,8 @@ public class Item extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
|
|
loadEnchantments(); |
|
|
|
loadEnchantments(); |
|
|
|
bakeInStats(); |
|
|
|
bakeInStats(); |
|
|
|
|
|
|
|
if(this.getItemBase().isVorg()) |
|
|
|
|
|
|
|
Item.BakeVorgStats(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -161,6 +165,8 @@ public class Item extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
|
|
loadEnchantments(); |
|
|
|
loadEnchantments(); |
|
|
|
bakeInStats(); |
|
|
|
bakeInStats(); |
|
|
|
|
|
|
|
if(this.getItemBase().isVorg()) |
|
|
|
|
|
|
|
Item.BakeVorgStats(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -234,7 +240,8 @@ 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) |
|
|
@ -627,6 +634,8 @@ 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; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -668,6 +677,15 @@ 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()) { |
|
|
|
|
|
|
|
item.addPermanentEnchantment(powerString, 0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
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); |
|
|
|
} |
|
|
|
} |
|
|
|