refactor(Core): rename namespaces and macros to acore (#2454)
This commit is contained in:
@@ -1125,7 +1125,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 (!Trinity::IsValidMapCoord(x, y, z) || z <= INVALID_HEIGHT)
|
||||
if (!acore::IsValidMapCoord(x, y, z) || z <= INVALID_HEIGHT)
|
||||
return;
|
||||
|
||||
float speedXY, speedZ;
|
||||
@@ -1981,7 +1981,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
if (!availableElixirs.empty())
|
||||
{
|
||||
// cast random elixir on target
|
||||
m_caster->CastSpell(unitTarget, Trinity::Containers::SelectRandomContainerElement(availableElixirs), true, m_CastItem);
|
||||
m_caster->CastSpell(unitTarget, acore::Containers::SelectRandomContainerElement(availableElixirs), true, m_CastItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2809,7 +2809,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 = Trinity::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(NULL, 1, honor_reward, false);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUIDLow());
|
||||
@@ -4196,8 +4196,8 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
|
||||
}
|
||||
|
||||
UnitList targets;
|
||||
Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(unitTarget, unitTarget, unitTarget->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
Trinity::UnitListSearcher<Trinity::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)
|
||||
{
|
||||
@@ -4825,7 +4825,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
||||
data << uint64(m_caster->GetGUID());
|
||||
|
||||
float dist = m_caster->GetVisibilityRange()+VISIBILITY_COMPENSATION;
|
||||
Trinity::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
|
||||
@@ -4849,8 +4849,8 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
UnitList targets;
|
||||
Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_caster, m_caster, m_caster->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
Trinity::UnitListSearcher<Trinity::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