📄 handler_mw.cpp
字号:
#include "StdAfx.h"
#include ".\handler_mw.h"
#include "WorldServerSession.h"
#include "ServerSessionManager.h"
#include <PacketStruct_MW.h>
#include <Protocol_MW.h>
#include <PacketStruct_MO.h>
#include <Protocol_MO.h>
#include "MasterServer.h"
VOID Handler_MW::OnMW_USERCOUNT_SYN( WorldServerSession *pWorldServer, MSG_BASE *pMsg, WORD wSize )
{
// OpServer俊 傈崔
MSG_MW_USERCOUNT_SYN *pRecvMsg = (MSG_MW_USERCOUNT_SYN*)pMsg;
MSG_MO_RTTG_USERCOUNT_NTF sendMsg;
DWORD dwTotalVillageCount = 0;
DWORD dwTotalBattleZoneCount = 0;
ServerSession *pOpServer = ServerSessionManager::Instance()->GetOpServer();
if( !pOpServer )
{
MessageOut( eCRITICAL_LOG, "RTTA 悼立荐 焊绊 角菩:No Data[ChannelNum %u]", pRecvMsg->byChannelCount );
return;
}
sendMsg.dwWorldID = pWorldServer->GetServerKey().GetWorldID();
for(BYTE i=0; i<pRecvMsg->byChannelCount; i++)
{
sendMsg.dwChannelID = pRecvMsg->ChannelInfo[i].dwChannelID;
sendMsg.dwVillageCount = pRecvMsg->ChannelInfo[i].dwVillageCount;
sendMsg.dwBattleZoneCount = pRecvMsg->ChannelInfo[i].dwBattleZoneCount;
pOpServer->Send( (BYTE*)&sendMsg, sizeof(MSG_MO_RTTG_USERCOUNT_NTF) );
MessageOut( eCRITICAL_LOG, "RTTA肺 悼立荐 焊绊: W(%u)C(%u)V(%u)B(%u)", sendMsg.dwWorldID,
sendMsg.dwChannelID,
sendMsg.dwVillageCount,
sendMsg.dwBattleZoneCount );
dwTotalVillageCount += sendMsg.dwVillageCount;
dwTotalBattleZoneCount += sendMsg.dwBattleZoneCount;
}
MessageOut( eCRITICAL_LOG, "岿靛 悼立 犬牢: W(%u)V(%u)B(%u)", sendMsg.dwWorldID,
dwTotalVillageCount,
dwTotalBattleZoneCount );
}
VOID Handler_MW::OnMW_BATTLEZONEINFO_ANS( WorldServerSession *pWorldServer, MSG_BASE *pMsg, WORD wSize )
{
MSG_MW_BATTLEZONEINFO_ANS *pRecvMsg = (MSG_MW_BATTLEZONEINFO_ANS*)pMsg;
SERVER_KEY worldServerKey = pWorldServer->GetServerKey();
MSG_MO_RTTG_BATTLEZONEINFO_ANS sendMsg;
// STRUCT_BATTLEZONE_INFO *pBattle;
TCHAR szMsg[512];
sendMsg.byCount = pRecvMsg->byCount;
for( BYTE i=0; i< pRecvMsg->byCount; i++)
{
sendMsg.ChannelInfo[i] = pRecvMsg->ChannelInfo[i];
_snprintf(szMsg, sizeof(szMsg), "硅撇粮 惑怕 : W(%d)C(%d)V(%d)H(%u)M(%u)PVP(%u)", pWorldServer->GetServerKey().GetWorldID(),
sendMsg.ChannelInfo[i].byChannelID,
sendMsg.ChannelInfo[i].dwVillageUserCount,
sendMsg.ChannelInfo[i].dwHuntingUserCount,
sendMsg.ChannelInfo[i].dwMissionUserCount,
sendMsg.ChannelInfo[i].dwPVPUserCount );
SUNLOG->InsertMessage( szMsg, eMIDDLE_LOG );
sendMsg.ChannelInfo[i].byWorldID = pWorldServer->GetServerKey().GetWorldID();
}
ServerSession *pOpServer = MasterServer::Instance()->GetOpServer(); //ServerSessionManager::Instance()->GetOpServer();
if( !pOpServer )
{
TCHAR szMsg[512];
_snprintf(szMsg, sizeof(szMsg), "RTTA 硅撇粮 泅炔 焊绊 角菩:No Data" );
SUNLOG->InsertMessage( szMsg, eCRITICAL_LOG );
return;
}
pOpServer->Send( (BYTE*)&sendMsg, sendMsg.GetSize() );
}
VOID Handler_MW::OnMW_USERMONEY_SYN( WorldServerSession *pWorldServer, MSG_BASE *pMsg, WORD wSize )
{
MSG_MW_USERMONEY_SYN *pRecvMsg = (MSG_MW_USERMONEY_SYN*)pMsg;
/*
MSG_MO_RTTG_USERMONEY_NTF sendMsg;
sendMsg.dwTotalUserMoney = pRecvMsg->dwTotalUserMoney;
sendMsg.
*/
}
VOID Handler_MW::OnMW_ARMORKIT_FINDHACK_SYN( WorldServerSession *pWorldServer, MSG_BASE *pMsg, WORD wSize )
{
// 弊措肺 副饭捞
MSG_MW_ARMORKIT_FINDHACK_SYN *pRecvMsg = (MSG_MW_ARMORKIT_FINDHACK_SYN*)pMsg;
// 郴侩篮 隔扼档 弊成 汗荤
MSG_MO_ARMORKIT_FINDHACK_NTF sendMsg;
sendMsg.dwGuid = pRecvMsg->dwGuid;
memset( sendMsg.szIP, 0, sizeof(sendMsg.szIP) );
memcpy( sendMsg.szIP, pRecvMsg->szIP, sizeof(sendMsg.szIP) );
sendMsg.HackType = pRecvMsg->HackType;
sendMsg.Size = pRecvMsg->Size;
memset( sendMsg.Buf, 0, sizeof(sendMsg.Buf) );
memcpy( sendMsg.Buf, pRecvMsg->Buf, sizeof(sendMsg.Buf) );
// 弊措肺 副饭捞
ServerSession *pOpServer = ServerSessionManager::Instance()->GetOpServer();
if( pOpServer )
{
pOpServer->Send( (BYTE*)&sendMsg, sizeof(MSG_MO_ARMORKIT_FINDHACK_NTF) );
TCHAR szMsg[512];
_snprintf(szMsg, sizeof(szMsg), "Armorkit Find Hack Tool(User %u)", sendMsg.dwGuid);
SUNLOG->InsertMessage( szMsg, eMIDDLE_LOG );
}
}
VOID Handler_MW::OnSERVERCOMMON_SERVERSHUTDOWN_ANS( WorldServerSession *pWorldServer, MSG_BASE *pMsg, WORD wSize )
{
// 辆丰 措扁吝牢 仇捞 辆丰等 巴捞骨肺 眉农
if( MasterServer::Instance()->IsExitServer() && MasterServer::Instance()->IsSendExit() )
{
MasterServer::Instance()->RemoveExitServer( pWorldServer->GetServerKey() ); // 辆丰登菌促!
MessageOut( eFULL_LOG, "World Exit Message Recv[%u]", pWorldServer->GetServerKey() );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -