Merge pull request #14976 from robinsch/wgTimer
Core/WorldState: WG Interface timer Closes issue #14913
This commit is contained in:
commit
c8df10dbc0
1 file changed
+3
-7
@@ -9616,13 +9616,9 @@ void Player::SendBattlefieldWorldStates()
|
||||
{
|
||||
if (BattlefieldWG* wg = (BattlefieldWG*)sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG))
|
||||
{
|
||||
if (wg->IsWarTime())
|
||||
SendUpdateWorldState(ClockWorldState[1], uint32(time(NULL)));
|
||||
else // Time to next battle
|
||||
{
|
||||
uint32 timer = wg->GetTimer() / 1000;
|
||||
SendUpdateWorldState(ClockWorldState[1], time(NULL) + timer);
|
||||
}
|
||||
SendUpdateWorldState(BATTLEFIELD_WG_WORLD_STATE_ACTIVE, wg->IsWarTime() ? 0 : 1);
|
||||
uint32 timer = wg->IsWarTime() ? 0 : (wg->GetTimer() / 1000); // 0 - Time to next battle
|
||||
SendUpdateWorldState(ClockWorldState[1], uint32(time(NULL) + timer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user