torune
24.05.2006, 02:55
since when lineage2 community becomes a cracking/hacking community instead of developing community.
shame on you all.
btw: i moved some codes, if you understand what's going on and know how code, you surely wont be stopped by these small /*TODO*/ bugs.
void __cdecl RequestEvaluate(BYTE *pBuffer, BYTE *pUser, BYTE *pSocket)
{
BYTE * pTargetData;
BYTE * pTargetSocket;
wchar_t* szMyName;
wchar_t* szTargetName;
wchar_t* szBuffer;
int nMyAppraise;
int nTargetCommend;
char * szSqlQuery;
if (pUser!=NULL)
{
__asm
{
mov esi, pUser;
mov eax, [esi+0f54h];
mov eax, [eax+378h];
cmp eax, 10;
jnb Jump_1;
push 898; //system message id 898
push 7ah;
push sFormat_1;
push pSocket;
call fSendToSinglePlayer;
add esp, 16;
jmp Jump_0;
Jump_1:
push esi;
call GetUserinfoEx;
mov esi, eax;
mov eax, [esi]USERINFOEX.RecomLeft
test eax, eax;
ja Jump_2;
push 833; //system message id 833
push 7ah;
push sFormat_1;
push pSocket;
call fSendToSinglePlayer;
add esp, 16;
jmp Jump_0;
Jump_2:
mov eax, pBuffer;
mov eax, dword ptr ds:[eax];
push eax;
call getCreature
mov ecx, eax;
cmp ecx, pUser;
jne Jump_3;
push 829; //system message id 829
push 7ah;
push sFormat_1;
push pSocket;
call fSendToSinglePlayer;
add esp, 16;
jmp Jump_0;
Jump_3:
mov pTargetData, ecx;
mov eax, [ecx+19B8h];
mov pTargetSocket, eax;
push ecx;
call GetUserinfoEx;
mov ecx, eax;
cmp [ecx]USERINFOEX.RecomHave, 255;
jb Jump_4;
push 1188 //system message id 1188
push 07Ah
push sFormat_1;
push pSocket
call fSendToSinglePlayer;
add esp, 16
jmp Jump_0;
Jump_4:
dec [esi]USERINFOEX.RecomLeft;
inc [ecx]USERINFOEX.RecomHave;
mov eax, [esi]USERINFOEX.RecomLeft;
mov nMyAppraise, eax;
mov eax, [ecx]USERINFOEX.RecomHave;
mov nTargetCommend, eax;
mov eax, pUser;
mov eax, [eax+0f54h];
add eax, 0a0h;
mov szMyName, eax;
mov eax, pTargetData;
mov eax, [eax+0f54h];
add eax, 0a0h;
mov szTargetName, eax;
}
szBuffer = (wchar_t *)GlobalAlloc(GMEM_ZEROINIT, 512);
wsprintfW(szBuffer, sqlQuery_1, nMyAppraise, szMyName, nTargetCommend, szTargetName);
szSqlQuery = UnicodeToGB2312(szBuffer);
m_dbConn.ExecuteSQL(szSqlQuery);
delete(szSqlQuery);
GlobalFree(szBuffer);
__asm
{
push nMyAppraise
push 1;
push szTargetName
push 0;
push 2;
push 830 //system message id 830
push 7Ah
push sFormat_10;
push pSocket
call fSendToSinglePlayer;
push szMyName
push 0
push 1
push 831 //system message id 831
push 7Ah
push sFormat_9
push pTargetSocket
call fSendToSinglePlayer;
add esp, 64;
}
}
}
shame on you all.
btw: i moved some codes, if you understand what's going on and know how code, you surely wont be stopped by these small /*TODO*/ bugs.
void __cdecl RequestEvaluate(BYTE *pBuffer, BYTE *pUser, BYTE *pSocket)
{
BYTE * pTargetData;
BYTE * pTargetSocket;
wchar_t* szMyName;
wchar_t* szTargetName;
wchar_t* szBuffer;
int nMyAppraise;
int nTargetCommend;
char * szSqlQuery;
if (pUser!=NULL)
{
__asm
{
mov esi, pUser;
mov eax, [esi+0f54h];
mov eax, [eax+378h];
cmp eax, 10;
jnb Jump_1;
push 898; //system message id 898
push 7ah;
push sFormat_1;
push pSocket;
call fSendToSinglePlayer;
add esp, 16;
jmp Jump_0;
Jump_1:
push esi;
call GetUserinfoEx;
mov esi, eax;
mov eax, [esi]USERINFOEX.RecomLeft
test eax, eax;
ja Jump_2;
push 833; //system message id 833
push 7ah;
push sFormat_1;
push pSocket;
call fSendToSinglePlayer;
add esp, 16;
jmp Jump_0;
Jump_2:
mov eax, pBuffer;
mov eax, dword ptr ds:[eax];
push eax;
call getCreature
mov ecx, eax;
cmp ecx, pUser;
jne Jump_3;
push 829; //system message id 829
push 7ah;
push sFormat_1;
push pSocket;
call fSendToSinglePlayer;
add esp, 16;
jmp Jump_0;
Jump_3:
mov pTargetData, ecx;
mov eax, [ecx+19B8h];
mov pTargetSocket, eax;
push ecx;
call GetUserinfoEx;
mov ecx, eax;
cmp [ecx]USERINFOEX.RecomHave, 255;
jb Jump_4;
push 1188 //system message id 1188
push 07Ah
push sFormat_1;
push pSocket
call fSendToSinglePlayer;
add esp, 16
jmp Jump_0;
Jump_4:
dec [esi]USERINFOEX.RecomLeft;
inc [ecx]USERINFOEX.RecomHave;
mov eax, [esi]USERINFOEX.RecomLeft;
mov nMyAppraise, eax;
mov eax, [ecx]USERINFOEX.RecomHave;
mov nTargetCommend, eax;
mov eax, pUser;
mov eax, [eax+0f54h];
add eax, 0a0h;
mov szMyName, eax;
mov eax, pTargetData;
mov eax, [eax+0f54h];
add eax, 0a0h;
mov szTargetName, eax;
}
szBuffer = (wchar_t *)GlobalAlloc(GMEM_ZEROINIT, 512);
wsprintfW(szBuffer, sqlQuery_1, nMyAppraise, szMyName, nTargetCommend, szTargetName);
szSqlQuery = UnicodeToGB2312(szBuffer);
m_dbConn.ExecuteSQL(szSqlQuery);
delete(szSqlQuery);
GlobalFree(szBuffer);
__asm
{
push nMyAppraise
push 1;
push szTargetName
push 0;
push 2;
push 830 //system message id 830
push 7Ah
push sFormat_10;
push pSocket
call fSendToSinglePlayer;
push szMyName
push 0
push 1
push 831 //system message id 831
push 7Ah
push sFormat_9
push pTargetSocket
call fSendToSinglePlayer;
add esp, 64;
}
}
}