Core/Spells: cleaned up and improved spell focusing behavior

* removed hacky update_object call from SetSpellFocus helper
* corrected facing behaivior in SetSpellFocus
* spells with SPELL_ATTR5_DONT_TURN_DURING_CAST will no longer set a target guid for proper clientside facing behaivior
* channeled spells with a destination target will no longer pick a objectTarget
* update serverside orientation for channeled spells with SPELL_ATTR1_CHANNEL_TRACK_TARGET
This commit is contained in:
Ovahlord committed 2020-09-09 20:08:35 +02:00
1 parent b81afb5b92
commit 3274117cec
6 files changed
+38 -98

No files matched your search

-7
View File
@@ -500,13 +500,6 @@ void Unit::Update(uint32 p_time)
// All position info based actions have been executed, reset info
_positionUpdateInfo.Reset();
// Update serverside orientation of channeled spells that are suposed to track the channel target
if (Spell const* spell = m_currentSpells[CURRENT_CHANNELED_SPELL])
if (spell->GetSpellInfo()->HasAttribute(SPELL_ATTR1_CHANNEL_TRACK_TARGET))
if (ObjectGuid guid = GetChannelObjectGuid())
if (WorldObject* target = ObjectAccessor::GetWorldObject(*this, guid))
SetOrientation(GetAngle(target));
// Update Power regeneration interval
if (_regenerationTimer >= int32(GetRegenerationInterval()))
_regenerationTimer -= (GetRegenerationInterval() - p_time);