Core/WorldStates: Migrate battleground HolidayWorldState to new system

This commit is contained in:
Shauren authored and Ovahlord committed 2022-12-21 22:01:54 +01:00
1 parent e748845e78
commit ccff3af924
5 files changed
+16 -33

No files matched your search

@@ -8779,22 +8779,6 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
packet.Worldstates.emplace_back(3901, int32(sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) - sWorld->getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS))); // 8 PreviousSeason
SendDirectMessage(packet.Write());
SendBGWeekendWorldStates();
}
void Player::SendBGWeekendWorldStates() const
{
for (uint32 i = 1; i < sBattlemasterListStore.GetNumRows(); ++i)
{
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(i);
if (bl && bl->HolidayWorldState)
{
if (BattlegroundMgr::IsBGWeekend((BattlegroundTypeId)bl->ID))
SendUpdateWorldState(bl->HolidayWorldState, 1);
else
SendUpdateWorldState(bl->HolidayWorldState, 0);
}
}
}
uint32 Player::GetXPRestBonus(uint32 xp)