mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
*Fix a crash bug caused by motionmaster.
*Fix charge movement. --HG-- branch : trunk
This commit is contained in:
@@ -44,7 +44,12 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
||||
return false;
|
||||
|
||||
if(unit.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED))
|
||||
return true;
|
||||
{
|
||||
if(unit.hasUnitState(UNIT_STAT_CHARGING))
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
Traveller<T> traveller(unit);
|
||||
|
||||
@@ -53,7 +58,8 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
||||
if(i_destinationHolder.HasArrived())
|
||||
{
|
||||
unit.StopMoving();
|
||||
MovementInform(unit);
|
||||
if(!unit.hasUnitState(UNIT_STAT_CHARGING))
|
||||
MovementInform(unit);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user