refactor(Core/Server): Improvements to antidos opcode handling (#21502)

This commit is contained in:
Takenbacon
2025-02-20 22:17:34 -08:00
committed by GitHub
parent f6c4164765
commit 4cd1ed2181
9 changed files with 413 additions and 419 deletions
-1
View File
@@ -366,7 +366,6 @@ enum WorldIntConfigs
CONFIG_WINTERGRASP_BATTLETIME,
CONFIG_WINTERGRASP_NOBATTLETIME,
CONFIG_WINTERGRASP_RESTART_AFTER_CRASH,
CONFIG_PACKET_SPOOF_POLICY,
CONFIG_PACKET_SPOOF_BANMODE,
CONFIG_PACKET_SPOOF_BANDURATION,
CONFIG_WARDEN_CLIENT_RESPONSE_DELAY,
+4 -1
View File
@@ -90,6 +90,7 @@
#include "WaypointMovementGenerator.h"
#include "WeatherMgr.h"
#include "WhoListCacheMgr.h"
#include "WorldGlobals.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "WorldSessionMgr.h"
@@ -1196,7 +1197,6 @@ void World::LoadConfigSettings(bool reload)
_bool_configs[CONFIG_SET_ALL_CREATURES_WITH_WAYPOINT_MOVEMENT_ACTIVE] = sConfigMgr->GetOption<bool>("SetAllCreaturesWithWaypointMovementActive", false);
// packet spoof punishment
_int_configs[CONFIG_PACKET_SPOOF_POLICY] = sConfigMgr->GetOption<int32>("PacketSpoof.Policy", (uint32)WorldSession::DosProtection::POLICY_KICK);
_int_configs[CONFIG_PACKET_SPOOF_BANMODE] = sConfigMgr->GetOption<int32>("PacketSpoof.BanMode", (uint32)0);
if (_int_configs[CONFIG_PACKET_SPOOF_BANMODE] > 1)
_int_configs[CONFIG_PACKET_SPOOF_BANMODE] = (uint32)0;
@@ -1952,6 +1952,9 @@ void World::SetInitialWorldSettings()
LOG_INFO("server.loading", "Load Channels...");
ChannelMgr::LoadChannels();
LOG_INFO("server.loading", "Loading AntiDos opcode policies");
sWorldGlobals->LoadAntiDosOpcodePolicies();
sScriptMgr->OnBeforeWorldInitialized();
if (sWorld->getBoolConfig(CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS))