diff options
author | Cannix <connex-castle@gmx.de> | 2018-02-17 16:46:26 +0100 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2021-08-08 21:21:34 +0200 |
commit | 64234b35ede0ec6e12048ec9a3dc8ae438ddb6e4 (patch) | |
tree | 8e12225e0f18841eba90ce3dfdeaad0b9aef95c0 /src | |
parent | 8713a623283b4d0e414a97b566854c1b21e8754b (diff) |
Core/Spells: Execute item casts immediately instead (#21396)
(cherry picked from commit 7e71b4535a0e927ecdee30489e5a3c0b6f247559)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 094cbb2045a..aff37de3ca9 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3116,12 +3116,11 @@ void Spell::prepare(SpellCastTargets const& targets, AuraEffect const* triggered if (!(_triggeredCastFlags & TRIGGERED_IGNORE_GCD)) 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 && /*!m_spellInfo->StartRecoveryTime && */!m_castItemGUID && GetCurrentContainer() == CURRENT_GENERIC_SPELL) + if (!m_casttime && /*!m_spellInfo->StartRecoveryTime && */ GetCurrentContainer() == CURRENT_GENERIC_SPELL) cast(true); } } |