mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 22:26:22 +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:
@@ -14643,6 +14643,8 @@ void Unit::TauntApply(Unit* taunter)
|
||||
return;
|
||||
|
||||
SetInFront(taunter);
|
||||
SetGuidValue(UNIT_FIELD_TARGET, taunter->GetGUID());
|
||||
|
||||
if (creature->IsAIEnabled)
|
||||
creature->AI()->AttackStart(taunter);
|
||||
|
||||
@@ -14681,6 +14683,7 @@ void Unit::TauntFadeOut(Unit* taunter)
|
||||
|
||||
if (target && target != taunter)
|
||||
{
|
||||
SetGuidValue(UNIT_FIELD_TARGET, target->GetGUID());
|
||||
SetInFront(target);
|
||||
if (creature->IsAIEnabled)
|
||||
creature->AI()->AttackStart(target);
|
||||
|
||||
@@ -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:
|
||||
{
|
||||
|
||||
@@ -3317,9 +3317,6 @@ void Spell::EffectTaunt(SpellEffIndex /*effIndex*/)
|
||||
if (HostileReference* forcedVictim = unitTarget->GetThreatMgr().GetOnlineContainer().getReferenceByTarget(m_caster))
|
||||
unitTarget->GetThreatMgr().setCurrentVictim(forcedVictim);
|
||||
}
|
||||
|
||||
if (unitTarget->ToCreature()->IsAIEnabled && !unitTarget->ToCreature()->HasReactState(REACT_PASSIVE))
|
||||
unitTarget->ToCreature()->AI()->AttackStart(m_caster);
|
||||
}
|
||||
|
||||
void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
||||
|
||||
@@ -277,13 +277,9 @@ public:
|
||||
{
|
||||
if (Creature* c = me->SummonCreature(NPC_OOZE_SPRAY_STALKER, *target, TEMPSUMMON_TIMED_DESPAWN, 8000))
|
||||
{
|
||||
me->SetOrientation(me->GetAngle(c));
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->DisableRotate(true);
|
||||
me->SetFacingTo(me->GetAngle(c));
|
||||
me->SendMovementFlagUpdate();
|
||||
me->SetFacingToObject(c);
|
||||
Talk(EMOTE_SLIME_SPRAY);
|
||||
me->CastSpell(c, SPELL_SLIME_SPRAY, false);
|
||||
DoCastSelf(SPELL_SLIME_SPRAY);
|
||||
}
|
||||
}
|
||||
events.DelayEvents(1);
|
||||
|
||||
Reference in New Issue
Block a user