feat(Core/Grids): Remove WorldObject separation in grid containers (#22595)

This commit is contained in:
Takenbacon
2025-08-08 21:36:24 -07:00
committed by GitHub
parent c97cee1e4f
commit 73317b2706
63 changed files with 160 additions and 313 deletions

View File

@@ -2823,7 +2823,7 @@ void UnitAura::FillTargetMap(std::map<Unit*, uint8>& targets, Unit* caster)
targetList.push_back(GetUnitOwner());
Acore::AnyGroupedUnitInObjectRangeCheck u_check(GetUnitOwner(), GetUnitOwner(), radius, GetSpellInfo()->Effects[effIndex].Effect == SPELL_EFFECT_APPLY_AREA_AURA_RAID);
Acore::UnitListSearcher<Acore::AnyGroupedUnitInObjectRangeCheck> searcher(GetUnitOwner(), targetList, u_check);
Cell::VisitAllObjects(GetUnitOwner(), searcher, radius);
Cell::VisitObjects(GetUnitOwner(), searcher, radius);
break;
}
case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND:
@@ -2831,14 +2831,14 @@ void UnitAura::FillTargetMap(std::map<Unit*, uint8>& targets, Unit* caster)
targetList.push_back(GetUnitOwner());
Acore::AnyFriendlyUnitInObjectRangeCheck u_check(GetUnitOwner(), GetUnitOwner(), radius);
Acore::UnitListSearcher<Acore::AnyFriendlyUnitInObjectRangeCheck> searcher(GetUnitOwner(), targetList, u_check);
Cell::VisitAllObjects(GetUnitOwner(), searcher, radius);
Cell::VisitObjects(GetUnitOwner(), searcher, radius);
break;
}
case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY:
{
Acore::AnyAoETargetUnitInObjectRangeCheck u_check(GetUnitOwner(), GetUnitOwner(), radius); // No GetCharmer in searcher
Acore::UnitListSearcher<Acore::AnyAoETargetUnitInObjectRangeCheck> searcher(GetUnitOwner(), targetList, u_check);
Cell::VisitAllObjects(GetUnitOwner(), searcher, radius);
Cell::VisitObjects(GetUnitOwner(), searcher, radius);
break;
}
case SPELL_EFFECT_APPLY_AREA_AURA_PET:
@@ -2900,7 +2900,7 @@ void DynObjAura::FillTargetMap(std::map<Unit*, uint8>& targets, Unit* /*caster*/
{
Acore::AnyFriendlyUnitInObjectRangeCheck u_check(GetDynobjOwner(), dynObjOwnerCaster, radius);
Acore::UnitListSearcher<Acore::AnyFriendlyUnitInObjectRangeCheck> searcher(GetDynobjOwner(), targetList, u_check);
Cell::VisitAllObjects(GetDynobjOwner(), searcher, radius);
Cell::VisitObjects(GetDynobjOwner(), searcher, radius);
}
// pussywizard: TARGET_DEST_DYNOBJ_NONE is supposed to search for both friendly and unfriendly targets, so for any unit
// what about EffectImplicitTargetA?
@@ -2908,13 +2908,13 @@ void DynObjAura::FillTargetMap(std::map<Unit*, uint8>& targets, Unit* /*caster*/
{
Acore::AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck u_check(GetDynobjOwner(), dynObjOwnerCaster, radius);
Acore::UnitListSearcher<Acore::AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck> searcher(GetDynobjOwner(), targetList, u_check);
Cell::VisitAllObjects(GetDynobjOwner(), searcher, radius);
Cell::VisitObjects(GetDynobjOwner(), searcher, radius);
}
else
{
Acore::AnyAoETargetUnitInObjectRangeCheck u_check(GetDynobjOwner(), dynObjOwnerCaster, radius);
Acore::UnitListSearcher<Acore::AnyAoETargetUnitInObjectRangeCheck> searcher(GetDynobjOwner(), targetList, u_check);
Cell::VisitAllObjects(GetDynobjOwner(), searcher, radius);
Cell::VisitObjects(GetDynobjOwner(), searcher, radius);
}
for (UnitList::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)