Merge branch 'master' of git@github.com:azerothcore/azerothcore-wotlk.git

This commit is contained in:
Yehonal
2016-08-10 12:41:06 +02:00
7 changed files with 309 additions and 77 deletions

View File

@@ -117,8 +117,7 @@ public:
uint32 updateTime = sWorld->GetUpdateTime();
uint32 avgUpdateTime = avgDiffTracker.getAverage();
handler->PSendSysMessage("%s Realm, revision: %s.", realmName.c_str(), _REVISION);
handler->PSendSysMessage("This server runs on AzerothCore.");
handler->PSendSysMessage("%s", _FULLVERSION);
if (!queuedSessionCount)
handler->PSendSysMessage("Connected players: %u. Characters in world: %u.", activeSessionCount, playerCount);
else

View File

@@ -223,7 +223,9 @@ public:
if (!*args)
return false;
uint32 ticketId = atoi(args);
char* ticketIdStr = strtok((char*)args, " ");
uint32 ticketId = atoi(ticketIdStr);
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
if (!ticket || ticket->IsClosed() || ticket->IsCompleted())
{
@@ -231,6 +233,20 @@ public:
return true;
}
char* response = strtok(NULL, "\n");
if (response)
{
// Cannot add response to ticket, assigned to someone else
//! Console excluded
Player* player = handler->GetSession() ? handler->GetSession()->GetPlayer() : NULL;
if (player && ticket->IsAssignedNotTo(player->GetGUID()))
{
handler->PSendSysMessage(LANG_COMMAND_TICKETALREADYASSIGNED, ticket->GetId());
return true;
}
ticket->AppendResponse(response);
}
if (Player* player = ticket->GetPlayer())
ticket->SendResponse(player->GetSession());