Core/Protocol:

- Correct and rename response message from creating/updating a ticket
- Prevent some trailing data in CMSG_GMTICKET_CREATE and add comment on stuff missing from its structure.
- Random cleanup
This commit is contained in:
kaelima committed 2012-03-28 03:59:03 +02:00
1 parent f9caf79b16
commit 820f45c424
8 files changed
+56 -43

No files matched your search

+5 -5
View File
@@ -38,7 +38,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
return;
}
GMTicketResponse response = GMTICKET_RESPONSE_FAILURE;
GMTicketResponse response = GMTICKET_RESPONSE_CREATE_ERROR;
// Player must not have ticket
if (!sTicketMgr->GetTicketByPlayer(GetPlayer()->GetGUID()))
{
@@ -48,7 +48,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
sWorld->SendGMText(LANG_COMMAND_TICKETNEW, GetPlayer()->GetName(), ticket->GetId());
response = GMTICKET_RESPONSE_SUCCESS;
response = GMTICKET_RESPONSE_CREATE_SUCCESS;
}
WorldPacket data(SMSG_GMTICKET_CREATE, 4);
@@ -61,8 +61,8 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
std::string message;
recv_data >> message;
GMTicketResponse response = GMTICKET_RESPONSE_FAILURE;
if (GmTicket *ticket = sTicketMgr->GetTicketByPlayer(GetPlayer()->GetGUID()))
GMTicketResponse response = GMTICKET_RESPONSE_UPDATE_ERROR;
if (GmTicket* ticket = sTicketMgr->GetTicketByPlayer(GetPlayer()->GetGUID()))
{
SQLTransaction trans = SQLTransaction(NULL);
ticket->SetMessage(message);
@@ -70,7 +70,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
sWorld->SendGMText(LANG_COMMAND_TICKETUPDATED, GetPlayer()->GetName(), ticket->GetId());
response = GMTICKET_RESPONSE_SUCCESS;
response = GMTICKET_RESPONSE_UPDATE_SUCCESS;
}
WorldPacket data(SMSG_GMTICKET_UPDATETEXT, 4);