mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +00:00
fix: delegate gossip/quest detail getters to QuestHandler (NPC dialog broken)
4 more stale getters from PR #23 split: - isGossipWindowOpen() — QuestHandler owns gossipWindowOpen_ - getCurrentGossip() — QuestHandler owns currentGossip_ - isQuestDetailsOpen() — QuestHandler owns questDetailsOpen_ - getQuestDetails() — QuestHandler owns currentQuestDetails_ Also fix GameHandler::update() distance-close checks to use delegating getters instead of stale member variables for vendor/gossip/taxi/trainer. Map state (currentMapId_, worldStateZoneId_, exploredZones_) confirmed NOT stale — domain handlers write via owner_. reference to GameHandler's members. Those getters are correct as-is.
This commit is contained in:
parent
ee02faa183
commit
b81c616785
2 changed files with 24 additions and 19 deletions
|
|
@ -1446,21 +1446,10 @@ public:
|
|||
// Quest-starting items: right-click triggers quest offer dialog via questgiver protocol
|
||||
void offerQuestFromItem(uint64_t itemGuid, uint32_t questId);
|
||||
uint64_t getBagItemGuid(int bagIndex, int slotIndex) const;
|
||||
bool isGossipWindowOpen() const { return gossipWindowOpen; }
|
||||
const GossipMessageData& getCurrentGossip() const { return currentGossip; }
|
||||
bool isQuestDetailsOpen() {
|
||||
// Check if delayed opening timer has expired
|
||||
if (questDetailsOpen) return true;
|
||||
if (questDetailsOpenTime != std::chrono::steady_clock::time_point{}) {
|
||||
if (std::chrono::steady_clock::now() >= questDetailsOpenTime) {
|
||||
questDetailsOpen = true;
|
||||
questDetailsOpenTime = std::chrono::steady_clock::time_point{};
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
const QuestDetailsData& getQuestDetails() const { return currentQuestDetails; }
|
||||
bool isGossipWindowOpen() const;
|
||||
const GossipMessageData& getCurrentGossip() const;
|
||||
bool isQuestDetailsOpen();
|
||||
const QuestDetailsData& getQuestDetails() const;
|
||||
|
||||
// Gossip POI (aliased from handler_types.hpp)
|
||||
using GossipPoi = game::GossipPoi;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue