aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-09-06 11:21:40 +0200
committerQAston <qaston@gmail.com>2011-09-06 11:21:40 +0200
commit94126e0369cfd46c522f86dc67d937462f7f9c60 (patch)
tree5fe14fadf8b413cf59a42f9edc6ae153df00aec3 /src
parent45609911442250dc5f2ef6d5081b03651cdb756c (diff)
Core/Spells: Fix some talents with incorrect target entries in dbcs. This is an alternative fix for #2848. Closes #2846 Closes #2848.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 6d10f40ae58..d456cfdcf47 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4752,6 +4752,11 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_DONT_REPORT;
}
+ // Don't check explicit target for passive spells (workaround) (check should be skipped only for learn case)
+ // those spells may have incorrect target entries or not filled at all (for example 15332)
+ // such spells when learned are not targeting anyone using targeting system, they should apply directly to caster instead
+ // also, such casts shouldn't be sent to client
+ if (!((m_spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !m_targets.GetUnitTarget() || m_targets.GetUnitTarget() == m_caster))
{
// Check explicit target for m_originalCaster - todo: get rid of such workarounds
SpellCastResult castResult = m_spellInfo->CheckExplicitTarget(m_originalCaster ? m_originalCaster : m_caster, m_targets.GetObjectTarget(), m_targets.GetItemTarget());