mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Add quest markers (! and ?) above NPCs and on minimap
Parse SMSG_QUESTGIVER_STATUS and SMSG_QUESTGIVER_STATUS_MULTIPLE packets to track per-NPC quest status, render yellow/gray ! and ? markers in 3D world space above NPC heads with distance-based scaling, and show corresponding dots on the minimap.
This commit is contained in:
parent
7d1e733b45
commit
e6a80c68c1
5 changed files with 224 additions and 2 deletions
|
|
@ -20,6 +20,19 @@ namespace network { class WorldSocket; class Packet; }
|
|||
|
||||
namespace game {
|
||||
|
||||
/**
|
||||
* Quest giver status values (WoW 3.3.5a)
|
||||
*/
|
||||
enum class QuestGiverStatus : uint8_t {
|
||||
NONE = 0,
|
||||
UNAVAILABLE = 1,
|
||||
INCOMPLETE = 5, // ? (gray)
|
||||
REWARD_REP = 6,
|
||||
AVAILABLE_LOW = 7, // ! (gray, low-level)
|
||||
AVAILABLE = 8, // ! (yellow)
|
||||
REWARD = 10 // ? (yellow)
|
||||
};
|
||||
|
||||
/**
|
||||
* World connection state
|
||||
*/
|
||||
|
|
@ -360,6 +373,13 @@ public:
|
|||
const std::vector<QuestLogEntry>& getQuestLog() const { return questLog_; }
|
||||
void abandonQuest(uint32_t questId);
|
||||
|
||||
// Quest giver status (! and ? markers)
|
||||
QuestGiverStatus getQuestGiverStatus(uint64_t guid) const {
|
||||
auto it = npcQuestStatus_.find(guid);
|
||||
return (it != npcQuestStatus_.end()) ? it->second : QuestGiverStatus::NONE;
|
||||
}
|
||||
const std::unordered_map<uint64_t, QuestGiverStatus>& getNpcQuestStatuses() const { return npcQuestStatus_; }
|
||||
|
||||
// Vendor
|
||||
void openVendor(uint64_t npcGuid);
|
||||
void closeVendor();
|
||||
|
|
@ -672,6 +692,9 @@ private:
|
|||
// Quest log
|
||||
std::vector<QuestLogEntry> questLog_;
|
||||
|
||||
// Quest giver status per NPC
|
||||
std::unordered_map<uint64_t, QuestGiverStatus> npcQuestStatus_;
|
||||
|
||||
// Faction hostility lookup (populated from FactionTemplate.dbc)
|
||||
std::unordered_map<uint32_t, bool> factionHostileMap_;
|
||||
bool isHostileFaction(uint32_t factionTemplateId) const {
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ enum class Opcode : uint16_t {
|
|||
// ---- Phase 5: Quests ----
|
||||
CMSG_QUESTGIVER_STATUS_QUERY = 0x182,
|
||||
SMSG_QUESTGIVER_STATUS = 0x183,
|
||||
SMSG_QUESTGIVER_STATUS_MULTIPLE = 0x198,
|
||||
CMSG_QUESTGIVER_HELLO = 0x184,
|
||||
CMSG_QUESTGIVER_QUERY_QUEST = 0x186,
|
||||
SMSG_QUESTGIVER_QUEST_DETAILS = 0x188,
|
||||
|
|
|
|||
|
|
@ -147,6 +147,8 @@ private:
|
|||
void renderDeathScreen(game::GameHandler& gameHandler);
|
||||
void renderEscapeMenu();
|
||||
void renderSettingsWindow();
|
||||
void renderQuestMarkers(game::GameHandler& gameHandler);
|
||||
void renderMinimapMarkers(game::GameHandler& gameHandler);
|
||||
|
||||
/**
|
||||
* Inventory screen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue