Skip to content

Commit

Permalink
MSG_QUEST_PUSH_RESULT packet structure fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Olion17 authored and billy1arm committed Jun 28, 2017
1 parent 171e825 commit 6da4dcf
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 3 additions & 1 deletion src/game/ChatCommands/debugcmds.cpp
Expand Up @@ -309,8 +309,10 @@ bool ChatHandler::HandleDebugSendQuestPartyMsgCommand(char* args)
uint32 msg;
if (!ExtractUInt32(&args, msg))
{ return false; }
if (msg > 0xFF)
{ return false; }

m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), msg);
m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), uint8(msg));
return true;
}

Expand Down
7 changes: 3 additions & 4 deletions src/game/Object/Player.cpp
Expand Up @@ -13742,14 +13742,13 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver)
}
}

void Player::SendPushToPartyResponse(Player* pPlayer, uint32 msg)
void Player::SendPushToPartyResponse(Player* pPlayer, uint8 msg)
{
if (pPlayer)
{
WorldPacket data(MSG_QUEST_PUSH_RESULT, (8 + 4 + 1));
WorldPacket data(MSG_QUEST_PUSH_RESULT, (8 + 1));
data << pPlayer->GetObjectGuid();
data << uint32(msg); // valid values: 0-8
data << uint8(0);
data << uint8(msg); // enum QuestShareMessages
GetSession()->SendPacket(&data);
DEBUG_LOG("WORLD: Sent MSG_QUEST_PUSH_RESULT");
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/Object/Player.h
Expand Up @@ -1385,7 +1385,7 @@ class Player : public Unit
void SendQuestTimerFailed(uint32 quest_id);
void SendCanTakeQuestResponse(uint32 msg) const;
void SendQuestConfirmAccept(Quest const* pQuest, Player* pReceiver);
void SendPushToPartyResponse(Player* pPlayer, uint32 msg);
void SendPushToPartyResponse(Player* pPlayer, uint8 msg);
void SendQuestUpdateAddItem(Quest const* pQuest, uint32 item_idx, uint32 count);
void SendQuestUpdateAddCreatureOrGo(Quest const* pQuest, ObjectGuid guid, uint32 creatureOrGO_idx, uint32 count);

Expand Down
2 changes: 1 addition & 1 deletion src/game/Server/Opcodes.cpp
Expand Up @@ -688,7 +688,7 @@ void Opcodes::BuildOpcodeList()
/*[-ZERO] Need check */ /*0x273*/ StoreOpcode(SMSG_STABLE_RESULT, "SMSG_STABLE_RESULT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide);
/*[-ZERO] Need check */ /*0x274*/ StoreOpcode(CMSG_STABLE_REVIVE_PET, "CMSG_STABLE_REVIVE_PET", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleStableRevivePet);
/*0x275*/ StoreOpcode(CMSG_STABLE_SWAP_PET, "CMSG_STABLE_SWAP_PET", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleStableSwapPet);
/*[-ZERO] Need check */ /*0x276*/ StoreOpcode(MSG_QUEST_PUSH_RESULT, "MSG_QUEST_PUSH_RESULT", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleQuestPushResult);
/*0x276*/ StoreOpcode(MSG_QUEST_PUSH_RESULT, "MSG_QUEST_PUSH_RESULT", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleQuestPushResult);
/*[-ZERO] Need check */ /*0x277*/ StoreOpcode(SMSG_PLAY_MUSIC, "SMSG_PLAY_MUSIC", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide);
/*[-ZERO] Need check */ /*0x278*/ StoreOpcode(SMSG_PLAY_OBJECT_SOUND, "SMSG_PLAY_OBJECT_SOUND", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide);
/*[-ZERO] Need check */ /*0x279*/ StoreOpcode(CMSG_REQUEST_PET_INFO, "CMSG_REQUEST_PET_INFO", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleRequestPetInfoOpcode);
Expand Down
5 changes: 2 additions & 3 deletions src/game/WorldHandlers/QuestHandler.cpp
Expand Up @@ -489,10 +489,9 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)

if (Player* pPlayer = ObjectAccessor::FindPlayer(_player->GetDividerGuid()))
{
WorldPacket data(MSG_QUEST_PUSH_RESULT, (8 + 4 + 1));
WorldPacket data(MSG_QUEST_PUSH_RESULT, (8 + 1));
data << ObjectGuid(guid);
data << uint32(msg); // valid values: 0-8
data << uint8(0);
data << uint8(msg); // enum QuestShareMessages
pPlayer->GetSession()->SendPacket(&data);
_player->ClearDividerGuid();
}
Expand Down

0 comments on commit 6da4dcf

Please sign in to comment.