[1.13c] Hp/MP Potion Class Bonuses

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
zjat
Junior Member
Champion of the Light
Posts: 324
Joined: Tue Jan 18, 2011 10:59 pm
United States of America

[1.13c] Hp/MP Potion Class Bonuses

Post by zjat » Tue Apr 02, 2024 11:18 pm

I was looking at this and didn't see an updated reference for 1.13c. So I thought I'd share:

Original Post
viewtopic.php?f=8&t=40504

[1.13c] D2Common

HP Potions

Code: Select all

00022260   8B5424 04        	MOV EDX,DWORD PTR SS:[ESP+4]
00022264   85D2			TEST EDX,EDX
00022266   8B4C24 08       	MOV ECX,DWORD PTR SS:[ESP+8]
0002226A   8BC1			MOV EAX,ECX
0002226C   74 24		JE SHORT 00022292
0002226E   833A 00		CMP DWORD PTR DS:[EDX],0
00022271   75 1F		JNZ SHORT 00022292
00022273   8B52 04		MOV EDX,DWORD PTR DS:[EDX+4]
00022276   83FA 06		CMP EDX,6				;  Switch (cases 0..6) 
00022279   77 1A		JA SHORT 00022295
0002227B   0FB692 A422D76F  	MOVZX EDX,BYTE PTR DS:[EDX+6FD722A4]
00022282   FF2495 9822D76F  	JMP DWORD PTR DS:[EDX*4+6FD72298]
00022289   8BC1             	MOV EAX,ECX				;  Cases 0,3,6 of switch				|| ama, pal, asn
0002228B   D1F8             	SAR EAX,1
0002228D   03C1             	ADD EAX,ECX
0002228F   C2 0800          	RETN 8
00022292   8D0409           	LEA EAX,DWORD PTR DS:[ECX+ECX]
00022295   C2 0800          	RETN 8
00022298   8922            	MOV DWORD PTR DS:[EDX],ESP
0002229A   D7               	XLAT BYTE PTR DS:[EBX+AL]
0002229B   6F               	OUTS DX,DWORD PTR ES:[EDI]
0002229C   92               	XCHG EAX,EDX
0002229D   22D7             	AND DL,BH
0002229F   6F               	OUTS DX,DWORD PTR ES:[EDI]
000222A0   95               	XCHG EAX,EBP
000222A1   22D7             	AND DL,BH
000222A3   6F               	OUTS DX,DWORD PTR ES:[EDI]
000222A4   00               						; Index table
000222A5   02
000222A6   02
000222A7   00             
000222A8   01
000222A9   02             
000222AA   00

MP Potions

Code: Select all

00022210   8B4C24 04        MOV ECX,DWORD PTR SS:[ESP+4]
00022214   85C9             TEST ECX,ECX
00022216   8B5424 08        MOV EDX,DWORD PTR SS:[ESP+8]
0002221A   8BC2             MOV EAX,EDX
0002221C   74 27            JE SHORT 00022245
0002221E   8339 00          CMP DWORD PTR DS:[ECX],0
00022221   75 22            JNZ SHORT 00022245
00022223   8B49 04          MOV ECX,DWORD PTR DS:[ECX+4]
00022226   83F9 06          CMP ECX,6					;  Switch (cases 0..6) 
00022229   77 1A            JA SHORT 00022245
0002222B   0FB689 5422D76F  MOVZX ECX,BYTE PTR DS:[ECX+6FD72254]
00022232   FF248D 4822D76F  JMP DWORD PTR DS:[ECX*4+6FD72248]
00022239   8D0412           LEA EAX,DWORD PTR DS:[EDX+EDX]
0002223C   C2 0800          RETN 8
0002223F   8BC2             MOV EAX,EDX					;  Cases 0,3,6 of switch  ama, pal, asn
00022241   D1F8             SAR EAX,1
00022243   03C2             ADD EAX,EDX
00022245   C2 0800          RETN 8
00022248   3F               AAS
00022249   22D7             AND DL,BH
0002224B   6F               OUTS DX,DWORD PTR ES:[EDI]
0002224C   3922             CMP DWORD PTR DS:[EDX],ESP
0002224E   D7               XLAT BYTE PTR DS:[EBX+AL]
0002224F   6F               OUTS DX,DWORD PTR ES:[EDI]
00022250   45               INC EBP
00022251   22D7             AND DL,BH
00022253   6F               OUTS DX,DWORD PTR ES:[EDI]
00022254   00               						; MP potion class bonus table
00022255   02
00022256   02
00022257   00                
00022258   01
00022259   02 
0002225A   00         

Post Reply

Return to “Code Editing”