From ceb960df09596d1d61f892016315be8c4f6b5525 Mon Sep 17 00:00:00 2001 From: Biscuit Boy Date: Thu, 21 Sep 2017 15:54:06 +1000 Subject: [PATCH 1/7] Added Foundation Aethernet --- sql/zonepositions.sql | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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, '') */; From 6e87892d2c243fe9f3b77a416e618f9ab99b8c48 Mon Sep 17 00:00:00 2001 From: Biscuit Boy Date: Fri, 22 Sep 2017 01:12:37 +1000 Subject: [PATCH 2/7] Added EXP GM Command Added the EXP Command for GM's in the GM Packet Handler --- .../Server_Zone/Network/Handlers/GMCommandHandlers.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp index f51c776f..d98b154d 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, @@ -189,6 +190,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 ); From e1d2f4fbb15a02479996ccb55b5774e26c2f6f1f Mon Sep 17 00:00:00 2001 From: Mordred <30826167+SapphireMordred@users.noreply.github.com> Date: Thu, 21 Sep 2017 23:59:05 +0200 Subject: [PATCH 3/7] Updated formatting to be inline with everything else. --- .../Server_Zone/Network/Handlers/GMCommandHandlers.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp index d98b154d..3262aba3 100644 --- a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp @@ -69,7 +69,7 @@ enum GmCommand Mp = 0x0065, Tp = 0x0066, Gp = 0x0067, - EXP = 0x0068, + Exp = 0x0068, Item = 0x00C8, Gil = 0x00C9, @@ -190,10 +190,10 @@ 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: + case GmCommand::Exp: { - targetPlayer->gainExp(param1); - pPlayer->sendNotice(std::to_string(param1) + " EXP was added to " + targetPlayer->getName()); + targetPlayer->gainExp( param1 ); + pPlayer->sendNotice( std::to_string( param1 ) + " Exp was added to " + targetPlayer->getName() ); break; } case GmCommand::Sex: From 4e928c3c18da976bff563b8ebc06b7b2718d2a42 Mon Sep 17 00:00:00 2001 From: Biscuit Boy Date: Fri, 22 Sep 2017 17:03:25 +1000 Subject: [PATCH 4/7] Added GM Teri Command Added The //gm teri Command (The Internal name can also be used) --- .../Network/Handlers/GMCommandHandlers.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp index 3262aba3..cd7dc6f7 100644 --- a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp @@ -84,6 +84,7 @@ enum GmCommand GC = 0x0154, GCRank = 0x0155, TeriInfo = 0x025D, + Teri = 0x0258, Jump = 0x025E, JumpNpc = 0x025F, }; @@ -269,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: { From 01a82562cb33e3c5a08ef0a924793e30b0390175 Mon Sep 17 00:00:00 2001 From: Biscuit Boy Date: Fri, 22 Sep 2017 17:08:12 +1000 Subject: [PATCH 5/7] Removed Debug Commands that can be used as GM Commands Removed the Debug Commands that have GM counterparts --- .../DebugCommand/DebugCommandHandler.cpp | 60 +------------------ 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/src/servers/Server_Zone/DebugCommand/DebugCommandHandler.cpp b/src/servers/Server_Zone/DebugCommand/DebugCommandHandler.cpp index 2d9c3d2a..9e509dab 100644 --- a/src/servers/Server_Zone/DebugCommand/DebugCommandHandler.cpp +++ b/src/servers/Server_Zone/DebugCommand/DebugCommandHandler.cpp @@ -176,33 +176,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; @@ -324,37 +297,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; @@ -540,4 +483,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() ) ); } - From 71eecf729f2dcefe55ecde480fe87fdcaea1c2a6 Mon Sep 17 00:00:00 2001 From: Biscuit Boy Date: Fri, 22 Sep 2017 17:15:10 +1000 Subject: [PATCH 6/7] Fixed Teri Placement --- src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp index cd7dc6f7..8e358d53 100644 --- a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp @@ -83,8 +83,8 @@ enum GmCommand QuestInspect = 0x0131, GC = 0x0154, GCRank = 0x0155, - TeriInfo = 0x025D, Teri = 0x0258, + TeriInfo = 0x025D, Jump = 0x025E, JumpNpc = 0x025F, }; From 1566178a1ae27aa2780696783ee4030264d2e326 Mon Sep 17 00:00:00 2001 From: Mordred <30826167+SapphireMordred@users.noreply.github.com> Date: Fri, 22 Sep 2017 12:06:35 +0200 Subject: [PATCH 7/7] formatting again --- src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp index 8e358d53..da042f44 100644 --- a/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/Server_Zone/Network/Handlers/GMCommandHandlers.cpp @@ -278,7 +278,7 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac { targetPlayer->setPosition( targetPlayer->getPos() ); targetPlayer->performZoning( param1, targetPlayer->getPos(), 0 ); - pPlayer->sendNotice( targetPlayer->getName() + " was warped to Zone " + std::to_string(param1) ); + pPlayer->sendNotice( targetPlayer->getName() + " was warped to Zone " + std::to_string( param1 ) ); } break; }