aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-02-24 02:55:27 -0300
committerfunjoker <funjoker109@gmail.com>2021-08-08 21:21:34 +0200
commitffa359c21cf92810d2c927496749148ff6ea9042 (patch)
tree4e46f2eb8ae6988e7bba1c8f2cb5b74a2b11118c /src
parent32997a598992c5be7ad838b52b9e9a185d68d9fb (diff)
Core/Auras: check conditions against referer caster, just as spells do
Closes #21492 (cherry picked from commit 83292cd983474753393017c4f7ac3ba509fc4c83)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 66e50d60356..e906511df52 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -2278,7 +2278,7 @@ void UnitAura::FillTargetMap(std::unordered_map<Unit*, uint32>& targets, Unit* c
// non-area aura
if (effect->Effect == SPELL_EFFECT_APPLY_AURA)
{
- if (!condList || sConditionMgr->IsObjectMeetToConditions(GetUnitOwner(), GetUnitOwner(), *condList))
+ if (!condList || sConditionMgr->IsObjectMeetToConditions(GetUnitOwner(), caster, *condList))
units.push_back(GetUnitOwner());
}
else
@@ -2308,27 +2308,27 @@ void UnitAura::FillTargetMap(std::unordered_map<Unit*, uint32>& targets, Unit* c
selectionType = TARGET_CHECK_ENEMY;
break;
case SPELL_EFFECT_APPLY_AREA_AURA_PET:
- if (!condList || sConditionMgr->IsObjectMeetToConditions(GetUnitOwner(), GetUnitOwner(), *condList))
+ if (!condList || sConditionMgr->IsObjectMeetToConditions(GetUnitOwner(), caster, *condList))
units.push_back(GetUnitOwner());
/* fallthrough */
case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
{
if (Unit* owner = GetUnitOwner()->GetCharmerOrOwner())
if (GetUnitOwner()->IsWithinDistInMap(owner, radius))
- if (!condList || sConditionMgr->IsObjectMeetToConditions(owner, GetUnitOwner(), *condList))
+ if (!condList || sConditionMgr->IsObjectMeetToConditions(owner, caster, *condList))
units.push_back(owner);
break;
}
case SPELL_EFFECT_APPLY_AURA_ON_PET:
{
if (Unit* pet = ObjectAccessor::GetUnit(*GetUnitOwner(), GetUnitOwner()->GetPetGUID()))
- if (!condList || sConditionMgr->IsObjectMeetToConditions(pet, GetUnitOwner(), *condList))
+ if (!condList || sConditionMgr->IsObjectMeetToConditions(pet, caster, *condList))
units.push_back(pet);
break;
}
case SPELL_EFFECT_APPLY_AREA_AURA_SUMMONS:
{
- if (!condList || sConditionMgr->IsObjectMeetToConditions(GetUnitOwner(), GetUnitOwner(), *condList))
+ if (!condList || sConditionMgr->IsObjectMeetToConditions(GetUnitOwner(), caster, *condList))
units.push_back(GetUnitOwner());
selectionType = TARGET_CHECK_SUMMONED;
@@ -2338,7 +2338,7 @@ void UnitAura::FillTargetMap(std::unordered_map<Unit*, uint32>& targets, Unit* c
if (selectionType != TARGET_CHECK_DEFAULT)
{
- Trinity::WorldObjectSpellAreaTargetCheck check(radius, GetUnitOwner(), caster, GetUnitOwner(), m_spellInfo, selectionType, condList, TARGET_OBJECT_TYPE_UNIT);
+ Trinity::WorldObjectSpellAreaTargetCheck check(radius, GetUnitOwner(), caster, caster, m_spellInfo, selectionType, condList, TARGET_OBJECT_TYPE_UNIT);
Trinity::UnitListSearcher<Trinity::WorldObjectSpellAreaTargetCheck> searcher(GetUnitOwner(), units, check);
Cell::VisitAllObjects(GetUnitOwner(), searcher, radius);