mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11336] Use movgen Finilize for code applied at normal movegen expire
This let resolve porblems for casts/etc that before happens before real movgen stop from code logic. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
ea516bef45
commit
328bd68350
5 changed files with 28 additions and 26 deletions
|
|
@ -44,6 +44,9 @@ template<class T>
|
|||
void PointMovementGenerator<T>::Finalize(T &unit)
|
||||
{
|
||||
unit.clearUnitState(UNIT_STAT_ROAMING|UNIT_STAT_ROAMING_MOVE);
|
||||
|
||||
if (i_destinationHolder.HasArrived())
|
||||
MovementInform(unit);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
|
@ -82,16 +85,8 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
|||
return true; // not expire now, but already lost
|
||||
}
|
||||
|
||||
if(i_destinationHolder.HasArrived())
|
||||
{
|
||||
unit.clearUnitState(UNIT_STAT_ROAMING_MOVE);
|
||||
MovementInform(unit);
|
||||
|
||||
if (!IsActive(unit))
|
||||
return true;
|
||||
|
||||
if (i_destinationHolder.HasArrived())
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue