Switch Item.template and MobLoot to CObjectTemplate
Item.template is now the cache template from CObjectTemplate.lookup instead of the legacy DB ItemTemplate, so item.template.cacheTemplate.X becomes item.template.X. MobLoot, LootManager, ItemManager.isTwoHanded/ isShield and CombatManager.getSwingAnimation take a CObjectTemplate. No value changes: every getter already read the cache template through the bridge, and the lookup resolves the same 7586 ids as static_item_templates with the same item_type (offline parity p17.py, 0 differences). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f39e35ac23
commit
6b4e9815e0
38 files changed
+201
-193
No files matched your search
@@ -94,7 +94,7 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
|
||||
if (npc.getParentZone() != null && npc.getParentZone().playerCityUUID != 0)
|
||||
if (!npc.charItemManager.hasRoomInventory(sell.template.cacheTemplate.getItemWt())) {
|
||||
if (!npc.charItemManager.hasRoomInventory(sell.template.getItemWt())) {
|
||||
ErrorPopupMsg.sendErrorPopup(player, 21);
|
||||
return true;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
//get goldItem cost to sell
|
||||
|
||||
cost = (int) (sell.template.cacheTemplate.getItemValue() * (sell.combat_health_current / sell.template.cacheTemplate.getCombatHealthFull()));
|
||||
cost = (int) (sell.template.getItemValue() * (sell.combat_health_current / sell.template.getCombatHealthFull()));
|
||||
|
||||
float bargain = player.getBargain();
|
||||
float profit = npc.getBuyPercent(player) + bargain;
|
||||
|
||||
Reference in new issue
Block a user