Core/Spells: Execute item casts immediately instead
Port From (https://github.com/TrinityCore/TrinityCore/commit/64234b35ede0ec6e12048ec9a3dc8ae438ddb6e4)
This commit is contained in:
@@ -2605,12 +2605,11 @@ namespace Game.Spells
|
||||
if (!_triggeredCastFlags.HasAnyFlag(TriggerCastFlags.IgnoreGCD))
|
||||
TriggerGlobalCooldown();
|
||||
|
||||
//item: first cast may destroy item and second cast causes crash
|
||||
// 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)
|
||||
if (m_casttime == 0 && /*m_spellInfo.StartRecoveryTime == 0 && */ GetCurrentContainer() == CurrentSpellTypes.Generic)
|
||||
Cast(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user