*Implements missing bool getDestination(float &, float &, float &) function in random movement generator
--HG-- branch : trunk
This commit is contained in:
@@ -27,6 +27,17 @@
|
||||
|
||||
#define RUNNING_CHANCE_RANDOMMV 20 //will be "1 / RUNNING_CHANCE_RANDOMMV"
|
||||
|
||||
template<>
|
||||
bool
|
||||
RandomMovementGenerator<Creature>::GetDestination(float &x, float &y, float &z) const
|
||||
{
|
||||
if(i_destinationHolder.HasArrived())
|
||||
return false;
|
||||
|
||||
i_destinationHolder.GetDestination(x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
template<>
|
||||
void
|
||||
RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
|
||||
|
||||
@@ -38,7 +38,8 @@ class TRINITY_DLL_SPEC RandomMovementGenerator
|
||||
void Finalize(T &) {}
|
||||
void Reset(T &);
|
||||
bool Update(T &, const uint32 &);
|
||||
void UpdateMapPosition(uint32 mapid, float &x ,float &y, float &z)
|
||||
bool GetDestination(float &x, float &y, float &z) const;
|
||||
void UpdateMapPosition(uint32 mapid, float &x ,float &y, float &z)
|
||||
{
|
||||
i_destinationHolder.GetLocationNow(mapid, x,y,z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user