mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
- New Quest mode (key 6) with full quest creation panel: - Title, description, required level - Quest giver / turn-in NPC ID linkage - Up to 4 objectives: Kill, Collect, Talk, Explore, Escort, Use Object - Rewards: XP and gold - Quest chain support via nextQuestId linking - Quest list showing all created quests with level and objective count - Save quests to JSON (included in Export Zone package) - Foundation for campaign system: create quest chains across NPCs, link objectives to placed creatures, build storylines
67 lines
1.4 KiB
C++
67 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <glm/glm.hpp>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <cstdint>
|
|
|
|
namespace wowee {
|
|
namespace editor {
|
|
|
|
enum class QuestObjectiveType {
|
|
KillCreature,
|
|
CollectItem,
|
|
TalkToNPC,
|
|
ExploreArea,
|
|
EscortNPC,
|
|
UseObject
|
|
};
|
|
|
|
struct QuestObjective {
|
|
QuestObjectiveType type = QuestObjectiveType::KillCreature;
|
|
std::string description;
|
|
std::string targetName;
|
|
uint32_t targetCount = 1;
|
|
};
|
|
|
|
struct QuestReward {
|
|
uint32_t xp = 100;
|
|
uint32_t gold = 0;
|
|
uint32_t silver = 0;
|
|
uint32_t copper = 0;
|
|
std::vector<std::string> itemRewards;
|
|
};
|
|
|
|
struct Quest {
|
|
uint32_t id = 0;
|
|
std::string title = "New Quest";
|
|
std::string description;
|
|
std::string completionText;
|
|
uint32_t requiredLevel = 1;
|
|
uint32_t questGiverNpcId = 0;
|
|
uint32_t turnInNpcId = 0;
|
|
std::vector<QuestObjective> objectives;
|
|
QuestReward reward;
|
|
uint32_t nextQuestId = 0; // chain link
|
|
};
|
|
|
|
class QuestEditor {
|
|
public:
|
|
void addQuest(const Quest& q);
|
|
void removeQuest(int index);
|
|
Quest* getQuest(int index);
|
|
const std::vector<Quest>& getQuests() const { return quests_; }
|
|
size_t questCount() const { return quests_.size(); }
|
|
|
|
bool saveToFile(const std::string& path) const;
|
|
|
|
Quest& getTemplate() { return template_; }
|
|
|
|
private:
|
|
std::vector<Quest> quests_;
|
|
Quest template_;
|
|
uint32_t nextId_ = 1;
|
|
};
|
|
|
|
} // namespace editor
|
|
} // namespace wowee
|