mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
*Merge with 448.
--HG-- branch : trunk
This commit is contained in:
@@ -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){}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user