mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
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.');
|
||||
6
data/sql/updates/world/2016_08_14_02.sql
Normal file
6
data/sql/updates/world/2016_08_14_02.sql
Normal file
@@ -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());
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user