*Add two new functions GetHomePosition() and GetRelativeAngle(x, y)
--HG-- branch : trunk
This commit is contained in:
+2
-1
@@ -702,8 +702,9 @@ class TRINITY_DLL_SPEC Creature : public Unit
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SetHomePosition(float x, float y, float z, float o) { m_homePosition.Relocate(x, y, z, o); }
|
void SetHomePosition(float x, float y, float z, float o) { m_homePosition.Relocate(x, y, z, o); }
|
||||||
void SetHomePosition(const Position &pos) { m_homePosition.Relocate(pos);}
|
void SetHomePosition(const Position &pos) { m_homePosition.Relocate(pos); }
|
||||||
void GetHomePosition(float &x, float &y, float &z, float &ori) { m_homePosition.GetPosition(x, y, z, ori); }
|
void GetHomePosition(float &x, float &y, float &z, float &ori) { m_homePosition.GetPosition(x, y, z, ori); }
|
||||||
|
Position GetHomePosition() { return m_homePosition; }
|
||||||
|
|
||||||
uint32 GetGlobalCooldown() const { return m_GlobalCooldown; }
|
uint32 GetGlobalCooldown() const { return m_GlobalCooldown; }
|
||||||
|
|
||||||
|
|||||||
@@ -408,6 +408,7 @@ struct TRINITY_DLL_SPEC Position
|
|||||||
float GetAngle(const Position *pos) const;
|
float GetAngle(const Position *pos) const;
|
||||||
float GetAngle(float x, float y) const;
|
float GetAngle(float x, float y) const;
|
||||||
float GetRelativeAngle(const Position *pos) const { return GetAngle(pos) - m_orientation; }
|
float GetRelativeAngle(const Position *pos) const { return GetAngle(pos) - m_orientation; }
|
||||||
|
float GetRelativeAngle(float x, float y) const { return GetAngle(x, y) - m_orientation; }
|
||||||
void GetSinCos(float x, float y, float &vsin, float &vcos) const;
|
void GetSinCos(float x, float y, float &vsin, float &vcos) const;
|
||||||
|
|
||||||
bool IsInDist2d(float x, float y, float dist) const
|
bool IsInDist2d(float x, float y, float dist) const
|
||||||
|
|||||||
Reference in New Issue
Block a user