diff options
| author | ShinDarth <borzifrancesco@gmail.com> | 2015-10-03 11:11:38 +0200 |
|---|---|---|
| committer | ShinDarth <borzifrancesco@gmail.com> | 2015-10-06 15:31:54 +0200 |
| commit | e66db9e20c968659388f5ef231ede1ee0a316976 (patch) | |
| tree | ecec91afbac1c3f36646647826cef98c4f335783 /src/server/scripts/Commands | |
| parent | ba009ea2e2d13c0aa8a76df5bfead6f757ccddc3 (diff) | |
Core/Ticket keep always trace of GM who resolves the ticket
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_ticket.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index b609dfe18dd..f7634381fc9 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -153,7 +153,7 @@ public: return true; } - sTicketMgr->CloseTicket(ticket->GetId(), player ? player->GetGUID() : ObjectGuid(uint64(-1))); + sTicketMgr->ResolveAndCloseTicket(ticket->GetId(), player ? player->GetGUID() : ObjectGuid(uint64(-1))); sTicketMgr->UpdateLastChange(); std::string msg = ticket->FormatMessageString(*handler, player ? player->GetName().c_str() : "Console", NULL, NULL, NULL, NULL); @@ -248,7 +248,10 @@ public: if (Player* player = ticket->GetPlayer()) ticket->SendResponse(player->GetSession()); + Player* gm = handler->GetSession() ? handler->GetSession()->GetPlayer() : nullptr; + SQLTransaction trans = SQLTransaction(NULL); + ticket->SetResolvedBy(gm ? gm->GetGUID() : ObjectGuid(uint64(-1))); ticket->SetCompleted(); ticket->SaveToDB(trans); |
