Example #1
0
void NSPacketProc::RegisterPacketProc()
{
	PacketHandler* poPacketHandler = (PacketHandler*)g_poContext->GetPacketHandler();
	// 外部消息
	poPacketHandler->RegsterExterPacketProc(NSMsgType::eLuaCmdMsg, (void*)OnLuaCmdMsg);

	// 内部消息
	poPacketHandler->RegsterInnerPacketProc(NSMsgType::eLuaRpcMsg, (void*)OnLuaRpcMsg);
	poPacketHandler->RegsterInnerPacketProc(NSMsgType::eLuaCmdMsg, (void*)OnLuaCmdMsgInner);
	poPacketHandler->RegsterInnerPacketProc(NSSysCmd::ssRegServiceRet, (void*)OnRegisterRouterCallback);
}
Example #2
0
void NSPacketProc::RegisterPacketProc()
{
	PacketHandler* poPacketHandler = g_poContext->GetPacketHandler();
	poPacketHandler->RegsterInnerPacketProc(NSMsgType::eLuaRpcMsg, (void*)OnLuaRpcMsg);
	poPacketHandler->RegsterInnerPacketProc(NSMsgType::eLuaCmdMsg, (void*)OnLuaCmdMsg);

	poPacketHandler->RegsterInnerPacketProc(NSSysCmd::ssRegServiceRet, (void*)OnRegisterRouterCallback);
	//poPacketHandler->RegsterInnerPacketProc(NSSysCmd::ssClientClose, (void*)OnClientClose);

	poPacketHandler->RegsterInnerPacketProc(NSCltSrvCmd::cRoleStartRunReq, (void*)OnRoleStartRun);
	poPacketHandler->RegsterInnerPacketProc(NSCltSrvCmd::cRoleStopRunReq, (void*)OnRoleStopRun);
}
Example #3
0
void NSPacketProc::RegisterPacketProc()
{
	PacketHandler* poPacketHandler = g_poContext->GetPacketHandler();
	poPacketHandler->RegsterInnerPacketProc(NSMsgType::eLuaRpcMsg, (void*)OnLuaRpcMsg);
	poPacketHandler->RegsterInnerPacketProc(NSMsgType::eLuaCmdMsg, (void*)OnLuaCmdMsg);

	poPacketHandler->RegsterInnerPacketProc(NSSysCmd::ssRegServiceRet, (void*)OnRegisterRouterCallback);
	poPacketHandler->RegsterInnerPacketProc(NSSysCmd::ssServiceClose, (void*)OnServiceClose);
	poPacketHandler->RegsterInnerPacketProc(NSSysCmd::ssClientClose, (void*)OnClientClose);

	poPacketHandler->RegsterInnerPacketProc(NSCltSrvCmd::cPlayerRun, (void*)OnPlayerRun);
	poPacketHandler->RegsterInnerPacketProc(NSCltSrvCmd::cPlayerStopRun, (void*)OnPlayerStopRun);
	poPacketHandler->RegsterInnerPacketProc(NSCltSrvCmd::ppActorStartAttack, (void*)OnActorStartAttack);
	poPacketHandler->RegsterInnerPacketProc(NSCltSrvCmd::ppActorStopAttack, (void*)OnActorStopAttack);
	poPacketHandler->RegsterInnerPacketProc(NSCltSrvCmd::cActorHurted, (void*)OnActorHurted);
	poPacketHandler->RegsterInnerPacketProc(NSCltSrvCmd::cActorDamage, (void*)OnActorDamage);
	poPacketHandler->RegsterInnerPacketProc(NSCltSrvCmd::cEveHurted, (void*)OnEveHurted);
}