mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +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
|
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
|
// Now we re-set destination to same node and start travel
|
||||||
creature.addUnitState(UNIT_STAT_ROAMING);
|
creature.addUnitState(UNIT_STAT_ROAMING);
|
||||||
if (creature.canFly())
|
if (creature.canFly())
|
||||||
|
|
@ -117,11 +117,11 @@ bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint3
|
||||||
}
|
}
|
||||||
else // if( !i_nextMoveTime.Passed())
|
else // if( !i_nextMoveTime.Passed())
|
||||||
{ // unexpected end of timer && creature stopped && not at end of segment
|
{ // unexpected end of timer && creature stopped && not at end of segment
|
||||||
if (!IsStopedByPlayer())
|
if (!IsStoppedByPlayer())
|
||||||
{ // Put 30 seconds delay
|
{ // Put 30 seconds delay
|
||||||
i_destinationHolder.IncreaseTravelTime(STOP_TIME_FOR_PLAYER);
|
i_destinationHolder.IncreaseTravelTime(STOP_TIME_FOR_PLAYER);
|
||||||
i_nextMoveTime.Reset(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
|
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
|
else // If not stopped then stop it and set the reset of TimeTracker to waittime
|
||||||
{
|
{
|
||||||
creature.StopMoving();
|
creature.StopMoving();
|
||||||
SetStopedByPlayer(false);
|
SetStoppedByPlayer(false);
|
||||||
i_nextMoveTime.Reset(i_path->at(i_currentNode).delay);
|
i_nextMoveTime.Reset(i_path->at(i_currentNode).delay);
|
||||||
++i_currentNode;
|
++i_currentNode;
|
||||||
if( i_currentNode >= i_path->size() )
|
if( i_currentNode >= i_path->size() )
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ class MANGOS_DLL_SPEC WaypointMovementGenerator<Creature>
|
||||||
public PathMovementBase<Creature, WaypointPath*>
|
public PathMovementBase<Creature, WaypointPath*>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WaypointMovementGenerator(Creature &) : i_nextMoveTime(0), b_StopedByPlayer(false) {}
|
WaypointMovementGenerator(Creature &) : i_nextMoveTime(0), b_StoppedByPlayer(false) {}
|
||||||
~WaypointMovementGenerator() { ClearWaypoints(); }
|
~WaypointMovementGenerator() { ClearWaypoints(); }
|
||||||
void Initialize(Creature &u)
|
void Initialize(Creature &u)
|
||||||
{
|
{
|
||||||
|
|
@ -86,7 +86,7 @@ public PathMovementBase<Creature, WaypointPath*>
|
||||||
void Reset(Creature &u)
|
void Reset(Creature &u)
|
||||||
{
|
{
|
||||||
ReloadPath(u);
|
ReloadPath(u);
|
||||||
b_StopedByPlayer = false;
|
b_StoppedByPlayer = false;
|
||||||
i_nextMoveTime.Reset(0);
|
i_nextMoveTime.Reset(0);
|
||||||
}
|
}
|
||||||
bool Update(Creature &u, const uint32 &diff);
|
bool Update(Creature &u, const uint32 &diff);
|
||||||
|
|
@ -100,8 +100,8 @@ public PathMovementBase<Creature, WaypointPath*>
|
||||||
void ReloadPath(Creature &c) { ClearWaypoints(); LoadPath(c); }
|
void ReloadPath(Creature &c) { ClearWaypoints(); LoadPath(c); }
|
||||||
|
|
||||||
// Player stoping creature
|
// Player stoping creature
|
||||||
bool IsStopedByPlayer() { return b_StopedByPlayer; }
|
bool IsStoppedByPlayer() { return b_StoppedByPlayer; }
|
||||||
void SetStopedByPlayer(bool val) { b_StopedByPlayer = val; }
|
void SetStoppedByPlayer(bool val) { b_StoppedByPlayer = val; }
|
||||||
|
|
||||||
// statics
|
// statics
|
||||||
static void Initialize(void);
|
static void Initialize(void);
|
||||||
|
|
@ -114,7 +114,7 @@ public PathMovementBase<Creature, WaypointPath*>
|
||||||
|
|
||||||
TimeTrackerSmall i_nextMoveTime;
|
TimeTrackerSmall i_nextMoveTime;
|
||||||
std::vector<bool> i_hasDone;
|
std::vector<bool> i_hasDone;
|
||||||
bool b_StopedByPlayer;
|
bool b_StoppedByPlayer;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** FlightPathMovementGenerator generates movement of the player for the paths
|
/** FlightPathMovementGenerator generates movement of the player for the paths
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8281"
|
#define REVISION_NR "8282"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue