fix(Core/Creature): Use proper name for wander distance (#2858)
* Change from spawndist to wander_distance Co-Authored-By: ratkosrb <ratkosrb@users.noreply.github.com> * fix sql error Co-Authored-By: ratkosrb <ratkosrb@users.noreply.github.com> * Let's see if this fixes eluna :) * Revert "Let's see if this fixes eluna :)" This reverts commit be675bf83fc6a02f3347ea76408152d623d374bf. * fix indent * Revert "fix indent" This reverts commit f4cb3d2d9fa908445d342b6f2e6dda9d52fd4665. * Revert "Revert "fix indent"" This reverts commit 48527cfd2f9031f95bdf6e0d7b90111a3c0dc0f2. Co-authored-by: ratkosrb <ratkosrb@users.noreply.github.com>
This commit is contained in:
parent
50287c05f0
commit
8a1eab2c23
14 changed files with 75 additions and 64 deletions
|
|
@ -202,10 +202,10 @@ void RandomMovementGenerator<Creature>::DoInitialize(Creature* creature)
|
|||
return;
|
||||
|
||||
if (!_wanderDistance)
|
||||
_wanderDistance = creature->GetRespawnRadius();
|
||||
_wanderDistance = creature->GetWanderDistance();
|
||||
|
||||
_nextMoveTime.Reset(creature->GetDBTableGUIDLow() && creature->GetRespawnRadius() == _wanderDistance ? urand(1, 5000) : 0);
|
||||
_wanderDistance = std::max((creature->GetRespawnRadius() == _wanderDistance && creature->GetInstanceId() == 0) ? (creature->CanFly() ? MIN_WANDER_DISTANCE_AIR : MIN_WANDER_DISTANCE_GROUND) : 0.0f, _wanderDistance);
|
||||
_nextMoveTime.Reset(creature->GetDBTableGUIDLow() && creature->GetWanderDistance() == _wanderDistance ? urand(1, 5000) : 0);
|
||||
_wanderDistance = std::max((creature->GetWanderDistance() == _wanderDistance && creature->GetInstanceId() == 0) ? (creature->CanFly() ? MIN_WANDER_DISTANCE_AIR : MIN_WANDER_DISTANCE_GROUND) : 0.0f, _wanderDistance);
|
||||
|
||||
if (G3D::fuzzyEq(_initialPosition.GetExactDist2d(0.0f, 0.0f), 0.0f))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue