Add Disables table based on the work of @Olion on Zero

Added `disables` table
Mostly backported from TC.
Changed table format (mapID in lower 16 bit, areaID in higer 16 bit of data field).
Added CREATURE_SPAWN and GAMEOBJECT_SPAWN disable types.
This commit is contained in:
Antz 2019-01-10 00:11:41 +00:00 committed by Antz
parent f5bb0529c1
commit a93afab540
16 changed files with 621 additions and 49 deletions

View file

@ -39,6 +39,7 @@
#include "Language.h"
#include "ScriptMgr.h"
#include "World.h"
#include "DisableMgr.h"
void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recv_data)
{
@ -107,6 +108,14 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recv_data)
BattleGroundTypeId bgTypeId = BattleGroundTypeId(bgTypeId_);
DEBUG_LOG("WORLD: Received opcode CMSG_BATTLEMASTER_JOIN from %s", guid.GetString().c_str());
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeId))
{
ChatHandler(this).SendSysMessage(LANG_BG_IS_DISABLED);
return;
}
// can do this, since it's battleground, not arena
BattleGroundQueueTypeId bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bgTypeId, ARENA_TYPE_NONE);