Core/Spell: Fixed bug where spell could fail to hit a target properly even if all conditions were met
This commit is contained in:
@@ -2651,7 +2651,11 @@ namespace Game.Spells
|
||||
TriggerGlobalCooldown();
|
||||
|
||||
//item: first cast may destroy item and second cast causes crash
|
||||
if (m_casttime == 0 && m_spellInfo.StartRecoveryTime == 0 && m_castItemGUID.IsEmpty() && GetCurrentContainer() == CurrentSpellTypes.Generic)
|
||||
// commented out !m_spellInfo->StartRecoveryTime, it forces instant spells with global cooldown to be processed in spell::update
|
||||
// as a result a spell that passed CheckCast and should be processed instantly may suffer from this delayed process
|
||||
// the easiest bug to observe is LoS check in AddUnitTarget, even if spell passed the CheckCast LoS check the situation can change in spell::update
|
||||
// because target could be relocated in the meantime, making the spell fly to the air (no targets can be registered, so no effects processed, nothing in combat log)
|
||||
if (m_casttime == 0 && /*m_spellInfo.StartRecoveryTime == 0 && */ m_castItemGUID.IsEmpty() && GetCurrentContainer() == CurrentSpellTypes.Generic)
|
||||
cast(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user