View Single Post
Old 11.07.2006, 16:29   #87
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

Yep, those are possible. Currently working on converting some hex fixes I added before into DLL hooks, so I can start injecting CharInfo and UserInfo with my own information.

You can do it almost the same way you hex, just make the jump go to the DLL instead.

Here is an example of how I hooked the AskJoinParty packet function. The code for my rewritten code is back a few posts.

Code:
//AskJoinParty Packet Fix (Yea, related to party, but this is more of a server packet fix)
BYTE * HookAskJoinPartyPacketAddr = (BYTE *)0x00510A35;
*HookAskJoinPartyPacketAddr = (BYTE)0xE9;
DWORD * HookAskJoinPartyPacketAddr2 = (DWORD *)0x00510A36;
*HookAskJoinPartyPacketAddr2 = (DWORD)AskJoinPartyPacketFix;
#ifdef __DEBUG__
	file << "Wrote L2Server." << std::hex << HookAskJoinPartyPacketAddr2 << " with AskJoinParty Packet Fix.  New jump address: " << std::hex << *HookAskJoinPartyPacketAddr2 << ".\n";
	file.flush();
#endif
*HookAskJoinPartyPacketAddr2 -= (0x00510A35+5); //rebase our jmp address
HookAskJoinPartyPacketAddr += 5;
*HookAskJoinPartyPacketAddr = (BYTE)0x90;
mcrabben7 is offline