*Merge with 448.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-10 11:21:59 -06:00
2 changed files with 13 additions and 1 deletions

View File

@@ -66,6 +66,18 @@ void WaypointMovementGenerator<Creature>::MovementInform(Creature &unit)
unit.AI()->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode);
}
template<class T>
bool WaypointMovementGenerator<T>::GetDestination(float &x, float &y, float &z) const
{
if(i_destinationHolder.HasArrived())
return false;
i_destinationHolder.GetDestination(x, y, z);
return true;
}
template bool WaypointMovementGenerator<Creature>::GetDestination(float &x, float &y, float &z) const;
template bool WaypointMovementGenerator<Player>::GetDestination(float &x, float &y, float &z) const;
template<>
void WaypointMovementGenerator<Creature>::Reset(Creature &unit){}

View File

@@ -76,7 +76,7 @@ class TRINITY_DLL_SPEC WaypointMovementGenerator
void GeneratePathId(T &);
void Reset(T &unit);
bool Update(T &, const uint32 &);
bool GetDestination(float &x, float &y, float &z) const{if(i_destinationHolder.HasArrived())return false; i_destinationHolder.GetDestination(x, y, z); return true;}
bool GetDestination(float &x, float &y, float &z) const;
MovementGeneratorType GetMovementGeneratorType() { return WAYPOINT_MOTION_TYPE; }
private: