*Use virtual function for GetFollowAngle
--HG-- branch : trunk
This commit is contained in:
@@ -54,7 +54,7 @@ class Minion : public TempSummon
|
||||
void InitSummon();
|
||||
void RemoveFromWorld();
|
||||
Unit *GetOwner() { return m_owner; }
|
||||
float GetFollowAngle() { return m_followAngle; }
|
||||
float GetFollowAngle() const { return m_followAngle; }
|
||||
void SetFollowAngle(float angle) { m_followAngle = angle; }
|
||||
bool IsPetGhoul() const {return GetEntry() == 26125;} // Ghoul may be guardian or pet
|
||||
protected:
|
||||
|
||||
@@ -14906,15 +14906,6 @@ void Unit::SetFlying(bool apply)
|
||||
}
|
||||
}
|
||||
|
||||
float Unit::GetFollowAngle() const
|
||||
{
|
||||
if (GetTypeId()!=TYPEID_UNIT)
|
||||
return PET_FOLLOW_ANGLE;
|
||||
if (!((Creature*)this)->HasSummonMask(SUMMON_MASK_MINION))
|
||||
return PET_FOLLOW_ANGLE;
|
||||
return ((Minion*)this)->GetFollowAngle();
|
||||
}
|
||||
|
||||
void Unit::NearTeleportTo( float x, float y, float z, float orientation, bool casting /*= false*/ )
|
||||
{
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
|
||||
+1
-1
@@ -1805,7 +1805,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
bool canFly() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLY_MODE); }
|
||||
bool IsFlying() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING); }
|
||||
void SetFlying(bool apply);
|
||||
float GetFollowAngle() const;
|
||||
virtual float GetFollowAngle() const { return M_PI/2; }
|
||||
protected:
|
||||
explicit Unit ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user