mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
core merge fixes for playerbots
This commit is contained in:
@@ -97,6 +97,32 @@ public:
|
||||
return _eventMap.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Current internal time as uint32 milliseconds
|
||||
*
|
||||
* was removed in core https://github.com/azerothcore/azerothcore-wotlk/pull/23121,
|
||||
* but still required atm for mod-playerbot.
|
||||
*/
|
||||
uint32 GetTimer() const
|
||||
{
|
||||
return static_cast<uint32>(duration_cast<Milliseconds>(_time.time_since_epoch()).count());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Time of found even
|
||||
*
|
||||
* was removed in core https://github.com/azerothcore/azerothcore-wotlk/pull/23121,
|
||||
* but still required atm for mod-playerbot.
|
||||
*/
|
||||
uint32 GetNextEventTime(uint16 eventId) const
|
||||
{
|
||||
auto timeUntil = GetTimeUntilEvent(eventId);
|
||||
if (timeUntil == Milliseconds::max())
|
||||
return 0;
|
||||
|
||||
return GetTimer() + static_cast<uint32>(timeUntil.count());
|
||||
}
|
||||
|
||||
/**
|
||||
* @name SetPhase
|
||||
* @brief Sets the phase of the map (absolute).
|
||||
|
||||
Reference in New Issue
Block a user