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

@@ -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

View File

@@ -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();

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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
{

View File

@@ -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) { }

View File

@@ -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

View File

@@ -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)

View File

@@ -291,7 +291,7 @@ public:
playerList.push_back(player);
if (!playerList.empty())
target = acore::Containers::SelectRandomContainerElement(playerList);
target = Acore::Containers::SelectRandomContainerElement(playerList);
}
}

View File

@@ -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)

View File

@@ -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);
}

View File

@@ -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)

View File

@@ -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