Core/PacketIO: Updated CMSG_WARDEN_DATA
Note: No packet handling changes made whatsoever. ...and ninja-fix a missing break from previous commit.
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
#include "VehiclePackets.h"
|
||||
#include "VoicePackets.h"
|
||||
#include "VoidStoragePackets.h"
|
||||
#include "WardenPackets.h"
|
||||
#include "WhoPackets.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "LFGPackets.h"
|
||||
#include "TicketPackets.h"
|
||||
#include "PacketUtilities.h"
|
||||
#include "SupportMgr.h"
|
||||
|
||||
using namespace WorldPackets;
|
||||
|
||||
@@ -248,15 +249,16 @@ void WorldPackets::Ticket::Complaint::Read()
|
||||
|
||||
switch (ComplaintType)
|
||||
{
|
||||
case 0:
|
||||
case SUPPORT_SPAM_TYPE_MAIL:
|
||||
_worldPacket >> MailID;
|
||||
break;
|
||||
case 1:
|
||||
case SUPPORT_SAPM_TYPE_CHAT:
|
||||
_worldPacket >> Chat;
|
||||
break;
|
||||
case 2:
|
||||
case SUPPORT_SPAM_TYPE_CALENDAR:
|
||||
_worldPacket >> EventGuid;
|
||||
_worldPacket >> InviteGuid;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "WardenPackets.h"
|
||||
|
||||
void WorldPackets::Warden::WardenData::Read()
|
||||
{
|
||||
uint32 size = _worldPacket.read<uint32>();
|
||||
|
||||
if (size)
|
||||
{
|
||||
Data.resize(size);
|
||||
_worldPacket.read(Data.contents(), size);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef WardenPackets_h__
|
||||
#define WardenPackets_h__
|
||||
|
||||
#include "Packet.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace Warden
|
||||
{
|
||||
class WardenData final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
WardenData(WorldPacket&& packet) : ClientPacket(CMSG_WARDEN_DATA, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
ByteBuffer Data;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // WardenPackets_h__
|
||||
@@ -784,7 +784,7 @@ void OpcodeTable::Initialize()
|
||||
DEFINE_HANDLER(CMSG_VOICE_DEL_IGNORE, STATUS_UNHANDLED, PROCESS_INPLACE, WorldPackets::Null, &WorldSession::Handle_NULL);
|
||||
DEFINE_HANDLER(CMSG_VOICE_SESSION_ENABLE, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Voice::VoiceSessionEnable, &WorldSession::HandleVoiceSessionEnable);
|
||||
DEFINE_HANDLER(CMSG_VOID_STORAGE_TRANSFER, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::VoidStorage::VoidStorageTransfer, &WorldSession::HandleVoidStorageTransfer);
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_WARDEN_DATA, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleWardenDataOpcode );
|
||||
DEFINE_HANDLER(CMSG_WARDEN_DATA, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Warden::WardenData, &WorldSession::HandleWardenData);
|
||||
DEFINE_HANDLER(CMSG_WHO, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Who::WhoRequestPkt, &WorldSession::HandleWhoOpcode);
|
||||
DEFINE_HANDLER(CMSG_WHO_IS, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Who::WhoIsRequest, &WorldSession::HandleWhoIsOpcode);
|
||||
DEFINE_HANDLER(CMSG_WORLD_PORT_RESPONSE, STATUS_TRANSFER, PROCESS_THREADUNSAFE, WorldPackets::Movement::WorldPortResponse, &WorldSession::HandleMoveWorldportAckOpcode);
|
||||
|
||||
@@ -680,6 +680,11 @@ namespace WorldPackets
|
||||
class SwapVoidItem;
|
||||
}
|
||||
|
||||
namespace Warden
|
||||
{
|
||||
class WardenData;
|
||||
}
|
||||
|
||||
namespace Who
|
||||
{
|
||||
class WhoIsRequest;
|
||||
@@ -1509,7 +1514,7 @@ class WorldSession
|
||||
void HandleBfQueueInviteResponse(WorldPackets::Battlefield::BFMgrQueueInviteResponse& bfMgrQueueInviteResponse);
|
||||
void HandleBfQueueExitRequest(WorldPackets::Battlefield::BFMgrQueueExitRequest& bfMgrQueueExitRequest);
|
||||
|
||||
void HandleWardenDataOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleWorldTeleportOpcode(WorldPackets::Misc::WorldTeleport& worldTeleport);
|
||||
void HandleMinimapPingOpcode(WorldPackets::Party::MinimapPingClient& packet);
|
||||
void HandleRandomRollOpcode(WorldPackets::Misc::RandomRollClient& packet);
|
||||
@@ -1663,6 +1668,9 @@ class WorldSession
|
||||
void HandleBattlePetSummon(WorldPackets::BattlePet::BattlePetSummon& battlePetSummon);
|
||||
void HandleCageBattlePet(WorldPackets::BattlePet::CageBattlePet& cageBattlePet);
|
||||
|
||||
// Warden
|
||||
void HandleWardenData(WorldPackets::Warden::WardenData& packet);
|
||||
|
||||
union ConnectToKey
|
||||
{
|
||||
struct
|
||||
|
||||
@@ -41,6 +41,13 @@ enum GMSupportComplaintType
|
||||
GMTICKET_SUPPORT_COMPLAINT_TYPE_SPAMMING = 24
|
||||
};
|
||||
|
||||
enum SupportSpamType
|
||||
{
|
||||
SUPPORT_SPAM_TYPE_MAIL = 0,
|
||||
SUPPORT_SAPM_TYPE_CHAT = 1,
|
||||
SUPPORT_SPAM_TYPE_CALENDAR = 2
|
||||
};
|
||||
|
||||
using ChatLog = WorldPackets::Ticket::SupportTicketSubmitComplaint::SupportTicketChatLog;
|
||||
|
||||
class Ticket
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "Util.h"
|
||||
#include "Warden.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "WardenPackets.h"
|
||||
|
||||
#include <openssl/sha.h>
|
||||
|
||||
@@ -220,16 +221,16 @@ std::string Warden::Penalty(WardenCheck* check /*= NULL*/)
|
||||
return "Undefined";
|
||||
}
|
||||
|
||||
void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
|
||||
void WorldSession::HandleWardenData(WorldPackets::Warden::WardenData& packet)
|
||||
{
|
||||
if (!_warden || recvData.empty())
|
||||
if (!_warden || packet.Data.empty())
|
||||
return;
|
||||
|
||||
_warden->DecryptData(recvData.contents(), recvData.size());
|
||||
_warden->DecryptData(packet.Data.contents(), packet.Data.size());
|
||||
uint8 opcode;
|
||||
recvData >> opcode;
|
||||
TC_LOG_DEBUG("warden", "Got packet, opcode %02X, size %u", opcode, uint32(recvData.size()));
|
||||
recvData.hexlike();
|
||||
packet.Data >> opcode;
|
||||
TC_LOG_DEBUG("warden", "Got packet, opcode %02X, size %u", opcode, uint32(packet.Data.size()));
|
||||
packet.Data.hexlike();
|
||||
|
||||
switch (opcode)
|
||||
{
|
||||
@@ -240,20 +241,20 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
|
||||
_warden->RequestHash();
|
||||
break;
|
||||
case WARDEN_CMSG_CHEAT_CHECKS_RESULT:
|
||||
_warden->HandleData(recvData);
|
||||
_warden->HandleData(packet.Data);
|
||||
break;
|
||||
case WARDEN_CMSG_MEM_CHECKS_RESULT:
|
||||
TC_LOG_DEBUG("warden", "NYI WARDEN_CMSG_MEM_CHECKS_RESULT received!");
|
||||
break;
|
||||
case WARDEN_CMSG_HASH_RESULT:
|
||||
_warden->HandleHashResult(recvData);
|
||||
_warden->HandleHashResult(packet.Data);
|
||||
_warden->InitializeModule();
|
||||
break;
|
||||
case WARDEN_CMSG_MODULE_FAILED:
|
||||
TC_LOG_DEBUG("warden", "NYI WARDEN_CMSG_MODULE_FAILED received!");
|
||||
break;
|
||||
default:
|
||||
TC_LOG_DEBUG("warden", "Got unknown warden opcode %02X of size %u.", opcode, uint32(recvData.size() - 1));
|
||||
TC_LOG_DEBUG("warden", "Got unknown warden opcode %02X of size %u.", opcode, uint32(packet.Data.size() - 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user