mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8282] Correct typo in SetStoppedByPlayer() and it's related.
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
a56f9ea6de
commit
8e6386aac0
3 changed files with 10 additions and 10 deletions
|
|
@ -106,7 +106,7 @@ bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint3
|
|||
{
|
||||
if( i_nextMoveTime.Passed()) // Timer has elapsed, meaning this part controlled it
|
||||
{
|
||||
SetStopedByPlayer(false);
|
||||
SetStoppedByPlayer(false);
|
||||
// Now we re-set destination to same node and start travel
|
||||
creature.addUnitState(UNIT_STAT_ROAMING);
|
||||
if (creature.canFly())
|
||||
|
|
@ -117,11 +117,11 @@ bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint3
|
|||
}
|
||||
else // if( !i_nextMoveTime.Passed())
|
||||
{ // unexpected end of timer && creature stopped && not at end of segment
|
||||
if (!IsStopedByPlayer())
|
||||
if (!IsStoppedByPlayer())
|
||||
{ // Put 30 seconds delay
|
||||
i_destinationHolder.IncreaseTravelTime(STOP_TIME_FOR_PLAYER);
|
||||
i_nextMoveTime.Reset(STOP_TIME_FOR_PLAYER);
|
||||
SetStopedByPlayer(true); // Mark we did it
|
||||
SetStoppedByPlayer(true); // Mark we did it
|
||||
}
|
||||
}
|
||||
return true; // Abort here this update
|
||||
|
|
@ -194,7 +194,7 @@ bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint3
|
|||
else // If not stopped then stop it and set the reset of TimeTracker to waittime
|
||||
{
|
||||
creature.StopMoving();
|
||||
SetStopedByPlayer(false);
|
||||
SetStoppedByPlayer(false);
|
||||
i_nextMoveTime.Reset(i_path->at(i_currentNode).delay);
|
||||
++i_currentNode;
|
||||
if( i_currentNode >= i_path->size() )
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class MANGOS_DLL_SPEC WaypointMovementGenerator<Creature>
|
|||
public PathMovementBase<Creature, WaypointPath*>
|
||||
{
|
||||
public:
|
||||
WaypointMovementGenerator(Creature &) : i_nextMoveTime(0), b_StopedByPlayer(false) {}
|
||||
WaypointMovementGenerator(Creature &) : i_nextMoveTime(0), b_StoppedByPlayer(false) {}
|
||||
~WaypointMovementGenerator() { ClearWaypoints(); }
|
||||
void Initialize(Creature &u)
|
||||
{
|
||||
|
|
@ -86,7 +86,7 @@ public PathMovementBase<Creature, WaypointPath*>
|
|||
void Reset(Creature &u)
|
||||
{
|
||||
ReloadPath(u);
|
||||
b_StopedByPlayer = false;
|
||||
b_StoppedByPlayer = false;
|
||||
i_nextMoveTime.Reset(0);
|
||||
}
|
||||
bool Update(Creature &u, const uint32 &diff);
|
||||
|
|
@ -100,8 +100,8 @@ public PathMovementBase<Creature, WaypointPath*>
|
|||
void ReloadPath(Creature &c) { ClearWaypoints(); LoadPath(c); }
|
||||
|
||||
// Player stoping creature
|
||||
bool IsStopedByPlayer() { return b_StopedByPlayer; }
|
||||
void SetStopedByPlayer(bool val) { b_StopedByPlayer = val; }
|
||||
bool IsStoppedByPlayer() { return b_StoppedByPlayer; }
|
||||
void SetStoppedByPlayer(bool val) { b_StoppedByPlayer = val; }
|
||||
|
||||
// statics
|
||||
static void Initialize(void);
|
||||
|
|
@ -114,7 +114,7 @@ public PathMovementBase<Creature, WaypointPath*>
|
|||
|
||||
TimeTrackerSmall i_nextMoveTime;
|
||||
std::vector<bool> i_hasDone;
|
||||
bool b_StopedByPlayer;
|
||||
bool b_StoppedByPlayer;
|
||||
};
|
||||
|
||||
/** FlightPathMovementGenerator generates movement of the player for the paths
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8281"
|
||||
#define REVISION_NR "8282"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue