Core/Events: avoid looking up for battlegrounds when no battleground has been linked to an active event

This commit is contained in:
Ovahlord
2020-01-11 20:16:54 +01:00
parent a3377e273a
commit a592be71f7

View File

@@ -1223,7 +1223,8 @@ void GameEventMgr::UpdateBattlegroundSettings()
sBattlegroundMgr->ResetHolidays();
for (uint32 activeEventId : m_ActiveEvents)
sBattlegroundMgr->SetHolidayActive(mGameEventBattlegroundHolidays[activeEventId]);
if (uint32 battleGroundId = mGameEventBattlegroundHolidays[activeEventId])
sBattlegroundMgr->SetHolidayActive(battleGroundId);
}
void GameEventMgr::UpdateEventNPCVendor(uint16 event_id, bool activate)