fix(Core/Spell): SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER to face caster (#4351)
* fix(Core/Spell): SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER to face caster * cherry-pick28353e920bCo-Authored-By: Meji <2695278+meji46@users.noreply.github.com> * [[nodiscard]] * return; * fix last thing * build * Revert "build" This reverts commitc892cc292f. * Update Object.h * Update Object.h * Update Object.h Co-authored-by: Meji <2695278+meji46@users.noreply.github.com>
This commit is contained in:
@@ -2761,15 +2761,10 @@ void Spell::EffectTeleUnitsFaceCaster(SpellEffIndex /*effIndex*/)
|
||||
if (!unitTarget || unitTarget->IsInFlight())
|
||||
return;
|
||||
|
||||
if (!m_targets.HasDst())
|
||||
if (m_targets.HasDst())
|
||||
{
|
||||
sLog->outError("Spell::EffectTeleUnitsFaceCaster - does not have destination for spell ID %u\n", m_spellInfo->Id);
|
||||
return;
|
||||
unitTarget->NearTeleportTo(destTarget->GetPositionX(), destTarget->GetPositionY(), destTarget->GetPositionZ(), destTarget->GetAbsoluteAngle(m_caster), unitTarget == m_caster);
|
||||
}
|
||||
|
||||
float x, y, z;
|
||||
destTarget->GetPosition(x, y, z);
|
||||
unitTarget->NearTeleportTo(x, y, z, unitTarget->GetAngle(m_caster));
|
||||
}
|
||||
|
||||
void Spell::EffectLearnSkill(SpellEffIndex effIndex)
|
||||
|
||||
Reference in New Issue
Block a user