mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 08:06:23 +00:00
refactor(Core): rename namespaces and macros to acore (#2454)
This commit is contained in:
@@ -1983,7 +1983,7 @@ class spell_pursue : public SpellScriptLoader
|
||||
else
|
||||
{
|
||||
//! In the end, only one target should be selected
|
||||
WorldObject* _target = Trinity::Containers::SelectRandomContainerElement(targets);
|
||||
WorldObject* _target = acore::Containers::SelectRandomContainerElement(targets);
|
||||
targets.clear();
|
||||
if (_target)
|
||||
targets.push_back(_target);
|
||||
@@ -2033,8 +2033,8 @@ class spell_vehicle_throw_passenger : public SpellScriptLoader
|
||||
{
|
||||
// use 99 because it is 3d search
|
||||
std::list<WorldObject*> targetList;
|
||||
Trinity::WorldObjectSpellAreaTargetCheck check(99, GetExplTargetDest(), GetCaster(), GetCaster(), GetSpellInfo(), TARGET_CHECK_DEFAULT, nullptr);
|
||||
Trinity::WorldObjectListSearcher<Trinity::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;
|
||||
|
||||
@@ -398,9 +398,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(Trinity::ObjectTypeIdCheck(TYPEID_PLAYER, false));
|
||||
targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
|
||||
Trinity::Containers::RandomResizeList(targets, 2);
|
||||
targets.remove_if(acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
|
||||
targets.remove_if(acore::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
|
||||
acore::Containers::RandomResizeList(targets, 2);
|
||||
for (std::list<Unit*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
{
|
||||
float prevZ = (*itr)->GetPositionZ();
|
||||
@@ -1232,9 +1232,9 @@ public:
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(Trinity::ObjectTypeIdCheck(TYPEID_PLAYER, false));
|
||||
targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
|
||||
Trinity::Containers::RandomResizeList(targets, 1);
|
||||
targets.remove_if(acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
|
||||
targets.remove_if(acore::UnitAuraCheck(true, SPELL_FLASH_FREEZE_TRAPPED_PLAYER));
|
||||
acore::Containers::RandomResizeList(targets, 1);
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
@@ -639,7 +639,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) {}
|
||||
|
||||
@@ -952,7 +952,7 @@ class spell_xt002_gravity_bomb_aura : public SpellScriptLoader
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (Unit* victim = GetCaster()->GetVictim())
|
||||
targets.remove_if(Trinity::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
targets.remove_if(acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -1034,7 +1034,7 @@ class spell_xt002_searing_light_spawn_life_spark : public SpellScriptLoader
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (Unit* victim = GetCaster()->GetVictim())
|
||||
targets.remove_if(Trinity::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
targets.remove_if(acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
Reference in New Issue
Block a user