diff options
| author | megamage <none@none> | 2009-05-06 09:36:51 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-06 09:36:51 -0500 |
| commit | 22667d3ee6ee258e60a711e2d1a504a9769d071c (patch) | |
| tree | 8d67e06df3beeacec2d19eb9d03ff8e7e353f41e /src/bindings/scripts | |
| parent | 50dc00cce0f6efc4424be7648d33c38cc189c54c (diff) | |
*Update script of heigan.
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts')
| -rw-r--r-- | src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp | 70 |
1 files changed, 51 insertions, 19 deletions
diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp index 54b9c5d57cd..9207b2c09a2 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp @@ -29,20 +29,22 @@ EndScriptData */ #define SAY_TAUNT RAND(-1533113,-1533114,-1533115,-1533116,-1533117) #define SAY_DEATH -1533118 -//Spells by boss -#define SPELL_WILT 23772 -#define SPELL_FEAVER 29998 - #define SPELL_SPELL_DISRUPTION 29310 #define SPELL_DECREPIT_FEVER HEROIC(29998,55011) -#define SPELL_PLAGUE_CLOUD 30122 +#define SPELL_PLAGUE_CLOUD 29350 enum Events { EVENT_DISRUPT = 1, EVENT_FEVER, - EVENT_CLOUD, EVENT_ERUPT, + EVENT_PHASE, +}; + +enum Phases +{ + PHASE_FIGHT = 1, + PHASE_DANCE, }; //Spell by eye stalks @@ -57,6 +59,9 @@ struct TRINITY_DLL_DECL boss_heiganAI : public ScriptedAI EventMap events; ScriptedInstance *instance; + uint32 eruptSection; + bool eruptDirection; + Phases phase; void Reset() { @@ -80,12 +85,33 @@ struct TRINITY_DLL_DECL boss_heiganAI : public ScriptedAI { DoScriptText(SAY_AGGRO, me); DoZoneInCombat(); - events.ScheduleEvent(EVENT_FEVER, 1200); - events.ScheduleEvent(EVENT_CLOUD, 360000); - events.ScheduleEvent(EVENT_ERUPT, 3000); + EnterPhase(PHASE_FIGHT); instance->SetBossState(BOSS_HEIGAN, IN_PROGRESS); } + void EnterPhase(Phases newPhase) + { + phase = newPhase; + events.Reset(); + eruptSection = 3; + if(phase == PHASE_FIGHT) + { + events.ScheduleEvent(EVENT_DISRUPT, 0); + events.ScheduleEvent(EVENT_FEVER, 20000); + events.ScheduleEvent(EVENT_PHASE, 85000); + events.ScheduleEvent(EVENT_ERUPT, 10000); + } + else + { + float x, y, z, o; + me->GetHomePosition(x, y, z, o); + me->NearTeleportTo(x, y, z, o); + DoCastAOE(SPELL_PLAGUE_CLOUD); + events.ScheduleEvent(EVENT_PHASE, 45000); + events.ScheduleEvent(EVENT_ERUPT, 5000); + } + } + void UpdateAI(const uint32 diff) { if(!UpdateVictim()) @@ -98,21 +124,27 @@ struct TRINITY_DLL_DECL boss_heiganAI : public ScriptedAI switch(eventId) { case EVENT_DISRUPT: - events.ScheduleEvent(EVENT_DISRUPT, 1200); + DoCastAOE(SPELL_SPELL_DISRUPTION); + events.ScheduleEvent(EVENT_DISRUPT, 5000); return; case EVENT_FEVER: - events.ScheduleEvent(EVENT_FEVER, 2000); + DoCastAOE(SPELL_DECREPIT_FEVER); + events.ScheduleEvent(EVENT_FEVER, 20000); return; - case EVENT_CLOUD: - events.ScheduleEvent(EVENT_CLOUD, 2000); + case EVENT_PHASE: + EnterPhase(phase == PHASE_FIGHT ? PHASE_DANCE : PHASE_FIGHT); return; case EVENT_ERUPT: - if(instance) - { - uint32 section = rand()%4; - instance->SetData(DATA_HEIGAN_ERUPT, section); - } - events.ScheduleEvent(EVENT_ERUPT, 2000); + instance->SetData(DATA_HEIGAN_ERUPT, eruptSection); + + if(eruptSection == 0) + eruptDirection = true; + else if(eruptSection == 3) + eruptDirection = false; + + eruptDirection ? ++eruptSection : --eruptSection; + + events.ScheduleEvent(EVENT_ERUPT, phase == PHASE_FIGHT ? 10000 : 3000); break; } } |
