Core/Packets: Typo fixes and cleanup of 0f84c7c7b1

This commit is contained in:
Nayd
2015-02-04 20:46:32 +00:00
parent 5398e482e3
commit 74f577e444
7 changed files with 10 additions and 19 deletions

View File

@@ -867,7 +867,6 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
SendPacket(accountDataTimes.Write());
/// Send FeatureSystemStatus
SendFeatureSystemStatus();
// Send MOTD
@@ -1101,13 +1100,10 @@ void WorldSession::SendFeatureSystemStatus()
features.BpayStoreEnabled = sWorld->getBoolConfig(CONFIG_FEATURE_SYSTEM_BPAY_STORE_ENABLED);
SendPacket(features.Write());
TC_LOG_DEBUG("misc", "SMSG_FEATURE_SYSTEM_STATUS [%s]", GetPlayerInfo().c_str());
}
void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData)
{
TC_LOG_DEBUG("network", "WORLD: Received CMSG_SET_FACTION_AT_WAR");
uint32 repListID;
uint8 flag;

View File

@@ -159,19 +159,17 @@ void WorldSession::HandleGMTicketDeleteOpcode(WorldPacket & /*recvData*/)
void WorldSession::HandleGMTicketGetCaseStatusOpcode(WorldPackets::Ticket::GMTicketGetCaseStatus& /*packet*/)
{
//TODO: Implement GmCase and handle this packet correctly
TC_LOG_DEBUG("misc", "CMSG_GM_TICKET_GET_CASE_STATUS [%s]", GetPlayerInfo().c_str());
// TODO: Implement GmCase and handle this packet correctly
}
void WorldSession::HandleGMTicketGetTicketOpcode(WorldPackets::Ticket::GMTicketGetTicket& /*packet*/)
{
TC_LOG_DEBUG("misc", "CMSG_GM_TICKET_GET_TICKET [%s]", GetPlayerInfo().c_str());
SendQueryTimeResponse();
if (GmTicket* ticket = sTicketMgr->GetTicketByPlayer(GetPlayer()->GetGUID()))
{
if (ticket->IsCompleted())
//TODO: Update SMSG_GM_TICKET_RESPONSE
// TODO: Update SMSG_GM_TICKET_RESPONSE
ticket->SendResponse(this);
else
sTicketMgr->SendTicket(this, ticket);
@@ -182,13 +180,11 @@ void WorldSession::HandleGMTicketGetTicketOpcode(WorldPackets::Ticket::GMTicketG
void WorldSession::HandleGMTicketSystemStatusOpcode(WorldPackets::Ticket::GMTicketGetSystemStatus& /*packet*/)
{
TC_LOG_DEBUG("misc", "CMSG_GM_TICKET_GET_SYSTEM_STATUS [%s]", GetPlayerInfo().c_str());
// Note: This only disables the ticket UI at client side and is not fully reliable
// Note: This disables the whole customer support UI after trying to send a ticket in disabled state (MessageBox: "GM Help Tickets are currently unavaiable."). UI remains disabled until the character relogs.
WorldPackets::Ticket::GMTicketSystemStatus response;
response.Status = sTicketMgr->GetStatus() ? GMTICKET_QUEUE_STATUS_ENABLED : GMTICKET_QUEUE_STATUS_DISABLED;
SendPacket(response.Write());
TC_LOG_DEBUG("misc", "SMSG_GM_TICKET_SYSTEM_STATUS [%s]", GetPlayerInfo().c_str());
}
void WorldSession::HandleGMSurveySubmit(WorldPacket& recvData)

View File

@@ -24,7 +24,6 @@ WorldPacket const* WorldPackets::Ticket::GMTicketSystemStatus::Write()
return &_worldPacket;
}
WorldPacket const* WorldPackets::Ticket::GMTicketCaseStatus::Write()
{
_worldPacket.AppendPackedTime(OldestTicketTime);
@@ -77,5 +76,7 @@ WorldPacket const* WorldPackets::Ticket::GMTicketGetTicketResponse::Write()
_worldPacket.WriteString(Info.Value.WaitTimeOverrideMessage);
}
_worldPacket.FlushBits();
return &_worldPacket;
}

View File

@@ -70,7 +70,7 @@ namespace WorldPackets
}
};
GMTicketCaseStatus() : ServerPacket(SMSG_GM_TICKET_CASE_STATUS) { }
GMTicketCaseStatus() : ServerPacket(SMSG_GM_TICKET_CASE_STATUS, 12) { }
WorldPacket const* Write() override;
@@ -84,7 +84,7 @@ namespace WorldPackets
public:
GMTicketGetTicket(WorldPacket&& packet) : ClientPacket(CMSG_GM_TICKET_GET_TICKET, std::move(packet)) { }
void Read() override { };
void Read() override { }
};
class GMTicketGetTicketResponse final : public ServerPacket
@@ -104,13 +104,12 @@ namespace WorldPackets
int32 WaitTimeOverrideMinutes = 0;
};
GMTicketGetTicketResponse() : ServerPacket(SMSG_GM_TICKET_GET_TICKET_RESPONSE) { }
GMTicketGetTicketResponse() : ServerPacket(SMSG_GM_TICKET_GET_TICKET_RESPONSE, 5) { }
WorldPacket const* Write() override;
int32 Result = 0;
Optional<GMTicketInfo> Info;
};
class GMTicketAcknowledgeSurvey final : public ClientPacket

View File

@@ -1279,7 +1279,7 @@ void OpcodeTable::Initialize()
DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_MESSAGECHAT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_PLAYER_INFO, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_REQUEST_PLAYER_INFO, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_TICKET_CASE_STATUS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_TICKET_CASE_STATUS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_TICKET_GET_TICKET_RESPONSE, STATUS_NEVER, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_TICKET_RESOLVE_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_GM_TICKET_RESPONSE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);

View File

@@ -407,5 +407,4 @@ void TicketMgr::SendTicket(WorldSession* session, GmTicket* ticket) const
response.Result = GMTICKET_STATUS_DEFAULT;
session->SendPacket(response.Write());
TC_LOG_DEBUG("misc", "SMSG_GM_GET_TICKET_RESPONSE [%s]", session->GetPlayerInfo().c_str());
}

View File

@@ -1063,10 +1063,10 @@ Command.LookupMaxResults = 0
# Ticket.SystemStatus
# Description: Enable/disable the ticket system. This disables the whole customer
# support UI after trying to send a ticket in disabled state
# (MessageBox: "GM Help Tickets are currently unavaiable.").
# (MessageBox: "GM Help Tickets are currently unavailable.").
# UI remains disabled until the character relogs.
# Default: 1 - (Enabled)
# 0 - (Disabled) 0 - (Disabled)
# 0 - (Disabled)
Ticket.SystemStatus = 1