mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +00:00
refactor(Core/Misc): acore to Acore (#6043)
This commit is contained in:
@@ -1135,7 +1135,7 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex)
|
||||
float x, y, z;
|
||||
destTarget->GetPosition(x, y, z);
|
||||
// xinef: this can happen if MovePositionToFirstCollision detects that X, Y cords are invalid and returns prematurely
|
||||
if (!acore::IsValidMapCoord(x, y, z) || z <= INVALID_HEIGHT)
|
||||
if (!Acore::IsValidMapCoord(x, y, z) || z <= INVALID_HEIGHT)
|
||||
return;
|
||||
|
||||
float speedXY, speedZ;
|
||||
@@ -2007,7 +2007,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
if (!availableElixirs.empty())
|
||||
{
|
||||
// cast random elixir on target
|
||||
m_caster->CastSpell(unitTarget, acore::Containers::SelectRandomContainerElement(availableElixirs), true, m_CastItem);
|
||||
m_caster->CastSpell(unitTarget, Acore::Containers::SelectRandomContainerElement(availableElixirs), true, m_CastItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2832,7 +2832,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
|
||||
// do not allow to add too many honor for player (50 * 21) = 1040 at level 70, or (50 * 31) = 1550 at level 80
|
||||
if (damage <= 50)
|
||||
{
|
||||
uint32 honor_reward = acore::Honor::hk_honor_at_level(unitTarget->getLevel(), float(damage));
|
||||
uint32 honor_reward = Acore::Honor::hk_honor_at_level(unitTarget->getLevel(), float(damage));
|
||||
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, honor_reward, false);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %s",
|
||||
@@ -4295,8 +4295,8 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
|
||||
}
|
||||
|
||||
UnitList targets;
|
||||
acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(unitTarget, unitTarget, unitTarget->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
acore::UnitListSearcher<acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(unitTarget, targets, u_check);
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(unitTarget, unitTarget, unitTarget->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
Acore::UnitListSearcher<Acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(unitTarget, targets, u_check);
|
||||
unitTarget->VisitNearbyObject(unitTarget->GetVisibilityRange(), searcher); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter)
|
||||
{
|
||||
@@ -4942,7 +4942,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
||||
data << m_caster->GetGUID();
|
||||
|
||||
float dist = m_caster->GetVisibilityRange() + VISIBILITY_COMPENSATION;
|
||||
acore::MessageDistDelivererToHostile notifier(m_caster, &data, dist);
|
||||
Acore::MessageDistDelivererToHostile notifier(m_caster, &data, dist);
|
||||
m_caster->VisitNearbyWorldObject(dist, notifier);
|
||||
|
||||
// xinef: we should also force pets to remove us from current target
|
||||
@@ -4966,8 +4966,8 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
UnitList targets;
|
||||
acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_caster, m_caster, m_caster->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
acore::UnitListSearcher<acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(m_caster, targets, u_check);
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_caster, m_caster, m_caster->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
Acore::UnitListSearcher<Acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(m_caster, targets, u_check);
|
||||
m_caster->VisitNearbyObject(m_caster->GetVisibilityRange(), searcher); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user