aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index d3923d99233..4fce14950eb 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1212,10 +1212,10 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
}
}
- if(unit->GetTypeId() == TYPEID_UNIT && ((Creature*)unit)->AI())
+ if(unit->GetTypeId() == TYPEID_UNIT && ((Creature*)unit)->IsAIEnabled)
((Creature*)unit)->AI()->SpellHit(m_caster, m_spellInfo);
- if(m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->AI())
+ if(m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->IsAIEnabled)
((Creature*)m_caster)->AI()->SpellHitTarget(unit, m_spellInfo);
for(ChanceTriggerSpells::const_iterator i = m_ChanceTriggerSpells.begin(); i != m_ChanceTriggerSpells.end(); ++i)