mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
refactor(Core/Misc): acore to Acore (#6043)
This commit is contained in:
@@ -1893,7 +1893,7 @@ void Unit::CalcAbsorbResist(Unit* attacker, Unit* victim, SpellSchoolMask school
|
||||
// We're going to call functions which can modify content of the list during iteration over it's elements
|
||||
// Let's copy the list so we can prevent iterator invalidation
|
||||
AuraEffectList vSchoolAbsorbCopy(victim->GetAuraEffectsByType(SPELL_AURA_SCHOOL_ABSORB));
|
||||
vSchoolAbsorbCopy.sort(acore::AbsorbAuraOrderPred());
|
||||
vSchoolAbsorbCopy.sort(Acore::AbsorbAuraOrderPred());
|
||||
|
||||
// absorb without mana cost
|
||||
for (AuraEffectList::iterator itr = vSchoolAbsorbCopy.begin(); (itr != vSchoolAbsorbCopy.end()) && (dmgInfo.GetDamage() > 0); ++itr)
|
||||
@@ -16294,8 +16294,8 @@ void Unit::UpdateReactives(uint32 p_time)
|
||||
Unit* Unit::SelectNearbyTarget(Unit* exclude, float dist) const
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(this, this, dist);
|
||||
acore::UnitListSearcher<acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(this, targets, u_check);
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(this, this, dist);
|
||||
Acore::UnitListSearcher<Acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(this, targets, u_check);
|
||||
VisitNearbyObject(dist, searcher);
|
||||
|
||||
// remove current target
|
||||
@@ -16323,14 +16323,14 @@ Unit* Unit::SelectNearbyTarget(Unit* exclude, float dist) const
|
||||
return nullptr;
|
||||
|
||||
// select random
|
||||
return acore::Containers::SelectRandomContainerElement(targets);
|
||||
return Acore::Containers::SelectRandomContainerElement(targets);
|
||||
}
|
||||
|
||||
Unit* Unit::SelectNearbyNoTotemTarget(Unit* exclude, float dist) const
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
acore::AnyUnfriendlyNoTotemUnitInObjectRangeCheck u_check(this, this, dist);
|
||||
acore::UnitListSearcher<acore::AnyUnfriendlyNoTotemUnitInObjectRangeCheck> searcher(this, targets, u_check);
|
||||
Acore::AnyUnfriendlyNoTotemUnitInObjectRangeCheck u_check(this, this, dist);
|
||||
Acore::UnitListSearcher<Acore::AnyUnfriendlyNoTotemUnitInObjectRangeCheck> searcher(this, targets, u_check);
|
||||
VisitNearbyObject(dist, searcher);
|
||||
|
||||
// remove current target
|
||||
@@ -16358,7 +16358,7 @@ Unit* Unit::SelectNearbyNoTotemTarget(Unit* exclude, float dist) const
|
||||
return nullptr;
|
||||
|
||||
// select random
|
||||
return acore::Containers::SelectRandomContainerElement(targets);
|
||||
return Acore::Containers::SelectRandomContainerElement(targets);
|
||||
}
|
||||
|
||||
void Unit::ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply)
|
||||
@@ -16893,7 +16893,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura)
|
||||
|
||||
if (!nearMembers.empty())
|
||||
{
|
||||
nearMembers.sort(acore::HealthPctOrderPred());
|
||||
nearMembers.sort(Acore::HealthPctOrderPred());
|
||||
if (Unit* target = nearMembers.front())
|
||||
{
|
||||
CastSpell(target, 41637 /*Dummy visual effect triggered by main spell cast*/, true);
|
||||
@@ -18369,7 +18369,7 @@ void Unit::UpdateObjectVisibility(bool forced, bool /*fromUpdate*/)
|
||||
// pussywizard: generally this is not needed here, delayed notifier will handle this, call only for pets
|
||||
if ((IsGuardian() || IsPet()) && GetOwnerGUID().IsPlayer())
|
||||
{
|
||||
acore::AIRelocationNotifier notifier(*this);
|
||||
Acore::AIRelocationNotifier notifier(*this);
|
||||
float radius = 60.0f;
|
||||
VisitNearbyObject(radius, notifier);
|
||||
}
|
||||
@@ -19220,7 +19220,7 @@ void Unit::SendTeleportPacket(Position& pos)
|
||||
|
||||
bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool teleport)
|
||||
{
|
||||
if (!acore::IsValidMapCoord(x, y, z, orientation))
|
||||
if (!Acore::IsValidMapCoord(x, y, z, orientation))
|
||||
return false;
|
||||
|
||||
float old_orientation = GetOrientation();
|
||||
@@ -19743,10 +19743,10 @@ void Unit::ExecuteDelayedUnitRelocationEvent()
|
||||
//active->m_last_notify_position.Relocate(active->GetPositionX(), active->GetPositionY(), active->GetPositionZ());
|
||||
}
|
||||
|
||||
acore::PlayerRelocationNotifier relocateNoLarge(*player, false); // visit only objects which are not large; default distance
|
||||
Acore::PlayerRelocationNotifier relocateNoLarge(*player, false); // visit only objects which are not large; default distance
|
||||
viewPoint->VisitNearbyObject(player->GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS, relocateNoLarge);
|
||||
relocateNoLarge.SendToSelf();
|
||||
acore::PlayerRelocationNotifier relocateLarge(*player, true); // visit only large objects; maximum distance
|
||||
Acore::PlayerRelocationNotifier relocateLarge(*player, true); // visit only large objects; maximum distance
|
||||
viewPoint->VisitNearbyObject(MAX_VISIBILITY_DISTANCE, relocateLarge);
|
||||
relocateLarge.SendToSelf();
|
||||
}
|
||||
@@ -19777,10 +19777,10 @@ void Unit::ExecuteDelayedUnitRelocationEvent()
|
||||
active->m_last_notify_position.Relocate(active->GetPositionX(), active->GetPositionY(), active->GetPositionZ());
|
||||
}
|
||||
|
||||
acore::PlayerRelocationNotifier relocateNoLarge(*player, false); // visit only objects which are not large; default distance
|
||||
Acore::PlayerRelocationNotifier relocateNoLarge(*player, false); // visit only objects which are not large; default distance
|
||||
viewPoint->VisitNearbyObject(player->GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS, relocateNoLarge);
|
||||
relocateNoLarge.SendToSelf();
|
||||
acore::PlayerRelocationNotifier relocateLarge(*player, true); // visit only large objects; maximum distance
|
||||
Acore::PlayerRelocationNotifier relocateLarge(*player, true); // visit only large objects; maximum distance
|
||||
viewPoint->VisitNearbyObject(MAX_VISIBILITY_DISTANCE, relocateLarge);
|
||||
relocateLarge.SendToSelf();
|
||||
|
||||
@@ -19801,7 +19801,7 @@ void Unit::ExecuteDelayedUnitRelocationEvent()
|
||||
|
||||
unit->m_last_notify_position.Relocate(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ());
|
||||
|
||||
acore::CreatureRelocationNotifier relocate(*unit);
|
||||
Acore::CreatureRelocationNotifier relocate(*unit);
|
||||
unit->VisitNearbyObject(unit->GetVisibilityRange() + VISIBILITY_COMPENSATION, relocate);
|
||||
|
||||
this->AddToNotify(NOTIFY_AI_RELOCATION);
|
||||
@@ -19814,7 +19814,7 @@ void Unit::ExecuteDelayedUnitAINotifyEvent()
|
||||
if (!this->IsInWorld() || this->IsDuringRemoveFromWorld())
|
||||
return;
|
||||
|
||||
acore::AIRelocationNotifier notifier(*this);
|
||||
Acore::AIRelocationNotifier notifier(*this);
|
||||
float radius = 60.0f;
|
||||
this->VisitNearbyObject(radius, notifier);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user