diff options
| author | Ovahlord <18347559+Ovahlord@users.noreply.github.com> | 2025-11-25 23:55:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-25 23:55:32 +0100 |
| commit | fb88f3c9750578d57d12e9900243e8b73500ce9c (patch) | |
| tree | 12a2c4631ccc08df357e34615883ed7c649df8e7 /src/server/game/Server | |
| parent | 1d5ef9c21cb5e01aab14122e1feeef91fd376fcd (diff) | |
Core/Warden: Removed implementation not compatible with modern client versions (#30491)
Diffstat (limited to 'src/server/game/Server')
| -rw-r--r-- | src/server/game/Server/Packets/AllPackets.h | 1 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/WardenPackets.cpp | 34 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/WardenPackets.h | 39 | ||||
| -rw-r--r-- | src/server/game/Server/Protocol/Opcodes.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Server/WorldSession.cpp | 24 | ||||
| -rw-r--r-- | src/server/game/Server/WorldSession.h | 16 | ||||
| -rw-r--r-- | src/server/game/Server/WorldSocket.cpp | 14 |
7 files changed, 1 insertions, 129 deletions
diff --git a/src/server/game/Server/Packets/AllPackets.h b/src/server/game/Server/Packets/AllPackets.h index 1450dab14dd..ad31706a627 100644 --- a/src/server/game/Server/Packets/AllPackets.h +++ b/src/server/game/Server/Packets/AllPackets.h @@ -79,7 +79,6 @@ #include "TransmogrificationPackets.h" #include "VehiclePackets.h" #include "VignettePackets.h" -#include "WardenPackets.h" #include "WhoPackets.h" #include "WorldStatePackets.h" diff --git a/src/server/game/Server/Packets/WardenPackets.cpp b/src/server/game/Server/Packets/WardenPackets.cpp deleted file mode 100644 index 5f767660020..00000000000 --- a/src/server/game/Server/Packets/WardenPackets.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information - * - * 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" -#include "PacketUtilities.h" - -namespace WorldPackets::Warden -{ -void WardenData::Read() -{ - uint32 requestedSize = _worldPacket.read<uint32>(); - std::size_t pos = _worldPacket.rpos(); - std::size_t remainingSize = _worldPacket.size() - pos; - if (requestedSize > remainingSize) - OnInvalidArraySize(requestedSize, remainingSize); - - Data.resize(requestedSize); - _worldPacket.read(Data.data(), requestedSize); -} -} diff --git a/src/server/game/Server/Packets/WardenPackets.h b/src/server/game/Server/Packets/WardenPackets.h deleted file mode 100644 index 938e345e806..00000000000 --- a/src/server/game/Server/Packets/WardenPackets.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information - * - * 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 TRINITYCORE_WARDEN_PACKETS_H -#define TRINITYCORE_WARDEN_PACKETS_H - -#include "Packet.h" - -namespace WorldPackets -{ - namespace Warden - { - class WardenData final : public ClientPacket - { - public: - explicit WardenData(WorldPacket&& packet) : ClientPacket(CMSG_WARDEN3_DATA, std::move(packet)) { } - - void Read() override; - - ByteBuffer Data; - }; - } -} - -#endif // TRINITYCORE_WARDEN_PACKETS_H diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp index df54c7f484a..97f7136e8e0 100644 --- a/src/server/game/Server/Protocol/Opcodes.cpp +++ b/src/server/game/Server/Protocol/Opcodes.cpp @@ -1031,7 +1031,7 @@ void OpcodeTable::InitializeClientOpcodes() DEFINE_HANDLER(CMSG_VOICE_CHANNEL_STT_TOKEN_REQUEST, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_VOICE_CHAT_JOIN_CHANNEL, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_VOICE_CHAT_LOGIN, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); - DEFINE_HANDLER(CMSG_WARDEN3_DATA, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleWardenData); + DEFINE_HANDLER(CMSG_WARDEN3_DATA, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL); DEFINE_HANDLER(CMSG_WHO, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleWhoOpcode); DEFINE_HANDLER(CMSG_WHO_IS, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleWhoIsOpcode); DEFINE_HANDLER(CMSG_WORLD_LOOT_OBJECT_CLICK, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL); diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 0c5898a8dc3..dcdd982d79e 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -53,7 +53,6 @@ #include "RealmList.h" #include "ScriptMgr.h" #include "SocialMgr.h" -#include "WardenWin.h" #include "World.h" #include "WorldSocket.h" #include <boost/circular_buffer.hpp> @@ -518,9 +517,6 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) //logout procedure should happen only in World::UpdateSessions() method!!! if (updater.ProcessUnsafe()) { - if (m_Socket[CONNECTION_TYPE_REALM] && m_Socket[CONNECTION_TYPE_REALM]->IsOpen() && _warden) - _warden->Update(diff); - ///- If necessary, log the player out if (ShouldLogOut(currentTime) && m_playerLoading.IsEmpty()) LogoutPlayer(true); @@ -529,9 +525,6 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) if ((m_Socket[CONNECTION_TYPE_REALM] && !m_Socket[CONNECTION_TYPE_REALM]->IsOpen()) || (m_Socket[CONNECTION_TYPE_INSTANCE] && !m_Socket[CONNECTION_TYPE_INSTANCE]->IsOpen())) { - if (GetPlayer() && _warden) - _warden->Update(diff); - expireTime -= expireTime > diff ? diff : expireTime; if (expireTime < diff || forceExit || !GetPlayer()) { @@ -1193,23 +1186,6 @@ bool WorldSession::CanAccessAlliedRaces() const return GetAccountExpansion() >= EXPANSION_BATTLE_FOR_AZEROTH; } -void WorldSession::InitWarden(SessionKey const& k) -{ - if (_os == "Win") - { - _warden = std::make_unique<WardenWin>(); - _warden->Init(this, k); - } - else if (_os == "Wn64") - { - // Not implemented - } - else if (_os == "Mc64") - { - // Not implemented - } -} - void WorldSession::LoadPermissions() { uint32 id = GetAccountId(); diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h index 5134c09af19..a05d02e211c 100644 --- a/src/server/game/Server/WorldSession.h +++ b/src/server/game/Server/WorldSession.h @@ -51,7 +51,6 @@ class LoginQueryHolder; class MessageBuffer; class Player; class Unit; -class Warden; class WorldPacket; class WorldSession; class WorldSocket; @@ -827,11 +826,6 @@ namespace WorldPackets class MoveSetVehicleRecIdAck; } - namespace Warden - { - class WardenData; - } - namespace Who { class WhoIsRequest; @@ -1023,10 +1017,6 @@ class TC_GAME_API WorldSession ClientBuild::VariantId const& GetClientBuildVariant() const { return _clientBuildVariant; } bool CanAccessAlliedRaces() const; - Warden* GetWarden() { return _warden.get(); } - Warden const* GetWarden() const { return _warden.get(); } - - void InitWarden(SessionKey const& k); /// Session in auth.queue currently void SetInQueue(bool state) { m_inQueue = state; } @@ -1854,9 +1844,6 @@ class TC_GAME_API WorldSession void HandleBattlePetUpdateNotify(WorldPackets::BattlePet::BattlePetUpdateNotify& battlePetUpdateNotify); void HandleCageBattlePet(WorldPackets::BattlePet::CageBattlePet& cageBattlePet); - // Warden - void HandleWardenData(WorldPackets::Warden::WardenData& packet); - // Battlenet void HandleBattlenetChangeRealmTicket(WorldPackets::Battlenet::ChangeRealmTicket& changeRealmTicket); void HandleBattlenetRequest(WorldPackets::Battlenet::Request& request); @@ -1989,9 +1976,6 @@ class TC_GAME_API WorldSession std::unordered_map<uint32, std::function<void(MessageBuffer)>> _battlenetResponseCallbacks; uint32 _battlenetRequestToken; - // Warden - std::unique_ptr<Warden> _warden; // Remains NULL if Warden system is not enabled by config - time_t _logoutTime; bool m_inQueue; // session wait in auth.queue ObjectGuid m_playerLoading; // code processed in LoginPlayer diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 27d1328ec90..f8af2f512a7 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -807,16 +807,6 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<WorldPackets::Auth:: return; } - // Must be done before WorldSession is created - bool wardenActive = sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED); - if (wardenActive && !ClientBuild::Platform::IsValid(account.Game.OS)) - { - SendAuthResponseError(ERROR_DENIED); - TC_LOG_ERROR("network", "WorldSocket::HandleAuthSession: Client {} attempted to log in using invalid client OS ({}).", address, account.Game.OS); - DelayedCloseSocket(); - return; - } - if (IpLocationRecord const* location = sIPLocation->GetLocationRecord(address)) _ipCountry = location->CountryCode; @@ -901,10 +891,6 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<WorldPackets::Auth:: account.Game.OS, account.Game.TimezoneOffset, account.Game.Build, buildVariant, account.Game.Locale, account.Game.Recruiter, account.Game.IsRectuiter); - // Initialize Warden system only if it is enabled by config - if (wardenActive) - _worldSession->InitWarden(_sessionKey); - QueueQuery(_worldSession->LoadPermissionsAsync().WithPreparedCallback([this](PreparedQueryResult result) { LoadSessionPermissionsCallback(std::move(result)); |
