fix(Core/Spells): Taunt always set proper target while channelling sp… (#13948)

* fix(Core/Spells): Taunt always set proper target while channelling spells.

Fixes #13841

* Update.

* Update.
This commit is contained in:
UltraNix
2023-08-06 03:16:05 +02:00
committed by GitHub
parent e8507435ff
commit c3acf75618
4 changed files with 19 additions and 17 deletions

View File

@@ -1101,6 +1101,20 @@ void AuraEffect::PeriodicTick(AuraApplication* aurApp, Unit* caster) const
Unit* target = aurApp->GetTarget();
// Update serverside orientation of tracking channeled auras on periodic update ticks
// exclude players because can turn during channeling and shouldn't desync orientation client/server
if (caster && !caster->IsPlayer() && m_spellInfo->IsChanneled() && m_spellInfo->HasAttribute(SPELL_ATTR1_TRACK_TARGET_IN_CHANNEL))
{
ObjectGuid const channelGuid = caster->GetGuidValue(UNIT_FIELD_CHANNEL_OBJECT);
if (!channelGuid.IsEmpty() && channelGuid != caster->GetGUID())
{
if (WorldObject const* objectTarget = ObjectAccessor::GetWorldObject(*caster, channelGuid))
{
caster->SetInFront(objectTarget);
}
}
}
switch (GetAuraType())
{
case SPELL_AURA_PERIODIC_DUMMY:
@@ -6122,14 +6136,6 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
GetBase()->GetUnitOwner()->CastSpell(target, triggeredSpellInfo, true, 0, this, GetBase()->GetUnitOwner()->GetGUID());
return;
}
// Slime Spray - temporary here until preventing default effect works again
// added on 9.10.2010
case 69508:
{
if (caster)
caster->CastSpell(target, triggerSpellId, true, nullptr, nullptr, caster->GetGUID());
return;
}
// Trial of the Crusader, Jaraxxus, Spinning Pain Spike
case 66283:
{