Core/Units: keep serverside orientation up to date while tracking a channel target
This commit is contained in:
1 parent
f0972517e8
commit
cd6fa62606
1 file changed
+7
@@ -521,6 +521,13 @@ void Unit::Update(uint32 p_time)
|
||||
|
||||
UpdateSplineMovement(p_time);
|
||||
i_motionMaster->UpdateMotion(p_time);
|
||||
|
||||
// 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));
|
||||
}
|
||||
|
||||
bool Unit::haveOffhandWeapon() const
|
||||
|
||||
Reference in new issue
Block a user