mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/game/Entities/Unit/Unit.h
This commit is contained in:
@@ -49,13 +49,23 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket& recvData)
|
||||
// Player must not have ticket
|
||||
if (!ticket || ticket->IsClosed())
|
||||
{
|
||||
ticket = new GmTicket(GetPlayer(), recvData);
|
||||
|
||||
uint32 mapId;
|
||||
float x, y, z;
|
||||
std::string message;
|
||||
uint32 needResponse;
|
||||
bool needMoreHelp;
|
||||
uint32 count;
|
||||
std::list<uint32> times;
|
||||
uint32 decompressedSize;
|
||||
std::string chatLog;
|
||||
|
||||
recvData >> mapId;
|
||||
recvData >> x >> y >> z;
|
||||
recvData >> message;
|
||||
|
||||
recvData >> needResponse;
|
||||
recvData >> needMoreHelp;
|
||||
|
||||
recvData >> count;
|
||||
|
||||
for (uint32 i = 0; i < count; i++)
|
||||
@@ -77,19 +87,25 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket& recvData)
|
||||
if (uncompress(dest.contents(), &realSize, recvData.contents() + pos, recvData.size() - pos) == Z_OK)
|
||||
{
|
||||
dest >> chatLog;
|
||||
ticket->SetChatLog(times, chatLog);
|
||||
}
|
||||
else
|
||||
{
|
||||
TC_LOG_ERROR("network", "CMSG_GMTICKET_CREATE possibly corrupt. Uncompression failed.");
|
||||
recvData.rfinish();
|
||||
delete ticket;
|
||||
return;
|
||||
}
|
||||
|
||||
recvData.rfinish(); // Will still have compressed data in buffer.
|
||||
}
|
||||
|
||||
ticket = new GmTicket(GetPlayer());
|
||||
ticket->SetPosition(mapId, x, y, z);
|
||||
ticket->SetMessage(message);
|
||||
ticket->SetGmAction(needResponse, needMoreHelp);
|
||||
|
||||
if (!chatLog.empty())
|
||||
ticket->SetChatLog(times, chatLog);
|
||||
|
||||
sTicketMgr->AddTicket(ticket);
|
||||
sTicketMgr->UpdateLastChange();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user