Skip to content

Commit

Permalink
Core/PacketIO: Update MSG_QUEST_PUSH_RESULT
Browse files Browse the repository at this point in the history
  • Loading branch information
Exxenoz authored and killerwife committed Jul 3, 2024
1 parent 9285779 commit 0fa92a1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/game/Chat/debugcmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ bool ChatHandler::HandleDebugSendQuestPartyMsgCommand(char* args)
if (!ExtractUInt32(&args, msg))
return false;

m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), msg);
m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), static_cast<QuestShareMessages>(msg));
return true;
}

Expand Down
7 changes: 3 additions & 4 deletions src/game/Entities/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13840,14 +13840,13 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver) cons
}
}

void Player::SendPushToPartyResponse(Player* pPlayer, uint32 msg) const
void Player::SendPushToPartyResponse(Player* pPlayer, QuestShareMessages msg) const
{
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);
GetSession()->SendPacket(data);
DEBUG_LOG("WORLD: Sent MSG_QUEST_PUSH_RESULT");
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/Entities/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ class Player : public Unit
void SendQuestTimerFailed(uint32 quest_id) const;
void SendCanTakeQuestResponse(uint32 msg) const;
void SendQuestConfirmAccept(Quest const* pQuest, Player* pReceiver) const;
void SendPushToPartyResponse(Player* pPlayer, uint32 msg) const;
void SendPushToPartyResponse(Player* pPlayer, QuestShareMessages msg) const;
void SendQuestUpdateAddItem(Quest const* pQuest, uint32 item_idx, uint32 current, uint32 count);
void SendQuestUpdateAddCreatureOrGo(Quest const* pQuest, ObjectGuid guid, uint32 creatureOrGO_idx, uint32 count);

Expand Down
5 changes: 2 additions & 3 deletions src/game/Quests/QuestHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,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);
pPlayer->GetSession()->SendPacket(data);
_player->ClearDividerGuid();
}
Expand Down

0 comments on commit 0fa92a1

Please sign in to comment.