From 2774d8a5107a7b21958eb254e3c35f194b84659e Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 19 Oct 2026 12:46:14 -0400 Subject: [PATCH] Read offering info and bane rank through the bridge Shrine boons read getItemOfferingInfo() and the banestone and bane production paths read getItemBaneRank() on template.cacheTemplate. The legacy parser only kept item_bane_rank when ACTIONRESPONSE is 4250517122; the cache parsers always read it. Parity shows this makes no difference: every template outside that gate has bane rank 0. Parity (offline, scripts/p14.py, 7586 templates): 0 differences in item_offering_info and item_bane_rank. No value changes expected. JSON-Refactor-Plan Task 1.4. Co-Authored-By: Claude Opus 5.5 --- src/engine/gameManager/NPCManager.java | 4 ++-- src/engine/net/client/handlers/ObjectActionMsgHandler.java | 4 ++-- src/engine/objects/Shrine.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index f15c6610..584ea145 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -547,8 +547,8 @@ public enum NPCManager { if (template == null) return 0; - if (template.item_bane_rank > 0) - return (long) (template.item_bane_rank * 60 * 60 * 3 * 1000 * Float.parseFloat(ConfigManager.MB_PRODUCTION_RATE.getValue())); + if (template.cacheTemplate.getItemBaneRank() > 0) + return (long) (template.cacheTemplate.getItemBaneRank() * 60 * 60 * 3 * 1000 * Float.parseFloat(ConfigManager.MB_PRODUCTION_RATE.getValue())); if (vendor.building == null) return 600; diff --git a/src/engine/net/client/handlers/ObjectActionMsgHandler.java b/src/engine/net/client/handlers/ObjectActionMsgHandler.java index 5fc91314..ea2bceae 100644 --- a/src/engine/net/client/handlers/ObjectActionMsgHandler.java +++ b/src/engine/net/client/handlers/ObjectActionMsgHandler.java @@ -188,14 +188,14 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { if (uuid > 680069 && uuid < 680074) //Handle Charter, Deed, Petition, Warrant here break; - if (item.template.item_bane_rank > 0) { + if (item.template.cacheTemplate.getItemBaneRank() > 0) { // Only one banestone at a time lock.writeLock().lock(); try { - if (Bane.summonBanestone(player, origin, item.template.item_bane_rank) == true) + if (Bane.summonBanestone(player, origin, item.template.cacheTemplate.getItemBaneRank()) == true) itemMan.consume(item); } finally { lock.writeLock().unlock(); diff --git a/src/engine/objects/Shrine.java b/src/engine/objects/Shrine.java index 86310ffb..19ab7fda 100644 --- a/src/engine/objects/Shrine.java +++ b/src/engine/objects/Shrine.java @@ -256,13 +256,13 @@ public class Shrine extends AbstractWorldObject implements Comparable { if (!boonOwner.charItemManager.doesCharOwnThisItem(boonItem.getObjectUUID())) return false; - for (ShrineType boonShrineType : boonItem.template.item_offering_info.keySet()) { + for (ShrineType boonShrineType : boonItem.template.cacheTemplate.getItemOfferingInfo().keySet()) { if (boonShrineType != shrineType) continue; //Same Shrine Type, add favors and stop loop. - int amount = boonItem.template.item_offering_info.get(boonShrineType) * boonItem.getNumOfItems(); + int amount = boonItem.template.cacheTemplate.getItemOfferingInfo().get(boonShrineType) * boonItem.getNumOfItems(); int oldAmount = this.favors; if (!DbManager.ShrineQueries.updateFavors(this, this.favors + amount, oldAmount)) {