Nice, i was looking for a way to add your previous post (
http://www.postpacific.com/forums/showthread.php?t=9400) into ASM or something.
A question: Can you do this?
Code:
Code:
Public ChargeFix
.const
.code
ChargeFix proc
;SkillInfo = r12+68h
;SkillInfo+0h - wszSkillName
;SkillInfo+8h - skillID
;RBP - pUser
;overwrited code
;.text:00000000006B8BB6 xor esi, esi ;Clear ESI
;.text:00000000006B8BB8 mov [rbp+0BACh], esi ;ZeroCharges
;.text:00000000006B8BBE mov rax, [rbp+0] ;ExitPoint
mov rax, [r12+68h] ;SkillInfo
mov eax, dword ptr [rax+8h] ;SkillID
cmp eax, 105h ;TripleSonicSlash
je FourChargesRequied
cmp eax, 5h ;DoubleSonicSlash
je ThreeChargesRequied
cmp eax, 6h ;SonicBlaster
je TwoChargesRequied
cmp eax, 11Ch ;HurricaneAssault
je TwoChargesRequied
cmp eax, 36h ;ForceBlaster
je OneChargeRequied
;Edit
cmp eax, 7h ;Sonic Buster
je NoChargesRequied
cmp eax, 9h ;Sonic Storm
je NoChargesRequied
cmp eax, 10h ;Force Buster
je NoChargesRequied
cmp eax, 23Ch ;Force Storm
je NoChargesRequied
;Edit
jmp Exit_Point
FourChargesRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 4h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point
ThreeChargesRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 3h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point
TwoChargesRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 2h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point
OneChargeRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 1h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point
;Edit
NoChargeRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 0h ;Or just delete the line.
mov [rbp+0BACh], eax ;Same here, delete the line.
jmp Exit_Point
;Edit
Exit_Point:
xor esi, esi
mov rax, 006B8BBEh
jmp rax
ChargeFix endp
end
To add support to ranged - AOE force-using skills. Or just by going to "exit_point" you prevent the loss of charges by using those skills? Those skills dont use any charges, but they still need to know how many charges do you have to calculate the damage they do.
i'm kinda stumped on the "xor esi,esi" and what does it mean. Does that line delete the charges? or it's got nothing to do with the charge system?
Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник.