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

@@ -4030,7 +4030,7 @@ void SmartScript::GetWorldObjectsInDist(ObjectVector& targets, float dist) const
Acore::AllWorldObjectsInRange u_check(obj, dist);
Acore::WorldObjectListSearcher<Acore::AllWorldObjectsInRange> searcher(obj, targets, u_check);
Cell::VisitAllObjects(obj, searcher, dist);
Cell::VisitObjects(obj, searcher, dist);
}
void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob)
@@ -5252,7 +5252,7 @@ Unit* SmartScript::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff) const
Acore::MostHPMissingInRange u_check(me, range, MinHPDiff);
Acore::UnitLastSearcher<Acore::MostHPMissingInRange> searcher(me, unit, u_check);
Cell::VisitGridObjects(me, searcher, range);
Cell::VisitObjects(me, searcher, range);
return unit;
}
@@ -5266,7 +5266,7 @@ Unit* SmartScript::DoSelectLowestHpPercentFriendly(float range, uint32 minHpPct,
Unit* unit = nullptr;
Acore::MostHPPercentMissingInRange u_check(me, range, minHpPct, maxHpPct);
Acore::UnitLastSearcher<Acore::MostHPPercentMissingInRange> searcher(me, unit, u_check);
Cell::VisitGridObjects(me, searcher, range);
Cell::VisitObjects(me, searcher, range);
return unit;
}
@@ -5277,7 +5277,7 @@ void SmartScript::DoFindFriendlyCC(std::vector<Creature*>& creatures, float rang
Acore::FriendlyCCedInRange u_check(me, range);
Acore::CreatureListSearcher<Acore::FriendlyCCedInRange> searcher(me, creatures, u_check);
Cell::VisitGridObjects(me, searcher, range);
Cell::VisitObjects(me, searcher, range);
}
void SmartScript::DoFindFriendlyMissingBuff(std::vector<Creature*>& creatures, float range, uint32 spellid) const
@@ -5287,7 +5287,7 @@ void SmartScript::DoFindFriendlyMissingBuff(std::vector<Creature*>& creatures, f
Acore::FriendlyMissingBuffInRange u_check(me, range, spellid);
Acore::CreatureListSearcher<Acore::FriendlyMissingBuffInRange> searcher(me, creatures, u_check);
Cell::VisitGridObjects(me, searcher, range);
Cell::VisitObjects(me, searcher, range);
}
Unit* SmartScript::DoFindClosestFriendlyInRange(float range, bool playerOnly) const
@@ -5298,7 +5298,7 @@ Unit* SmartScript::DoFindClosestFriendlyInRange(float range, bool playerOnly) co
Unit* unit = nullptr;
Acore::AnyFriendlyNotSelfUnitInObjectRangeCheck u_check(me, me, range, playerOnly);
Acore::UnitLastSearcher<Acore::AnyFriendlyNotSelfUnitInObjectRangeCheck> searcher(me, unit, u_check);
Cell::VisitAllObjects(me, searcher, range);
Cell::VisitObjects(me, searcher, range);
return unit;
}