Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Server Modifications ONLY!

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 25.12.2005, 01:58   #12
torune
Архивный участник
 
Join Date: Jul 2005
Posts: 371
Default

For some people this might be useful, just finished a dll to do it automaticly
i dont gurantee the code works
Code:
//ITEMDATA
typedef struct{	
	DWORD field;
	LPWSTR string;
	DWORD value;
	DWORD empty;
} ITEMDATA, *LPITEMDATA;

void copyBlock(LPDWORD destination, const DWORD* source, int _size)
{
	for(int i=_size>>2;--i>=0;) {
		*destination = *source;
		destination += 4;
		source += 4;
	}
}

void replaceByte(LPDWORD destination, BYTE data)
{
	*destination = data;
}

L2EXT_API void parseItemData()
{
	int ItemDataType
	LPITEMDATA _lpDwords;
	LPITEMDATA _lpCopy = new ITEMDATA();
	LPDWORD _lpCounter;
	__asm 
	{
		mov _lpDwords, 0x6C5E48;
		mov _lpCounter, 0x56786F;
		mov ItemDataType, eax;
	}
	copyBlock((LPDWORD)_lpCopy, (LPDWORD)_lpDwords, 16);

	_lpDwords->field = 0x26;
	_lpDwords->string = 0x6C5E58;
	_lpDwords->value = 0x06;
	_lpDwords->empty = 0;

	replaceByte(_lpCounter, 0x81);
	__asm {
		push ItemDataType;
		CALL _fnItemDataParser;
		ADD ESP,4;
		push eax
	}

	replaceByte(_lpCounter, 0x80);
	copyBlock((LPDWORD)_lpDwords,(LPDWORD)_lpCopy,  16);
	delete _lpCopy;
	_asm pop eax;
}
torune is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 10:56.