aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_ticket.cpp5
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);