aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorazazel <none@none>2010-12-24 17:59:54 +0600
committerazazel <none@none>2010-12-24 17:59:54 +0600
commit8a8dedfd6ef11d919ec8e821c0a8829a607fc619 (patch)
treed839338e77f8e609b29e0527ffc10cd787d16f47 /src
parent928443d8993869dfbf3adceabe4ba0b3cfe0edef (diff)
Scripts/HoL: fix Ionar dispersing into sparks (by tassader1000) Closes issue #4573
Fix tested and approved by Aokromes and kiper. NOTE: Do not forget the DB part of the commit! --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp42
1 files changed, 17 insertions, 25 deletions
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
index c5068c3080f..7e6bfe6fce4 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
@@ -71,30 +71,6 @@ class boss_ionar : public CreatureScript
public:
boss_ionar() : CreatureScript("boss_ionar") { }
- bool EffectDummyCreature(Unit* /*pCaster*/, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget)
- {
- //always check spellid and effectindex
- if (uiSpellId == SPELL_DISPERSE && uiEffIndex == 0)
- {
- if (pCreatureTarget->GetEntry() != NPC_IONAR)
- return true;
-
- for (uint8 i = 0; i < DATA_MAX_SPARKS; ++i)
- pCreatureTarget->CastSpell(pCreatureTarget, SPELL_SUMMON_SPARK, true);
-
- pCreatureTarget->AttackStop();
- pCreatureTarget->SetVisible(false);
- pCreatureTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE);
-
- pCreatureTarget->GetMotionMaster()->Clear();
- pCreatureTarget->GetMotionMaster()->MoveIdle();
-
- //always return true when we are handling this spell and effect
- return true;
- }
- return false;
- }
-
CreatureAI* GetAI(Creature* pCreature) const
{
return new boss_ionarAI(pCreature);
@@ -167,6 +143,22 @@ public:
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), me);
}
+ void SpellHit(Unit* /*caster*/, const SpellEntry* spell)
+ {
+ if (spell->Id == SPELL_DISPERSE)
+ {
+ for (uint8 i = 0; i < DATA_MAX_SPARKS; ++i)
+ me->CastSpell(me, SPELL_SUMMON_SPARK, true);
+
+ me->AttackStop();
+ me->SetVisible(false);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE);
+
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveIdle();
+ }
+ }
+
//make sparks come back
void CallBackSparks()
{
@@ -291,7 +283,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false);
- DoCast(me, SPELL_DISPERSE, true);
+ DoCast(me, SPELL_DISPERSE, false);
}
DoMeleeAttackIfReady();