mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
refactor(Core/Misc): acore to Acore (#6043)
This commit is contained in:
@@ -192,8 +192,8 @@ public:
|
||||
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(acore::AllWorldObjectsInExactRange(GetCaster(), 100.0f, true));
|
||||
targets.remove_if(acore::AllWorldObjectsInExactRange(GetCaster(), 25.0f, false));
|
||||
targets.remove_if(Acore::AllWorldObjectsInExactRange(GetCaster(), 100.0f, true));
|
||||
targets.remove_if(Acore::AllWorldObjectsInExactRange(GetCaster(), 25.0f, false));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
targets.sort(acore::ObjectDistanceOrderPred(GetCaster(), false));
|
||||
targets.sort(Acore::ObjectDistanceOrderPred(GetCaster(), false));
|
||||
if (targets.size() > GetSpellValue()->MaxAffectedTargets)
|
||||
{
|
||||
std::list<WorldObject*>::iterator itr = targets.begin();
|
||||
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(acore::UnitAuraCheck(true, SPELL_SABER_LASH_IMMUNITY));
|
||||
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_SABER_LASH_IMMUNITY));
|
||||
if (targets.size() <= 1)
|
||||
FinishCast(SPELL_FAILED_DONT_REPORT);
|
||||
}
|
||||
|
||||
@@ -613,7 +613,7 @@ public:
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
targets.sort(acore::ObjectDistanceOrderPred(GetCaster()));
|
||||
targets.sort(Acore::ObjectDistanceOrderPred(GetCaster()));
|
||||
WorldObject* target = targets.front();
|
||||
targets.clear();
|
||||
targets.push_back(target);
|
||||
|
||||
@@ -49,7 +49,7 @@ enum Misc
|
||||
EVENT_TALK_KILL = 10
|
||||
};
|
||||
|
||||
struct ShadowOfDeathSelector : public acore::unary_function<Unit*, bool>
|
||||
struct ShadowOfDeathSelector : public Acore::unary_function<Unit*, bool>
|
||||
{
|
||||
bool operator()(Unit const* target) const
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ enum Misc
|
||||
EVENT_KILL_TALK = 100
|
||||
};
|
||||
|
||||
struct HammerOfJusticeSelector : public acore::unary_function<Unit*, bool>
|
||||
struct HammerOfJusticeSelector : public Acore::unary_function<Unit*, bool>
|
||||
{
|
||||
Unit const* _me;
|
||||
HammerOfJusticeSelector(Unit* me) : _me(me) { }
|
||||
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
if (Unit* victim = GetCaster()->GetVictim())
|
||||
unitList.remove_if(acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
unitList.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
acore::Containers::RandomResize(unitList, 1);
|
||||
Acore::Containers::RandomResize(unitList, 1);
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
playerList.push_back(player);
|
||||
|
||||
if (!playerList.empty())
|
||||
target = acore::Containers::SelectRandomContainerElement(playerList);
|
||||
target = Acore::Containers::SelectRandomContainerElement(playerList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
acore::Containers::RandomResize(unitList, 1);
|
||||
Acore::Containers::RandomResize(unitList, 1);
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
|
||||
@@ -833,7 +833,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
|
||||
@@ -993,7 +993,7 @@ public:
|
||||
targetList.push_back(target);
|
||||
}
|
||||
|
||||
acore::Containers::RandomResize(targetList, 5);
|
||||
Acore::Containers::RandomResize(targetList, 5);
|
||||
for (std::list<Unit*>::const_iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
|
||||
GetCaster()->CastSpell(*itr, SPELL_NETHER_BEAM_DAMAGE, true);
|
||||
}
|
||||
|
||||
@@ -697,8 +697,8 @@ public:
|
||||
me->SetObjectScale(large ? 2.0f : 1.0f);
|
||||
|
||||
std::list<WorldObject*> ClusterList;
|
||||
acore::AllWorldObjectsInRange objects(me, searchDistance);
|
||||
acore::WorldObjectListSearcher<acore::AllWorldObjectsInRange> searcher(me, ClusterList, objects);
|
||||
Acore::AllWorldObjectsInRange objects(me, searchDistance);
|
||||
Acore::WorldObjectListSearcher<Acore::AllWorldObjectsInRange> searcher(me, ClusterList, objects);
|
||||
me->VisitNearbyObject(searchDistance, searcher);
|
||||
|
||||
for (std::list<WorldObject*>::const_iterator i = ClusterList.begin(); i != ClusterList.end(); ++i)
|
||||
|
||||
@@ -1757,7 +1757,7 @@ public:
|
||||
}
|
||||
if (!UnitsWithMana.empty())
|
||||
{
|
||||
DoCast(acore::Containers::SelectRandomContainerElement(UnitsWithMana), SPELL_MANA_BURN);
|
||||
DoCast(Acore::Containers::SelectRandomContainerElement(UnitsWithMana), SPELL_MANA_BURN);
|
||||
ManaBurnTimer = 8000 + (rand() % 10 * 1000); // 8-18 sec cd
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user