Kelsidavis-WoWee/tools/editor/cli_clone.hpp
Kelsi 3fdf75a03b refactor(editor): extract clone-* duplicate handlers into cli_clone.cpp
Moves the three clone-* handlers (--clone-quest,
--clone-creature, --clone-object) out of main.cpp into a new
cli_clone.{hpp,cpp} module. All three deep-copy by index,
optionally rename, and (for creature/object) offset the new
copy by 5 yards along X to prevent z-fighting with the
original. Each resets the per-entity unique id so downstream
systems that dedupe by id stay consistent.

main.cpp shrinks by 184 lines (6,315 to 6,131).
2026-05-09 08:06:20 -07:00

20 lines
691 B
C++

#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the clone-* duplicate handlers — deep-copy a quest /
// creature spawn / object placement by index, optionally
// renaming and offsetting the new copy. Useful for templating
// patterns: design once, clone N times.
// --clone-quest duplicate a quest with all objectives + rewards
// --clone-creature duplicate a spawn (default 5-yard X offset)
// --clone-object duplicate an object placement (5-yard X offset)
//
// Returns true if matched; outRc holds the exit code.
bool handleClone(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee