mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-27 20:32:21 +01:00
*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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user