aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp10
2 files changed, 16 insertions, 18 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
index 6c872e8acd9..3223039ee2e 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
@@ -506,26 +506,24 @@ public:
DrinkInturrupted = true;
}
- void SpellHit(Unit* /*pAttacker*/, const SpellInfo* Spell) override
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
- //We only care about interrupt effects and only if they are durring a spell currently being cast
- for (SpellEffectInfo const* effect : Spell->GetEffectsForDifficulty(me->GetMap()->GetDifficultyID()))
- if (effect && effect->Effect == SPELL_EFFECT_INTERRUPT_CAST && me->IsNonMeleeSpellCast(false))
- {
- //Interrupt effect
- me->InterruptNonMeleeSpells(false);
+ // We only care about interrupt effects and only if they are durring a spell currently being cast
+ if (spellInfo->HasEffect(SPELL_EFFECT_INTERRUPT_CAST) && me->IsNonMeleeSpellCast(false))
+ {
+ // Interrupt effect
+ me->InterruptNonMeleeSpells(false);
- //Normally we would set the cooldown equal to the spell duration
- //but we do not have access to the DurationStore
+ // Normally we would set the cooldown equal to the spell duration
+ // but we do not have access to the DurationStore
- switch (CurrentNormalSpell)
- {
+ switch (CurrentNormalSpell)
+ {
case SPELL_ARCMISSLE: ArcaneCooldown = 5000; break;
case SPELL_FIREBALL: FireCooldown = 5000; break;
case SPELL_FROSTBOLT: FrostCooldown = 5000; break;
- }
- return;
}
+ }
}
void MoveInLineOfSight(Unit* who) override
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
index c4663fac354..9db3d07fe9a 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
@@ -31,7 +31,7 @@ EndScriptData */
#include "ObjectAccessor.h"
#include "Player.h"
#include "ScriptedCreature.h"
-#include "SpellMgr.h"
+#include "SpellInfo.h"
#include "uldaman.h"
enum Says
@@ -127,10 +127,10 @@ class boss_archaedas : public CreatureScript
me->SetControlled(false, UNIT_STATE_ROOT);
}
- void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
// Being woken up from the altar, start the awaken sequence
- if (spell == sSpellMgr->GetSpellInfo(SPELL_ARCHAEDAS_AWAKEN))
+ if (spellInfo->Id == SPELL_ARCHAEDAS_AWAKEN)
{
Talk(SAY_AGGRO);
iAwakenTimer = 4000;
@@ -278,10 +278,10 @@ class npc_archaedas_minions : public CreatureScript
bAmIAwake = true;
}
- void SpellHit(Unit * /*caster*/, const SpellInfo* spell) override
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
// time to wake up, start animation
- if (spell == sSpellMgr->GetSpellInfo(SPELL_ARCHAEDAS_AWAKEN))
+ if (spellInfo->Id == SPELL_ARCHAEDAS_AWAKEN)
{
iAwakenTimer = 5000;
bWakingUp = true;