mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 11:33:48 +00:00
minimize delta, legacy and merge mistakes over the years
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
|
||||
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>
|
||||
*
|
||||
* This file was based on
|
||||
* https://embeddedartistry.com/blog/2017/05/17/creating-a-circular-buffer-in-c-and-c/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Originally written by Rochet2 - Copyright (C) 2018+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: http://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE
|
||||
* Originally written by Rochet2 - Copyright (C) 2018+ AzerothCore <www.azerothcore.org>
|
||||
*/
|
||||
|
||||
#ifndef _DATA_MAP_H_
|
||||
|
||||
@@ -97,32 +97,6 @@ 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).
|
||||
|
||||
@@ -120,7 +120,7 @@ class EventProcessor
|
||||
[[nodiscard]] uint64 CalculateQueueTime(uint64 delay) const;
|
||||
|
||||
void CancelEventGroup(uint8 group);
|
||||
bool HaveEventList() const { return !m_events.empty(); }
|
||||
bool HasEvents() const { return !m_events.empty(); }
|
||||
|
||||
protected:
|
||||
uint64 m_time{0};
|
||||
|
||||
@@ -347,7 +347,6 @@ inline wchar_t wcharToLower(wchar_t wchar)
|
||||
|
||||
void wstrToUpper(std::wstring& str);
|
||||
void wstrToLower(std::wstring& str);
|
||||
void strToLower(std::string& str);
|
||||
|
||||
std::wstring GetMainPartOfName(std::wstring const& wname, uint32 declension);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user