Created
September 1, 2014 22:11
-
-
Save zabustak/b05c43ffcd6bdc483c66 to your computer and use it in GitHub Desktop.
Pos cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.../PitOfSaron/boss_scourgelord_tyrannus.cpp | 59 ++++++++++++++++++++++ | |
1 file changed, 59 insertions(+) | |
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp | |
index 833c376..caaf06b 100644 | |
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp | |
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp | |
@@ -69,6 +69,10 @@ enum Spells | |
SPELL_EJECT_ALL_PASSENGERS = 50630, | |
SPELL_FULL_HEAL = 43979, | |
+ | |
+ SPELL_ICICLE_FALL = 69428, | |
+ SPELL_FALL_DAMAGE = 62236, | |
+ SPELL_ICICLE = 62234, | |
}; | |
enum Events | |
@@ -512,6 +516,60 @@ class at_tyrannus_event_starter : public AreaTriggerScript | |
} | |
}; | |
+ | |
+class npc_tyrannus_icicle : public CreatureScript | |
+{ | |
+ public: | |
+ npc_tyrannus_icicle() : CreatureScript("npc_tyrannus_icicle") { } | |
+ | |
+ CreatureAI* GetAI(Creature* pCreature) const | |
+ { | |
+ return new npc_tyrannus_icicleAI(pCreature); | |
+ } | |
+ | |
+ struct npc_tyrannus_icicleAI : public ScriptedAI | |
+ { | |
+ npc_tyrannus_icicleAI(Creature *c) : ScriptedAI(c) | |
+ { | |
+ pInstance = c->GetInstanceScript(); | |
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); | |
+ me->SetReactState(REACT_PASSIVE); | |
+ } | |
+ | |
+ void InitializeAI() OVERRIDE | |
+ { | |
+ if (!pInstance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName)) | |
+ me->IsAIEnabled = false; | |
+ } | |
+ | |
+ void Reset() | |
+ { | |
+ IcicleTimer = urand(3000, 9000); | |
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED); | |
+ me->SetReactState(REACT_PASSIVE); | |
+ } | |
+ | |
+ void UpdateAI(uint32(diff)) | |
+ { | |
+ if (pInstance->GetBossState(DATA_TYRANNUS) != DONE) | |
+ { | |
+ if (IcicleTimer <= diff) | |
+ { | |
+ DoCast(me, SPELL_FALL_DAMAGE); | |
+ DoCast(me, SPELL_ICICLE_FALL); | |
+ DoCast(me, SPELL_ICICLE); | |
+ IcicleTimer = urand(3000, 9000); | |
+ } | |
+ else IcicleTimer -= diff; | |
+ } | |
+ } | |
+ private: | |
+ InstanceScript* pInstance; | |
+ uint32 IcicleTimer; | |
+ }; | |
+ | |
+}; | |
+ | |
void AddSC_boss_tyrannus() | |
{ | |
new boss_tyrannus(); | |
@@ -519,4 +577,5 @@ void AddSC_boss_tyrannus() | |
new spell_tyrannus_overlord_brand(); | |
new spell_tyrannus_mark_of_rimefang(); | |
new at_tyrannus_event_starter(); | |
+ new npc_tyrannus_icicle(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment