Core/Opcodes: Remove some opcodes that no longer exist on cata and fix a couple of log messages

This commit is contained in:
Spp
2012-08-22 13:38:55 +02:00
parent 1f162fb7c0
commit bb559072ee
6 changed files with 1665 additions and 1680 deletions

View File

@@ -58,23 +58,6 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_PLAYER_NOT_IN_GUILD);
}
void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_CREATE");
std::string name;
recvPacket >> name;
if (!GetPlayer()->GetGuildId()) // Player cannot be in guild
{
Guild* guild = new Guild();
if (guild->Create(GetPlayer(), name))
sGuildMgr->AddGuild(guild);
else
delete guild;
}
}
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_INVITE");

File diff suppressed because it is too large Load Diff

View File

@@ -183,7 +183,6 @@ enum Opcodes
CMSG_DEL_IGNORE = 0x4727,
CMSG_DEL_VOICE_IGNORE = 0x0024,
CMSG_DESTROY_ITEM = 0x4A27,
CMSG_DESTROY_ITEMS = 0x0000,
CMSG_DISMISS_CONTROLLED_VEHICLE = 0x3218,
CMSG_DISMISS_CRITTER = 0x4227,
CMSG_DUEL_ACCEPTED = 0x2136,
@@ -254,7 +253,6 @@ enum Opcodes
CMSG_GUILD_BANK_UPDATE_TAB = 0x0106,
CMSG_GUILD_BANK_WITHDRAW_MONEY = 0x0037,
CMSG_GUILD_CHANGE_NAME_REQUEST = 0x1232,
CMSG_GUILD_CREATE = 0x0000,
CMSG_GUILD_DECLINE = 0x3231,
CMSG_GUILD_DEL_RANK = 0x3234,
CMSG_GUILD_DEMOTE = 0x1020,
@@ -429,7 +427,6 @@ enum Opcodes
CMSG_PVP_LOG_DATA = 0x7308,
CMSG_QUERY_BATTLEFIELD_STATE = 0x7202,
CMSG_QUERY_COMPLETION_NPC_RESPONSE = 0x7302,
CMSG_QUERY_GUILD_MAX_XP = 0x0000,
CMSG_QUERY_GUILD_MEMBERS_FOR_RECIPE = 0x1036,
CMSG_QUERY_GUILD_MEMBER_RECIPES = 0x1037,
CMSG_QUERY_GUILD_RECIPES = 0x3033,
@@ -816,8 +813,6 @@ enum Opcodes
SMSG_COMMENTATOR_SKIRMISH_QUEUE_RESULT2 = 0x6814,
SMSG_COMMENTATOR_STATE_CHANGED = 0x0737,
SMSG_COMPLAIN_RESULT = 0x6D24,
SMSG_COMPLETION_NPC_RESPONCE = 0x0000,
SMSG_COMPLETION_NPC_RESPONSE = 0x75A1,
SMSG_COMPRESSED_ACHIEVEMENT_DATA = 0x0000,
SMSG_COMPRESSED_CHAR_ENUM = 0x0000,
SMSG_COMPRESSED_GUILD_ROSTER = 0x0000,
@@ -1217,6 +1212,7 @@ enum Opcodes
SMSG_QUESTUPDATE_COMPLETE = 0x2937,
SMSG_QUESTUPDATE_FAILED = 0x6324,
SMSG_QUESTUPDATE_FAILEDTIMER = 0x6427,
SMSG_QUEST_NPC_QUERY_RESPONSE = 0x75A1,
SMSG_QUEST_CONFIRM_ACCEPT = 0x6F07,
SMSG_QUEST_FORCE_REMOVE = 0x6605,
SMSG_QUEST_POI_QUERY_RESPONSE = 0x6304,

View File

@@ -200,17 +200,23 @@ void WorldSession::SendPacket(WorldPacket const* packet, bool forced /*= false*/
if (!m_Socket)
return;
if (packet->GetOpcode() == NULL_OPCODE || packet->GetOpcode() == UNKNOWN_OPCODE)
if (packet->GetOpcode() == NULL_OPCODE)
{
sLog->outError(LOG_FILTER_NETWORKIO, "Prevented sending of %s", packet->GetOpcode() == NULL_OPCODE ? "NULL_OPCODE" : "UNKNOWN_OPCODE");
sLog->outError(LOG_FILTER_OPCODES, "Prevented sending of NULL_OPCODE to %s", GetPlayerName(false).c_str());
return;
}
else if (packet->GetOpcode() == UNKNOWN_OPCODE)
{
sLog->outError(LOG_FILTER_OPCODES, "Prevented sending of UNKNOWN_OPCODE to %s", GetPlayerName(false).c_str());
return;
}
if (!forced)
{
if (!opcodeTable[packet->GetOpcode()])
OpcodeHandler* handler = opcodeTable[packet->GetOpcode()];
if (!handler || handler->status == STATUS_UNHANDLED)
{
sLog->outError(LOG_FILTER_NETWORKIO, "Prevented sending disabled opcode %d (hex 0x%04X)", packet->GetOpcode(), packet->GetOpcode());
sLog->outError(LOG_FILTER_OPCODES, "Prevented sending disabled opcode %s to %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str(), GetPlayerName(false).c_str());
return;
}
}

View File

@@ -567,7 +567,6 @@ class WorldSession
void HandleTurnInPetitionOpcode(WorldPacket& recvData);
void HandleGuildQueryOpcode(WorldPacket& recvPacket);
void HandleGuildCreateOpcode(WorldPacket& recvPacket);
void HandleGuildInviteOpcode(WorldPacket& recvPacket);
void HandleGuildRemoveOpcode(WorldPacket& recvPacket);
void HandleGuildAcceptOpcode(WorldPacket& recvPacket);

View File

@@ -731,7 +731,8 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
return -1;
}
if (!opcodeTable[opcode])
OpcodeHandler* handler = opcodeTable[opcode];
if (!handler || handler->status == STATUS_UNHANDLED)
{
sLog->outError(LOG_FILTER_OPCODES, "No defined handler for opcode %s sent by %s", GetOpcodeNameForLogging(new_pct->GetOpcode()).c_str(), m_Session->GetPlayerName(false).c_str());
return 0;
@@ -743,7 +744,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
// OK, give the packet to WorldSession
aptr.release();
// WARNINIG here we call it with locks held.
// WARNING here we call it with locks held.
// Its possible to cause deadlock if QueuePacket calls back
m_Session->QueuePacket(new_pct);
return 0;