Core/WorldStates: Migrate Wintergrasp worldstates to new system
Port From (https://github.com/TrinityCore/TrinityCore/commit/6285033ed5ba8f67330eca40c1ae4840882a98d3)
This commit is contained in:
@@ -741,17 +741,6 @@ namespace Game.Entities
|
||||
void SendBattlefieldWorldStates()
|
||||
{
|
||||
// Send misc stuff that needs to be sent on every login, like the battle timers.
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.WintergraspEnable))
|
||||
{
|
||||
BattleField wg = Global.BattleFieldMgr.GetBattlefieldByBattleId(BattlefieldIds.WG);
|
||||
if (wg != null)
|
||||
{
|
||||
SendUpdateWorldState(WorldStates.BattlefieldWgActive, (uint)(wg.IsWarTime() ? 0 : 1));
|
||||
uint timer = wg.IsWarTime() ? 0 : (wg.GetTimer() / 1000); // 0 - Time to next battle
|
||||
SendUpdateWorldState(WorldStates.BattlefieldWgTimeNextBattle, (uint)(GameTime.GetGameTime() + timer));
|
||||
}
|
||||
}
|
||||
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.TolbaradEnable))
|
||||
{
|
||||
BattleField tb = Global.BattleFieldMgr.GetBattlefieldByBattleId(BattlefieldIds.TB);
|
||||
|
||||
@@ -3466,10 +3466,6 @@ namespace Game.Entities
|
||||
packet.AddState(4882, 0); // WORLD_STATE_HOR_WAVE_COUNT
|
||||
}
|
||||
break;
|
||||
case (uint)AreaId.Wintergrasp: // Wintergrasp
|
||||
if (battlefield != null && battlefield.GetTypeId() == (uint)BattleFieldTypes.WinterGrasp)
|
||||
battlefield.FillInitialWorldStates(packet);
|
||||
break;
|
||||
// Zul Aman
|
||||
case 3805:
|
||||
if (instance != null && mapid == 568)
|
||||
|
||||
Reference in New Issue
Block a user