*Implements missing bool getDestination(float &, float &, float &) function in random movement generator

--HG--
branch : trunk
This commit is contained in:
2008-12-14 18:16:25 +02:00
parent d7f76aec99
commit 395116752b
2 changed files with 13 additions and 1 deletions
+11
View File
@@ -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)
+2 -1
View File
@@ -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);
}