Core/Spells: cleaned up and improved spell focusing behavior

Port From (https://github.com/TrinityCore/TrinityCore/commit/c295cb9814f4c2a1878aa047cefe0cfbc7958f93)
This commit is contained in:
hondacrx
2022-05-04 10:02:53 -04:00
parent 1c860ad2e2
commit 2c1cc804c3
3 changed files with 30 additions and 56 deletions
+12
View File
@@ -513,6 +513,18 @@ namespace Game.Spells
Unit target = aurApp.GetTarget();
// Update serverside orientation of tracking channeled auras on periodic update ticks
if (caster != null && m_spellInfo.IsChanneled() && m_spellInfo.HasAttribute(SpellAttr1.ChannelTrackTarget) && !caster.m_unitData.ChannelObjects.Empty())
{
ObjectGuid channelGuid = caster.m_unitData.ChannelObjects[0];
if (channelGuid != caster.GetGUID())
{
WorldObject objectTarget = Global.ObjAccessor.GetWorldObject(caster, channelGuid);
if (objectTarget != null)
caster.SetInFront(objectTarget);
}
}
switch (GetAuraType())
{
case AuraType.PeriodicDummy: