I found out my problem in my code. Was a bastard stack issue, but I got it all squared away. Alt + M and Map button work 100% now
Code:
// Reply to Client Packet: RequestShowMiniMap(0xCD)
// Reply Packet Header: 0xB6
// Reply Packet Format: cd
//
// Enables the Alt+M / Map button functionality in-game
//
// Parameters:
// DWORD * packetStart - address of the socket ID (probably)
// int mapID - map to display to the client (default: 1665)
//
void ReplyRequestShowMiniMap(DWORD * packetStart, int mapID)
{
const char * format = "cd";
__asm
{
push mapID //the mapID to load for the player
push 0x00B6 //the packet header
//push 0x009D //packet header in L2J SVN 6.17
push format //packet format 'cd'
push packetStart //pushes the address of the start of the packet
call fCUserSocketSend
add esp, 0x10 //fix our stack pointer
}
}
After that function runs, it returns to the packet handler, immediately returns from there, and then returns to L2Server.0050F8FC.