Index: scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp =================================================================== --- scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp (revision 297) +++ scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp (working copy) @@ -210,6 +210,8 @@ void hyjalAI::TeleportRaid(Player* player, float X, float Y, float Z) { + UpdateWorldState(0); + if(!player) { if(PlayerGUID) @@ -248,6 +250,7 @@ CheckBossTimer = 5000; PlayerGUID = player->GetGUID(); m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); + UpdateWorldState(0); } } @@ -310,6 +313,11 @@ DoPlaySoundToSet(m_creature, Sound); } +void hyjalAI::UpdateWorldState(uint32 value) +{ + m_creature->GetMap()->UpdateWorldState(WORLDSTATE_WAVES, value); +} + void hyjalAI::UpdateAI(const uint32 diff) { if(!EventBegun) return; @@ -323,6 +331,7 @@ else if(Faction == 1) SummonNextWave(HordeWaves, WaveCount, 1); WaveCount++; + UpdateWorldState(WaveCount); }else NextWaveTimer -= diff; } Index: scripts/zone/caverns_of_time/hyjal/hyjalAI.h =================================================================== --- scripts/zone/caverns_of_time/hyjal/hyjalAI.h (revision 297) +++ scripts/zone/caverns_of_time/hyjal/hyjalAI.h (working copy) @@ -18,6 +18,7 @@ #include "../../../../../../game/Player.h" #include "../../../../../../game/Group.h" #include "../../../../../../game/GossipDef.h" +#include "../../../../../../game/Map.h" // Trash Mobs summoned in waves #define NECROMANCER 17899 @@ -39,6 +40,8 @@ #define SPELL_TELEPORT_VISUAL 41232 +#define WORLDSTATE_WAVES 2482 + struct Wave { uint32 Mob1, Mob2, Mob3, Mob4, Mob5, Mob6, Mob7, Mob8, Mob9, Mob10, Mob11, Mob12, Mob13, Mob14, Mob15, Mob16, Mob17, Mob18; @@ -195,6 +198,8 @@ uint32 GetInstanceData(uint32 Event); void Talk(uint32 id); + + void UpdateWorldState(uint32 value); public: ScriptedInstance* pInstance;