Read template health, charges and flags through the bridge
Consumers of the legacy ItemTemplate combat_health_full,
item_initial_charges and item_flags now read getCombatHealthFull(),
getItemInitialCharges() and getItemFlags() on template.cacheTemplate.
No consumer read the template's combat_health_current; the
combat_health_current reads are the Item's own field.
Parity (offline, scripts/p14.py, 7586 templates): 0 differences in
combat_health_current, combat_health_full, item_initial_charges and
item_flags ("None" dropped on both sides). 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
dc4a9ee08a
commit
d197f62c1f
6 files changed
+14
-14
No files matched your search
@@ -515,7 +515,7 @@ public class InfoCmd extends AbstractDevCmd {
|
||||
output += StringUtils.addWS("Qty: "
|
||||
+ df.format(item.getNumOfItems()), 20);
|
||||
output += "Charges: " + (byte) item.chargesRemaining
|
||||
+ '/' + item.template.item_initial_charges;
|
||||
+ '/' + item.template.cacheTemplate.getItemInitialCharges();
|
||||
output += newline;
|
||||
output += "Name: " + template.cacheTemplate.getItemBaseName();
|
||||
output += newline;
|
||||
|
||||
@@ -80,7 +80,7 @@ public class PrintInventoryCmd extends AbstractDevCmd {
|
||||
if (item.template.cacheTemplate.getItemType().equals(ItemType.GOLD) == false) {
|
||||
|
||||
String chargeInfo = "";
|
||||
int chargeMax = template.item_initial_charges;
|
||||
int chargeMax = template.cacheTemplate.getItemInitialCharges();
|
||||
|
||||
if (chargeMax > 0) {
|
||||
int charges = item.chargesRemaining;
|
||||
|
||||
Reference in new issue
Block a user