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
@@ -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.combat_health_full));
|
||||
cost = (int) (sell.template.cacheTemplate.getItemValue() * (sell.combat_health_current / sell.template.cacheTemplate.getCombatHealthFull()));
|
||||
|
||||
float bargain = player.getBargain();
|
||||
float profit = npc.getBuyPercent(player) + bargain;
|
||||
|
||||
Reference in new issue
Block a user