mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
refactor(Core/Grids): Ported cmangos/mangos-wotlk@ea99457 (#6113)
* refactor(Core/Grids): Ported cmangos/mangos-wotlk@ea99457
(cherry picked from commit d6201e5dbb)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: SilverIce <slifeleaf@gmail.com>
* Update CellImpl.h
* w
* more more brackets
* ew
* fix build
This commit is contained in:
@@ -381,7 +381,7 @@ Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 minHPDiff)
|
||||
Unit* unit = nullptr;
|
||||
Acore::MostHPMissingInRange u_check(me, range, minHPDiff);
|
||||
Acore::UnitLastSearcher<Acore::MostHPMissingInRange> searcher(me, unit, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
Cell::VisitAllObjects(me, searcher, range);
|
||||
|
||||
return unit;
|
||||
}
|
||||
@@ -391,7 +391,7 @@ std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range)
|
||||
std::list<Creature*> list;
|
||||
Acore::FriendlyCCedInRange u_check(me, range);
|
||||
Acore::CreatureListSearcher<Acore::FriendlyCCedInRange> searcher(me, list, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
Cell::VisitAllObjects(me, searcher, range);
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ std::list<Creature*> ScriptedAI::DoFindFriendlyMissingBuff(float range, uint32 u
|
||||
std::list<Creature*> list;
|
||||
Acore::FriendlyMissingBuffInRange u_check(me, range, uiSpellid);
|
||||
Acore::CreatureListSearcher<Acore::FriendlyMissingBuffInRange> searcher(me, list, u_check);
|
||||
me->VisitNearbyObject(range, searcher);
|
||||
Cell::VisitAllObjects(me, searcher, range);
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -408,15 +408,10 @@ Player* ScriptedAI::GetPlayerAtMinimumRange(float minimumRange)
|
||||
{
|
||||
Player* player = nullptr;
|
||||
|
||||
CellCoord pair(Acore::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
|
||||
Cell cell(pair);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Acore::PlayerAtMinimumRangeAway check(me, minimumRange);
|
||||
Acore::PlayerSearcher<Acore::PlayerAtMinimumRangeAway> searcher(me, player, check);
|
||||
TypeContainerVisitor<Acore::PlayerSearcher<Acore::PlayerAtMinimumRangeAway>, GridTypeMapContainer> visitor(searcher);
|
||||
|
||||
cell.Visit(pair, visitor, *me->GetMap(), *me, minimumRange);
|
||||
Cell::VisitWorldObjects(me, searcher, minimumRange);
|
||||
|
||||
return player;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user