fix(ui): restore authentic 1.13c mercenary hire stone dialog and packet protocol (#558) #561
Loading…
Reference in New Issue
No description provided.
Delete Branch "fix/issue-558-mercenary-hire-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #558.
Restores authentic Diablo II v1.13c mercenary hire stone dialog, scrollable list control, confirmation warning dialog, and packet protocol per decompiled binary ground truth (
D2Client.dll,D2Common.dll,D2Game.dll,Hireling.txt,textslid.dc6).Resolves the broken placeholder and overflowing cards reported in:
https://screenshot-v2.corp.google.com/2qe6rvuna5ci8
Changes Implemented
Authentic 490x350 Stone Dialog &
textslid.dc6Scrollable List (D2Client.dll0x6faf9440&0x6fb17d00):490x350stone dialog atx = (screenWidth - 490) / 2 = 155, y = screenHeight / 2 - 195 = 105with carvedboxpieces.dc6frame.data/global/ui/menu/textslid.dc6(17 frames of12x13) topublic/assets/ui/textslid.pngandpublic/ui/textslid.png, integrated intopack-ui.ts,pack-ui-assets.ts, andbaked-ui-meta.ts.y = 126formatted infont16white: String0x0d24(ItemDesc1s:"Your Gold: %d Hire which Mercenary?"/"你的金錢: %d 雇用那個傭兵? ") displaying player available gold (playerGold + stashGold).x = 155, y = 140, w = 490, h = 280displaying up to 7 candidates at a time (34px2-line pitch per candidate: Line 1 with name, lvl, hp, def, cost; Line 2 withHireDescability string).textslid.dc6frames 8, 9, 13, 14, 15, 16) activated when candidates > 7, supporting mouse clicks, dragging, and mouse wheel.y = 420: String0x0d48(Back:"cancel"/"取消"), which closes the hire dialog and re-opens the originating NPC menu (D2Client.dll0x6faf9090).npcMenurendering and re-opening while the hire stone dialog is active.64-bit LCG Stat Derivation (
D2Common.dllOrdinals 109880x6fd7c9e0& 104580x6fd7ccc0):src/common/units/hireling-table.tscontaining all 120 compiled records ofhireling.bin.D2Common_10988from mercenary name ID (0Rogue,1Desert Mercenary,2Iron Wolf,4Barbarian).D2Common_1045864-bit LCG (seedLo = dwSeed >>> 0,seedHi = 666, multiplier0x6AC690C5).merc01..merc34,merca201..merca241,MercX101..MercX167) and ability descriptions (strhirespecial1..10,PalMerc*) in both English and Chinese intocanonical-tbl-strings.ts.Replace Mercenary Confirmation Dialog (
D2Client.dll0x6faf7500):300x160stone confirmation dialog with String0x0d18(VerifyTransaction9:"This Mercenary will replace your current one."/"這個傭兵會換掉前一位。"),Yes(0x0d10), andNo(0x0d11).Yesconfirms the transaction and dispatches0x36 MercHire.C2S
0x36MercHire Protocol Fix (D2Game.dll0x6fcdd5e0/0x6fcdd490):hireMercto sendwMercName(nameId) instead ofseedas the secondu32parameter in0x36 MercHire(9B), satisfying authoritative D2GS candidate validation.Testing & Parity Verification:
tests/common/hireling-table.test.tsverifying act resolution, localized names, ability descriptions, and LCG stat calculations.tests/client/hire-dialog.test.tsverifying 490x350 stone dialog rendering, scrolling, hit testing, confirmation dialog, and cancel re-opening NPC menu.