aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server
diff options
context:
space:
mode:
authorShauren <none@none>2010-07-21 12:14:23 +0200
committerShauren <none@none>2010-07-21 12:14:23 +0200
commit6a539270ec9447b19c9a08d8f4d867cdc9208a0c (patch)
tree205a0ba10028f12e90bcc0695ccb6612e2c52317 /src/server/game/Server
parent0bda7fd36112c47e073411ba10653d35c052b205 (diff)
Added global disable system and moved all disable fields/tables/configs into it
NOTE: instance disables were not converted for new system! if you had some then you need to fix that using new system --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Server')
-rw-r--r--src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
index e779f2a8ab1..a50eb813bb5 100644
--- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
@@ -34,6 +34,7 @@
#include "Player.h"
#include "Object.h"
#include "Opcodes.h"
+#include "DisableMgr.h"
void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
{
@@ -90,6 +91,12 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
return;
}
+ if (sDisableMgr.IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeId_, NULL))
+ {
+ ChatHandler(this).PSendSysMessage(LANG_BG_DISABLED);
+ return;
+ }
+
BattleGroundTypeId bgTypeId = BattleGroundTypeId(bgTypeId_);
sLog.outDebug("WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
@@ -659,6 +666,12 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
return;
}
+ if (sDisableMgr.IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, BATTLEGROUND_AA, NULL))
+ {
+ ChatHandler(this).PSendSysMessage(LANG_ARENA_DISABLED);
+ return;
+ }
+
BattleGroundTypeId bgTypeId = bg->GetTypeID();
BattleGroundQueueTypeId bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bgTypeId, arenatype);
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),_player->getLevel());