diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 4ce022d00..e3d2d4a3c 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -212,7 +212,7 @@ BattleGround::BattleGround() m_Status = STATUS_NONE; m_ClientInstanceID = 0; m_EndTime = 0; - m_BracketId = BG_BRACKET_ID_FIRST; + m_BracketId = BG_BRACKET_ID_TEMPLATE; m_InvitedAlliance = 0; m_InvitedHorde = 0; m_ArenaType = ARENA_TYPE_NONE; @@ -286,7 +286,11 @@ BattleGround::~BattleGround() DelObject(i); sBattleGroundMgr.RemoveBattleGround(GetInstanceID(), GetTypeID()); - sBattleGroundMgr.DeleteClientVisibleInstanceId(GetTypeID(), GetBracketId(), GetClientInstanceID()); + + // skip template bgs as they were never added to visible bg list + BattleGroundBracketId bracketId = GetBracketId(); + if (bracketId != BG_BRACKET_ID_TEMPLATE) + sBattleGroundMgr.DeleteClientVisibleInstanceId(GetTypeID(), bracketId, GetClientInstanceID()); // unload map // map can be null at bg destruction diff --git a/src/game/DBCEnums.h b/src/game/DBCEnums.h index 3afa1a331..847c6dd66 100644 --- a/src/game/DBCEnums.h +++ b/src/game/DBCEnums.h @@ -34,6 +34,7 @@ enum BattleGroundBracketId // bracketId for level ranges { + BG_BRACKET_ID_TEMPLATE = -1, // used to mark bg as template BG_BRACKET_ID_FIRST = 0, BG_BRACKET_ID_LAST = 15 }; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d19fdaf71..679636843 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11860" + #define REVISION_NR "11861" #endif // __REVISION_NR_H__