mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
i.e. world update start
This commit is contained in:
committed by
Francesco Borzì
parent
1b7522ff0e
commit
51b8773528
@@ -7,6 +7,7 @@
|
||||
#include "Common.h"
|
||||
#include "TicketMgr.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GameTime.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "WorldPacket.h"
|
||||
@@ -16,7 +17,7 @@
|
||||
#include "Player.h"
|
||||
#include "Opcodes.h"
|
||||
|
||||
inline float GetAge(uint64 t) { return float(time(NULL) - t) / DAY; }
|
||||
inline float GetAge(uint64 t) { return float(GameTime::GetGameTime() - t) / DAY; }
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// GM ticket
|
||||
@@ -24,7 +25,7 @@ GmTicket::GmTicket() : _id(0), _playerGuid(0), _type(TICKET_TYPE_OPEN), _posX(0)
|
||||
_closedBy(0), _resolvedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false),
|
||||
_needResponse(false), _needMoreHelp(false) { }
|
||||
|
||||
GmTicket::GmTicket(Player* player) : _type(TICKET_TYPE_OPEN), _createTime(time(NULL)), _lastModifiedTime(time(NULL)), _closedBy(0), _resolvedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), _needMoreHelp(false)
|
||||
GmTicket::GmTicket(Player* player) : _type(TICKET_TYPE_OPEN), _createTime(GameTime::GetGameTime()), _lastModifiedTime(GameTime::GetGameTime()), _closedBy(0), _resolvedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), _needMoreHelp(false)
|
||||
{
|
||||
_id = sTicketMgr->GenerateTicketId();
|
||||
_playerName = player->GetName();
|
||||
@@ -147,7 +148,7 @@ void GmTicket::SendResponse(WorldSession* session) const
|
||||
|
||||
std::string GmTicket::FormatMessageString(ChatHandler& handler, bool detailed) const
|
||||
{
|
||||
time_t curTime = time(NULL);
|
||||
time_t curTime = GameTime::GetGameTime();
|
||||
|
||||
std::stringstream ss;
|
||||
ss << handler.PGetParseString(LANG_COMMAND_TICKETLISTGUID, _id);
|
||||
@@ -186,6 +187,12 @@ std::string GmTicket::FormatMessageString(ChatHandler& handler, const char* szCl
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
void GmTicket::SetMessage(std::string const& message)
|
||||
{
|
||||
_message = message;
|
||||
_lastModifiedTime = uint64(GameTime::GetGameTime());
|
||||
}
|
||||
|
||||
void GmTicket::SetUnassigned()
|
||||
{
|
||||
_assignedTo = 0;
|
||||
@@ -235,7 +242,7 @@ void GmTicket::SetChatLog(std::list<uint32> time, std::string const& log)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Ticket manager
|
||||
TicketMgr::TicketMgr() : _status(true), _lastTicketId(0), _lastSurveyId(0), _openTicketCount(0), _lastChange(time(NULL)) { }
|
||||
TicketMgr::TicketMgr() : _status(true), _lastTicketId(0), _lastSurveyId(0), _openTicketCount(0), _lastChange(GameTime::GetGameTime()) { }
|
||||
|
||||
TicketMgr::~TicketMgr()
|
||||
{
|
||||
@@ -369,6 +376,10 @@ void TicketMgr::ResolveAndCloseTicket(uint32 ticketId, int64 source)
|
||||
}
|
||||
}
|
||||
|
||||
void TicketMgr::UpdateLastChange()
|
||||
{
|
||||
_lastChange = uint64(GameTime::GetGameTime());
|
||||
}
|
||||
|
||||
void TicketMgr::ShowList(ChatHandler& handler, bool onlineOnly) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user