mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
*Move movementinform to finalize function to prevent error log spams.
--HG-- branch : trunk
This commit is contained in:
@@ -57,15 +57,22 @@ bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
||||
|
||||
if(i_destinationHolder.HasArrived())
|
||||
{
|
||||
//unit.StopMoving();
|
||||
if(!unit.hasUnitState(UNIT_STAT_CHARGING))
|
||||
MovementInform(unit);
|
||||
arrived = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void PointMovementGenerator<T>:: Finalize(T &unit)
|
||||
{
|
||||
if(unit.hasUnitState(UNIT_STAT_CHARGING))
|
||||
unit.clearUnitState(UNIT_STAT_CHARGING);
|
||||
else if(arrived)
|
||||
MovementInform(unit);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void PointMovementGenerator<T>::MovementInform(T &unit)
|
||||
{
|
||||
@@ -79,7 +86,8 @@ template <> void PointMovementGenerator<Creature>::MovementInform(Creature &unit
|
||||
template void PointMovementGenerator<Player>::Initialize(Player&);
|
||||
template bool PointMovementGenerator<Player>::Update(Player &, const uint32 &diff);
|
||||
template void PointMovementGenerator<Player>::MovementInform(Player&);
|
||||
template void PointMovementGenerator<Player>::Finalize(Player&);
|
||||
|
||||
template void PointMovementGenerator<Creature>::Initialize(Creature&);
|
||||
template bool PointMovementGenerator<Creature>::Update(Creature&, const uint32 &diff);
|
||||
|
||||
template void PointMovementGenerator<Creature>::Finalize(Creature&);
|
||||
|
||||
Reference in New Issue
Block a user