aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-12-29 03:34:54 -0300
committerDoctorKraft <DoctorKraft@users.noreply.github.com>2018-03-18 00:19:43 +0100
commitb03a2c3736283cbf44bb1e715c99c908b82b21bb (patch)
treebb11de181235f0507f330f08c3d19cb90d91fdb9 /src
parent18b4e5d4bdadca44f97edb24031113f501ad9a9d (diff)
Core/Spell: Prevent NO_TARGET auras from actually selecting target (same as caster)
- Fixes an issue with generic mount scripts where the dummy aura was applied and removed then the real mount was applied - Pets would be unsummoned, resummoned and unsummoned again in an instant Closes #16783 (cherry picked from commit 584d347b70be521d7431dfe1694b80f2e95b957b)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 2592c973e8d..1178f7ce3ed 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -691,7 +691,9 @@ uint32 SpellEffectInfo::GetProvidedTargetMask() const
uint32 SpellEffectInfo::GetMissingTargetMask(bool srcSet /*= false*/, bool dstSet /*= false*/, uint32 mask /*=0*/) const
{
uint32 effImplicitTargetMask = GetTargetFlagMask(GetUsedTargetObjectType());
- uint32 providedTargetMask = GetTargetFlagMask(TargetA.GetObjectType()) | GetTargetFlagMask(TargetB.GetObjectType()) | mask;
+ uint32 providedTargetMask = GetProvidedTargetMask() | mask;
+ if (!providedTargetMask) // no targets to select
+ return 0;
// remove all flags covered by effect target mask
if (providedTargetMask & TARGET_FLAG_UNIT_MASK)