feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)

i.e. world update start
This commit is contained in:
Viste(Кирилл)
2019-02-14 21:22:17 +03:00
committed by Francesco Borzì
parent 1b7522ff0e
commit 51b8773528
108 changed files with 933 additions and 509 deletions

View File

@@ -281,7 +281,6 @@ public: // pussywizard: public class Member
m_level(0),
m_class(0),
m_flags(GUILDMEMBER_STATUS_NONE),
m_logoutTime(::time(NULL)),
m_accountId(0),
m_rankId(rankId)
{
@@ -320,7 +319,7 @@ public: // pussywizard: public class Member
void ChangeRank(uint8 newRank);
inline void UpdateLogoutTime() { m_logoutTime = ::time(NULL); }
inline void UpdateLogoutTime();
inline bool IsRank(uint8 rankId) const { return m_rankId == rankId; }
inline bool IsRankNotLower(uint8 rankId) const { return m_rankId <= rankId; }
inline bool IsSamePlayer(uint64 guid) const { return m_guid == guid; }
@@ -375,7 +374,7 @@ private:
class LogEntry
{
public:
LogEntry(uint32 guildId, uint32 guid) : m_guildId(guildId), m_guid(guid), m_timestamp(::time(NULL)) { }
LogEntry(uint32 guildId, uint32 guid);
LogEntry(uint32 guildId, uint32 guid, time_t timestamp) : m_guildId(guildId), m_guid(guid), m_timestamp(timestamp) { }
virtual ~LogEntry() { }