aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2016-12-30 17:41:47 +0100
committerariel- <ariel-@users.noreply.github.com>2016-12-30 13:41:47 -0300
commit464d3ad5d09d58136911f4ad09335f53049ac628 (patch)
tree71faf86ec1cbf13e986b84273a3713aa95d6ca6c /src
parentbcfe41e5694e1780c6417ee03071d3b94b979099 (diff)
Core/Spell: Fixed bug where spell could fail to hit a target properly even if all conditions were met (#18596)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 1a9fbf94a15..0071aa23f37 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3069,7 +3069,11 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
TriggerGlobalCooldown();
//item: first cast may destroy item and second cast causes crash
- if (!m_casttime && !m_spellInfo->StartRecoveryTime && !m_castItemGUID && GetCurrentContainer() == CURRENT_GENERIC_SPELL)
+ // 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)
cast(true);
}
}