Core/Creature: Clear creature focus after an evade

Port From (https://github.com/TrinityCore/TrinityCore/commit/a7cf209428fae5b025a0dcdc6b00bcef12175ed6)
This commit is contained in:
hondacrx
2022-01-05 23:55:47 -05:00
parent 654c9743e3
commit 72fa0cd450
3 changed files with 16 additions and 13 deletions
+4 -7
View File
@@ -3994,13 +3994,10 @@ namespace Game.Spells
if (m_UniqueTargetInfo.Count == 1 && m_UniqueGOTargetInfo.Empty())
{
if (target.TargetGUID != unitCaster.GetGUID())
{
Creature creatureCaster = unitCaster.ToCreature();
if (creatureCaster != null)
if (!creatureCaster.HasSpellFocus())
creatureCaster.SetSpellFocus(this, Global.ObjAccessor.GetWorldObject(creatureCaster, target.TargetGUID));
}
Creature creatureCaster = unitCaster.ToCreature();
if (creatureCaster != null)
if (!creatureCaster.HasSpellFocus(this))
creatureCaster.SetSpellFocus(this, Global.ObjAccessor.GetWorldObject(creatureCaster, target.TargetGUID));
}
}