Move the vendor mod table off the legacy item template

LOAD_TEMPLATE_MODTABLES now returns a templateID -> modTable map that
ForgeManager owns (vendorModTables). ForgeManager.forgeItem, WorkOrder
validation and the ManageNPCMsg forge item list read it through
ForgeManager.getVendorModTable(), and ItemTemplate.modTable is removed.

Values are unchanged: static_vendor_items has 5089 rows, one per
templateID, all present in static_item_templates, modTable 0-30.
Templates not in the table still read 0. The old loader stopped at the
first templateID missing from ItemTemplate.templates; there are none.
No comparator added or removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-20 07:37:54 -04:00
1 parent 2b4c1a73d1
commit 70ea9b3bc9
6 files changed
+27 -20

No files matched your search

+5 -4
View File
@@ -421,16 +421,17 @@ public class ManageNPCMsg extends ClientNetMsg {
for (int templateID : rollableSet) {
ItemTemplate template = ItemTemplate.templates.get(templateID);
int modTable = ForgeManager.getVendorModTable(templateID);
writer.put((byte) 1);
writer.putInt(0);
writer.putInt(templateID); //itemID
writer.putInt(template.cacheTemplate.getItemValue());
writer.putInt(600);
writer.put((byte) 1);
writer.put((byte) template.modTable);
writer.put((byte) template.modTable);
writer.put((byte) template.modTable);
writer.put((byte) template.modTable);//EffectItemType
writer.put((byte) modTable);
writer.put((byte) modTable);
writer.put((byte) modTable);
writer.put((byte) modTable);//EffectItemType
}
ArrayList<Item> cooking = NPCManager.getAllCookingForVendor(npc);