[1.09] Changing value displayed by potions

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
Forum Regular
Posts: 611
Joined: Mon Oct 22, 2007 9:46 am
Location: England
Great Britain


[1.09] Changing value displayed by potions

Post by Kieran » Sun Feb 10, 2019 6:09 pm

Hello Everyone,

I have recently changed the values in D2Game.dll to alter the values of health and mana potions to reflect the amounts given to the later versions of the game.

This worked fine without any problems however the game is still displaying the old values. I am aware that changes will be made to D2Client.dll and Mnw1995 kindly provided me with the spell desc handler:

Code: Select all

6FADEF40   83EC 28          SUB ESP,28
6FADEF43   53               PUSH EBX
6FADEF44   56               PUSH ESI
6FADEF45   57               PUSH EDI
6FADEF46   8BF2             MOV ESI,EDX
6FADEF48   B9 9B0F0000      MOV ECX,0F9B
6FADEF4D   E8 F20A0800      CALL <JMP.&D2Lang.#10004>
6FADEF52   B9 9E0F0000      MOV ECX,0F9E
6FADEF57   894424 0C        MOV DWORD PTR SS:[ESP+C],EAX
6FADEF5B   E8 E40A0800      CALL <JMP.&D2Lang.#10004>
6FADEF60   8BF8             MOV EDI,EAX
6FADEF62   8B4424 38        MOV EAX,DWORD PTR SS:[ESP+38]
6FADEF66   897C24 10        MOV DWORD PTR SS:[ESP+10],EDI
6FADEF6A   8B90 88010000    MOV EDX,DWORD PTR DS:[EAX+188]
6FADEF70   8BC2             MOV EAX,EDX
6FADEF72   83E8 08          SUB EAX,8
6FADEF75   0F84 E9000000    JE D2Client.6FADF064
6FADEF7B   48               DEC EAX
6FADEF7C   0F84 DB000000    JE D2Client.6FADF05D
6FADEF82   8B0D D897B76F    MOV ECX,DWORD PTR DS:[6FB797D8]
6FADEF88   33FF             XOR EDI,EDI
6FADEF8A   85C9             TEST ECX,ECX
6FADEF8C   0F86 F0000000    JBE D2Client.6FADF082
6FADEF92   B8 6097B76F      MOV EAX,D2Client.6FB79760
6FADEF97   3B10             CMP EDX,DWORD PTR DS:[EAX]
6FADEF99   74 11            JE SHORT D2Client.6FADEFAC
6FADEF9B   47               INC EDI
6FADEF9C   83C0 0C          ADD EAX,0C
6FADEF9F   3BF9             CMP EDI,ECX
6FADEFA1  ^72 F4            JB SHORT D2Client.6FADEF97
6FADEFA3   5F               POP EDI
6FADEFA4   5E               POP ESI
6FADEFA5   5B               POP EBX
6FADEFA6   83C4 28          ADD ESP,28
6FADEFA9   C2 0400          RETN 4
6FADEFAC   55               PUSH EBP
6FADEFAD   8D5C24 24        LEA EBX,DWORD PTR SS:[ESP+24]
6FADEFB1   BD 0A000000      MOV EBP,0A
6FADEFB6   8BCB             MOV ECX,EBX
6FADEFB8   FF15 34BBB66F    CALL DWORD PTR DS:[<&D2Lang.??_FUnicode@>; D2Lang.??_FUnicode@@QAEXXZ
6FADEFBE   83C3 02          ADD EBX,2
6FADEFC1   4D               DEC EBP
6FADEFC2  ^75 F2            JNZ SHORT D2Client.6FADEFB6
6FADEFC4   8D047F           LEA EAX,DWORD PTR DS:[EDI+EDI*2]
6FADEFC7   5D               POP EBP
6FADEFC8   C1E0 02          SHL EAX,2
6FADEFCB   8B88 6897B76F    MOV ECX,DWORD PTR DS:[EAX+6FB79768]
6FADEFD1   85C9             TEST ECX,ECX
6FADEFD3   74 14            JE SHORT D2Client.6FADEFE9
6FADEFD5   8B88 6497B76F    MOV ECX,DWORD PTR DS:[EAX+6FB79764]
6FADEFDB   51               PUSH ECX
6FADEFDC   E8 DFDF0400      CALL D2Client.6FB2CFC0
6FADEFE1   50               PUSH EAX
6FADEFE2   E8 6FFC0700      CALL <JMP.&D2Common.#10841>
6FADEFE7   EB 12            JMP SHORT D2Client.6FADEFFB
6FADEFE9   8B90 6497B76F    MOV EDX,DWORD PTR DS:[EAX+6FB79764]
6FADEFEF   52               PUSH EDX
6FADEFF0   E8 CBDF0400      CALL D2Client.6FB2CFC0
6FADEFF5   50               PUSH EAX
6FADEFF6   E8 55FC0700      CALL <JMP.&D2Common.#10842>
6FADEFFB   B9 8E0D0000      MOV ECX,0D8E
6FADF000   8BF8             MOV EDI,EAX
6FADF002   E8 3D0A0800      CALL <JMP.&D2Lang.#10004>
6FADF007   8BD0             MOV EDX,EAX
6FADF009   8BCE             MOV ECX,ESI
6FADF00B   FF15 3CBBB66F    CALL DWORD PTR DS:[<&D2Lang.?strcpy@Unic>; D2Lang.?strcpy@Unicode@@SIPAU1@PAU1@PBU1@@Z
6FADF011   8D4424 14        LEA EAX,DWORD PTR SS:[ESP+14]
6FADF015   57               PUSH EDI
6FADF016   68 3883B76F      PUSH D2Client.6FB78338                   ; ASCII "%ld"
6FADF01B   6A 0A            PUSH 0A
6FADF01D   50               PUSH EAX
6FADF01E   E8 4D0E0800      CALL <JMP.&Storm.#578>
6FADF023   83C4 10          ADD ESP,10
6FADF026   8D5424 14        LEA EDX,DWORD PTR SS:[ESP+14]
6FADF02A   8D4C24 20        LEA ECX,DWORD PTR SS:[ESP+20]
6FADF02E   6A 09            PUSH 9
6FADF030   FF15 6CBBB66F    CALL DWORD PTR DS:[<&D2Lang.?win2Unicode>; D2Lang.?win2Unicode@Unicode@@SIPAU1@PAU1@PBDH@Z
6FADF036   8B3D 40BBB66F    MOV EDI,DWORD PTR DS:[<&D2Lang.?strcat@U>; D2Lang.?strcat@Unicode@@SIPAU1@PAU1@PBU1@@Z
6FADF03C   8BCE             MOV ECX,ESI
6FADF03E   8B5424 0C        MOV EDX,DWORD PTR SS:[ESP+C]
6FADF042   FFD7             CALL EDI
6FADF044   8D5424 20        LEA EDX,DWORD PTR SS:[ESP+20]
6FADF048   8BCE             MOV ECX,ESI
6FADF04A   FFD7             CALL EDI
6FADF04C   8B5424 10        MOV EDX,DWORD PTR SS:[ESP+10]
6FADF050   8BCE             MOV ECX,ESI
6FADF052   FFD7             CALL EDI
6FADF054   5F               POP EDI
6FADF055   5E               POP ESI
6FADF056   5B               POP EBX
6FADF057   83C4 28          ADD ESP,28
6FADF05A   C2 0400          RETN 4
6FADF05D   B9 900D0000      MOV ECX,0D90
6FADF062   EB 05            JMP SHORT D2Client.6FADF069
6FADF064   B9 8F0D0000      MOV ECX,0D8F
6FADF069   E8 D6090800      CALL <JMP.&D2Lang.#10004>
6FADF06E   8BD0             MOV EDX,EAX
6FADF070   8BCE             MOV ECX,ESI
6FADF072   FF15 3CBBB66F    CALL DWORD PTR DS:[<&D2Lang.?strcpy@Unic>; D2Lang.?strcpy@Unicode@@SIPAU1@PAU1@PBU1@@Z
6FADF078   8BD7             MOV EDX,EDI
6FADF07A   8BCE             MOV ECX,ESI
6FADF07C   FF15 40BBB66F    CALL DWORD PTR DS:[<&D2Lang.?strcat@Unic>; D2Lang.?strcat@Unicode@@SIPAU1@PAU1@PBU1@@Z
6FADF082   5F               POP EDI
6FADF083   5E               POP ESI
6FADF084   5B               POP EBX
6FADF085   83C4 28          ADD ESP,28
6FADF088   C2 0400          RETN 4
Though I am still at a loss on what changes I should make to reflect the new values. If anybody has a few minutes to point me in the right direction it would be greatly appreciated.



Post Reply

Return to “Code Editing”