mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Ignore zero-id forced quest removals to prevent spawn spam
This commit is contained in:
parent
79903cfdd4
commit
cabf897683
1 changed files with 17 additions and 4 deletions
|
|
@ -1764,30 +1764,43 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
break;
|
||||
}
|
||||
uint32_t questId = packet.readUInt32();
|
||||
if (questId == 0) {
|
||||
// Some servers emit a zero-id variant during world bootstrap.
|
||||
// Treat as no-op to avoid false "Quest removed" spam.
|
||||
break;
|
||||
}
|
||||
|
||||
bool removed = false;
|
||||
std::string removedTitle;
|
||||
for (auto it = questLog_.begin(); it != questLog_.end(); ++it) {
|
||||
if (it->questId == questId) {
|
||||
removedTitle = it->title;
|
||||
questLog_.erase(it);
|
||||
removed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (currentQuestDetails.questId == questId) {
|
||||
questDetailsOpen = false;
|
||||
currentQuestDetails = QuestDetailsData{};
|
||||
removed = true;
|
||||
}
|
||||
if (currentQuestRequestItems_.questId == questId) {
|
||||
questRequestItemsOpen_ = false;
|
||||
currentQuestRequestItems_ = QuestRequestItemsData{};
|
||||
removed = true;
|
||||
}
|
||||
if (currentQuestOfferReward_.questId == questId) {
|
||||
questOfferRewardOpen_ = false;
|
||||
currentQuestOfferReward_ = QuestOfferRewardData{};
|
||||
removed = true;
|
||||
}
|
||||
if (!removedTitle.empty()) {
|
||||
addSystemChatMessage("Quest removed: " + removedTitle);
|
||||
} else {
|
||||
addSystemChatMessage("Quest removed (ID " + std::to_string(questId) + ").");
|
||||
if (removed) {
|
||||
if (!removedTitle.empty()) {
|
||||
addSystemChatMessage("Quest removed: " + removedTitle);
|
||||
} else {
|
||||
addSystemChatMessage("Quest removed (ID " + std::to_string(questId) + ").");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue