mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-09 18:43:51 +00:00
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).
20 lines
691 B
C++
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
|