Core/WorldStates: Migrate battleground HolidayWorldState to new system
This commit is contained in:
1 parent
e748845e78
commit
ccff3af924
5 files changed
+16
-33
No files matched your search
@@ -30,7 +30,7 @@
|
||||
#include "PoolMgr.h"
|
||||
#include "UnitAI.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldStateMgr.h"
|
||||
|
||||
GameEventMgr* GameEventMgr::instance()
|
||||
{
|
||||
@@ -1581,19 +1581,9 @@ void GameEventMgr::UpdateWorldStates(uint16 event_id, bool Activate)
|
||||
{
|
||||
GameEventData const& event = mGameEvent[event_id];
|
||||
if (event.holiday_id != HOLIDAY_NONE)
|
||||
{
|
||||
BattlegroundTypeId bgTypeId = BattlegroundMgr::WeekendHolidayIdToBGType(event.holiday_id);
|
||||
if (bgTypeId != BATTLEGROUND_TYPE_NONE)
|
||||
{
|
||||
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
|
||||
if (bl && bl->HolidayWorldState)
|
||||
{
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildUpdateWorldStatePacket(&data, bl->HolidayWorldState, Activate ? 1 : 0);
|
||||
sWorld->SendGlobalMessage(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(BattlegroundMgr::WeekendHolidayIdToBGType(event.holiday_id)))
|
||||
if (bl->HolidayWorldState)
|
||||
sWorldStateMgr->SetValue(bl->HolidayWorldState, Activate ? 1 : 0, false, nullptr);
|
||||
}
|
||||
|
||||
GameEventMgr::GameEventMgr() : isSystemInit(false)
|
||||
|
||||
Reference in new issue
Block a user