Add function to change orientation or set in front of some unit. It also send packet with move update, so client also will see that creature change orientation.

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-12-05 11:12:21 +01:00
parent 76c57e111a
commit 7d38088860
+12
View File
@@ -1622,6 +1622,18 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
SetOrientation(GetAngle(target));
}
bool isInBackInMap(Unit const* target, float distance, float arc = M_PI) const;
void ChangeOrient(float fAngle, Unit* pUnit = NULL)
{
if(!this)
return;
if(!pUnit)
this->SetOrientation(fAngle);
else
this->SetInFront(pUnit);
this->SendMovementFlagUpdate();
}
// Visibility system
UnitVisibility GetVisibility() const { return m_Visibility; }