Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 24.05.2006, 02:55   #1
torune
Архивный участник
 
Join Date: Jul 2005
Posts: 371
Default [share]void RequestEvaluate()

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.

Code:
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;		
		}
	}
}
torune is offline  
 


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 23:16.