Core/Spells: players shouldn't force their orientation (serverside) on each periodictick when channeling (#26363)

* Core/Spells: players shouldn't force their orientation (serverside) on each periodictick when channeling

* apply @Ovahlord feedback

(cherry picked from commit 6bdfa91fa7)
This commit is contained in:
Gildor
2021-04-11 13:57:14 +02:00
committed by Shauren
parent 667d3cf8fd
commit 0d51e52aa6

View File

@@ -1065,7 +1065,8 @@ void AuraEffect::PeriodicTick(AuraApplication* aurApp, Unit* caster) const
Unit* target = aurApp->GetTarget();
// Update serverside orientation of tracking channeled auras on periodic update ticks
if (caster && m_spellInfo->IsChanneled() && m_spellInfo->HasAttribute(SPELL_ATTR1_CHANNEL_TRACK_TARGET) && caster->m_unitData->ChannelObjects.size())
// 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_CHANNEL_TRACK_TARGET) && caster->m_unitData->ChannelObjects.size())
{
ObjectGuid const channelGuid = caster->m_unitData->ChannelObjects[0];
if (channelGuid != caster->GetGUID())