diff --git a/data/sql/updates/world/2016_08_13_01.sql b/data/sql/updates/world/2016_08_13_01.sql deleted file mode 100644 index 37a5dfc4c..000000000 --- a/data/sql/updates/world/2016_08_13_01.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES -(1334, 'Your ticket has been closed.'), -(1335, 'You received a ticket response.'); \ No newline at end of file diff --git a/data/sql/updates/2016_08_14_00.sql b/data/sql/updates/world/2016_08_14_00.sql similarity index 100% rename from data/sql/updates/2016_08_14_00.sql rename to data/sql/updates/world/2016_08_14_00.sql diff --git a/data/sql/updates/2016_08_14_01.sql b/data/sql/updates/world/2016_08_14_01.sql similarity index 100% rename from data/sql/updates/2016_08_14_01.sql rename to data/sql/updates/world/2016_08_14_01.sql diff --git a/data/sql/updates/world/2016_08_14_02.sql b/data/sql/updates/world/2016_08_14_02.sql new file mode 100644 index 000000000..866d64fd5 --- /dev/null +++ b/data/sql/updates/world/2016_08_14_02.sql @@ -0,0 +1,6 @@ +ALTER TABLE world_db_version CHANGE COLUMN 2016_08_14_01 2016_08_14_02 bit; + +DELETE FROM `trinity_string` WHERE `entry`IN (1334, 1335); +INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES +(1334, 'Your ticket has been closed.'), +(1335, 'You received a ticket response.'); diff --git a/src/scripts/Commands/cs_ticket.cpp b/src/scripts/Commands/cs_ticket.cpp index e8ed75d6f..1641cb766 100644 --- a/src/scripts/Commands/cs_ticket.cpp +++ b/src/scripts/Commands/cs_ticket.cpp @@ -252,17 +252,17 @@ public: ticket->SendResponse(player->GetSession()); ChatHandler(player->GetSession()).SendSysMessage(LANG_TICKET_COMPLETED); } - Player* gm = handler->GetSession() ? handler->GetSession()->GetPlayer() : NULL; - std::string msg = ticket->FormatMessageString(*handler, NULL, NULL, NULL, NULL); - msg += handler->PGetParseString(LANG_COMMAND_TICKETCOMPLETED, gm ? gm->GetName().c_str() : "Console"); - handler->SendGlobalGMSysMessage(msg.c_str()); + Player* gm = handler->GetSession() ? handler->GetSession()->GetPlayer() : NULL; SQLTransaction trans = SQLTransaction(NULL); ticket->SetCompleted(); ticket->SetResolvedBy(gm ? gm->GetGUID() : -1); ticket->SaveToDB(trans); + std::string msg = ticket->FormatMessageString(*handler, NULL, NULL, NULL, NULL); + msg += handler->PGetParseString(LANG_COMMAND_TICKETCOMPLETED, gm ? gm->GetName().c_str() : "Console"); + handler->SendGlobalGMSysMessage(msg.c_str()); sTicketMgr->UpdateLastChange(); return true; }