Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Server Modifications ONLY! > Extenders
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 04.03.2008, 21:54   #1
Drag
Guest
 
Posts: n/a
Default BackstabFix

asm, katek... resp xD

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник.
 
Old 04.03.2008, 21:54   #2
roxaz
Guest
 
Posts: n/a
Default BackstabFix

funny thing.. kation tells me all the time that coding in c++ is better than coding in asm, and here we go - he posts asm code ^^

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник.
 
Old 04.03.2008, 21:54   #3
Kation
Guest
 
Posts: n/a
Default BackstabFix

Yes, most of my extender is written in c++ got 2 or 3 hooks in asm, but there are some things that cant be done via c++ or are much better/easier in asm (example if you need to get something from xmm2 etc), i cant see where's the point in forcing extender to be c++ only. For most cases for me coding in c++ is just faster and sometimes safer than doing that in asm.


p.s GotDamageBy is not getting only 2 parameters(pCreature/pEnemy) ;P.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник.
 
Old 04.03.2008, 21:54   #4
Morte
Guest
 
Posts: n/a
Default BackstabFix

Quote:


Originally Posted by Kation
View Post

p.s GotDamageBy is not getting only 2 parameters(pCreature/pEnemy) ;P.

am yes.. it also gets' an int and a bool in the end... wtf are they? )

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник.
 
Old 04.03.2008, 21:54   #5
humordwarf
Guest
 
Posts: n/a
Default BackstabFix

Code:

Code:
double Creature::GotDamageBy(CCreature* creature, CCreature* attacker, double damage, int dmgType, bool dmgFlag);
and what?

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник.
 
Old 04.03.2008, 21:54   #6
Ascian
Guest
 
Posts: n/a
Default BackstabFix

CCreature::GotDamageBy only has 4 arguments not 5. Where'd you get the 5th?

Code:

Code:
mov     ebx, r9d
movsd   xmm6, xmm2
mov     rsi, rdx
mov     rbp, rcx
EDIT: Nevermind, you just have an extra CCreature where there shouldn't be Wink

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник.
 
Old 04.03.2008, 21:54   #7
humordwarf
Guest
 
Posts: n/a
Default BackstabFix

Quote:


Originally Posted by Ascian
View Post

CCreature::GotDamageBy only has 4 arguments not 5. Where'd you get the 5th?

Code:

Code:
mov     ebx, r9d
movsd   xmm6, xmm2
mov     rsi, rdx
mov     rbp, rcx
EDIT: Nevermind, you just have an extra CCreature where there shouldn't be Wink

(screams like that master yoda) use the force, my young jedi... look for 5th parameter on the stack and let the force be with you...

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник.
 
Old 04.03.2008, 21:54   #8
Morte
Guest
 
Posts: n/a
Default BackstabFix

Quote:


Originally Posted by Ascian
View Post

CCreature::GotDamageBy only has 4 arguments not 5. Where'd you get the 5th?

Code:

Code:
mov     ebx, r9d
movsd   xmm6, xmm2
mov     rsi, rdx
mov     rbp, rcx
EDIT: Nevermind, you just have an extra CCreature where there shouldn't be Wink

Code:

Code:
.text:00000000007AF6B8                 mov     byte ptr [rsp+20h], 1  ;unk2
.text:00000000007AF6BD                 mov     r9d, 1    ;unk1
.text:00000000007AF6C3                 movsd   xmm2, dDamage
.text:00000000007AF6C7                 mov     rdx, pSource
.text:00000000007AF6CA                 mov     rcx, pTarget
.text:00000000007AF6CD                 mov     rax, [rax+5F8h]
.text:00000000007AF6D4                 call    rax
5 parameters ) yet as far as i understood, none of them controls whether damage is done to HP or CP. all this stuff is checked later in GotDamageBy @514DB6

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник.
 
Old 15.03.2008, 21:54   #9
songaiyun
Guest
 
Posts: n/a
Default BackstabFix

nice share,but why c++ much harder?

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (3 Days Ago); точное время не сохранилось. Открыть источник.
 
Old 15.03.2008, 21:54   #10
testdude
Guest
 
Posts: n/a
Default BackstabFix

Quote:


Originally Posted by songaiyun
View Post

nice share,but why c++ much harder?

well what if u need something from a register that isnt an argument register or on the stack? u cant get it with C++... with 32bit you could use inline asm and get it but not with 64bit...


example

http://www.postpacific.com/forums/sh...ad.php?t=10239


now you could do some of that code with C++...


void AVE_Hook(int idontcare, wchar_t *wcSkillBuffer)

{

if (!wcscmp(wcSkillBuffer, L"ave_stealth"))

{

// now what?

}

}


but now what do u do? u cant get rbp (CSkillInfo pointer) so u cant set the abnormal ID


for fixing packets and making it so u can connect the new chronicle clients u can easily do most of it with just C++, but for adding the new stuff that is needed to make a real extender... u NEED asm...

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (3 Days Ago); точное время не сохранилось. Открыть источник.
 
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:44.