diff options
Diffstat (limited to 'src/game/SpellEffects.cpp')
| -rw-r--r-- | src/game/SpellEffects.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 9ee2050a6ab..86c2235cdb5 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1824,7 +1824,8 @@ void Spell::EffectTriggerSpell(uint32 i) return; // get highest rank of the Stealth spell - uint32 spellId = 0; + bool found = false; + SpellEntry const *spellInfo; const PlayerSpellMap& sp_list = ((Player*)m_caster)->GetSpellMap(); for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr) { @@ -1832,26 +1833,26 @@ void Spell::EffectTriggerSpell(uint32 i) if(!itr->second->active || itr->second->disabled || itr->second->state == PLAYERSPELL_REMOVED) continue; - SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); + spellInfo = sSpellStore.LookupEntry(itr->first); if (!spellInfo) continue; if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE_STEALTH) { - spellId = spellInfo->Id; + found=true; break; } } // no Stealth spell found - if (!spellId) + if (!found) return; // reset cooldown on it if needed - if(((Player*)m_caster)->HasSpellCooldown(spellId)) - ((Player*)m_caster)->RemoveSpellCooldown(spellId); + if(((Player*)m_caster)->HasSpellCooldown(spellInfo->Id)) + ((Player*)m_caster)->RemoveSpellCooldown(spellInfo->Id); - m_caster->CastSpell(m_caster, spellId, true); + m_TriggerSpells.push_back(spellInfo); return; } // just skip @@ -1961,8 +1962,7 @@ void Spell::EffectTriggerSpell(uint32 i) for(uint32 j = i+1; j < 3; ++j) { if(m_spellInfo->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER - && (m_spellInfo->Effect[j]==SPELL_EFFECT_INSTAKILL - || m_spellInfo->Effect[j]==SPELL_EFFECT_SANCTUARY)) + && (m_spellInfo->Effect[j]==SPELL_EFFECT_INSTAKILL)) { instant = true; break; |
