mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Get rid of monster movement flags, since it's really spline flags.
Thanks to Ralek for research.
This commit is contained in:
parent
4a3081e7d5
commit
db547a008a
20 changed files with 206 additions and 182 deletions
|
|
@ -98,13 +98,13 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
|
|||
if (is_air_ok)
|
||||
{
|
||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||
creature.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||
creature.AddSplineFlag(SPLINEFLAG_UNKNOWN7);
|
||||
}
|
||||
//else if (is_water_ok) // Swimming mode to be done with more than this check
|
||||
else
|
||||
{
|
||||
i_nextMoveTime.Reset(urand(500+i_destinationHolder.GetTotalTravelTime(), 10000+i_destinationHolder.GetTotalTravelTime()));
|
||||
creature.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||
creature.AddSplineFlag(SPLINEFLAG_WALKMODE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -115,9 +115,9 @@ void RandomMovementGenerator<Creature>::Initialize(Creature &creature)
|
|||
return;
|
||||
|
||||
if (creature.canFly())
|
||||
creature.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||
creature.AddSplineFlag(SPLINEFLAG_UNKNOWN7);
|
||||
else
|
||||
creature.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||
creature.AddSplineFlag(SPLINEFLAG_WALKMODE);
|
||||
|
||||
creature.addUnitState(UNIT_STAT_ROAMING|UNIT_STAT_ROAMING_MOVE);
|
||||
_setRandomLocation(creature);
|
||||
|
|
@ -168,15 +168,15 @@ RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff
|
|||
if (i_nextMoveTime.Passed())
|
||||
{
|
||||
if (creature.canFly())
|
||||
creature.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||
creature.AddSplineFlag(SPLINEFLAG_UNKNOWN7);
|
||||
else
|
||||
creature.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||
creature.AddSplineFlag(SPLINEFLAG_WALKMODE);
|
||||
|
||||
_setRandomLocation(creature);
|
||||
}
|
||||
else if (creature.isPet() && creature.GetOwner() && !creature.IsWithinDist(creature.GetOwner(), PET_FOLLOW_DIST+2.5f))
|
||||
{
|
||||
creature.AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||
creature.AddSplineFlag(SPLINEFLAG_WALKMODE);
|
||||
_setRandomLocation(creature);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue