From ffa359c21cf92810d2c927496749148ff6ea9042 Mon Sep 17 00:00:00 2001 From: ariel- Date: Sat, 24 Feb 2018 02:55:27 -0300 Subject: Core/Auras: check conditions against referer caster, just as spells do Closes #21492 (cherry picked from commit 83292cd983474753393017c4f7ac3ba509fc4c83) --- src/server/game/Spells/Auras/SpellAuras.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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& 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& 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& 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 searcher(GetUnitOwner(), units, check); Cell::VisitAllObjects(GetUnitOwner(), searcher, radius); -- cgit v1.2.3