Core/Spells: Correct meaning & usage of SPELL_ATTR_EX2_NOT_RESET_AUTOSHOOT (now SPELL_ATTR_EX2_NOT_RESET_AUTO_ACTIONS) to ignore timer reset for both melee swings and ranged autoshoots, fixes issue 2639

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-09-12 23:52:37 +03:00
parent c4028111bd
commit cbe95da41a
4 changed files with 7 additions and 9 deletions
+3 -4
View File
@@ -3738,7 +3738,7 @@ void Spell::finish(bool ok)
}
}
if (IsMeleeAttackResetSpell())
if (IsAutoActionResetSpell())
{
bool found = false;
Unit::AuraEffectList const& vIgnoreReset = m_caster->GetAuraEffectsByType(SPELL_AURA_IGNORE_MELEE_RESET);
@@ -3750,13 +3750,12 @@ void Spell::finish(bool ok)
break;
}
}
if (!found)
if (!found && !(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_RESET_AUTO_ACTIONS))
{
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);
m_caster->resetAttackTimer(RANGED_ATTACK);
}
}
+1 -2
View File
@@ -516,8 +516,7 @@ class Spell
}
bool IsTriggered() const {return m_IsTriggeredSpell;};
bool IsChannelActive() const { return m_caster->GetUInt32Value(UNIT_CHANNEL_SPELL) != 0; }
bool IsMeleeAttackResetSpell() const { return !m_IsTriggeredSpell && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK); }
bool IsRangedAttackResetSpell() const { return !m_IsTriggeredSpell && /*IsRangedSpell() &&*/ !(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_RESET_AUTOSHOT); }
bool IsAutoActionResetSpell() const { return !m_IsTriggeredSpell && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK); }
bool IsDeletable() const { return !m_referencedFromCurrentSpell && !m_executedCurrently; }
void SetReferencedFromCurrent(bool yes) { m_referencedFromCurrentSpell = yes; }