mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 00:00:13 +00:00
feat: implement quest sharing with party via CMSG_PUSHQUESTTOPARTY
This commit is contained in:
parent
e781ede5b2
commit
71b0a18238
4 changed files with 41 additions and 1 deletions
|
|
@ -16096,6 +16096,28 @@ void GameHandler::abandonQuest(uint32_t questId) {
|
|||
gossipPois_.end());
|
||||
}
|
||||
|
||||
void GameHandler::shareQuestWithParty(uint32_t questId) {
|
||||
if (state != WorldState::IN_WORLD || !socket) {
|
||||
addSystemChatMessage("Cannot share quest: not in world.");
|
||||
return;
|
||||
}
|
||||
if (!isInGroup()) {
|
||||
addSystemChatMessage("You must be in a group to share a quest.");
|
||||
return;
|
||||
}
|
||||
network::Packet pkt(wireOpcode(Opcode::CMSG_PUSHQUESTTOPARTY));
|
||||
pkt.writeUInt32(questId);
|
||||
socket->send(pkt);
|
||||
// Local feedback: find quest title
|
||||
for (const auto& q : questLog_) {
|
||||
if (q.questId == questId && !q.title.empty()) {
|
||||
addSystemChatMessage("Sharing quest: " + q.title);
|
||||
return;
|
||||
}
|
||||
}
|
||||
addSystemChatMessage("Quest shared.");
|
||||
}
|
||||
|
||||
void GameHandler::handleQuestRequestItems(network::Packet& packet) {
|
||||
QuestRequestItemsData data;
|
||||
if (!QuestRequestItemsParser::parse(packet, data)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue