mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
refactor(Core): rename namespaces and macros to acore (#2454)
This commit is contained in:
@@ -193,8 +193,8 @@ class spell_murmur_thundering_storm : public SpellScriptLoader
|
||||
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(Trinity::AllWorldObjectsInExactRange(GetCaster(), 100.0f, true));
|
||||
targets.remove_if(Trinity::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()
|
||||
|
||||
@@ -200,7 +200,7 @@ class spell_gurtogg_bloodboil : public SpellScriptLoader
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
targets.sort(Trinity::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 @@ class spell_mother_shahraz_fatal_attraction : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(Trinity::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);
|
||||
}
|
||||
|
||||
@@ -612,7 +612,7 @@ class spell_reliquary_of_souls_fixate : public SpellScriptLoader
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
targets.sort(Trinity::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) { }
|
||||
|
||||
@@ -402,7 +402,7 @@ class spell_leotheras_insidious_whisper : public SpellScriptLoader
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
if (Unit* victim = GetCaster()->GetVictim())
|
||||
unitList.remove_if(Trinity::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
unitList.remove_if(acore::ObjectGUIDCheck(victim->GetGUID(), true));
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
@@ -200,7 +200,7 @@ class spell_morogrim_tidewalker_water_globule_new_target : public SpellScriptLoa
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
Trinity::Containers::RandomResizeList(unitList, 1);
|
||||
acore::Containers::RandomResizeList(unitList, 1);
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
|
||||
@@ -245,7 +245,7 @@ class spell_tsh_shoot_flame_arrow : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
Trinity::Containers::RandomResizeList(unitList, 1);
|
||||
acore::Containers::RandomResizeList(unitList, 1);
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
|
||||
@@ -835,7 +835,7 @@ class spell_kaelthas_mind_control : 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()
|
||||
@@ -995,7 +995,7 @@ class spell_kaelthas_nether_beam : public SpellScriptLoader
|
||||
targetList.push_back(target);
|
||||
}
|
||||
|
||||
Trinity::Containers::RandomResizeList(targetList, 5);
|
||||
acore::Containers::RandomResizeList(targetList, 5);
|
||||
for (std::list<Unit*>::const_iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
|
||||
GetCaster()->CastSpell(*itr, SPELL_NETHER_BEAM_DAMAGE, true);
|
||||
}
|
||||
|
||||
@@ -692,8 +692,8 @@ class npc_simon_bunny : public CreatureScript
|
||||
me->SetObjectScale(large ? 2.0f : 1.0f);
|
||||
|
||||
std::list<WorldObject*> ClusterList;
|
||||
Trinity::AllWorldObjectsInRange objects(me, searchDistance);
|
||||
Trinity::WorldObjectListSearcher<Trinity::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)
|
||||
|
||||
@@ -1759,7 +1759,7 @@ public:
|
||||
}
|
||||
if (!UnitsWithMana.empty())
|
||||
{
|
||||
DoCast(Trinity::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