mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 22:37:45 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
2f5497f662
3 changed files with 32 additions and 61 deletions
|
@ -23,7 +23,7 @@ CREATE TABLE IF NOT EXISTS `zonepositions` (
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
) 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`;
|
DELETE FROM `zonepositions`;
|
||||||
/*!40000 ALTER TABLE `zonepositions` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `zonepositions` DISABLE KEYS */;
|
||||||
INSERT INTO `zonepositions` (`id`, `target_zone_id`, `pos_x`, `pos_y`, `pos_z`, `pos_o`, `radius`) VALUES
|
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),
|
(5865668, 399, -221.2, 104.271, -599.535, 0.268, 2),
|
||||||
(5865672, 399, -221.2, 155.809, -516.036, 0.295, 2),
|
(5865672, 399, -221.2, 155.809, -516.036, 0.295, 2),
|
||||||
(5865598, 399, -221.2, 104.271, -599.535, 0.268, 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 */;
|
/*!40000 ALTER TABLE `zonepositions` ENABLE KEYS */;
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||||
|
|
|
@ -175,33 +175,6 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::PlayerPtr pPlaye
|
||||||
pPlayer->queuePacket( setActorPosPacket );
|
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 != "" ) )
|
else if( ( subCommand == "tele" ) && ( params != "" ) )
|
||||||
{
|
{
|
||||||
int32_t aetheryteId;
|
int32_t aetheryteId;
|
||||||
|
@ -323,37 +296,7 @@ void Core::DebugCommandHandler::add( char * data, Core::Entity::PlayerPtr pPlaye
|
||||||
"subCommand " + subCommand + " params: " + params );
|
"subCommand " + subCommand + " params: " + params );
|
||||||
|
|
||||||
|
|
||||||
if( ( subCommand == "item" ) && ( params != "" ) )
|
if( subCommand == "status" )
|
||||||
{
|
|
||||||
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" )
|
|
||||||
{
|
{
|
||||||
int32_t id;
|
int32_t id;
|
||||||
int32_t duration;
|
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( "SapphireServer " + Version::VERSION + " - " + Version::GIT_HASH );
|
||||||
pPlayer->sendDebug( "Sessions: " + std::to_string( g_serverZone.getSessionCount() ) );
|
pPlayer->sendDebug( "Sessions: " + std::to_string( g_serverZone.getSessionCount() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ enum GmCommand
|
||||||
Mp = 0x0065,
|
Mp = 0x0065,
|
||||||
Tp = 0x0066,
|
Tp = 0x0066,
|
||||||
Gp = 0x0067,
|
Gp = 0x0067,
|
||||||
|
Exp = 0x0068,
|
||||||
|
|
||||||
Item = 0x00C8,
|
Item = 0x00C8,
|
||||||
Gil = 0x00C9,
|
Gil = 0x00C9,
|
||||||
|
@ -82,6 +83,7 @@ enum GmCommand
|
||||||
QuestInspect = 0x0131,
|
QuestInspect = 0x0131,
|
||||||
GC = 0x0154,
|
GC = 0x0154,
|
||||||
GCRank = 0x0155,
|
GCRank = 0x0155,
|
||||||
|
Teri = 0x0258,
|
||||||
TeriInfo = 0x025D,
|
TeriInfo = 0x025D,
|
||||||
Jump = 0x025E,
|
Jump = 0x025E,
|
||||||
JumpNpc = 0x025F,
|
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 ) );
|
pPlayer->sendNotice( "Gp for " + targetPlayer->getName() + " was set to " + std::to_string( param1 ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GmCommand::Exp:
|
||||||
|
{
|
||||||
|
targetPlayer->gainExp( param1 );
|
||||||
|
pPlayer->sendNotice( std::to_string( param1 ) + " Exp was added to " + targetPlayer->getName() );
|
||||||
|
break;
|
||||||
|
}
|
||||||
case GmCommand::Sex:
|
case GmCommand::Sex:
|
||||||
{
|
{
|
||||||
targetPlayer->setLookAt( CharaLook::Gender, param1 );
|
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() ) );
|
"\nNextWeather:" + std::to_string( pPlayer->getCurrentZone()->getNextWeather() ) );
|
||||||
break;
|
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:
|
case GmCommand::Jump:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue