From ddd52bcbab7c00d2e51dbbaaf7b42fbf5d418f7b Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 13 Mar 2018 19:25:50 +1100 Subject: [PATCH] create zone cmd --- .../DebugCommand/DebugCommandHandler.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp index 0aaa4e7f..78e57411 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp @@ -709,6 +709,17 @@ void Core::DebugCommandHandler::instance( char* data, Entity::Player &player, bo else player.sendDebug( "Failed to create instance with id: " + std::to_string( instanceContentId ) ); } + if( subCommand == "createzone" || subCommand == "crz" ) + { + uint32_t zoneId; + sscanf( params.c_str(), "%d", &zoneId ); + + auto instance = pTeriMgr->createTerritoryInstance( zoneId ); + if( instance ) + player.sendDebug( "Created instance with id: " + std::to_string( instance->getGuId() ) + " -> " + instance->getName() ); + else + player.sendDebug( "Failed to create instance with id: " + std::to_string( zoneId ) ); + } else if( subCommand == "remove" || subCommand == "rm" ) { uint32_t terriId;