refactor(Core/Misc): acore to Acore (#6043)

This commit is contained in:
Kitzunu
2021-05-31 14:21:54 +02:00
committed by GitHub
parent 7eeae6866e
commit 897a02bb75
224 changed files with 942 additions and 942 deletions

View File

@@ -165,7 +165,7 @@ public:
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(acore::PowerCheck(POWER_MANA, false));
targets.remove_if(Acore::PowerCheck(POWER_MANA, false));
}
void Register() override

View File

@@ -888,16 +888,16 @@ void hyjalAI::JustDied(Unit* /*killer*/)
void hyjalAI::HideNearPos(float x, float y)
{
CellCoord pair(acore::ComputeCellCoord(x, y));
CellCoord pair(Acore::ComputeCellCoord(x, y));
Cell cell(pair);
cell.SetNoCreate();
// First get all creatures.
std::list<Creature*> creatures;
acore::AllFriendlyCreaturesInGrid creature_check(me);
acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid> creature_searcher(me, creatures, creature_check);
Acore::AllFriendlyCreaturesInGrid creature_check(me);
Acore::CreatureListSearcher<Acore::AllFriendlyCreaturesInGrid> creature_searcher(me, creatures, creature_check);
TypeContainerVisitor <acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> creature_visitor(creature_searcher);
TypeContainerVisitor <Acore::CreatureListSearcher<Acore::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> creature_visitor(creature_searcher);
cell.Visit(pair, creature_visitor, *(me->GetMap()), *me, me->GetGridActivationRange());
if (!creatures.empty())
@@ -912,13 +912,13 @@ void hyjalAI::HideNearPos(float x, float y)
void hyjalAI::RespawnNearPos(float x, float y)
{
CellCoord p(acore::ComputeCellCoord(x, y));
CellCoord p(Acore::ComputeCellCoord(x, y));
Cell cell(p);
cell.SetNoCreate();
acore::RespawnDo u_do;
acore::WorldObjectWorker<acore::RespawnDo> worker(me, u_do);
TypeContainerVisitor<acore::WorldObjectWorker<acore::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
Acore::RespawnDo u_do;
Acore::WorldObjectWorker<Acore::RespawnDo> worker(me, u_do);
TypeContainerVisitor<Acore::WorldObjectWorker<Acore::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
cell.Visit(p, obj_worker, *me->GetMap(), *me, me->GetGridActivationRange());
}
@@ -943,16 +943,16 @@ void hyjalAI::WaypointReached(uint32 waypointId)
}
//do some talking
//all alive guards walk near here
CellCoord pair(acore::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
CellCoord pair(Acore::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(pair);
cell.SetNoCreate();
// First get all creatures.
std::list<Creature*> creatures;
acore::AllFriendlyCreaturesInGrid creature_check(me);
acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid> creature_searcher(me, creatures, creature_check);
Acore::AllFriendlyCreaturesInGrid creature_check(me);
Acore::CreatureListSearcher<Acore::AllFriendlyCreaturesInGrid> creature_searcher(me, creatures, creature_check);
TypeContainerVisitor
<acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid>,
<Acore::CreatureListSearcher<Acore::AllFriendlyCreaturesInGrid>,
GridTypeMapContainer> creature_visitor(creature_searcher);
cell.Visit(pair, creature_visitor, *(me->GetMap()), *me, me->GetGridActivationRange());
@@ -984,15 +984,15 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
{
if (TeleportTimer <= diff)
{
CellCoord pair(acore::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
CellCoord pair(Acore::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
Cell cell(pair);
cell.SetNoCreate();
std::list<Creature*> creatures;
acore::AllFriendlyCreaturesInGrid creature_check(me);
acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid> creature_searcher(me, creatures, creature_check);
Acore::AllFriendlyCreaturesInGrid creature_check(me);
Acore::CreatureListSearcher<Acore::AllFriendlyCreaturesInGrid> creature_searcher(me, creatures, creature_check);
TypeContainerVisitor
<acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid>,
<Acore::CreatureListSearcher<Acore::AllFriendlyCreaturesInGrid>,
GridTypeMapContainer> creature_visitor(creature_searcher);
cell.Visit(pair, creature_visitor, *(me->GetMap()), *me, me->GetGridActivationRange());

View File

@@ -180,8 +180,8 @@ public:
DoCast(me, SPELL_IDOM_ROOM_CAMERA_SHAKE);
me->SummonGameObject(GO_BELNISTRASZS_BRAZIER, 2577.196f, 947.0781f, 53.16757f, 2.356195f, 0, 0, 0.9238796f, 0.3826832f, 3600);
std::list<WorldObject*> ClusterList;
acore::AllWorldObjectsInRange objects(me, 50.0f);
acore::WorldObjectListSearcher<acore::AllWorldObjectsInRange> searcher(me, ClusterList, objects);
Acore::AllWorldObjectsInRange objects(me, 50.0f);
Acore::WorldObjectListSearcher<Acore::AllWorldObjectsInRange> searcher(me, ClusterList, objects);
me->VisitNearbyObject(50.0f, searcher);
for (std::list<WorldObject*>::const_iterator itr = ClusterList.begin(); itr != ClusterList.end(); ++itr)
{

View File

@@ -137,7 +137,7 @@ public:
targetList.push_back((*itr)->getTarget());
}
acore::Containers::RandomResize(targetList, 5);
Acore::Containers::RandomResize(targetList, 5);
for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
DoCast(*itr, SPELL_DRAIN_MANA);

View File

@@ -139,8 +139,8 @@ public:
{
GameObject* cage = GetHitGObj();
std::list<WorldObject*> cagesList;
acore::AllWorldObjectsInRange objects(GetCaster(), 15.0f);
acore::WorldObjectListSearcher<acore::AllWorldObjectsInRange> searcher(GetCaster(), cagesList, objects);
Acore::AllWorldObjectsInRange objects(GetCaster(), 15.0f);
Acore::WorldObjectListSearcher<Acore::AllWorldObjectsInRange> searcher(GetCaster(), cagesList, objects);
GetCaster()->VisitNearbyObject(15.0f, searcher);
for (std::list<WorldObject*>::const_iterator itr = cagesList.begin(); itr != cagesList.end(); ++itr)
{

View File

@@ -311,8 +311,8 @@ public:
void IsSummonedBy(Unit* /*summoner*/) override
{
std::list<Player*> playerOnQuestList;
acore::AnyPlayerInObjectRangeCheck checker(me, 5.0f);
acore::PlayerListSearcher<acore::AnyPlayerInObjectRangeCheck> searcher(me, playerOnQuestList, checker);
Acore::AnyPlayerInObjectRangeCheck checker(me, 5.0f);
Acore::PlayerListSearcher<Acore::AnyPlayerInObjectRangeCheck> searcher(me, playerOnQuestList, checker);
me->VisitNearbyWorldObject(5.0f, searcher);
for (std::list<Player*>::const_iterator itr = playerOnQuestList.begin(); itr != playerOnQuestList.end(); ++itr)
{