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 | |
parent | 50dc00cce0f6efc4424be7648d33c38cc189c54c (diff) |
*Update script of heigan.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp | 70 | ||||
-rw-r--r-- | src/game/Spell.cpp | 3 | ||||
-rw-r--r-- | src/game/Unit.cpp | 5 |
3 files changed, 56 insertions, 22 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; } } diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index c863e8cc933..912bea7e89b 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2297,7 +2297,8 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura ReSetTimer(); //Containers for channeled spells have to be set //TODO:Apply this to all casted spells if needed - if(m_IsTriggeredSpell && !IsChanneledSpell(m_spellInfo)) + // Why check m_casttime? 29350: channelled triggers channelled + if(m_IsTriggeredSpell && (!IsChanneledSpell(m_spellInfo) || !m_casttime)) cast(true); else { diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 093ef51925c..c9ef3125372 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -13861,11 +13861,12 @@ void Unit::NearTeleportTo( float x, float y, float z, float orientation, bool ca DestroyForNearbyPlayers(); GetMap()->CreatureRelocation((Creature*)this, x, y, z, orientation); + ObjectAccessor::UpdateObjectVisibility(this); //WorldPacket data; // Work strange for many spells: triggered active mover set for targeted player to creature //BuildTeleportAckMsg(&data, x, y, z, orientation); - BuildHeartBeatMsg(&data); - SendMessageToSet(&data, false); + //BuildHeartBeatMsg(&data); + //SendMessageToSet(&data, false); } } |