mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-22 04:37:47 +00:00
gm command fix, quest debug output change
This commit is contained in:
parent
d1a636c6cc
commit
cd1b51f23f
2 changed files with 9 additions and 6 deletions
|
@ -282,13 +282,16 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac
|
|||
}
|
||||
case GmCommand::Teri:
|
||||
{
|
||||
if( param1 < 128 )
|
||||
pPlayer->sendUrgent( "Zone ID out of range." );
|
||||
auto zoneInfo = g_zoneMgr.getZone( param1 );
|
||||
if ( !zoneInfo )
|
||||
{
|
||||
pPlayer->sendUrgent( "Invalid zone " + std::to_string( param1 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
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 ) + " (" + zoneInfo->getName( ) + ")" );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ bool Core::Scripting::ScriptManager::onTalk( Core::Entity::PlayerPtr pPlayer, ui
|
|||
std::string objName = Event::getEventName( eventId );
|
||||
|
||||
pPlayer->sendDebug("Actor: " +
|
||||
std::to_string( actorId ) +
|
||||
std::to_string( actorId ) + " -> " + std::to_string( Core::Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) +
|
||||
" \neventId: " +
|
||||
std::to_string( eventId ) +
|
||||
" (0x" + boost::str( boost::format( "%|08X|" )
|
||||
|
@ -114,18 +114,18 @@ bool Core::Scripting::ScriptManager::onTalk( Core::Entity::PlayerPtr pPlayer, ui
|
|||
}
|
||||
catch( std::exception& e )
|
||||
{
|
||||
pPlayer->sendDebug( e.what( ) );
|
||||
|
||||
if( eventType == Common::EventType::Quest )
|
||||
{
|
||||
auto questInfo = g_exdData.getQuestInfo( eventId );
|
||||
if( questInfo )
|
||||
{
|
||||
pPlayer->sendDebug( "Quest not implemented: " + questInfo->name + "\n" + e.what() );
|
||||
pPlayer->sendUrgent( "Quest not implemented: " + questInfo->name );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
pPlayer->sendDebug( e.what() );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue