aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-12-25 22:14:53 +0100
committerMachiavelli <none@none>2010-12-25 22:14:53 +0100
commitb0eaf1f42c35399e09fac36159f09166d8eb9f8e (patch)
treedbd1ce6383185159f3469f62ea7f10bbfe24eba5
parentd93972743158bca797472af74b0c6a902ac801eb (diff)
Scripts/Ulduar: Despawn trigger for towers when towers are destroyed. (Allows proper spawn linking)
--HG-- branch : trunk
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
index 2ad8d758471..451f7066d98 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
@@ -81,6 +81,7 @@ enum Creatures
NPC_LOREKEEPER = 33686, //Hard mode starter
NPC_BRANZ_BRONZBEARD = 33579,
NPC_DELORAH = 33701,
+ NPC_ULDUAR_GAUNTLET_GENERATOR = 33571, // Trigger tied to towers
};
enum Towers
@@ -1325,10 +1326,8 @@ public:
void OnDestroyed(Player* /*pPlayer*/, GameObject* pGO, uint32 /*value*/)
{
InstanceScript* instance = pGO->GetInstanceScript();
- if (pGO->GetGOValue()->building.health == 0)
+ switch(pGO->GetEntry())
{
- switch(pGO->GetEntry())
- {
case GO_TOWER_OF_STORMS:
instance->ProcessEvent(pGO, EVENT_TOWER_OF_STORM_DESTROYED);
break;
@@ -1341,10 +1340,12 @@ public:
case GO_TOWER_OF_LIFE:
instance->ProcessEvent(pGO, EVENT_TOWER_OF_LIFE_DESTROYED);
break;
- }
}
- }
+ Creature* trigger = pGO->FindNearestCreature(NPC_ULDUAR_GAUNTLET_GENERATOR, 15.0f, true);
+ if (trigger)
+ trigger->DisappearAndDie();
+ }
};
class at_RX_214_repair_o_matic_station : public AreaTriggerScript