diff options
Diffstat (limited to 'src/server/game/Tickets/TicketMgr.cpp')
-rw-r--r-- | src/server/game/Tickets/TicketMgr.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index 566033fb700..0c5f3e608d9 100644 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -32,12 +32,12 @@ inline float GetAge(uint64 t) { return float(time(NULL) - t) / DAY; } /////////////////////////////////////////////////////////////////////////////////////////////////// // GM ticket -GmTicket::GmTicket() : _id(0), _playerGuid(0), _posX(0), _posY(0), _posZ(0), _mapId(0), _createTime(0), _lastModifiedTime(0), - _closedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), +GmTicket::GmTicket() : _id(0), _posX(0), _posY(0), _posZ(0), _mapId(0), _createTime(0), _lastModifiedTime(0), + _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), _needResponse(false), _needMoreHelp(false) { } GmTicket::GmTicket(Player* player) : _posX(0), _posY(0), _posZ(0), _mapId(0), _createTime(time(NULL)), _lastModifiedTime(time(NULL)), - _closedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), + _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), _needResponse(false), _needMoreHelp(false) { _id = sTicketMgr->GenerateTicketId(); @@ -53,7 +53,7 @@ bool GmTicket::LoadFromDB(Field* fields) // ticketId, guid, name, message, createTime, mapId, posX, posY, posZ, lastModifiedTime, closedBy, assignedTo, comment, response, completed, escalated, viewed, haveTicket uint8 index = 0; _id = fields[ index].GetUInt32(); - _playerGuid = MAKE_NEW_GUID(fields[++index].GetUInt32(), 0, HIGHGUID_PLAYER); + _playerGuid = ObjectGuid(HIGHGUID_PLAYER, fields[++index].GetUInt32()); _playerName = fields[++index].GetString(); _message = fields[++index].GetString(); _createTime = fields[++index].GetUInt32(); @@ -62,8 +62,8 @@ bool GmTicket::LoadFromDB(Field* fields) _posY = fields[++index].GetFloat(); _posZ = fields[++index].GetFloat(); _lastModifiedTime = fields[++index].GetUInt32(); - _closedBy = fields[++index].GetInt32(); - _assignedTo = MAKE_NEW_GUID(fields[++index].GetUInt32(), 0, HIGHGUID_PLAYER); + _closedBy = ObjectGuid(uint64(fields[++index].GetInt32())); + _assignedTo = ObjectGuid(HIGHGUID_PLAYER, fields[++index].GetUInt32()); _comment = fields[++index].GetString(); _response = fields[++index].GetString(); _completed = fields[++index].GetBool(); @@ -80,7 +80,7 @@ void GmTicket::SaveToDB(SQLTransaction& trans) const uint8 index = 0; PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_GM_TICKET); stmt->setUInt32( index, _id); - stmt->setUInt32(++index, GUID_LOPART(_playerGuid)); + stmt->setUInt32(++index, _playerGuid.GetCounter()); stmt->setString(++index, _playerName); stmt->setString(++index, _message); stmt->setUInt32(++index, uint32(_createTime)); @@ -89,8 +89,8 @@ void GmTicket::SaveToDB(SQLTransaction& trans) const stmt->setFloat (++index, _posY); stmt->setFloat (++index, _posZ); stmt->setUInt32(++index, uint32(_lastModifiedTime)); - stmt->setInt32 (++index, GUID_LOPART(_closedBy)); - stmt->setUInt32(++index, GUID_LOPART(_assignedTo)); + stmt->setInt32 (++index, int32(_closedBy.GetCounter())); + stmt->setUInt32(++index, _assignedTo.GetCounter()); stmt->setString(++index, _comment); stmt->setString(++index, _response); stmt->setBool (++index, _completed); @@ -204,7 +204,7 @@ std::string GmTicket::FormatMessageString(ChatHandler& handler, const char* szCl void GmTicket::SetUnassigned() { - _assignedTo = 0; + _assignedTo.Clear(); switch (_escalatedStatus) { case TICKET_ASSIGNED: _escalatedStatus = TICKET_UNASSIGNED; break; @@ -354,7 +354,7 @@ void TicketMgr::AddTicket(GmTicket* ticket) ticket->SaveToDB(trans); } -void TicketMgr::CloseTicket(uint32 ticketId, int64 source) +void TicketMgr::CloseTicket(uint32 ticketId, ObjectGuid source) { if (GmTicket* ticket = GetTicket(ticketId)) { |