Core/WorldStates: Migrate Wintergrasp worldstates to new system

Port From (https://github.com/TrinityCore/TrinityCore/commit/6285033ed5ba8f67330eca40c1ae4840882a98d3)
This commit is contained in:
hondacrx
2022-06-27 16:45:31 -04:00
parent 2ea34c42fa
commit 9cece8cc8a
7 changed files with 82 additions and 97 deletions
-11
View File
@@ -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);
-4
View File
@@ -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)