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

@@ -352,7 +352,7 @@ public:
myList.push_back(p);
if (!myList.empty())
{
myList.sort(acore::ObjectDistanceOrderPred(me->GetVictim()));
myList.sort(Acore::ObjectDistanceOrderPred(me->GetVictim()));
Player* target = myList.front();
if (me->GetVictim()->GetGUID() != _tankGUID || target->GetGUID() != _offtankGUID)
{
@@ -420,7 +420,7 @@ public:
if (Player* p = itr->GetSource())
if (p->IsAlive() && p != me->GetVictim() && p->GetGUID() != _offtankGUID && !p->IsGameMaster() && p->GetDistance(me) < 100.0f && !p->HasAura(SPELL_UNCONTROLLABLE_FRENZY))
myList.push_back(p);
acore::Containers::RandomResize(myList, Is25ManRaid() ? 3 : 2);
Acore::Containers::RandomResize(myList, Is25ManRaid() ? 3 : 2);
if (myList.size() > 1)
{
Talk(SAY_PACT_OF_THE_DARKFALLEN);
@@ -446,7 +446,7 @@ public:
if (!myList.empty())
{
acore::Containers::RandomResize(myList, 1);
Acore::Containers::RandomResize(myList, 1);
Player* target = myList.front();
Talk(EMOTE_SWARMING_SHADOWS, target);
Talk(SAY_SWARMING_SHADOWS);
@@ -468,7 +468,7 @@ public:
if (p->IsAlive() && p != me->GetVictim() && p->GetGUID() != _offtankGUID && !p->IsGameMaster() && !p->HasAura(SPELL_PACT_OF_THE_DARKFALLEN) && !p->HasAura(SPELL_UNCONTROLLABLE_FRENZY))
myList.push_back(p);
acore::Containers::RandomResize(myList, uint32(Is25ManRaid() ? 4 : 2));
Acore::Containers::RandomResize(myList, uint32(Is25ManRaid() ? 4 : 2));
for (std::list<Player*>::iterator itr = myList.begin(); itr != myList.end(); ++itr)
me->CastSpell(*itr, SPELL_TWILIGHT_BLOODBOLT, false);
me->CastSpell(me, SPELL_TWILIGHT_BLOODBOLT_TARGET, false);
@@ -625,7 +625,7 @@ public:
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(acore::UnitAuraCheck(false, SPELL_PACT_OF_THE_DARKFALLEN));
targets.remove_if(Acore::UnitAuraCheck(false, SPELL_PACT_OF_THE_DARKFALLEN));
bool remove = true;
std::list<WorldObject*>::const_iterator itr, itr2, itrEnd = targets.end();
@@ -670,7 +670,7 @@ public:
void FilterTargets(std::list<WorldObject*>& unitList)
{
unitList.remove_if(acore::UnitAuraCheck(true, SPELL_PACT_OF_THE_DARKFALLEN));
unitList.remove_if(Acore::UnitAuraCheck(true, SPELL_PACT_OF_THE_DARKFALLEN));
unitList.push_back(GetCaster());
}
@@ -723,7 +723,7 @@ public:
{
uint32 targetCount = (targets.size() + 2) / 3;
targets.remove_if(BloodboltHitCheck(static_cast<LanaThelAI*>(GetCaster()->GetAI())));
acore::Containers::RandomResize(targets, targetCount);
Acore::Containers::RandomResize(targets, targetCount);
// mark targets now, effect hook has missile travel time delay (might cast next in that time)
for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
GetCaster()->GetAI()->SetGUID((*itr)->GetGUID(), GUID_BLOODBOLT);
@@ -921,7 +921,7 @@ public:
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(acore::AllWorldObjectsInExactRange(GetCaster(), GetSpellInfo()->Effects[0].CalcRadius(), true));
targets.remove_if(Acore::AllWorldObjectsInExactRange(GetCaster(), GetSpellInfo()->Effects[0].CalcRadius(), true));
}
void Register() override

View File

@@ -539,7 +539,7 @@ public:
if (_guardList.empty())
{
GetCreatureListWithEntryInGrid(_guardList, me, NPC_SE_KOR_KRON_REAVER, 20.0f);
_guardList.sort(acore::ObjectDistanceOrderPred(me));
_guardList.sort(Acore::ObjectDistanceOrderPred(me));
}
uint32 x = 1;
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
@@ -800,7 +800,7 @@ public:
if (_guardList.empty())
{
GetCreatureListWithEntryInGrid(_guardList, me, NPC_SE_SKYBREAKER_MARINE, 20.0f);
_guardList.sort(acore::ObjectDistanceOrderPred(me));
_guardList.sort(Acore::ObjectDistanceOrderPred(me));
}
uint32 x = 1;
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
@@ -1242,7 +1242,7 @@ public:
// select one random target, with preference of ranged targets
uint32 targetsAtRange = 0;
uint32 const minTargets = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 10 : 4);
targets.sort(acore::ObjectDistanceOrderPred(GetCaster(), false));
targets.sort(Acore::ObjectDistanceOrderPred(GetCaster(), false));
// get target count at range
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr, ++targetsAtRange)
@@ -1310,12 +1310,12 @@ public:
if (GetSpellInfo()->Id == 72385 || GetSpellInfo()->Id == 72442) // 10n, 10h
{
WorldObject* target = acore::Containers::SelectRandomContainerElement(targets);
WorldObject* target = Acore::Containers::SelectRandomContainerElement(targets);
targets.clear();
targets.push_back(target);
}
else
acore::Containers::RandomResize(targets, 3);
Acore::Containers::RandomResize(targets, 3);
}
void Register() override

View File

@@ -2208,7 +2208,7 @@ public:
void SelectTarget(std::list<WorldObject*>& targets)
{
targets.remove_if(IgbExplosionCheck(GetCaster()));
acore::Containers::RandomResize(targets, 1);
Acore::Containers::RandomResize(targets, 1);
}
void Register() override
@@ -2477,7 +2477,7 @@ public:
targets.remove_if(BurningPitchFilterCheck(teamId == TEAM_HORDE ? GO_ORGRIMS_HAMMER_H : GO_THE_SKYBREAKER_A));
if (!targets.empty())
{
WorldObject* target = acore::Containers::SelectRandomContainerElement(targets);
WorldObject* target = Acore::Containers::SelectRandomContainerElement(targets);
targets.clear();
targets.push_back(target);
}
@@ -2563,7 +2563,7 @@ public:
if (!targets.empty())
{
WorldObject* target = acore::Containers::SelectRandomContainerElement(targets);
WorldObject* target = Acore::Containers::SelectRandomContainerElement(targets);
targets.clear();
targets.push_back(target);
}

View File

@@ -618,7 +618,7 @@ public:
return;
// select random cultist
Creature* cultist = acore::Containers::SelectRandomContainerElement(temp);
Creature* cultist = Acore::Containers::SelectRandomContainerElement(temp);
if (!cultist)
return;

View File

@@ -58,7 +58,7 @@ enum Events
uint32 const boneSpikeSummonId[3] = {69062, 72669, 72670};
struct BoneStormMoveTargetSelector : public acore::unary_function<Unit*, bool>
struct BoneStormMoveTargetSelector : public Acore::unary_function<Unit*, bool>
{
public:
BoneStormMoveTargetSelector(Creature* source) : _source(source) { }

View File

@@ -188,7 +188,7 @@ private:
};
// xinef: malleable goo selector, check for target validity
struct MalleableGooSelector : public acore::unary_function<Unit*, bool>
struct MalleableGooSelector : public Acore::unary_function<Unit*, bool>
{
const Unit* me;
MalleableGooSelector(Unit const* unit) : me(unit) {}
@@ -874,7 +874,7 @@ public:
void ScaleRange(std::list<WorldObject*>& targets)
{
targets.remove_if(acore::AllWorldObjectsInExactRange(GetCaster(), 2.5f * GetCaster()->GetFloatValue(OBJECT_FIELD_SCALE_X), true));
targets.remove_if(Acore::AllWorldObjectsInExactRange(GetCaster(), 2.5f * GetCaster()->GetFloatValue(OBJECT_FIELD_SCALE_X), true));
}
// big hax to unlock Abomination Eat Ooze ability, requires caster aura spell from difficulty X, but unlocks clientside when got base aura
@@ -1024,10 +1024,10 @@ public:
void FilterTargets(std::list<WorldObject*>& targets)
{
// vanish rank 1-3, mage invisibility
targets.remove_if(acore::UnitAuraCheck(true, 11327));
targets.remove_if(acore::UnitAuraCheck(true, 11329));
targets.remove_if(acore::UnitAuraCheck(true, 26888));
targets.remove_if(acore::UnitAuraCheck(true, 32612));
targets.remove_if(Acore::UnitAuraCheck(true, 11327));
targets.remove_if(Acore::UnitAuraCheck(true, 11329));
targets.remove_if(Acore::UnitAuraCheck(true, 26888));
targets.remove_if(Acore::UnitAuraCheck(true, 32612));
}
void Register() override
@@ -1098,8 +1098,8 @@ public:
void SelectTarget(std::list<WorldObject*>& targets)
{
// dbc has only 1 field for excluding, this will prevent anyone from getting both at the same time
targets.remove_if(acore::UnitAuraCheck(true, SPELL_VOLATILE_OOZE_PROTECTION));
targets.remove_if(acore::UnitAuraCheck(true, SPELL_GASEOUS_BLOAT_PROTECTION));
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_VOLATILE_OOZE_PROTECTION));
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_GASEOUS_BLOAT_PROTECTION));
if (targets.empty())
{
@@ -1108,7 +1108,7 @@ public:
return;
}
WorldObject* target = acore::Containers::SelectRandomContainerElement(targets);
WorldObject* target = Acore::Containers::SelectRandomContainerElement(targets);
targets.clear();
targets.push_back(target);
_target = target;
@@ -1256,8 +1256,8 @@ public:
}
}
targets.remove_if(acore::UnitAuraCheck(true, sSpellMgr->GetSpellIdForDifficulty(SPELL_UNBOUND_PLAGUE, GetCaster())));
acore::Containers::RandomResize(targets, 1);
targets.remove_if(Acore::UnitAuraCheck(true, sSpellMgr->GetSpellIdForDifficulty(SPELL_UNBOUND_PLAGUE, GetCaster())));
Acore::Containers::RandomResize(targets, 1);
}
void HandleScript(SpellEffIndex /*effIndex*/)
@@ -1627,7 +1627,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

@@ -510,12 +510,12 @@ public:
{
// remove targets with this aura already
// tank is not on this list
targets.remove_if(acore::UnitAuraCheck(true, GetSpellInfo()->Id));
targets.remove_if(Acore::UnitAuraCheck(true, GetSpellInfo()->Id));
targets.remove(GetCaster()->GetVictim());
if (targets.empty())
return;
WorldObject* target = acore::Containers::SelectRandomContainerElement(targets);
WorldObject* target = Acore::Containers::SelectRandomContainerElement(targets);
targets.clear();
targets.push_back(target);
_target = target;

View File

@@ -225,7 +225,7 @@ private:
ObjectGuid _sindragosaGUID;
};
struct LastPhaseIceTombTargetSelector : public acore::unary_function<Unit*, bool>
struct LastPhaseIceTombTargetSelector : public Acore::unary_function<Unit*, bool>
{
public:
LastPhaseIceTombTargetSelector(Creature* source) : _source(source) { }
@@ -908,10 +908,10 @@ public:
uint32 maxSize = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 3 : 1);
healList.remove_if(UnchainedMagicTargetSelector(false));
if (healList.size() > maxSize)
acore::Containers::RandomResize(healList, maxSize);
Acore::Containers::RandomResize(healList, maxSize);
dpsList.remove_if(UnchainedMagicTargetSelector(true));
if (dpsList.size() > maxSize)
acore::Containers::RandomResize(dpsList, maxSize);
Acore::Containers::RandomResize(dpsList, maxSize);
unitList.splice(unitList.begin(), healList);
unitList.splice(unitList.begin(), dpsList);
}
@@ -1202,7 +1202,7 @@ public:
void FilterTargets(std::list<WorldObject*>& unitList)
{
unitList.remove_if(acore::UnitAuraCheck(true, GetSpellInfo()->Id));
unitList.remove_if(Acore::UnitAuraCheck(true, GetSpellInfo()->Id));
targetList.clear();
targetList = unitList;
}
@@ -1906,11 +1906,11 @@ public:
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
targets.remove_if(Acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
if (targets.empty())
return;
WorldObject* target = acore::Containers::SelectRandomContainerElement(targets);
WorldObject* target = Acore::Containers::SelectRandomContainerElement(targets);
targets.clear();
targets.push_back(target);
}
@@ -1927,7 +1927,7 @@ public:
if (unitList.empty())
return;
acore::Containers::SelectRandomContainerElement(unitList)->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true);
Acore::Containers::SelectRandomContainerElement(unitList)->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true);
}
void Register() override

View File

@@ -357,7 +357,7 @@ void SendPacketToPlayers(WorldPacket const* data, Unit* source)
player->GetSession()->SendPacket(data);
}
struct ShadowTrapLKTargetSelector : public acore::unary_function<Unit*, bool>
struct ShadowTrapLKTargetSelector : public Acore::unary_function<Unit*, bool>
{
public:
ShadowTrapLKTargetSelector(Creature* source, bool playerOnly = true, bool reqLOS = false, float maxDist = 0.0f) : _source(source), _playerOnly(playerOnly), _reqLOS(reqLOS), _maxDist(maxDist) { }
@@ -383,7 +383,7 @@ private:
float _maxDist;
};
struct NonTankLKTargetSelector : public acore::unary_function<Unit*, bool>
struct NonTankLKTargetSelector : public Acore::unary_function<Unit*, bool>
{
public:
NonTankLKTargetSelector(Creature* source, bool playerOnly = true, bool reqLOS = false, float maxDist = 0.0f, uint32 exclude1 = 0, uint32 exclude2 = 0) : _source(source), _playerOnly(playerOnly), _reqLOS(reqLOS), _maxDist(maxDist), _exclude1(exclude1), _exclude2(exclude2) { }
@@ -417,7 +417,7 @@ private:
uint32 _exclude2;
};
struct DefileTargetSelector : public acore::unary_function<Unit*, bool>
struct DefileTargetSelector : public Acore::unary_function<Unit*, bool>
{
public:
DefileTargetSelector(Creature* source) : _source(source) { }
@@ -574,7 +574,7 @@ private:
Creature& _owner;
};
class NecroticPlagueTargetCheck : public acore::unary_function<Unit*, bool>
class NecroticPlagueTargetCheck : public Acore::unary_function<Unit*, bool>
{
public:
NecroticPlagueTargetCheck(Unit const* obj, uint32 notAura1, uint32 notAura2) : _sourceObj(obj), _notAura1(notAura1), _notAura2(notAura2) {}
@@ -686,7 +686,7 @@ public:
// Reset The Frozen Throne gameobjects
FrozenThroneResetWorker reset;
acore::GameObjectWorker<FrozenThroneResetWorker> worker(me, reset);
Acore::GameObjectWorker<FrozenThroneResetWorker> worker(me, reset);
me->VisitNearbyGridObject(333.0f, worker);
me->AddAura(SPELL_EMOTE_SIT_NO_SHEATH, me);
@@ -1966,7 +1966,7 @@ public:
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.sort(acore::ObjectDistanceOrderPred(GetCaster()));
targets.sort(Acore::ObjectDistanceOrderPred(GetCaster()));
if (targets.size() <= 1)
return;
@@ -2431,9 +2431,9 @@ public:
void CorrectRange(std::list<WorldObject*>& targets)
{
targets.remove_if(VehicleCheck());
targets.remove_if(acore::AllWorldObjectsInExactRange(GetCaster(), 10.0f * GetCaster()->GetFloatValue(OBJECT_FIELD_SCALE_X), true));
targets.remove_if(Acore::AllWorldObjectsInExactRange(GetCaster(), 10.0f * GetCaster()->GetFloatValue(OBJECT_FIELD_SCALE_X), true));
uint32 strangulatedAura[4] = {68980, 74325, 74296, 74297};
targets.remove_if(acore::UnitAuraCheck(true, strangulatedAura[GetCaster()->GetMap()->GetDifficulty()]));
targets.remove_if(Acore::UnitAuraCheck(true, strangulatedAura[GetCaster()->GetMap()->GetDifficulty()]));
}
void ChangeDamageAndGrow()
@@ -2573,7 +2573,7 @@ public:
if (!triggers.empty())
{
valid = true;
triggers.sort(acore::ObjectDistanceOrderPred(me));
triggers.sort(Acore::ObjectDistanceOrderPred(me));
target->GetMotionMaster()->Clear();
target->UpdatePosition(*me, true);
@@ -2800,9 +2800,9 @@ public:
targets.clear();
return;
}
targets.remove_if(acore::UnitAuraCheck(true, GetSpellInfo()->Id));
targets.remove_if(acore::UnitAuraCheck(true, SPELL_BOSS_HITTIN_YA_AURA)); // done in dbc, but just to be sure xd
targets.remove_if(acore::UnitAuraCheck(true, SPELL_HARVEST_SOUL_VALKYR));
targets.remove_if(Acore::UnitAuraCheck(true, GetSpellInfo()->Id));
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_BOSS_HITTIN_YA_AURA)); // done in dbc, but just to be sure xd
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_HARVEST_SOUL_VALKYR));
if (InstanceScript* _instance = caster->GetInstanceScript())
if (Creature* lichKing = ObjectAccessor::GetCreature(*caster, _instance->GetGuidData(DATA_THE_LICH_KING)))
if (Spell* s = lichKing->GetCurrentSpell(CURRENT_GENERIC_SPELL))
@@ -2812,7 +2812,7 @@ public:
if (targets.empty())
return;
_target = acore::Containers::SelectRandomContainerElement(targets);
_target = Acore::Containers::SelectRandomContainerElement(targets);
targets.clear();
targets.push_back(_target);
if (Creature* caster = GetCaster()->ToCreature())
@@ -2989,7 +2989,7 @@ public:
if (targets.empty())
return;
_target = acore::Containers::SelectRandomContainerElement(targets);
_target = Acore::Containers::SelectRandomContainerElement(targets);
}
void HandleScript(SpellEffIndex effIndex)

View File

@@ -144,7 +144,7 @@ public:
}
};
struct ManaVoidSelector : public acore::unary_function<Unit*, bool>
struct ManaVoidSelector : public Acore::unary_function<Unit*, bool>
{
explicit ManaVoidSelector(WorldObject const* source) : _source(source) { }
@@ -205,7 +205,7 @@ public:
bool Execute(uint64 /*currTime*/, uint32 /*diff*/) override
{
acore::CreatureWorker<ValithriaDespawner> worker(_creature, *this);
Acore::CreatureWorker<ValithriaDespawner> worker(_creature, *this);
_creature->VisitNearbyGridObject(333.0f, worker);
_creature->AI()->Reset();
_creature->setActive(false);
@@ -525,7 +525,7 @@ public:
std::list<Creature*> archmages;
RisenArchmageCheck check;
acore::CreatureListSearcher<RisenArchmageCheck> searcher(me, archmages, check);
Acore::CreatureListSearcher<RisenArchmageCheck> searcher(me, archmages, check);
me->VisitNearbyGridObject(100.0f, searcher);
for (std::list<Creature*>::iterator itr = archmages.begin(); itr != archmages.end(); ++itr)
(*itr)->AI()->DoAction(ACTION_ENTER_COMBAT);
@@ -1305,9 +1305,9 @@ public:
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(acore::AllWorldObjectsInExactRange(GetCaster(), 250.0f, true));
targets.remove_if(Acore::AllWorldObjectsInExactRange(GetCaster(), 250.0f, true));
std::list<WorldObject*> list_copy = targets;
targets.remove_if(acore::UnitAuraCheck(true, SPELL_RECENTLY_SPAWNED));
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_RECENTLY_SPAWNED));
if (targets.empty())
{
if (list_copy.empty())
@@ -1315,7 +1315,7 @@ public:
targets = list_copy;
}
WorldObject* target = acore::Containers::SelectRandomContainerElement(targets);
WorldObject* target = Acore::Containers::SelectRandomContainerElement(targets);
targets.clear();
targets.push_back(target);
}
@@ -1361,14 +1361,14 @@ public:
std::list<Creature*> summoners;
caster->GetCreaturesWithEntryInRange(summoners, 200.0f, NPC_WORLD_TRIGGER);
std::list<Creature*> list_copy = summoners;
summoners.remove_if(acore::UnitAuraCheck(true, SPELL_RECENTLY_SPAWNED));
summoners.remove_if(Acore::UnitAuraCheck(true, SPELL_RECENTLY_SPAWNED));
if (summoners.empty())
{
if (list_copy.empty())
return;
summoners = list_copy;
}
acore::Containers::RandomResize(summoners, 2);
Acore::Containers::RandomResize(summoners, 2);
for (uint32 i = 0; i < 3; ++i)
caster->CastSpell(summoners.front(), SPELL_SUMMON_SUPPRESSER, true);

View File

@@ -840,7 +840,7 @@ public:
// get all nearby vrykul
std::list<Creature*> temp;
FrostwingVrykulSearcher check(me, 150.0f);
acore::CreatureListSearcher<FrostwingVrykulSearcher> searcher(me, temp, check);
Acore::CreatureListSearcher<FrostwingVrykulSearcher> searcher(me, temp, check);
me->VisitNearbyGridObject(150.0f, searcher);
_aliveTrash.clear();
@@ -884,15 +884,15 @@ public:
_wipeCheckTimer = 3000;
Player* player = nullptr;
acore::AnyPlayerInObjectRangeCheck check(me, 140.0f);
acore::PlayerSearcher<acore::AnyPlayerInObjectRangeCheck> searcher(me, player, check);
Acore::AnyPlayerInObjectRangeCheck check(me, 140.0f);
Acore::PlayerSearcher<Acore::AnyPlayerInObjectRangeCheck> searcher(me, player, check);
me->VisitNearbyWorldObject(140.0f, searcher);
// wipe
if (!player || me->GetExactDist(4357.0f, 2606.0f, 350.0f) > 125.0f)
{
//Talk(SAY_CROK_DEATH);
FrostwingGauntletRespawner respawner;
acore::CreatureWorker<FrostwingGauntletRespawner> worker(me, respawner);
Acore::CreatureWorker<FrostwingGauntletRespawner> worker(me, respawner);
me->VisitNearbyGridObject(333.0f, worker);
return;
}
@@ -1337,7 +1337,7 @@ public:
{
std::list<Creature*> targets = DoFindFriendlyMissingBuff(40.0f, SPELL_POWER_WORD_SHIELD);
if (!targets.empty())
DoCast(acore::Containers::SelectRandomContainerElement(targets), SPELL_POWER_WORD_SHIELD);
DoCast(Acore::Containers::SelectRandomContainerElement(targets), SPELL_POWER_WORD_SHIELD);
Events.ScheduleEvent(EVENT_ARNATH_PW_SHIELD, urand(15000, 20000));
break;
}
@@ -1361,8 +1361,8 @@ public:
Creature* FindFriendlyCreature() const
{
Creature* target = nullptr;
acore::MostHPMissingInRange u_check(me, 60.0f, 0);
acore::CreatureLastSearcher<acore::MostHPMissingInRange> searcher(me, target, u_check);
Acore::MostHPMissingInRange u_check(me, 60.0f, 0);
Acore::CreatureLastSearcher<Acore::MostHPMissingInRange> searcher(me, target, u_check);
me->VisitNearbyGridObject(60.0f, searcher);
return target;
}
@@ -1969,7 +1969,7 @@ public:
std::list<Creature*> wards;
GetCaster()->GetCreatureListWithEntryInGrid(wards, NPC_DEATHBOUND_WARD, 150.0f);
wards.sort(acore::ObjectDistanceOrderPred(GetCaster()));
wards.sort(Acore::ObjectDistanceOrderPred(GetCaster()));
for (std::list<Creature*>::iterator itr = wards.begin(); itr != wards.end(); ++itr)
{
if ((*itr)->IsAlive() && (*itr)->HasAura(SPELL_STONEFORM))
@@ -2065,8 +2065,8 @@ public:
// First effect
void CountTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
targets.remove_if(acore::ObjectGUIDCheck(GetCaster()->GetGUID(), true));
targets.remove_if(Acore::ObjectTypeIdCheck(TYPEID_PLAYER, false));
targets.remove_if(Acore::ObjectGUIDCheck(GetCaster()->GetGUID(), true));
bool kill = true;
for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
@@ -2159,7 +2159,7 @@ public:
void RemoveAliveTarget(std::list<WorldObject*>& targets)
{
targets.remove_if(AliveCheck());
acore::Containers::RandomResize(targets, 2);
Acore::Containers::RandomResize(targets, 2);
}
void Land(SpellEffIndex /*effIndex*/)
@@ -2274,7 +2274,7 @@ public:
instance->SetData(DATA_COLDFLAME_JETS, IN_PROGRESS);
std::list<Creature*> traps;
GetCreatureListWithEntryInGrid(traps, player, NPC_FROST_FREEZE_TRAP, 120.0f);
traps.sort(acore::ObjectDistanceOrderPred(player));
traps.sort(Acore::ObjectDistanceOrderPred(player));
bool instant = false;
for (std::list<Creature*>::iterator itr = traps.begin(); itr != traps.end(); ++itr)
{
@@ -2332,7 +2332,7 @@ public:
if (!crok->IsAlive())
{
FrostwingGauntletRespawner respawner;
acore::CreatureWorker<FrostwingGauntletRespawner> worker(crok, respawner);
Acore::CreatureWorker<FrostwingGauntletRespawner> worker(crok, respawner);
crok->VisitNearbyGridObject(333.0f, worker);
return true;
}

View File

@@ -1541,7 +1541,7 @@ public:
if (stalkers.empty())
return;
stalkers.sort(acore::ObjectDistanceOrderPred(teleporter));
stalkers.sort(Acore::ObjectDistanceOrderPred(teleporter));
stalkers.front()->CastSpell((Unit*)nullptr, SPELL_ARTHAS_TELEPORTER_CEREMONY, false);
stalkers.pop_front();
for (std::list<Creature*>::iterator itr = stalkers.begin(); itr != stalkers.end(); ++itr)
@@ -1774,7 +1774,7 @@ public:
GetCreatureListWithEntryInGrid(triggers, terenas, NPC_WORLD_TRIGGER_INFINITE_AOI, 100.0f);
if (!triggers.empty())
{
triggers.sort(acore::ObjectDistanceOrderPred(terenas, false));
triggers.sort(Acore::ObjectDistanceOrderPred(terenas, false));
Unit* visual = triggers.front();
visual->CastSpell(visual, SPELL_FROSTMOURNE_TELEPORT_VISUAL, true);
}
@@ -1845,7 +1845,7 @@ public:
return;
}
go->Relocate(acore::Containers::SelectRandomContainerElement(trapPositions));
go->Relocate(Acore::Containers::SelectRandomContainerElement(trapPositions));
}
protected: