1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-19 17:56:51 +00:00

I've had it... new option added to skip opening cutscenes

This commit is contained in:
Mordred 2021-12-02 17:34:27 +01:00
parent 6326991494
commit c84cfbaed7
4 changed files with 11 additions and 0 deletions

View file

@ -14,6 +14,7 @@ DisconnectTimeout = 20
[General]
; Sent on login - each line must be shorter than 307 characters, split lines with ';'
MotD = Welcome to Sapphire!;This is a very good server;You can change these messages by editing General.MotD in config/config.ini
SkipOpening = true
[Navigation]
MeshPath = navi

View file

@ -64,6 +64,7 @@ namespace Sapphire::Common::Config
} navigation;
std::string motd;
bool skipOpening;
};
struct LobbyConfig

View file

@ -16,6 +16,8 @@
#include "Manager/ItemMgr.h"
#include "Quest/Quest.h"
#include "WorldServer.h"
using namespace Sapphire::Common;
using namespace Sapphire::Network::Packets;
using namespace Sapphire::Network::Packets::WorldPackets::Server;
@ -88,6 +90,12 @@ bool Sapphire::Entity::Player::loadFromDb( uint64_t characterId )
m_bNewAdventurer = res->getBoolean( "IsNewAdventurer" );
m_openingSequence = res->getUInt8( "OpeningSequence" );
// check if opening sequence should be skipped
auto& server = Common::Service< World::WorldServer >::ref();
auto skipOpening = server.getConfig().skipOpening;
if( m_openingSequence < 2 && skipOpening )
m_openingSequence = 2;
m_gc = res->getUInt8( "GrandCompany" );
m_cfPenaltyUntil = res->getUInt( "CFPenaltyUntil" );
m_activeTitle = res->getUInt16( "ActiveTitle" );

View file

@ -107,6 +107,7 @@ bool Sapphire::World::WorldServer::loadSettings( int32_t argc, char* argv[] )
m_config.network.inRangeDistance = configMgr.getValue< float >( "Network", "InRangeDistance", 80.f );
m_config.motd = configMgr.getValue< std::string >( "General", "MotD", "" );
m_config.skipOpening = configMgr.getValue( "General", "SkipOpening", false );
m_config.housing.defaultEstateName = configMgr.getValue< std::string >( "Housing", "DefaultEstateName", "Estate #{}" );