aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r--src/game/SpellMgr.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index a522d8c051a..f9d607010ca 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -597,6 +597,13 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep)
break;
}
+ // Special case: effects which determine positivity of whole spell
+ for (uint8 i = 0;i<MAX_SPELL_EFFECTS;++i)
+ {
+ if (spellproto->EffectApplyAuraName[i] == SPELL_AURA_MOD_STEALTH)
+ return true;
+ }
+
switch(spellproto->Effect[effIndex])
{
// always positive effects (check before target checks that provided non-positive result in some case for positive effects)
@@ -1349,9 +1356,6 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
// Exist req for PROC_EX_EX_TRIGGER_ALWAYS
if ((procExtra & AURA_SPELL_PROC_EX_MASK) && (procEvent_procEx & PROC_EX_EX_TRIGGER_ALWAYS))
return true;
- // Passive spells can`t trigger if need hit
- if ((procEvent_procEx & PROC_EX_NORMAL_HIT))
- return false;
// Check Extra Requirement like (hit/crit/miss/resist/parry/dodge/block/immune/reflect/absorb and other)
if (procEvent_procEx & procExtra)
return true;
@@ -2249,7 +2253,9 @@ void SpellMgr::LoadSpellAreas()
spellArea.gender = Gender(fields[7].GetUInt8());
spellArea.autocast = fields[8].GetBool();
- if(!sSpellStore.LookupEntry(spell))
+ if(const SpellEntry* spellInfo = sSpellStore.LookupEntry(spell))
+ const_cast<SpellEntry*>(spellInfo)->Attributes |= SPELL_ATTR_CANT_CANCEL;
+ else
{
sLog.outErrorDb("Spell %u listed in `spell_area` does not exist", spell);
continue;