*Add two new functions GetHomePosition() and GetRelativeAngle(x, y)

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-19 18:20:34 -08:00
parent 4abed08f4d
commit 02eeffd22f
2 changed files with 3 additions and 1 deletions

View File

@@ -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(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); }
Position GetHomePosition() { return m_homePosition; }
uint32 GetGlobalCooldown() const { return m_GlobalCooldown; }

View File

@@ -408,6 +408,7 @@ struct TRINITY_DLL_SPEC Position
float GetAngle(const Position *pos) const;
float GetAngle(float x, float y) const;
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;
bool IsInDist2d(float x, float y, float dist) const