mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-01 08:27:46 +00:00
Merge pull request #796 from hkAlice/aggro-attempts
[3.0] adds int, unspecified type, type range and array of values to rngmgr; warning cleanups;
This commit is contained in:
commit
d262e3f5a4
14 changed files with 126 additions and 92 deletions
|
@ -1499,9 +1499,8 @@ namespace Sapphire::Common
|
||||||
|
|
||||||
using PlayerStateFlagList = std::vector< PlayerStateFlag >;
|
using PlayerStateFlagList = std::vector< PlayerStateFlag >;
|
||||||
|
|
||||||
|
struct BNPCInstanceObject
|
||||||
struct BNPCInstanceObject
|
{
|
||||||
{
|
|
||||||
uint16_t territoryType;
|
uint16_t territoryType;
|
||||||
std::string bnpcName;
|
std::string bnpcName;
|
||||||
uint32_t instanceId;
|
uint32_t instanceId;
|
||||||
|
@ -1548,15 +1547,15 @@ struct BNPCInstanceObject
|
||||||
uint32_t ServerPathId;
|
uint32_t ServerPathId;
|
||||||
uint32_t EquipmentID;
|
uint32_t EquipmentID;
|
||||||
uint32_t CustomizeID;
|
uint32_t CustomizeID;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CellId is used to identify a cell in the cell container of a zone
|
* CellId is used to identify a cell in the cell container of a zone
|
||||||
*/
|
*/
|
||||||
struct CellId
|
struct CellId
|
||||||
{
|
{
|
||||||
uint32_t x{ 0 };
|
uint32_t x{ 0 };
|
||||||
uint32_t y{ 0 };
|
uint32_t y{ 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -731,6 +731,7 @@ void Sapphire::Entity::BNpc::update( uint64_t tickCount )
|
||||||
}
|
}
|
||||||
|
|
||||||
checkAggro();
|
checkAggro();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case BNpcState::Combat:
|
case BNpcState::Combat:
|
||||||
|
@ -796,6 +797,7 @@ void Sapphire::Entity::BNpc::update( uint64_t tickCount )
|
||||||
pNaviProvider->updateAgentParameters( *this );
|
pNaviProvider->updateAgentParameters( *this );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -832,20 +834,21 @@ void Sapphire::Entity::BNpc::onDeath()
|
||||||
{
|
{
|
||||||
auto& server = Common::Service< World::WorldServer >::ref();
|
auto& server = Common::Service< World::WorldServer >::ref();
|
||||||
auto& playerMgr = Common::Service< World::Manager::PlayerMgr >::ref();
|
auto& playerMgr = Common::Service< World::Manager::PlayerMgr >::ref();
|
||||||
|
auto& taskMgr = Common::Service< World::Manager::TaskMgr >::ref();
|
||||||
|
|
||||||
setTargetId( INVALID_GAME_OBJECT_ID64 );
|
setTargetId( INVALID_GAME_OBJECT_ID64 );
|
||||||
m_currentStance = Stance::Passive;
|
m_currentStance = Stance::Passive;
|
||||||
m_state = BNpcState::Dead;
|
m_state = BNpcState::Dead;
|
||||||
m_timeOfDeath = Util::getTimeSeconds();
|
m_timeOfDeath = Util::getTimeSeconds();
|
||||||
setOwner( nullptr );
|
setOwner( nullptr );
|
||||||
|
|
||||||
auto& taskMgr = Common::Service< World::Manager::TaskMgr >::ref();
|
|
||||||
taskMgr.queueTask( World::makeFadeBNpcTask( 10000, getAsBNpc() ) );
|
taskMgr.queueTask( World::makeFadeBNpcTask( 10000, getAsBNpc() ) );
|
||||||
taskMgr.queueTask( World::makeRemoveBNpcTask( 12000, getAsBNpc() ) );
|
taskMgr.queueTask( World::makeRemoveBNpcTask( 12000, getAsBNpc() ) );
|
||||||
|
|
||||||
auto& exdData = Common::Service< Data::ExdData >::ref();
|
auto& exdData = Common::Service< Data::ExdData >::ref();
|
||||||
auto paramGrowthInfo = exdData.getRow< Excel::ParamGrow >( m_level );
|
auto paramGrowthInfo = exdData.getRow< Excel::ParamGrow >( m_level );
|
||||||
|
|
||||||
for( auto& pHateEntry : m_hateList )
|
for( const auto& pHateEntry : m_hateList )
|
||||||
{
|
{
|
||||||
// TODO: handle drops
|
// TODO: handle drops
|
||||||
auto pPlayer = pHateEntry->m_pChara->getAsPlayer();
|
auto pPlayer = pHateEntry->m_pChara->getAsPlayer();
|
||||||
|
@ -855,6 +858,7 @@ void Sapphire::Entity::BNpc::onDeath()
|
||||||
pPlayer->gainExp( paramGrowthInfo->data().BaseExp );
|
pPlayer->gainExp( paramGrowthInfo->data().BaseExp );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hateListClear();
|
hateListClear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -474,7 +474,7 @@ Sapphire::Entity::Player::InvSlotPair Sapphire::Entity::Player::getFreeBagSlot()
|
||||||
|
|
||||||
Sapphire::Entity::Player::InvSlotPair Sapphire::Entity::Player::getFreeContainerSlot( uint32_t containerId )
|
Sapphire::Entity::Player::InvSlotPair Sapphire::Entity::Player::getFreeContainerSlot( uint32_t containerId )
|
||||||
{
|
{
|
||||||
auto freeSlot = static_cast < int8_t >( m_storageMap[ containerId ]->getFreeSlot() );
|
auto freeSlot = static_cast< int8_t >( m_storageMap[ containerId ]->getFreeSlot() );
|
||||||
|
|
||||||
if( freeSlot != -1 )
|
if( freeSlot != -1 )
|
||||||
return std::make_pair( containerId, freeSlot );
|
return std::make_pair( containerId, freeSlot );
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include "WorldServer.h"
|
#include "WorldServer.h"
|
||||||
|
|
||||||
#include "Session.h"
|
#include "Session.h"
|
||||||
|
#include <Manager/RNGMgr.h>
|
||||||
|
|
||||||
using namespace Sapphire::Network;
|
using namespace Sapphire::Network;
|
||||||
using namespace Sapphire::Network::Packets;
|
using namespace Sapphire::Network::Packets;
|
||||||
|
|
|
@ -53,7 +53,7 @@ bool LinkshellMgr::loadLinkshells()
|
||||||
size_t entryCount = inData.size() / 8;
|
size_t entryCount = inData.size() / 8;
|
||||||
std::vector< uint64_t > list( entryCount );
|
std::vector< uint64_t > list( entryCount );
|
||||||
|
|
||||||
for( int i = 0; i < entryCount; ++i )
|
for( uint64_t i = 0; i < entryCount; ++i )
|
||||||
{
|
{
|
||||||
auto val = *reinterpret_cast< const uint64_t* >( &inData[ i * 8 ] );
|
auto val = *reinterpret_cast< const uint64_t* >( &inData[ i * 8 ] );
|
||||||
list[ i ] = val;
|
list[ i ] = val;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Sapphire::World::Manager
|
namespace Sapphire::World::Manager
|
||||||
{
|
{
|
||||||
|
@ -19,24 +20,47 @@ namespace Sapphire::World::Manager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RandGenerator( std::shared_ptr< std::mt19937 > pEngine, T minRange = std::numeric_limits< T >::min(), T maxRange = std::numeric_limits< T >::max() )
|
RandGenerator( std::shared_ptr< std::mt19937 > pEngine, T minRange = std::numeric_limits< T >::min(), T maxRange = std::numeric_limits< T >::max() )
|
||||||
: m_engine( pEngine ), m_dist( minRange, maxRange )
|
: m_engine( pEngine ), m_fpuDist( minRange, maxRange ), m_intDist( minRange, maxRange )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// returns a single value for T type on set ranges, deducing real or integer distribution from given numeric type
|
||||||
T next()
|
T next()
|
||||||
{
|
{
|
||||||
return m_dist( *m_engine );
|
if constexpr( std::is_integral< T >::value )
|
||||||
|
return m_intDist( *m_engine );
|
||||||
|
|
||||||
|
return m_fpuDist( *m_engine );
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
// returns an array of size nSize with values type T on set ranges, deducing real or integer distribution from given numeric type
|
||||||
std::uniform_real_distribution< T > m_dist;
|
template< std::size_t nSize >
|
||||||
|
const std::array< T, nSize > nextCount()
|
||||||
|
{
|
||||||
|
std::array< T, nSize > _valPush;
|
||||||
|
|
||||||
|
for( auto i = 0; i < nSize; ++i )
|
||||||
|
{
|
||||||
|
if constexpr( std::is_integral< T >::value )
|
||||||
|
_valPush[ i ] = ( m_intDist( *m_engine ) );
|
||||||
|
else
|
||||||
|
_valPush[ i ] = ( m_fpuDist( *m_engine ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return _valPush;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
std::uniform_real_distribution<> m_fpuDist;
|
||||||
|
std::uniform_int_distribution<> m_intDist;
|
||||||
std::shared_ptr< std::mt19937 > m_engine;
|
std::shared_ptr< std::mt19937 > m_engine;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RNGMgr
|
class RNGMgr
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// Constructs a manager to supply states for random integer and float distribution using a Mersenne Twister engine
|
||||||
RNGMgr()
|
RNGMgr()
|
||||||
{
|
{
|
||||||
m_engine = std::make_shared< std::mt19937 >( *engineSeed< std::mt19937::state_size >() );
|
m_engine = std::make_shared< std::mt19937 >( *engineSeed< std::mt19937::state_size >() );
|
||||||
|
@ -48,7 +72,7 @@ namespace Sapphire::World::Manager
|
||||||
RNGMgr& operator=( const RNGMgr& pRNGMgr ) = delete;
|
RNGMgr& operator=( const RNGMgr& pRNGMgr ) = delete;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Creates a RNG with specified parameters for multiple uses
|
* @brief Creates a state with specified parameters for multiple uses
|
||||||
* @tparam Numeric type to be used for the generator
|
* @tparam Numeric type to be used for the generator
|
||||||
* @param Minimum value possible for the random value
|
* @param Minimum value possible for the random value
|
||||||
* @param Maximum value possible for the random value
|
* @param Maximum value possible for the random value
|
||||||
|
@ -60,6 +84,17 @@ namespace Sapphire::World::Manager
|
||||||
return RandGenerator< T >( m_engine, minRange, maxRange );
|
return RandGenerator< T >( m_engine, minRange, maxRange );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Creates a state with only typed data arithmetic range
|
||||||
|
* @tparam Numeric type to be used for the generator and range (::min(), ::max() of numeric type)
|
||||||
|
* @return Random number generator object
|
||||||
|
*/
|
||||||
|
template< typename T, typename = typename std::enable_if< std::is_arithmetic< T >::value, T >::type >
|
||||||
|
RandGenerator< T > getRandGenerator()
|
||||||
|
{
|
||||||
|
return RandGenerator< T >( m_engine );
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
template< std::size_t STATE_SIZE >
|
template< std::size_t STATE_SIZE >
|
||||||
|
@ -70,6 +105,11 @@ namespace Sapphire::World::Manager
|
||||||
std::array< uint32_t, STATE_SIZE > seedArray;
|
std::array< uint32_t, STATE_SIZE > seedArray;
|
||||||
std::random_device rd;
|
std::random_device rd;
|
||||||
|
|
||||||
|
// check if kernel can supply sufficiently non-deterministic output
|
||||||
|
|
||||||
|
if( rd.entropy() == 0.f )
|
||||||
|
Logger::error( "Kernel random device entropy reported zero - Random number generator may be poor quality" );
|
||||||
|
|
||||||
std::generate_n( seedArray.data(), seedArray.size(), std::ref( rd ) );
|
std::generate_n( seedArray.data(), seedArray.size(), std::ref( rd ) );
|
||||||
auto pSeq = std::make_unique< std::seed_seq >( std::begin( seedArray ), std::end( seedArray ) );
|
auto pSeq = std::make_unique< std::seed_seq >( std::begin( seedArray ), std::end( seedArray ) );
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,8 @@ using namespace Sapphire;
|
||||||
using namespace Sapphire::World::Manager;
|
using namespace Sapphire::World::Manager;
|
||||||
|
|
||||||
TerritoryMgr::TerritoryMgr() :
|
TerritoryMgr::TerritoryMgr() :
|
||||||
m_lastInstanceId( 10000 )
|
m_lastInstanceId( 10000 ),
|
||||||
|
m_inRangeDistance( 0 )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ void Sapphire::Network::GameConnection::getCommonlistHandler( const Packets::FFX
|
||||||
const size_t itemsPerPage = 10;
|
const size_t itemsPerPage = 10;
|
||||||
|
|
||||||
// this func paginates any commonlist entry, associating them with online player data and hierarchy ID (optional)
|
// this func paginates any commonlist entry, associating them with online player data and hierarchy ID (optional)
|
||||||
auto generateEntries = [&]( const auto& idVec, size_t offset, const std::vector< Common::HierarchyData >& hierarchyVec ) -> std::vector< PlayerEntry >
|
auto generateEntries = [ & ]( const auto& idVec, size_t offset, const std::vector< Common::HierarchyData >& hierarchyVec ) -> std::vector< PlayerEntry >
|
||||||
{
|
{
|
||||||
std::vector< PlayerEntry > entries;
|
std::vector< PlayerEntry > entries;
|
||||||
|
|
||||||
|
|
|
@ -448,10 +448,9 @@ void Sapphire::Network::GameConnection::commandHandler( const Packets::FFXIVARR_
|
||||||
}
|
}
|
||||||
case PacketCommand::TARGET_DECIDE: // Change target
|
case PacketCommand::TARGET_DECIDE: // Change target
|
||||||
{
|
{
|
||||||
|
|
||||||
uint64_t targetId = param1;
|
uint64_t targetId = param1;
|
||||||
|
|
||||||
if( targetId == player.getTargetId() || targetId == 0xE0000000 )
|
if( targetId == player.getTargetId() || targetId == Common::INVALID_GAME_OBJECT_ID )
|
||||||
targetId = 0;
|
targetId = 0;
|
||||||
|
|
||||||
player.changeTarget( targetId );
|
player.changeTarget( targetId );
|
||||||
|
|
|
@ -641,7 +641,7 @@ void Sapphire::Network::GameConnection::gearSetEquip( const Packets::FFXIVARR_PA
|
||||||
auto& server = Common::Service< World::WorldServer >::ref();
|
auto& server = Common::Service< World::WorldServer >::ref();
|
||||||
|
|
||||||
// Loop over all slots
|
// Loop over all slots
|
||||||
for (int slot = 0; slot < 14; slot++ )
|
for( int slot = 0; slot < 14; ++slot )
|
||||||
{
|
{
|
||||||
const auto fromSlot = packet.data().containerIndex[ slot ];
|
const auto fromSlot = packet.data().containerIndex[ slot ];
|
||||||
const auto fromContainer = packet.data().storageId[ slot ];
|
const auto fromContainer = packet.data().storageId[ slot ];
|
||||||
|
@ -659,19 +659,19 @@ void Sapphire::Network::GameConnection::gearSetEquip( const Packets::FFXIVARR_PA
|
||||||
ackPacket->data().operationType = operationType;
|
ackPacket->data().operationType = operationType;
|
||||||
server.queueForPlayer( player.getCharacterId(), ackPacket );
|
server.queueForPlayer( player.getCharacterId(), ackPacket );
|
||||||
|
|
||||||
if ( fromItem && equippedItem )
|
if( fromItem && equippedItem )
|
||||||
{
|
{
|
||||||
player.swapItem( fromContainer, fromSlot, Common::GearSet0, slot );
|
player.swapItem( fromContainer, fromSlot, Common::GearSet0, slot );
|
||||||
server.queueForPlayer( player.getCharacterId(), std::make_shared< UpdateInventorySlotPacket >( player.getId(), fromSlot, fromContainer, *equippedItem, 0 ) );
|
server.queueForPlayer( player.getCharacterId(), std::make_shared< UpdateInventorySlotPacket >( player.getId(), fromSlot, fromContainer, *equippedItem, 0 ) );
|
||||||
server.queueForPlayer( player.getCharacterId(), std::make_shared< UpdateInventorySlotPacket >( player.getId(), slot, Common::GearSet0, *fromItem, 0 ) );
|
server.queueForPlayer( player.getCharacterId(), std::make_shared< UpdateInventorySlotPacket >( player.getId(), slot, Common::GearSet0, *fromItem, 0 ) );
|
||||||
}
|
}
|
||||||
else if ( fromItem && !equippedItem )
|
else if( fromItem && !equippedItem )
|
||||||
{
|
{
|
||||||
player.moveItem( fromContainer, fromSlot, Common::GearSet0, slot );
|
player.moveItem( fromContainer, fromSlot, Common::GearSet0, slot );
|
||||||
server.queueForPlayer( player.getCharacterId(), std::make_shared< UpdateInventorySlotPacket >( player.getId(), fromSlot, fromContainer, 0 ) );
|
server.queueForPlayer( player.getCharacterId(), std::make_shared< UpdateInventorySlotPacket >( player.getId(), fromSlot, fromContainer, 0 ) );
|
||||||
server.queueForPlayer( player.getCharacterId(), std::make_shared< UpdateInventorySlotPacket >( player.getId(), slot, Common::GearSet0, *fromItem, 0 ) );
|
server.queueForPlayer( player.getCharacterId(), std::make_shared< UpdateInventorySlotPacket >( player.getId(), slot, Common::GearSet0, *fromItem, 0 ) );
|
||||||
}
|
}
|
||||||
else if ( !fromItem && equippedItem )
|
else if( !fromItem && equippedItem )
|
||||||
{
|
{
|
||||||
auto containerId = World::Manager::ItemMgr::getCharaEquipSlotCategoryToArmoryId( static_cast< Common::EquipSlotCategory >( equippedItem->getSlot() ) );
|
auto containerId = World::Manager::ItemMgr::getCharaEquipSlotCategoryToArmoryId( static_cast< Common::EquipSlotCategory >( equippedItem->getSlot() ) );
|
||||||
auto freeSlot = player.getFreeContainerSlot( containerId ).second;
|
auto freeSlot = player.getFreeContainerSlot( containerId ).second;
|
||||||
|
|
|
@ -7,15 +7,6 @@
|
||||||
namespace Sapphire::Network::Packets::WorldPackets::Server
|
namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
{
|
{
|
||||||
|
|
||||||
uint64_t ExecuteCharacterID;
|
|
||||||
uint64_t TargetCharacterID;
|
|
||||||
uint8_t ExecuteIdentity;
|
|
||||||
uint8_t TargetIdentity;
|
|
||||||
uint8_t UpdateStatus;
|
|
||||||
uint8_t Count;
|
|
||||||
char ExecuteCharacterName[32];
|
|
||||||
char TargetCharacterName[32];
|
|
||||||
|
|
||||||
class PcPartyUpdatePacket : public ZoneChannelPacket< FFXIVIpcPcPartyUpdate >
|
class PcPartyUpdatePacket : public ZoneChannelPacket< FFXIVIpcPcPartyUpdate >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
memcpy( m_data.Aetheryte, player.getAetheryteArray().data(), sizeof( m_data.Aetheryte ) );
|
memcpy( m_data.Aetheryte, player.getAetheryteArray().data(), sizeof( m_data.Aetheryte ) );
|
||||||
|
|
||||||
// Set the class levels and exp.
|
// Set the class levels and exp.
|
||||||
for( uint8_t i = 0; i < 23; i++ )
|
for( uint8_t i = 0; i < Common::CLASSJOB_TOTAL; ++i )
|
||||||
{
|
{
|
||||||
m_data.Lv[ i ] = player.getClassArray()[ i ];
|
m_data.Lv[ i ] = player.getClassArray()[ i ];
|
||||||
m_data.Exp[ i ] = player.getExpArray()[ i ];
|
m_data.Exp[ i ] = player.getExpArray()[ i ];
|
||||||
|
|
|
@ -54,6 +54,7 @@ using namespace Sapphire::World::Manager;
|
||||||
|
|
||||||
Territory::Territory() :
|
Territory::Territory() :
|
||||||
m_territoryTypeId( 0 ),
|
m_territoryTypeId( 0 ),
|
||||||
|
m_ident(),
|
||||||
m_guId( 0 ),
|
m_guId( 0 ),
|
||||||
m_currentWeather( Common::Weather::FairSkies ),
|
m_currentWeather( Common::Weather::FairSkies ),
|
||||||
m_weatherOverride( Common::Weather::None ),
|
m_weatherOverride( Common::Weather::None ),
|
||||||
|
@ -908,7 +909,6 @@ bool Territory::loadBNpcs()
|
||||||
|
|
||||||
while( res->next() )
|
while( res->next() )
|
||||||
{
|
{
|
||||||
|
|
||||||
auto bnpc = std::make_shared< Common::BNPCInstanceObject >();
|
auto bnpc = std::make_shared< Common::BNPCInstanceObject >();
|
||||||
|
|
||||||
bnpc->territoryType = res->getInt( 1 );
|
bnpc->territoryType = res->getInt( 1 );
|
||||||
|
@ -970,8 +970,6 @@ bool Territory::loadBNpcs()
|
||||||
m_spawnInfo.emplace_back( info );
|
m_spawnInfo.emplace_back( info );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,8 @@ WorldServer::WorldServer( const std::string& configName ) :
|
||||||
m_configName( configName ),
|
m_configName( configName ),
|
||||||
m_bRunning( true ),
|
m_bRunning( true ),
|
||||||
m_lastDBPingTime( 0 ),
|
m_lastDBPingTime( 0 ),
|
||||||
m_worldId( 67 )
|
m_worldId( 67 ),
|
||||||
|
m_port( 0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +163,9 @@ void WorldServer::run( int32_t argc, char* argv[] )
|
||||||
}
|
}
|
||||||
Common::Service< Db::DbWorkerPool< Db::ZoneDbConnection > >::set( pDb );
|
Common::Service< Db::DbWorkerPool< Db::ZoneDbConnection > >::set( pDb );
|
||||||
|
|
||||||
|
auto pRNGMgr = std::make_shared< Manager::RNGMgr >();
|
||||||
|
Common::Service< Manager::RNGMgr >::set( pRNGMgr );
|
||||||
|
|
||||||
Logger::info( "Loading all players" );
|
Logger::info( "Loading all players" );
|
||||||
if( !loadPlayers() )
|
if( !loadPlayers() )
|
||||||
{
|
{
|
||||||
|
@ -192,9 +196,6 @@ void WorldServer::run( int32_t argc, char* argv[] )
|
||||||
auto pNaviMgr = std::make_shared< Manager::NaviMgr >();
|
auto pNaviMgr = std::make_shared< Manager::NaviMgr >();
|
||||||
Common::Service< Manager::NaviMgr >::set( pNaviMgr );
|
Common::Service< Manager::NaviMgr >::set( pNaviMgr );
|
||||||
|
|
||||||
auto pRNGMgr = std::make_shared< Manager::RNGMgr >();
|
|
||||||
Common::Service< Manager::RNGMgr >::set( pRNGMgr );
|
|
||||||
|
|
||||||
Logger::info( "TerritoryMgr: Setting up zones" );
|
Logger::info( "TerritoryMgr: Setting up zones" );
|
||||||
auto pTeriMgr = std::make_shared< Manager::TerritoryMgr >();
|
auto pTeriMgr = std::make_shared< Manager::TerritoryMgr >();
|
||||||
auto pHousingMgr = std::make_shared< Manager::HousingMgr >();
|
auto pHousingMgr = std::make_shared< Manager::HousingMgr >();
|
||||||
|
|
Loading…
Add table
Reference in a new issue