[9208] Big cleanup in UNIT_STAT_* use

* Re-number enums by function groups and use where possible new defined masks in code instead raw enum |-lists.
* Avoid use movement generator generic state markers like UNIT_STAT_CONFUSED for mark movement stoped.
  Add special shadow UNIT_STAT_CONFUSED_MOVE/etc states for like use.
  UNIT_STAT_CONFUSED in like case will be safe expect use for normal checks confused state presence
  And UNIT_STAT_CONFUSED_MOVE for check real move in this state
This commit is contained in:
VladimirMangos 2010-01-18 10:48:31 +03:00
parent 7d6b1b292e
commit 6a2e8064f1
25 changed files with 251 additions and 104 deletions

View file

@ -76,20 +76,10 @@ public PathMovementBase<Creature, WaypointPath*>
public:
WaypointMovementGenerator(Creature &) : i_nextMoveTime(0), b_StoppedByPlayer(false) {}
~WaypointMovementGenerator() { ClearWaypoints(); }
void Initialize(Creature &u)
{
i_nextMoveTime.Reset(0); // TODO: check the lower bound (0 is probably too small)
u.StopMoving();
LoadPath(u);
}
void Interrupt(Creature &) {}
void Finalize(Creature &) {}
void Reset(Creature &u)
{
ReloadPath(u);
b_StoppedByPlayer = false;
i_nextMoveTime.Reset(0);
}
void Initialize(Creature &u);
void Interrupt(Creature &);
void Finalize(Creature &);
void Reset(Creature &u);
bool Update(Creature &u, const uint32 &diff);
void MovementInform(Creature &);