Read item weight, value and base name through the bridge
Consumers of the legacy ItemTemplate item_wt, item_value and item_base_name now read getItemWt(), getItemValue() and getItemBaseName() on template.cacheTemplate. Parity (offline, scripts/p14.py, 7586 templates): 0 differences in item_wt, item_value and item_base_name. No value changes expected. JSON-Refactor-Plan Task 1.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b8ac8cce3e
commit
dc4a9ee08a
29 files changed
+59
-59
No files matched your search
@@ -307,7 +307,7 @@ public class Warehouse {
|
||||
if (resource.template.cacheTemplate.getItemType().equals(mbEnums.ItemType.GOLD))
|
||||
resourceType = mbEnums.ResourceType.GOLD;
|
||||
else
|
||||
resourceType = mbEnums.ResourceType.valueOf(ItemTemplate.templates.get(resource.templateID).item_base_name.toUpperCase());
|
||||
resourceType = mbEnums.ResourceType.valueOf(ItemTemplate.templates.get(resource.templateID).cacheTemplate.getItemBaseName().toUpperCase());
|
||||
|
||||
if (transaction)
|
||||
AddTransactionToWarehouse(warehouse, playerCharacter.getObjectType(), playerCharacter.getObjectUUID(), mbEnums.TransactionType.DEPOSIT, resourceType, amount);
|
||||
@@ -432,7 +432,7 @@ public class Warehouse {
|
||||
return false;
|
||||
|
||||
if (addToInventory)
|
||||
if (!itemMan.hasRoomInventory(template.item_wt)) {
|
||||
if (!itemMan.hasRoomInventory(template.cacheTemplate.getItemWt())) {
|
||||
ChatManager.chatSystemInfo(playerCharacter, "You can not carry any more of that item.");
|
||||
return false;
|
||||
}
|
||||
@@ -517,7 +517,7 @@ public class Warehouse {
|
||||
if (itemMan == null)
|
||||
return false;
|
||||
|
||||
if (!itemMan.hasRoomInventory(template.item_wt)) {
|
||||
if (!itemMan.hasRoomInventory(template.cacheTemplate.getItemWt())) {
|
||||
ChatManager.chatSystemInfo(playerCharacter, "You can not carry any more of that item.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user