mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/Auras: Use owner instead of caster for same map check in SPELL_EFFECT_APPLY_AREA_AURA_SUMMONS
This commit is contained in:
@@ -2386,7 +2386,7 @@ void UnitAura::FillTargetMap(std::unordered_map<Unit*, uint32>& targets, Unit* c
|
||||
Trinity::UnitListSearcher<Trinity::WorldObjectSpellAreaTargetCheck> searcher(GetUnitOwner(), units, check);
|
||||
Cell::VisitAllObjects(GetUnitOwner(), searcher, radius);
|
||||
// by design WorldObjectSpellAreaTargetCheck allows not-in-world units (for spells) but for auras it is not acceptable
|
||||
units.erase(std::remove_if(units.begin(), units.end(), [caster](Unit* unit) { return !unit->IsSelfOrInSameMap(caster); }), units.end());
|
||||
units.erase(std::remove_if(units.begin(), units.end(), [this](Unit* unit) { return !unit->IsSelfOrInSameMap(GetUnitOwner()); }), units.end());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user