mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
refactor(Core/Misc): acore to Acore (#6043)
This commit is contained in:
@@ -1660,7 +1660,7 @@ public:
|
||||
else
|
||||
{
|
||||
//! In the end, only one target should be selected
|
||||
WorldObject* _target = acore::Containers::SelectRandomContainerElement(targets);
|
||||
WorldObject* _target = Acore::Containers::SelectRandomContainerElement(targets);
|
||||
targets.clear();
|
||||
if (_target)
|
||||
targets.push_back(_target);
|
||||
@@ -1709,8 +1709,8 @@ public:
|
||||
{
|
||||
// use 99 because it is 3d search
|
||||
std::list<WorldObject*> targetList;
|
||||
acore::WorldObjectSpellAreaTargetCheck check(99, GetExplTargetDest(), GetCaster(), GetCaster(), GetSpellInfo(), TARGET_CHECK_DEFAULT, nullptr);
|
||||
acore::WorldObjectListSearcher<acore::WorldObjectSpellAreaTargetCheck> searcher(GetCaster(), targetList, check);
|
||||
Acore::WorldObjectSpellAreaTargetCheck check(99, GetExplTargetDest(), GetCaster(), GetCaster(), GetSpellInfo(), TARGET_CHECK_DEFAULT, nullptr);
|
||||
Acore::WorldObjectListSearcher<Acore::WorldObjectSpellAreaTargetCheck> searcher(GetCaster(), targetList, check);
|
||||
GetCaster()->GetMap()->VisitAll(GetCaster()->m_positionX, GetCaster()->m_positionY, 99, searcher);
|
||||
float minDist = 99 * 99;
|
||||
Unit* target = nullptr;
|
||||
|
||||
@@ -424,9 +424,9 @@ public:
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
targets.push_back(itr->GetSource());
|
||||
targets.remove_if(acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
|
||||
targets.remove_if(acore::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
|
||||
acore::Containers::RandomResize(targets, (RAID_MODE(2,3)));
|
||||
targets.remove_if(Acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
|
||||
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
|
||||
Acore::Containers::RandomResize(targets, (RAID_MODE(2,3)));
|
||||
for (std::list<Unit*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
float prevZ = (*itr)->GetPositionZ();
|
||||
@@ -1271,9 +1271,9 @@ public:
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
|
||||
targets.remove_if(acore::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
|
||||
acore::Containers::RandomResize(targets, 1);
|
||||
targets.remove_if(Acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
|
||||
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
|
||||
Acore::Containers::RandomResize(targets, 1);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -635,7 +635,7 @@ public:
|
||||
};
|
||||
|
||||
// predicate function to select non main tank target
|
||||
class StoneGripTargetSelector : public acore::unary_function<Unit*, bool>
|
||||
class StoneGripTargetSelector : public Acore::unary_function<Unit*, bool>
|
||||
{
|
||||
public:
|
||||
StoneGripTargetSelector(Creature* me, Unit const* victim) : _me(me), _victim(victim) {}
|
||||
|
||||
@@ -941,7 +941,7 @@ public:
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (Unit* victim = GetCaster()->GetVictim())
|
||||
targets.remove_if(acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1023,7 +1023,7 @@ public:
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (Unit* victim = GetCaster()->GetVictim())
|
||||
targets.remove_if(acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user