diff options
| author | Shauren <shauren.trinity@gmail.com> | 2021-04-05 23:47:05 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-04-05 23:47:05 +0200 |
| commit | d29dd1eeb5c52dc76bd741fe1ee0e875c416b8e7 (patch) | |
| tree | 19b4dda1de5bee6f3d45a3472f131380443365d4 /src/server/game/Guilds | |
| parent | c648ac58e0a0724a6eff0242afaf665443f675ef (diff) | |
Core/Misc: Change all unix time columns in character database to bigint (signed)
Diffstat (limited to 'src/server/game/Guilds')
| -rw-r--r-- | src/server/game/Guilds/Guild.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/Guilds/Guild.h | 4 | ||||
| -rw-r--r-- | src/server/game/Guilds/GuildFinderMgr.cpp | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 487ac491966..79326a97a38 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -134,7 +134,7 @@ void Guild::EventLogEntry::SaveToDB(CharacterDatabaseTransaction& trans) const stmt->setUInt64(++index, m_playerGuid1); stmt->setUInt64(++index, m_playerGuid2); stmt->setUInt8 (++index, m_newRank); - stmt->setUInt64(++index, m_timestamp); + stmt->setInt64 (++index, m_timestamp); trans->Append(stmt); } @@ -173,7 +173,7 @@ void Guild::BankEventLogEntry::SaveToDB(CharacterDatabaseTransaction& trans) con stmt->setUInt64(++index, m_itemOrMoney); stmt->setUInt16(++index, m_itemStackCount); stmt->setUInt8 (++index, m_destTabId); - stmt->setUInt64(++index, m_timestamp); + stmt->setInt64 (++index, m_timestamp); trans->Append(stmt); } @@ -218,7 +218,7 @@ void Guild::NewsLogEntry::SaveToDB(CharacterDatabaseTransaction& trans) const stmt->setUInt64(++index, GetPlayerGuid().GetCounter()); stmt->setUInt32(++index, GetFlags()); stmt->setUInt32(++index, GetValue()); - stmt->setUInt64(++index, GetTimestamp()); + stmt->setInt64 (++index, GetTimestamp()); CharacterDatabase.ExecuteOrAppend(trans, stmt); } @@ -2421,7 +2421,7 @@ bool Guild::LoadEventLogFromDB(Field* fields) const m_eventLog->LoadEvent(new EventLogEntry( m_id, // guild id fields[1].GetUInt32(), // guid - time_t(fields[6].GetUInt32()), // timestamp + fields[6].GetInt64(), // timestamp GuildEventLogTypes(fields[2].GetUInt8()), // event type fields[3].GetUInt64(), // player guid 1 fields[4].GetUInt64(), // player guid 2 @@ -2459,7 +2459,7 @@ bool Guild::LoadBankEventLogFromDB(Field* fields) pLog->LoadEvent(new BankEventLogEntry( m_id, // guild id guid, // guid - time_t(fields[8].GetUInt32()), // timestamp + fields[8].GetInt64(), // timestamp dbTabId, // tab id eventType, // event type fields[4].GetUInt64(), // player guid @@ -2479,7 +2479,7 @@ void Guild::LoadGuildNewsLogFromDB(Field* fields) const m_newsLog->LoadEvent(new NewsLogEntry( m_id, // guild id fields[1].GetUInt32(), // guid - fields[6].GetUInt32(), // timestamp //64 bits? + fields[6].GetInt64(), // timestamp //64 bits? GuildNews(fields[2].GetUInt8()), // type ObjectGuid::Create<HighGuid::Player>(fields[3].GetUInt64()), // player guid fields[4].GetUInt32(), // Flags diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index 20e6196d66e..17cb2a3d7f6 100644 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -406,14 +406,14 @@ class TC_GAME_API Guild virtual ~LogEntry() { } uint32 GetGUID() const { return m_guid; } - uint64 GetTimestamp() const { return m_timestamp; } + time_t GetTimestamp() const { return m_timestamp; } virtual void SaveToDB(CharacterDatabaseTransaction& trans) const = 0; protected: ObjectGuid::LowType m_guildId; uint32 m_guid; - uint64 m_timestamp; + time_t m_timestamp; }; // Event log entry diff --git a/src/server/game/Guilds/GuildFinderMgr.cpp b/src/server/game/Guilds/GuildFinderMgr.cpp index 3517bf3b399..a6ff56d015e 100644 --- a/src/server/game/Guilds/GuildFinderMgr.cpp +++ b/src/server/game/Guilds/GuildFinderMgr.cpp @@ -114,9 +114,9 @@ void GuildFinderMgr::LoadMembershipRequests() uint8 classRoles = fields[3].GetUInt8(); uint8 interests = fields[4].GetUInt8(); std::string comment = fields[5].GetString(); - uint32 submitTime = fields[6].GetUInt32(); + time_t submitTime = fields[6].GetInt64(); - MembershipRequest request(playerId, guildId, availability, classRoles, interests, std::move(comment), time_t(submitTime)); + MembershipRequest request(playerId, guildId, availability, classRoles, interests, std::move(comment), submitTime); _membershipRequestsByGuild[guildId][playerId] = request; _membershipRequestsByPlayer[playerId][guildId] = request; @@ -140,7 +140,7 @@ void GuildFinderMgr::AddMembershipRequest(ObjectGuid const& guildGuid, Membershi stmt->setUInt8(3, request.GetClassRoles()); stmt->setUInt8(4, request.GetInterests()); stmt->setString(5, request.GetComment()); - stmt->setUInt32(6, request.GetSubmitTime()); + stmt->setInt64(6, request.GetSubmitTime()); trans->Append(stmt); CharacterDatabase.CommitTransaction(trans); |
