Misc: fix SQL updates + move some lines of code
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
|
|
||||||
(1334, 'Your ticket has been closed.'),
|
|
||||||
(1335, 'You received a ticket response.');
|
|
||||||
@@ -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.');
|
||||||
@@ -252,17 +252,17 @@ public:
|
|||||||
ticket->SendResponse(player->GetSession());
|
ticket->SendResponse(player->GetSession());
|
||||||
ChatHandler(player->GetSession()).SendSysMessage(LANG_TICKET_COMPLETED);
|
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);
|
Player* gm = handler->GetSession() ? handler->GetSession()->GetPlayer() : NULL;
|
||||||
msg += handler->PGetParseString(LANG_COMMAND_TICKETCOMPLETED, gm ? gm->GetName().c_str() : "Console");
|
|
||||||
handler->SendGlobalGMSysMessage(msg.c_str());
|
|
||||||
|
|
||||||
SQLTransaction trans = SQLTransaction(NULL);
|
SQLTransaction trans = SQLTransaction(NULL);
|
||||||
ticket->SetCompleted();
|
ticket->SetCompleted();
|
||||||
ticket->SetResolvedBy(gm ? gm->GetGUID() : -1);
|
ticket->SetResolvedBy(gm ? gm->GetGUID() : -1);
|
||||||
ticket->SaveToDB(trans);
|
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();
|
sTicketMgr->UpdateLastChange();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user