Inventories: data for slots 6-7, JSON in save files

Weapon sets and combat-art slots 6-7 live in a shadow inventory per
inventory; the slot methods run the original code on it for slots >= 5,
so item references, icon resources and selection events stay the
game's own. Save games (cInventoryManager::Serialize) and hero files
(saveHero / loadHero) store inventories as JSON ("SRIJ" + length);
vanilla blocks are still read, which migrates old saves. Multiplayer
transfers keep the binary format. nlohmann/json fetched via git.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-15 00:26:35 +02:00
1 parent 37634c77ba
commit 998e315d98
7 files changed
+754 -4

No files matched your search

+6
View File
@@ -104,3 +104,9 @@
0x005da880 cInventoryEntry::GetPotionRef
0x0057f750 SlotCountForLevel # table 0x95503c, max 5
0x008110d0 GameWindowProc # in-game window procedure: keys (dead keys, modifiers 0x182cdec)
0x005def60 cInventoryManager::Serialize # (stream, write, x): all 32 inventories, save games
0x005d9450 cInventoryEntry::GetArtSlotData
0x005de4e0 cInventoryEntry::CollectItemIds # grid items only
0x0055fac0 cCreature::AssignArtToSlot # (art, slot), rejects slot > 4
0x006046f0 ItemDataMgr::saveHero
0x00605900 ItemDataMgr::loadHero