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
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user