diff options
author | megamage <none@none> | 2009-08-07 16:12:50 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-07 16:12:50 -0500 |
commit | 0f7b23070fd61ac4afd65d415bd56876d3716ea1 (patch) | |
tree | a99ec14cb86d8b5f670a0a2efc0dc0f136b6a7c6 /src/game/Unit.cpp | |
parent | 74357a8971c45851f5b00415fbc52b8bb168c0b7 (diff) |
*Fix a bug introduced in 3874. This makes IsNonMeleeSpellCasted cannot correctly check if caster is casting.
*This fixes the bug that Heigan chases players when he is channelling.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 5c666f3778f..d6abba40659 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3502,15 +3502,17 @@ bool Unit::IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled, bool skip if ( m_currentSpells[CURRENT_GENERIC_SPELL] && (m_currentSpells[CURRENT_GENERIC_SPELL]->getState() != SPELL_STATE_FINISHED) && (withDelayed || m_currentSpells[CURRENT_GENERIC_SPELL]->getState() != SPELL_STATE_DELAYED) ) + { if (!isAutoshoot || !(m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_RESET_AUTOSHOT)) return(true); - + } // channeled spells may be delayed, but they are still considered casted else if ( !skipChanneled && m_currentSpells[CURRENT_CHANNELED_SPELL] && (m_currentSpells[CURRENT_CHANNELED_SPELL]->getState() != SPELL_STATE_FINISHED) ) + { if (!isAutoshoot || !(m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_RESET_AUTOSHOT)) return(true); - + } // autorepeat spells may be finished or delayed, but they are still considered casted else if ( !skipAutorepeat && m_currentSpells[CURRENT_AUTOREPEAT_SPELL] ) return(true); |