fix(ui): restore authentic 1.13c mercenary hire stone dialog and packet protocol (Hireables.cpp / D2Common ordinal 10458) #558
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Bug Report: Mercenary Hire UI & Packet Protocol (1.13c Ground Truth Mismatch)
Visual Evidence & Symptoms (
play.html)Reference: https://screenshot-v2.corp.google.com/2qe6rvuna5ci8
320x432dark rectangle at(80, 60)with an[X]button, instead of the authentic centered490x350carved stone dialog (D2Client.dll0x6faf9440+dialog.cpp0x6fb53e40).i * 68) with no scrollbar, overflowing past 432px all the way down toy = 720pxover the bottom control bar (ctrlpnl-800.png) and health globe.Kashya / talk / hire / cancel) in the center of the screen and the left hire panel are open at the same time becauseClientWorld.applyClientCommandresetswindow: 'none'when sending0x38 NpcEntityAction(3), causingHudModel.syncNpcInteraction()to re-openwp.npcMenuon top of the hire panel when0x4F/0x4Earrives from the server.level = (seed % 15) + 5,cost = level * 150 + 100,name = Mercenary #${nameId},HP = 40 + level * 12,DEF = 20 + level * 6) insrc/client/ui-model/hud-model.ts, completely ignoringHireling.txt/hireling.binandD2Common.dllordinal 10458 (0x6fd7ccc0).0x36(MercHire) Protocol Mismatch: When hiring, the client sendsseedinstead ofwMercName(nameId), causing authentic D2GS (D2Game.dll0x6fcdd5e0) to reject the transaction because candidate verification fails at0x6fcdd490.300x160confirmation prompt (0x6faf7500) warning that the current mercenary and their equipped gear will be lost.Diablo II v1.13c Binary Ground Truth
D2Common.dllOrdinals 109880x6fd7c9e0& 104580x6fd7ccc0):hireling.binname ID range[NameFirst..NameLast]to mapwMercNameto act index (0..3).Hireling.txtand applies D2's 64-bit Linear Congruential Generator (seedLo = dwSeed >>> 0,seedHi = 666, multiplier0x6AC690C5) to pick sub-type, level (Math.max(2, playerLevel + levelOffset - 5)), HP, STR, DEX, DEF, hire cost (Math.trunc((baseCost * (100 + 15 * levelDelta)) / 100)), and ability description (bHireDesc).D2Client.dll&D2Game.dll):0x38 NpcEntityAction(action: 3, npcId, selfId)(0x6faf8b67).0x4F MercForHireListStart(1B) followed by up to 100x4E MercForHire(7B:u8 0x4E | u16 wMercName | u32 dwSeed).0x36 MercHire(9B) sendsu8 0x36 | u32 npcId | u32 wMercName(the zero-extendedwMercName/nameId, NOTdwSeed).D2Client.dll0x6faf9440+0x6fb17d00+0x6faf7500):490x350stone dialog atx = (screenWidth - 490) / 2 = 155, y = screenHeight / 2 - 195 = 105withboxpieces.dc6frame.y = 126:ItemDesc1sformatted withtotalGold("Your Gold: %d Hire which Mercenary?"/"你的金錢: %d 雇用那個傭兵? ").x = 155, y = 140, w = 490, h = 280withtextslid.dc6scrollbar control.font16(Line 1:<Name> - Lvl: <lvl> Life: <hp> Def: <def> Cost: <cost>; Line 2:" "+<HireDesc>). Color isblue(3) when hovered/selected,white(0) unselected.y = 420: String0x0d48(Back:"cancel"/"取消"), returning to NPC menu (0x6faf9090).0x6faf7500): If player already has a mercenary, prompt300x160stone box with String0x0d18(VerifyTransaction9:"This Mercenary will replace your current one."/"這個傭兵會換掉前一位。"),Yes/No.