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
|
|
@ -74,7 +74,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner)
|
|||
|
||||
D::_addUnitStateMove(owner);
|
||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||
((Creature&)owner).AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||
((Creature&)owner).AddSplineFlag(SPLINEFLAG_UNKNOWN7);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
@ -141,7 +141,7 @@ bool TargetedMovementGeneratorMedium<T,D>::Update(T &owner, const uint32 & time_
|
|||
{
|
||||
D::_addUnitStateMove(owner);
|
||||
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||
((Creature&)owner).AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||
((Creature&)owner).AddSplineFlag(SPLINEFLAG_UNKNOWN7);
|
||||
|
||||
i_destinationHolder.StartTravel(traveller);
|
||||
return true;
|
||||
|
|
@ -199,10 +199,10 @@ template<>
|
|||
void ChaseMovementGenerator<Creature>::Initialize(Creature &owner)
|
||||
{
|
||||
owner.addUnitState(UNIT_STAT_CHASE|UNIT_STAT_CHASE_MOVE);
|
||||
owner.RemoveMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||
owner.RemoveSplineFlag(SPLINEFLAG_WALKMODE);
|
||||
|
||||
if (((Creature*)&owner)->canFly())
|
||||
owner.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||
owner.AddSplineFlag(SPLINEFLAG_UNKNOWN7);
|
||||
|
||||
_setTargetLocation(owner);
|
||||
}
|
||||
|
|
@ -273,7 +273,7 @@ void FollowMovementGenerator<Creature>::Initialize(Creature &owner)
|
|||
_updateSpeed(owner);
|
||||
|
||||
if (((Creature*)&owner)->canFly())
|
||||
owner.AddMonsterMoveFlag(MONSTER_MOVE_FLY);
|
||||
owner.AddSplineFlag(SPLINEFLAG_UNKNOWN7);
|
||||
|
||||
_setTargetLocation(owner);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue