[1.09d] Display Life/Mana Values

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
Kieran
Forum Regular
Angel
Posts: 591
Joined: Mon Oct 22, 2007 9:46 am
Location: England
Contact:
Great Britain

Hand-picked

[1.09d] Display Life/Mana Values

Post by Kieran » Thu Mar 08, 2018 4:53 pm

Hello Guys,

Having a little bit of a nightmare with trying to get Life and Mana Values to always display above the globes in version 1.09.

I have looked at the following thread: viewtopic.php?f=8&t=58894

This explains things fairly well and from my understanding it appears to be removing the co-ordinates for the mouse over area; making the mouse over the whole screen. This bit I can achieve fine which sets life to always display but not mana. It is the next step that is throwing me off as the code starts to vary at this point.

Is anybody able to help out?

For reference here is the function for v1.09.

Cheers guys,

Kieran

*Update: I've separated the function out so its a bit easier to digest/read.

[Display Function]

Code: Select all

6FAF8AE0   81EC 5C020000    SUB ESP,25C
6FAF8AE6   53               PUSH EBX
6FAF8AE7   55               PUSH EBP
6FAF8AE8   56               PUSH ESI
6FAF8AE9   57               PUSH EDI
6FAF8AEA   E8 D1440300      CALL D2Client.6FB2CFC0
6FAF8AEF   894424 10        MOV DWORD PTR SS:[ESP+10],EAX
6FAF8AF3   E8 F8CE0500      CALL D2Client.6FB559F0
6FAF8AF8   8BD8             MOV EBX,EAX
6FAF8AFA   E8 01CF0500      CALL D2Client.6FB55A00
6FAF8AFF   8BE8             MOV EBP,EAX
6FAF8B01   8D7424 14        LEA ESI,DWORD PTR SS:[ESP+14]
6FAF8B05   BF 64000000      MOV EDI,64
6FAF8B0A   8BCE             MOV ECX,ESI
6FAF8B0C   FF15 34BBB66F    CALL DWORD PTR DS:[<&D2Lang.??_FUnicode@>; D2Lang.??_FUnicode@@QAEXXZ
6FAF8B12   83C6 02          ADD ESI,2
6FAF8B15   4F               DEC EDI
6FAF8B16  ^75 F2            JNZ SHORT D2Client.6FAF8B0A
6FAF8B18   8DB424 A4010000  LEA ESI,DWORD PTR SS:[ESP+1A4]
6FAF8B1F   BF 64000000      MOV EDI,64
6FAF8B24   8BCE             MOV ECX,ESI
6FAF8B26   FF15 34BBB66F    CALL DWORD PTR DS:[<&D2Lang.??_FUnicode@>; D2Lang.??_FUnicode@@QAEXXZ
6FAF8B2C   83C6 02          ADD ESI,2
6FAF8B2F   4F               DEC EDI
6FAF8B30  ^75 F2            JNZ SHORT D2Client.6FAF8B24
[Health Hover Function & Co-Ordinates]

Code: Select all

6FAF8B32   A1 E040B76F      MOV EAX,DWORD PTR DS:[6FB740E0]
6FAF8B37   83FB 1E          CMP EBX,1E ; Health Hover X Co-Ordinate Left
6FAF8B3A   0F8C CE000000    JL D2Client.6FAF8C0E
6FAF8B40   83FB 6E          CMP EBX,6E ; Health Hover X Co-Ordinate Right
6FAF8B43   0F8F C5000000    JG D2Client.6FAF8C0E
6FAF8B49   8D48 B5          LEA ECX,DWORD PTR DS:[EAX-4B] ; Health Hover Y Co-Ordinate Top
6FAF8B4C   3BE9             CMP EBP,ECX
6FAF8B4E   0F8C BA000000    JL D2Client.6FAF8C0E
6FAF8B54   8D50 F1          LEA EDX,DWORD PTR DS:[EAX-F] ; Health Hover Y Co-Ordinate Bottom
6FAF8B57   3BEA             CMP EBP,EDX
6FAF8B59   0F8F AF000000    JG D2Client.6FAF8C0E
6FAF8B5F   B9 06000000      MOV ECX,6
6FAF8B64   E8 87010000      CALL D2Client.6FAF8CF0
6FAF8B69   8BF0             MOV ESI,EAX
6FAF8B6B   8B4424 10        MOV EAX,DWORD PTR SS:[ESP+10]
6FAF8B6F   50               PUSH EAX
6FAF8B70   C1FE 08          SAR ESI,8
6FAF8B73   E8 4E5A0600      CALL <JMP.&D2Common.#10564>
6FAF8B78   8BD8             MOV EBX,EAX
6FAF8B7A   C1FB 08          SAR EBX,8
6FAF8B7D   E8 3E440300      CALL D2Client.6FB2CFC0
6FAF8B82   8338 00          CMP DWORD PTR DS:[EAX],0
6FAF8B85   75 14            JNZ SHORT D2Client.6FAF8B9B
6FAF8B87   8378 0C 11       CMP DWORD PTR DS:[EAX+C],11
6FAF8B8B   74 0E            JE SHORT D2Client.6FAF8B9B
6FAF8B8D   85F6             TEST ESI,ESI
6FAF8B8F   7C 0A            JL SHORT D2Client.6FAF8B9B
6FAF8B91   83FE 01          CMP ESI,1
6FAF8B94   7F 05            JG SHORT D2Client.6FAF8B9B
6FAF8B96   BE 01000000      MOV ESI,1
6FAF8B9B   8DBC24 DC000000  LEA EDI,DWORD PTR SS:[ESP+DC]
6FAF8BA2   BD 64000000      MOV EBP,64
6FAF8BA7   8BCF             MOV ECX,EDI
6FAF8BA9   FF15 34BBB66F    CALL DWORD PTR DS:[<&D2Lang.??_FUnicode@>; D2Lang.??_FUnicode@@QAEXXZ
6FAF8BAF   83C7 02          ADD EDI,2
6FAF8BB2   4D               DEC EBP
6FAF8BB3  ^75 F2            JNZ SHORT D2Client.6FAF8BA7
6FAF8BB5   53               PUSH EBX
6FAF8BB6   56               PUSH ESI
[Health String & Co-Orindates]

Code: Select all

6FAF8BB7   B9 45100000      MOV ECX,1045 ; Health Table String
6FAF8BBC   E8 836E0600      CALL <JMP.&D2Lang.#10004>
6FAF8BC1   8D8C24 E4000000  LEA ECX,DWORD PTR SS:[ESP+E4]
6FAF8BC8   50               PUSH EAX
6FAF8BC9   51               PUSH ECX
6FAF8BCA   6A 64            PUSH 64
6FAF8BCC   FF15 48BBB66F    CALL DWORD PTR DS:[<&D2Lang.?sprintf@Uni>; D2Lang.?sprintf@Unicode@@SAXHPAU1@PBU1@ZZ
6FAF8BD2   83C4 14          ADD ESP,14
6FAF8BD5   8D9424 DC000000  LEA EDX,DWORD PTR SS:[ESP+DC]
6FAF8BDC   8D4C24 14        LEA ECX,DWORD PTR SS:[ESP+14]
6FAF8BE0   FF15 40BBB66F    CALL DWORD PTR DS:[<&D2Lang.?strcat@Unic>; D2Lang.?strcat@Unicode@@SIPAU1@PAU1@PBU1@@Z
6FAF8BE6   8D4C24 14        LEA ECX,DWORD PTR SS:[ESP+14]
6FAF8BEA   E8 2F700600      CALL <JMP.&D2Win.#10121>
6FAF8BEF   99               CDQ
6FAF8BF0   2BC2             SUB EAX,EDX
6FAF8BF2   8B15 E040B76F    MOV EDX,DWORD PTR DS:[6FB740E0]
6FAF8BF8   6A 00            PUSH 0
6FAF8BFA   83C2 A1          ADD EDX,-5F ; Health Text Position Y Co-Ordinate
6FAF8BFD   6A 00            PUSH 0 ; Text Colour
6FAF8BFF   52               PUSH EDX
6FAF8C00   D1F8             SAR EAX,1
6FAF8C02   BA 41000000      MOV EDX,41 ; Health Text Position X Co-Ordinate
6FAF8C07   2BD0             SUB EDX,EAX
6FAF8C09   E9 C2000000      JMP D2Client.6FAF8CD0 ; Jumps to Write Function
[Mana Hover Function & Co-Ordinates]

Code: Select all

6FAF8C0E   8B0D DC40B76F    MOV ECX,DWORD PTR DS:[6FB740DC]
6FAF8C14   8D51 91          LEA EDX,DWORD PTR DS:[ECX-6F] ; Mana Hover X Co-Ordinate Left
6FAF8C17   3BDA             CMP EBX,EDX
6FAF8C19   0F8C BA000000    JL D2Client.6FAF8CD9
6FAF8C1F   83C1 E1          ADD ECX,-1F ; Mana Hover X Co-Ordinate Right
6FAF8C22   3BD9             CMP EBX,ECX
6FAF8C24   0F8F AF000000    JG D2Client.6FAF8CD9
6FAF8C2A   8D48 B5          LEA ECX,DWORD PTR DS:[EAX-4B] ; Mana Hover Y Co-Ordinate Top
6FAF8C2D   3BE9             CMP EBP,ECX
6FAF8C2F   0F8C A4000000    JL D2Client.6FAF8CD9
6FAF8C35   83C0 F1          ADD EAX,-0F ; Mana Hover Y Co-Ordinate Bottom
6FAF8C38   3BE8             CMP EBP,EAX
6FAF8C3A   0F8F 99000000    JG D2Client.6FAF8CD9
6FAF8C40   B9 08000000      MOV ECX,8
6FAF8C45   E8 A6000000      CALL D2Client.6FAF8CF0
6FAF8C4A   8B5424 10        MOV EDX,DWORD PTR SS:[ESP+10]
6FAF8C4E   8BF0             MOV ESI,EAX
6FAF8C50   52               PUSH EDX
6FAF8C51   C1FE 08          SAR ESI,8
6FAF8C54   E8 775E0600      CALL <JMP.&D2Common.#10565>
6FAF8C59   8BF8             MOV EDI,EAX
6FAF8C5B   8D9C24 DC000000  LEA EBX,DWORD PTR SS:[ESP+DC]
6FAF8C62   C1FF 08          SAR EDI,8
6FAF8C65   BD 64000000      MOV EBP,64
6FAF8C6A   8BCB             MOV ECX,EBX
6FAF8C6C   FF15 34BBB66F    CALL DWORD PTR DS:[<&D2Lang.??_FUnicode@>; D2Lang.??_FUnicode@@QAEXXZ
6FAF8C72   83C3 02          ADD EBX,2
6FAF8C75   4D               DEC EBP
6FAF8C76  ^75 F2            JNZ SHORT D2Client.6FAF8C6A
6FAF8C78   57               PUSH EDI
6FAF8C79   56               PUSH ESI
[Mana String & Co-Ordinates]

Code: Select all

6FAF8C7A   B9 46100000      MOV ECX,1046 ; Mana Table String
6FAF8C7F   E8 C06D0600      CALL <JMP.&D2Lang.#10004>
6FAF8C84   50               PUSH EAX
6FAF8C85   8D8424 E8000000  LEA EAX,DWORD PTR SS:[ESP+E8]
6FAF8C8C   50               PUSH EAX
6FAF8C8D   6A 64            PUSH 64
6FAF8C8F   FF15 48BBB66F    CALL DWORD PTR DS:[<&D2Lang.?sprintf@Uni>; D2Lang.?sprintf@Unicode@@SAXHPAU1@PBU1@ZZ
6FAF8C95   83C4 14          ADD ESP,14
6FAF8C98   8D9424 DC000000  LEA EDX,DWORD PTR SS:[ESP+DC]
6FAF8C9F   8D4C24 14        LEA ECX,DWORD PTR SS:[ESP+14]
6FAF8CA3   FF15 40BBB66F    CALL DWORD PTR DS:[<&D2Lang.?strcat@Unic>; D2Lang.?strcat@Unicode@@SIPAU1@PAU1@PBU1@@Z
6FAF8CA9   8D4C24 14        LEA ECX,DWORD PTR SS:[ESP+14]
6FAF8CAD   E8 6C6F0600      CALL <JMP.&D2Win.#10121>
6FAF8CB2   8B0D E040B76F    MOV ECX,DWORD PTR DS:[6FB740E0]
6FAF8CB8   99               CDQ
6FAF8CB9   2BC2             SUB EAX,EDX
6FAF8CBB   8B15 DC40B76F    MOV EDX,DWORD PTR DS:[6FB740DC]
6FAF8CC1   D1F8             SAR EAX,1
6FAF8CC3   6A 00            PUSH 0
6FAF8CC5   83C1 A1          ADD ECX,-5F ; Mana Text Position Y Co-Ordinate
6FAF8CC8   2BD0             SUB EDX,EAX
6FAF8CCA   6A 00            PUSH 0 ; Mana Text Colour
6FAF8CCC   51               PUSH ECX
6FAF8CCD   83EA 41          SUB EDX,41 ; Mana Text Position X C-Ordinate
[Print Function For Health & Mana]

Code: Select all

6FAF8CD0   8D4C24 20        LEA ECX,DWORD PTR SS:[ESP+20]
6FAF8CD4   E8 3F6F0600      CALL <JMP.&D2Win.#10117>
6FAF8CD9   5F               POP EDI
6FAF8CDA   5E               POP ESI
6FAF8CDB   5D               POP EBP
6FAF8CDC   5B               POP EBX
6FAF8CDD   81C4 5C020000    ADD ESP,25C
6FAF8CE3   C3               RETN

Post Reply

Return to “Code Editing”