⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 packethandler.cpp

📁 奇迹世界 部分源代码奇迹世界 部分源代码奇迹世界 部分源代码
💻 CPP
📖 第 1 页 / 共 2 页
字号:
	return m_pFuncMap_MW->Add( pFuncInfo );
}

// 辨靛 辑滚甫 困茄 菩哦 眠啊
BOOL PacketHandler::RegGuildServerPacket( BYTE category, BYTE protocol, PacketHandler::fnHandler_WZ fnHandler )
{
	FUNC_WZ *pFuncInfo	= new FUNC_WZ;

	pFuncInfo->m_dwFunctionKey	= MAKEWORD( category, protocol );
	pFuncInfo->m_fnHandler		= fnHandler;

	return m_pFuncMap_WZ->Add( pFuncInfo );
}





BOOL PacketHandler::ParsePacket_CW( User *pUser, MSG_BASE *pMsg, WORD wSize )
{
	//墨抛绊府俊 蝶扼 鞠龋拳 秦刀贸府
	if( pMsg->m_byCategory == 0xff )
	{
		// ......秦刀
		// 秦刀茄 单捞磐俊辑 墨抛绊府客 菩哦鸥涝 眠免 : byPacketCategory,byPacketType
	}

	FUNC_CW *pFuncInfo = (FUNC_CW*)m_pFuncMap_CW->Find( MAKEWORD( pMsg->m_byCategory, pMsg->m_byProtocol ) );

	if( pFuncInfo == NULL )
	{
		MessageOut(eCRITICAL_LOG,  "Invalid packet from game client! : Category[%d]Protocol[%d]",pMsg->m_byCategory, pMsg->m_byProtocol );
		return FALSE;
	}

	pFuncInfo->m_fnHandler( pUser, pMsg, wSize );

	return TRUE;
}


BOOL PacketHandler::ParsePacket_DW( GameDBProxySession *pGameDBProxySession, MSG_BASE * pMsg, WORD wSize )
{
	//墨抛绊府俊 蝶扼 鞠龋拳 秦刀贸府
	if( pMsg->m_byCategory == 0xff )
	{
		// ......秦刀
		// 秦刀茄 单捞磐俊辑 墨抛绊府客 菩哦鸥涝 眠免 : byPacketCategory,byPacketType
	}

	FUNC_DW *pFuncInfo = (FUNC_DW*)m_pFuncMap_DW->Find( MAKEWORD( pMsg->m_byCategory, pMsg->m_byProtocol ) );

	if( pFuncInfo == NULL )
	{
		MessageOut(eCRITICAL_LOG,  "Invalid packet from game DB proxy! : Category[%d]Protocol[%d]",pMsg->m_byCategory, pMsg->m_byProtocol );
		return FALSE;
	}

	pFuncInfo->m_fnHandler( pGameDBProxySession, pMsg, wSize );

	return TRUE;
}

BOOL PacketHandler::ParsePacket_TW( AccountDBProxySession *pAccountDBProxySession, MSG_BASE * pMsg, WORD wSize )
{
	//墨抛绊府俊 蝶扼 鞠龋拳 秦刀贸府
	if( pMsg->m_byCategory == 0xff )
	{
		// ......秦刀
		// 秦刀茄 单捞磐俊辑 墨抛绊府客 菩哦鸥涝 眠免 : byPacketCategory,byPacketType
	}

	FUNC_TW *pFuncInfo = (FUNC_TW*)m_pFuncMap_TW->Find( MAKEWORD( pMsg->m_byCategory, pMsg->m_byProtocol ) );

	if( pFuncInfo == NULL )
	{
		MessageOut(eCRITICAL_LOG,  "Invalid packet from account DB proxy! : Category[%d]Protocol[%d]", pMsg->m_byCategory, pMsg->m_byProtocol );
		return FALSE;
	}

	pFuncInfo->m_fnHandler( pAccountDBProxySession, pMsg, wSize );

	return TRUE;
}

// 霸烙 辑滚肺何磐 坷绰 菩哦 颇教
BOOL PacketHandler::ParsePacket_GW( GameServerSession *pGameServerSession, MSG_BASE * pMsg, WORD wSize )
{
	//墨抛绊府俊 蝶扼 鞠龋拳 秦刀贸府
	if( pMsg->m_byCategory == 0xff )
	{
		// ......秦刀
		// 秦刀茄 单捞磐俊辑 墨抛绊府客 菩哦鸥涝 眠免 : byPacketCategory,byPacketType
	}

	FUNC_GW *pFuncInfo = (FUNC_GW*)m_pFuncMap_GW->Find( MAKEWORD( pMsg->m_byCategory, pMsg->m_byProtocol ) );

	if( pFuncInfo == NULL )
	{
		MessageOut(eCRITICAL_LOG,  "Invalid packet from game server! : Category[%d]Protocol[%d]", pMsg->m_byCategory, pMsg->m_byProtocol );
		return FALSE;
	}

	pFuncInfo->m_fnHandler( pGameServerSession, pMsg, wSize );

	return TRUE;
}


// 硅撇 辑滚肺何磐 坷绰 菩哦 颇教
BOOL PacketHandler::ParsePacket_BW( BattleServerSession *pBattleServerSession, MSG_BASE * pMsg, WORD wSize )
{
	//墨抛绊府俊 蝶扼 鞠龋拳 秦刀贸府
	if( pMsg->m_byCategory == 0xff )
	{
		// ......秦刀
		// 秦刀茄 单捞磐俊辑 墨抛绊府客 菩哦鸥涝 眠免 : byPacketCategory,byPacketType
	}

	FUNC_BW *pFuncInfo = (FUNC_BW*)m_pFuncMap_BW->Find( MAKEWORD( pMsg->m_byCategory, pMsg->m_byProtocol ) );

	if( pFuncInfo == NULL )
	{
		return FALSE;
	}

	pFuncInfo->m_fnHandler( pBattleServerSession, pMsg, wSize );

	return TRUE;
}


// 鞘靛 辑滚肺何磐 坷绰 菩哦 颇教
BOOL PacketHandler::ParsePacket_FW( FieldServerSession *pFieldServerSession, MSG_BASE * pMsg, WORD wSize )
{
	//墨抛绊府俊 蝶扼 鞠龋拳 秦刀贸府
	if( pMsg->m_byCategory == 0xff )
	{
		// ......秦刀
		// 秦刀茄 单捞磐俊辑 墨抛绊府客 菩哦鸥涝 眠免 : byPacketCategory,byPacketType
	}

	FUNC_FW *pFuncInfo = (FUNC_FW*)m_pFuncMap_FW->Find( MAKEWORD( pMsg->m_byCategory, pMsg->m_byProtocol ) );

	if( pFuncInfo == NULL )
	{
		return FALSE;
	}

	pFuncInfo->m_fnHandler( pFieldServerSession, pMsg, wSize );

	return TRUE;
}

// 俊捞傈飘 辑滚肺何磐 坷绰 菩哦 颇教
BOOL PacketHandler::ParsePacket_AW( AgentServerSession *pAgentServerSession, MSG_BASE *pMsg, WORD wSize )
{
	//墨抛绊府俊 蝶扼 鞠龋拳 秦刀贸府
	if( pMsg->m_byCategory == 0xff )
	{
		// ......秦刀
		// 秦刀茄 单捞磐俊辑 墨抛绊府客 菩哦鸥涝 眠免 : byPacketCategory,byPacketType
	}

	FUNC_AW *pFuncInfo = (FUNC_AW*)m_pFuncMap_AW->Find( MAKEWORD( pMsg->m_byCategory, pMsg->m_byProtocol ) );

	if( pFuncInfo == NULL )
	{
		return FALSE;
	}

	pFuncInfo->m_fnHandler( pAgentServerSession, pMsg, wSize );

	return TRUE;
}

// 付胶磐 辑滚肺何磐 坷绰 菩哦 颇教
BOOL PacketHandler::ParsePacket_MW( MasterServerSession *pMasterServerSession, MSG_BASE *pMsg, WORD wSize )
{
	//墨抛绊府俊 蝶扼 鞠龋拳 秦刀贸府
	if( pMsg->m_byCategory == 0xff )
	{
		// ......秦刀
		// 秦刀茄 单捞磐俊辑 墨抛绊府客 菩哦鸥涝 眠免 : byPacketCategory,byPacketType
	}

	FUNC_MW *pFuncInfo = (FUNC_MW*)m_pFuncMap_MW->Find( MAKEWORD( pMsg->m_byCategory, pMsg->m_byProtocol ) );

	if( pFuncInfo == NULL )
	{
		MessageOut(eCRITICAL_LOG,  "Warning: Unregistered packet(%d)(%d)", pMsg->m_byCategory, pMsg->m_byProtocol );
		return FALSE;
	}

	pFuncInfo->m_fnHandler( pMasterServerSession, pMsg, wSize );

	return TRUE;
}

// 辨靛 辑滚肺何磐 坷绰 菩哦 颇教
BOOL PacketHandler::ParsePacket_WZ( GuildServerSession *pGuildServerSession, MSG_BASE *pMsg, WORD wSize )
{
	//墨抛绊府俊 蝶扼 鞠龋拳 秦刀贸府
	if( pMsg->m_byCategory == 0xff )
	{
		// ......秦刀
		// 秦刀茄 单捞磐俊辑 墨抛绊府客 菩哦鸥涝 眠免 : byPacketCategory,byPacketType
	}

	FUNC_WZ *pFuncInfo = (FUNC_WZ*)m_pFuncMap_WZ->Find( MAKEWORD( pMsg->m_byCategory, pMsg->m_byProtocol ) );

	if( pFuncInfo == NULL )
	{
		MessageOut(eCRITICAL_LOG,  "Warning: Unregistered packet(%d)(%d)", pMsg->m_byCategory, pMsg->m_byProtocol );
		return FALSE;
	}

	pFuncInfo->m_fnHandler( pGuildServerSession, pMsg, wSize );

	return TRUE;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -