diff --git a/sql/zonepositions.sql b/sql/zonepositions.sql index 6da31e35..4f61b1ca 100644 --- a/sql/zonepositions.sql +++ b/sql/zonepositions.sql @@ -23,7 +23,7 @@ CREATE TABLE IF NOT EXISTS `zonepositions` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; --- Dumping data for table sapphire.zonepositions: 166 rows +-- Dumping data for table sapphire.zonepositions: 173 rows DELETE FROM `zonepositions`; /*!40000 ALTER TABLE `zonepositions` DISABLE KEYS */; INSERT INTO `zonepositions` (`id`, `target_zone_id`, `pos_x`, `pos_y`, `pos_z`, `pos_o`, `radius`) VALUES @@ -199,7 +199,16 @@ INSERT INTO `zonepositions` (`id`, `target_zone_id`, `pos_x`, `pos_y`, `pos_z`, (5865668, 399, -221.2, 104.271, -599.535, 0.268, 2), (5865672, 399, -221.2, 155.809, -516.036, 0.295, 2), (5865598, 399, -221.2, 104.271, -599.535, 0.268, 2), - (5865604, 399, -533.153, 153.074, -487.968, 0.18, 2); + (5865604, 399, -533.153, 153.074, -487.968, 0.18, 2), + (5916706, 418, -111.521, 15.14, -29.188, 0.0077, 2), + (5916705, 418, 47.713, 23.979, 1.144, 1.457, 2), + (5916704, 418, 47.701, -12.02, 67.738, 2.057, 2), + (5916727, 155, -161.481, 304.153, -321.403, 0.795, 2), + (5916708, 419, 0.000456, 16.015, -35.806, -0.0296, 2), + (5916724, 419, 80.156, 10.054, -123.9, -2.445, 2), + (5916722, 419, -80.517, 10.054, -123.315, 2.468, 2), + (5916717, 419, -136.889, -12.634, -16.757, 0.978, 2), + (5916716, 419, 136.079, -9.234, -66.426, -0.989, 2); /*!40000 ALTER TABLE `zonepositions` ENABLE KEYS */; /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; diff --git a/src/servers/Server_Zone/DebugCommand/DebugCommandHandler.cpp b/src/servers/Server_Zone/DebugCommand/DebugCommandHandler.cpp index e98e19ef..e9eb2aa7 100644 --- a/src/servers/Server_Zone/DebugCommand/DebugCommandHandler.cpp +++ b/src/servers/Server_Zone/DebugCommand/DebugCommandHandler.cpp @@ -175,33 +175,6 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::PlayerPtr pPlaye pPlayer->queuePacket( setActorPosPacket ); } - else if( ( subCommand == "zone" ) && ( params != "" ) ) - { - int32_t zoneId; - sscanf( params.c_str(), "%i", &zoneId ); - - if( zoneId < 1 ) - pPlayer->sendUrgent( "Zone id out of range." ); - else - { - pPlayer->setPosition( pPlayer->getPos() ); - pPlayer->performZoning( zoneId, pPlayer->getPos(), 0); - } - - } - else if( ( subCommand == "hp" ) && ( params != "" ) ) - { - int32_t hp; - sscanf( params.c_str(), "%i", &hp ); - - pPlayer->setHp( hp ); - - auto control = Network::Packets::Server::ActorControlPacket142( pPlayer->getId(), Common::ActorControlType::HpSetStat, 1, pPlayer->getHp() ); - - pPlayer->sendToInRangeSet( control, true ); - - } - else if( ( subCommand == "tele" ) && ( params != "" ) ) { int32_t aetheryteId; @@ -323,37 +296,7 @@ void Core::DebugCommandHandler::add( char * data, Core::Entity::PlayerPtr pPlaye "subCommand " + subCommand + " params: " + params ); - if( ( subCommand == "item" ) && ( params != "" ) ) - { - int32_t catalogId; - int32_t amount; - - sscanf( params.c_str(), "%d %d", &catalogId, &amount ); - - if( amount < 1 || amount > 99 ) - { - amount = 1; - } - - if( ( catalogId == 0xcccccccc ) ) - { - pPlayer->sendUrgent( "Syntaxerror." ); - return; - } - - if( !pPlayer->addItem( -1, catalogId, amount ) ) - pPlayer->sendUrgent( "Item " + std::to_string( catalogId ) + " not found..." ); - - } - else if( subCommand == "exp" ) - { - int32_t amount; - - sscanf( params.c_str(), "%d", &amount ); - - pPlayer->gainExp( amount ); - } - else if( subCommand == "status" ) + if( subCommand == "status" ) { int32_t id; int32_t duration; @@ -539,4 +482,3 @@ void Core::DebugCommandHandler::serverInfo( char * data, Core::Entity::PlayerPtr pPlayer->sendDebug( "SapphireServer " + Version::VERSION + " - " + Version::GIT_HASH ); pPlayer->sendDebug( "Sessions: " + std::to_string( g_serverZone.getSessionCount() ) ); } - diff --git a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp index f51c776f..da042f44 100644 --- a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp @@ -69,6 +69,7 @@ enum GmCommand Mp = 0x0065, Tp = 0x0066, Gp = 0x0067, + Exp = 0x0068, Item = 0x00C8, Gil = 0x00C9, @@ -82,6 +83,7 @@ enum GmCommand QuestInspect = 0x0131, GC = 0x0154, GCRank = 0x0155, + Teri = 0x0258, TeriInfo = 0x025D, Jump = 0x025E, JumpNpc = 0x025F, @@ -189,6 +191,12 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac pPlayer->sendNotice( "Gp for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) ); break; } + case GmCommand::Exp: + { + targetPlayer->gainExp( param1 ); + pPlayer->sendNotice( std::to_string( param1 ) + " Exp was added to " + targetPlayer->getName() ); + break; + } case GmCommand::Sex: { targetPlayer->setLookAt( CharaLook::Gender, param1 ); @@ -262,6 +270,18 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac "\nNextWeather:" + std::to_string( pPlayer->getCurrentZone()->getNextWeather() ) ); break; } + case GmCommand::Teri: + { + if( param1 < 128 ) + pPlayer->sendUrgent( "Zone ID out of range." ); + else + { + targetPlayer->setPosition( targetPlayer->getPos() ); + targetPlayer->performZoning( param1, targetPlayer->getPos(), 0 ); + pPlayer->sendNotice( targetPlayer->getName() + " was warped to Zone " + std::to_string( param1 ) ); + } + break; + } case GmCommand::Jump: {