1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

Merge branch 'ThreePointOh' of https://github.com/SapphireServer/Sapphire into 3.0-friendlist

This commit is contained in:
Alice Ogeda 2021-12-02 15:06:36 -03:00
commit 7f6b3e409e
4 changed files with 11 additions and 0 deletions

View file

@ -14,6 +14,7 @@ DisconnectTimeout = 20
[General] [General]
; Sent on login - each line must be shorter than 307 characters, split lines with ';' ; 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 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] [Navigation]
MeshPath = navi MeshPath = navi

View file

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

View file

@ -16,6 +16,8 @@
#include "Manager/ItemMgr.h" #include "Manager/ItemMgr.h"
#include "Quest/Quest.h" #include "Quest/Quest.h"
#include "WorldServer.h"
using namespace Sapphire::Common; using namespace Sapphire::Common;
using namespace Sapphire::Network::Packets; using namespace Sapphire::Network::Packets;
using namespace Sapphire::Network::Packets::WorldPackets::Server; 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_bNewAdventurer = res->getBoolean( "IsNewAdventurer" );
m_openingSequence = res->getUInt8( "OpeningSequence" ); 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_gc = res->getUInt8( "GrandCompany" );
m_cfPenaltyUntil = res->getUInt( "CFPenaltyUntil" ); m_cfPenaltyUntil = res->getUInt( "CFPenaltyUntil" );
m_activeTitle = res->getUInt16( "ActiveTitle" ); m_activeTitle = res->getUInt16( "ActiveTitle" );

View file

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