mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-09 18:43:51 +00:00
Moves the two quest-reward mutation handlers
(--add-quest-reward-item, --set-quest-reward) out of main.cpp
into a new cli_quest_reward.{hpp,cpp} module. Both operate on
a quest's reward struct in zone.json: the first greedy-consumes
multiple item paths in one invocation, the second uses
order-independent flag/value pairs (--xp / --gold / --silver
/ --copper) with strict 'only changed fields are written'
semantics so partial updates don't clobber unrelated fields.
main.cpp shrinks by 114 lines (6,429 to 6,315).
17 lines
500 B
C++
17 lines
500 B
C++
#pragma once
|
|
|
|
namespace wowee {
|
|
namespace editor {
|
|
namespace cli {
|
|
|
|
// Dispatch the quest-reward mutation handlers — both operate
|
|
// on a quest's reward struct in zone.json.
|
|
// --add-quest-reward-item append item rewards (greedy multi-arg)
|
|
// --set-quest-reward update XP / gold / silver / copper
|
|
//
|
|
// Returns true if matched; outRc holds the exit code.
|
|
bool handleQuestReward(int& i, int argc, char** argv, int& outRc);
|
|
|
|
} // namespace cli
|
|
} // namespace editor
|
|
} // namespace wowee
|