Core/Misc: Move WorldState enum to SharedDefines

Move WG battlefield world states to the global enum
This commit is contained in:
Carbenium authored and Ovahlord committed 2022-10-09 00:03:42 +02:00
1 parent 45e1e8c282
commit d5f7d7b754
6 files changed
+83 -86

No files matched your search

+1 -1
View File
@@ -9449,7 +9449,7 @@ void Player::SendBattlefieldWorldStates() const
{
if (BattlefieldWG* wg = static_cast<BattlefieldWG*>(sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG)))
{
SendUpdateWorldState(BATTLEFIELD_WG_WORLD_STATE_ACTIVE, wg->IsWarTime() ? 0 : 1);
SendUpdateWorldState(WS_BATTLEFIELD_WG_ACTIVE, wg->IsWarTime() ? 0 : 1);
uint32 timer = wg->IsWarTime() ? 0 : (wg->GetTimer() / 1000); // 0 - Time to next battle
SendUpdateWorldState(ClockWorldState[1], uint32(GameTime::GetGameTime() + timer));
}