mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
Rebase resync
This commit is contained in:
parent
a0797532e8
commit
1997c1e903
3106 changed files with 11118 additions and 627576 deletions
|
|
@ -27,11 +27,16 @@
|
|||
template<class T>
|
||||
void ConfusedMovementGenerator<T>::Initialize(T& unit)
|
||||
{
|
||||
unit.addUnitState(UNIT_STAT_CONFUSED);
|
||||
|
||||
// set initial position
|
||||
unit.GetPosition(i_x, i_y, i_z);
|
||||
|
||||
if (!unit.isAlive() || unit.hasUnitState(UNIT_STAT_NOT_MOVE))
|
||||
return;
|
||||
|
||||
unit.StopMoving();
|
||||
unit.addUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_CONFUSED_MOVE);
|
||||
unit.addUnitState(UNIT_STAT_CONFUSED_MOVE);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
|
@ -45,6 +50,10 @@ template<class T>
|
|||
void ConfusedMovementGenerator<T>::Reset(T& unit)
|
||||
{
|
||||
i_nextMoveTime.Reset(0);
|
||||
|
||||
if (!unit.isAlive() || unit.hasUnitState(UNIT_STAT_NOT_MOVE))
|
||||
return;
|
||||
|
||||
unit.StopMoving();
|
||||
unit.addUnitState(UNIT_STAT_CONFUSED | UNIT_STAT_CONFUSED_MOVE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue