Commit Graph
348 Commits
Author SHA1 Message Date
MagicBotandClaude Opus 5.5 ac5d1548b7 Remove the static_rune_powers loader
Nothing reads the table since the captain powers moved to MinionType.
Drops LOAD_RUNE_POWERS and the ResultSet RunePowerEntry constructor.
The table drop is MBDATA sql/3.9-rune-powers-drop.sql, run after deploy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 12:35:34 -04:00
MagicBotandClaude Opus 5.5 236bddc93b Key MobBase on its ID and stop reading loadID
Every static_npc_mobbase row has ID = loadID since 3.6 dropped the
server-made rows, so the race rune and rune effects are looked up by ID and
the loaders no longer filter on loadID. No value change (dev: 2375 of 2375
rows have ID = loadID). Mob.loadID and NPC.loadID are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:37:16 -04:00
MagicBotandClaude Opus 5.5 7027000ba1 Remove the dead static_npc_mobbase_race speeds loader
LOAD_ALL_MOBBASE_SPEEDS and MobBase.updateSpeeds have had no caller since
3.3 moved mob speeds to rune_speed. No value change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:36:30 -04:00
MagicBotandClaude Opus 5.5 f07d7f3fe9 Remove the dead static_npc_mob_resists loader
AbstractCharacter.getResists fell back to Resists.getResists(0), but the
table has no ID 0, so the fallback always returned null. It now returns
the field directly. Removes dbResistHandler, the cache, the ResultSet
constructor and the empty setMobResists stub. No value change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:11:30 -04:00
MagicBotandClaude Opus 5.5 6561d585b9 Remove the dead static_npc_mobbase_stats loader
MobBase builds its stats from the race rune's rune_attr_adj since 3.2, so
LOAD_STATS and the MobBaseStats ResultSet constructor have no callers.
No value change. The table is dropped by sql/3.6-mob-stats-resists-drop.sql.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:11:00 -04:00
MagicBotandClaude Opus 5.5 ad3e616cb7 Remove the static_npc_mobbase_effects loader
Mob effects come from the race rune (2.10b builder) and necro pets get
NECROPETSTATS in code, so GET_RUNEBASE_EFFECTS, the MobBaseEffects
ResultSet constructor, its unused mobBaseID and the equals/hashCode used
for the merge are gone. The table is now unread; drop it with
sql/3.4-mobbase-effects-drop.sql.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:16:19 -04:00
MagicBotandClaude Opus 5.5 ccc9d9f0ed Drop the server-made mobbase rows and the dead mobbase columns
The 406 ID <> loadID mobbases (15000-17266) were junk: no RUNE file, nothing
on dev references them. MobBase now always reads its core fields from the
race rune and logs an error if the rune is missing; the loader skips any
ID <> loadID rows still present. GetClassType only matched those IDs, so it
always returned 2518 and is replaced by the constant.

DB: MBDATA/JSON-Refactor-Plan/sql/3.6-mobbase-cleanup.sql deletes the rows,
the 10 orphan static_npc_mobbase_effects rows (17061/17122/17154) and drops
13 columns no longer read: lootTableID, name, level, health, atr, defense,
minDmg, maxDmg, noaggro, raceType, fsm, notEnemy, enemy.

Value changes: none for the 2375 loaded mobbases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:03:27 -04:00
MagicBotandClaude Opus 5.5 c811ba9f4e Log the loaded mobbase count, split into rune and server-made rows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 13:31:49 -04:00
MagicBotandClaude Opus 5.5 db67e56302 Write static_rune_lookup from the loaded race and class caches at world boot
The DB views char_perAccount and dyn_trash_detail lost their race and class
names when 2.11 dropped the Phase 2 tables. The world server now rewrites the
generated static_rune_lookup table (ID, type, name) after the second
Race.loadAllRaces(): 26 player races, 4 base classes, the promotion runes and
the CSR promotion rows 2901-2911. One transaction (delete, batch insert,
commit); on any failure it rolls back and logs a warning, the boot continues.

Names come from the runes: races use obj_name (as in 2.3), classes the rune
names, so DB typos such as "Theif" become "Thief" in the views. No gameplay
change. Needs JSON-Refactor-Plan/sql/2.12-rune-lookup.sql (table, level
functions, views) run before boot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:35:58 -04:00
MagicBotandClaude Opus 5.5 8b9aa43c1b Remove the dead skill and power DB loaders
Deletes the uncalled static_rune_skill_adjusts, static_rune_maxskills,
static_skill_skillsgranted, static_skill_skillreq and static_power_powergrant
loaders and their ResultSet constructors. LOAD_RUNE_POWERS stays for the 14
Magister Captain guard contract ids. No value changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:42:19 -04:00
MagicBotandClaude Opus 5.5 d576ed1468 Stop reading the replaced race, base class and promotion columns
static_rune_race is read only for the race ids and the server-only heights;
the hair/beard style, racebaseclass, baseclass and promotionrunereq queries
are gone. GET_BASE_CLASS is cache-only, which also drops the obj_account
cache-miss query. CSR/admin promotions 2901+ (no promotionrunereq rows) get an
empty allowed list. No value changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:41:06 -04:00
MagicBotandClaude Opus 5.5 658d52cf41 Remove the dead static_rune_baseeffect path
RuneBaseEffect, its handler, every effectsGranted field and getter (including
the PromotionClass promoID*10+2500..2503 lookups) and the empty
PlayerBonuses.grantEffect had no reader (2.10a). The GameObjectType constant
stays so later ordinals are unchanged. No value changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:40:12 -04:00
MagicBotandClaude Opus 5.5 64a86152d3 Load rune bases from all non-RACE runes, dropping static_rune_runebase reads
The 315 static_rune_runebase rows are exactly the non-RACE runes, so the loader
selects by rune_type. Removes the server type/subtype columns (no live reader),
the runereq/overwrite path, the GET_RUNEBASE cache-miss query, the runebase
attribute handler, the racerune/baseclassrune loaders and the 111111 checks.
No value changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:36:34 -04:00
MagicBotandClaude Opus 5.5 992177eb0c Return the cached PromotionClass from GET_PROMOTION_CLASS
Character load and the promotion trainer re-read static_rune_promotion on every
call and replaced the cached object. They now get the object loaded at boot,
as GET_BASE_CLASS already does; the DB query is only a miss fallback.
No value changes: the cached and re-read objects hold the same row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 10:32:24 -04:00
MagicBotandClaude Opus 5.5 0283f85e87 Remove the legacy ItemTemplate and static_item_templates loader
Every reader moved to CObjectTemplate in 1.7, so the DB-loaded
engine.objects.ItemTemplate, LOAD_ITEM_TEMPLATES and linkCacheTemplates
are dead. No value changes: nothing read the legacy maps any more.
The boot log loses the legacy per-type count and the link warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 08:53:14 -04:00
MagicBotandClaude Opus 5.5 6b4e9815e0 Switch Item.template and MobLoot to CObjectTemplate
Item.template is now the cache template from CObjectTemplate.lookup
instead of the legacy DB ItemTemplate, so item.template.cacheTemplate.X
becomes item.template.X. MobLoot, LootManager, ItemManager.isTwoHanded/
isShield and CombatManager.getSwingAnimation take a CObjectTemplate.

No value changes: every getter already read the cache template through
the bridge, and the lookup resolves the same 7586 ids as
static_item_templates with the same item_type (offline parity p17.py,
0 differences).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 07:55:28 -04:00
MagicBotandClaude Opus 5.5 70ea9b3bc9 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>
2026-10-20 07:37:54 -04:00
MagicBotandClaude Opus 5.5 dc4a9ee08a 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>
2026-10-19 12:44:35 -04:00
MagicBotandClaude Opus 5.5 b8ac8cce3e Read item_type through the cache template bridge
Every consumer of the legacy ItemTemplate item_type now reads
template.cacheTemplate.getItemType(). Left on the legacy field: the
type count in dbItemHandler.LOAD_ITEM_TEMPLATES, which runs before the
bridge is linked. The charter checks already read DeedTemplate.

Parity (offline, static_item_templates vs the template
CObjectIndex.lookup picks, scripts/p14.py, 7586 templates: ITEM 4011,
DEED 880, RUNE 2695): 0 differences in item_type. No value changes
expected.

JSON-Refactor-Plan Task 1.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:43:57 -04:00
MagicBotandClaude Opus 5.5 ef6fe4aa5b Skip rubble when locating a city's warehouse building at load
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 09:21:57 -04:00
MagicBotandClaude Opus 5.5 0865a7be74 Log only the JSON error and workorder ID when a workorder fails to load
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 08:24:04 -04:00
MagicBotandClaude Opus 5.5 a079deef8d Log only the JSON error and city UUID when a warehouse fails to load
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 08:23:18 -04:00
MagicBotandClaude Opus 5.5 2a2c528981 Fix NPC rune sets storing the set id instead of the rune id
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:06:10 -04:00
MagicBot ab96cfcda4 Header update 2026-07-26 19:08:44 -04:00
MagicBot 84347f8290 statAlt used as offset to terrain. 2026-01-13 14:56:06 -05:00
MagicBot d257ce50cf Sanity check for null city. 2024-06-18 11:56:19 -04:00
MagicBot 24215e21c9 Sanity check for deleted vendors 2024-06-12 14:15:19 -04:00
MagicBot 1d673ca2e5 Sanity check for deleted vendors 2024-06-12 14:04:19 -04:00
MagicBot 634f1478ce Removed custom exception candy 2024-05-12 13:36:47 -04:00
MagicBot 4796f7042d Bugfix in update_value 2024-05-12 11:09:45 -04:00
MagicBot 161335da26 Comment cleanup 2024-05-10 10:12:45 -04:00
MagicBot 7f1bc2a4b7 Update to workOrder loading. 2024-05-10 09:50:14 -04:00
MagicBot e37a4fab38 Update to workOrder loading. 2024-05-10 09:44:11 -04:00
MagicBot 2760a45d2f Early exit moved to run() 2024-05-10 09:39:43 -04:00
MagicBot 47a93f6545 sql parm count fix 2024-05-06 13:56:18 -04:00
MagicBot 0cff40070b Realm derived not stored 2024-05-06 13:33:28 -04:00
FatBoy 60b8843563 Added ./setrace command 2024-05-04 21:38:06 -05:00
FatBoy 042f7c675f cleanup dbEffectsResourceCostHandler 2024-04-28 13:28:53 -05:00
MagicBot 3c4d8239db Charter template id is stored not ordinal 2024-04-28 14:18:13 -04:00
MagicBot e1e72b71bd Better name for context 2024-04-27 07:24:57 -04:00
MagicBot 9850b54981 Comment cleanup 2024-04-25 09:22:50 -04:00
MagicBot bcb40fecbb Loading effect costmap data at bootsrap 2024-04-23 14:56:30 -04:00
MagicBot 81f86ceca9 Code written to refactor db call out of effect costs. 2024-04-23 14:36:01 -04:00
MagicBot d590511035 Code written to refactor db call out of effect costs. 2024-04-23 14:27:12 -04:00
MagicBot f48b9f10e1 Code written to refactor db call out of effect costs. 2024-04-23 14:25:19 -04:00
MagicBot 30787f7ae2 Remnants of old garbage system removed 2024-04-23 12:25:26 -04:00
MagicBot 50a169149f Resubmit unfinished workorders 2024-04-22 16:33:29 -04:00
MagicBot 286a76b1de More workorder loading work 2024-04-22 16:07:25 -04:00
MagicBot 73e30062ea Method to load workorders on bootstrap 2024-04-22 16:02:22 -04:00
MagicBot 7300af9073 Method to load workorders on bootstrap 2024-04-22 15:49:57 -04:00