mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
refactor(editor): extract quest+objective handlers into cli_quest_objective.cpp
Moves three contiguous quest mutation handlers (--add-quest,
--add-quest-objective, --remove-quest-objective) out of
main.cpp into a new cli_quest_objective.{hpp,cpp} module.
All three operate on a zone's quests.json with the same
QuestEditor load-edit-save flow; the objective add/remove
pair includes auto-generated description text from
type+name+count for tooltip-friendly defaults.
main.cpp shrinks by 174 lines (6,603 to 6,429). Reward and
clone-quest handlers stay inline for follow-up extractions.
This commit is contained in:
parent
4189051c09
commit
db8d499e8e
4 changed files with 246 additions and 179 deletions
22
tools/editor/cli_quest_objective.hpp
Normal file
22
tools/editor/cli_quest_objective.hpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
namespace wowee {
|
||||
namespace editor {
|
||||
namespace cli {
|
||||
|
||||
// Dispatch the quest / quest-objective mutation handlers.
|
||||
// All three operate on a zone's quests.json:
|
||||
// --add-quest append a new quest (title + opt fields)
|
||||
// --add-quest-objective append an objective to an existing quest
|
||||
// --remove-quest-objective remove an objective by index
|
||||
//
|
||||
// Reward and clone-quest operations live in their own
|
||||
// modules (cli_quest_reward / cli_clone) so the per-quest
|
||||
// objective logic stays focused.
|
||||
//
|
||||
// Returns true if matched; outRc holds the exit code.
|
||||
bool handleQuestObjective(int& i, int argc, char** argv, int& outRc);
|
||||
|
||||
} // namespace cli
|
||||
} // namespace editor
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue