diff options
| author | thenecromancer <none@none> | 2010-01-24 15:43:58 +0100 |
|---|---|---|
| committer | thenecromancer <none@none> | 2010-01-24 15:43:58 +0100 |
| commit | 81321b390a828ce5f25f9f70502d831f49595e66 (patch) | |
| tree | f7089d901f94bb8da1660557f0d937104b2a9f72 /src/game/Spell.cpp | |
| parent | 372bef8a553afb50e41bad446363b4aad5cb9f38 (diff) | |
Add support for Maelstrom Weapon to prevent melee attack interruption when affecting spells
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
| -rw-r--r-- | src/game/Spell.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index f48a808225d..daa9f71289e 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3369,11 +3369,24 @@ void Spell::finish(bool ok) if (IsMeleeAttackResetSpell()) { - m_caster->resetAttackTimer(BASE_ATTACK); - if(m_caster->haveOffhandWeapon()) - m_caster->resetAttackTimer(OFF_ATTACK); - if(!(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_RESET_AUTOSHOT)) - m_caster->resetAttackTimer(RANGED_ATTACK); + bool found = false; + Unit::AuraEffectList const& vIgnoreReset = m_caster->GetAuraEffectsByType(SPELL_AURA_IGNORE_MELEE_RESET); + for (Unit::AuraEffectList::const_iterator i = vIgnoreReset.begin(); i != vIgnoreReset.end(); ++i) + { + if ((*i)->IsAffectedOnSpell(m_spellInfo)) + { + found = true; + break; + } + } + if (!found) + { + m_caster->resetAttackTimer(BASE_ATTACK); + if(m_caster->haveOffhandWeapon()) + m_caster->resetAttackTimer(OFF_ATTACK); + if(!(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_RESET_AUTOSHOT)) + m_caster->resetAttackTimer(RANGED_ATTACK); + } } // potions disabled by client, send event "not in combat" if need |
