mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 17:13:47 +00:00
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:
@@ -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:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user