mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
feat(Core/Movement): Add LastMovement::lastTransportEntry for transport-resume gate
This commit is contained in:
parent
dcecb6844f
commit
bf5d4cf047
@ -24,6 +24,7 @@ LastMovement::LastMovement(LastMovement& other)
|
|||||||
nextTeleport = other.nextTeleport;
|
nextTeleport = other.nextTeleport;
|
||||||
lastPath = other.lastPath;
|
lastPath = other.lastPath;
|
||||||
priority = other.priority;
|
priority = other.priority;
|
||||||
|
lastTransportEntry = other.lastTransportEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LastMovement::clear()
|
void LastMovement::clear()
|
||||||
@ -42,6 +43,7 @@ void LastMovement::clear()
|
|||||||
msTime = 0;
|
msTime = 0;
|
||||||
lastdelayTime = 0;
|
lastdelayTime = 0;
|
||||||
priority = MovementPriority::MOVEMENT_NORMAL;
|
priority = MovementPriority::MOVEMENT_NORMAL;
|
||||||
|
lastTransportEntry = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LastMovement::Set(Unit* follow)
|
void LastMovement::Set(Unit* follow)
|
||||||
|
|||||||
@ -39,6 +39,7 @@ public:
|
|||||||
lastPath = other.lastPath;
|
lastPath = other.lastPath;
|
||||||
nextTeleport = other.nextTeleport;
|
nextTeleport = other.nextTeleport;
|
||||||
priority = other.priority;
|
priority = other.priority;
|
||||||
|
lastTransportEntry = other.lastTransportEntry;
|
||||||
return *this;
|
return *this;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -66,6 +67,10 @@ public:
|
|||||||
MovementPriority priority;
|
MovementPriority priority;
|
||||||
TravelPath lastPath;
|
TravelPath lastPath;
|
||||||
time_t nextTeleport;
|
time_t nextTeleport;
|
||||||
|
// Entry of the transport the bot is currently aboard mid-journey,
|
||||||
|
// used by WaitForTransport to resume a transport segment if the
|
||||||
|
// bot is still on it next tick (e.g. boat in motion). 0 = none.
|
||||||
|
uint32 lastTransportEntry{0};
|
||||||
std::future<TravelPath> future;
|
std::future<TravelPath> future;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user