mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
Spaces
This commit is contained in:
parent
54e60107e9
commit
39c1282d6f
3 changed files with 12 additions and 12 deletions
|
@ -167,14 +167,14 @@ void Sapphire::Entity::BNpc::step()
|
|||
return;
|
||||
}
|
||||
|
||||
auto stepPos = m_naviLastPath[m_naviPathStep];
|
||||
auto stepPos = m_naviLastPath[ m_naviPathStep ];
|
||||
|
||||
if( Util::distance( getPos().x, getPos().y, getPos().z, stepPos.x, stepPos.y, stepPos.z ) <= 4 && m_naviPathStep < m_naviLastPath.size() - 1 )
|
||||
{
|
||||
// Reached step in path
|
||||
m_naviPathStep++;
|
||||
|
||||
stepPos = m_naviLastPath[m_naviPathStep];
|
||||
stepPos = m_naviLastPath[ m_naviPathStep ];
|
||||
}
|
||||
|
||||
// This is probably not a good way to do it but works fine for now
|
||||
|
|
|
@ -23,7 +23,7 @@ bool Sapphire::World::Manager::NaviMgr::setupTerritory( std::string internalName
|
|||
Sapphire::NaviProvider* Sapphire::World::Manager::NaviMgr::getNaviProvider( std::string internalName )
|
||||
{
|
||||
if( m_naviProviderTerritoryMap.find( internalName ) != m_naviProviderTerritoryMap.end() )
|
||||
return m_naviProviderTerritoryMap[internalName];
|
||||
return m_naviProviderTerritoryMap[ internalName ];
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -347,7 +347,7 @@ bool Sapphire::World::ServerMgr::createSession( uint32_t sessionId )
|
|||
Logger::info( "[{0}] Creating new session", session_id_str );
|
||||
|
||||
std::shared_ptr< Session > newSession( new Session( sessionId, framework() ) );
|
||||
m_sessionMapById[sessionId] = newSession;
|
||||
m_sessionMapById[ sessionId ] = newSession;
|
||||
|
||||
if( !newSession->loadPlayer() )
|
||||
{
|
||||
|
@ -355,7 +355,7 @@ bool Sapphire::World::ServerMgr::createSession( uint32_t sessionId )
|
|||
return false;
|
||||
}
|
||||
|
||||
m_sessionMapByName[newSession->getPlayer()->getName()] = newSession;
|
||||
m_sessionMapByName[ newSession->getPlayer()->getName() ] = newSession;
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -424,7 +424,7 @@ std::string Sapphire::World::ServerMgr::getPlayerNameFromDb( uint32_t playerId,
|
|||
|
||||
void Sapphire::World::ServerMgr::updatePlayerName( uint32_t playerId, const std::string & playerNewName )
|
||||
{
|
||||
m_playerNameMapById[playerId] = playerNewName;
|
||||
m_playerNameMapById[ playerId ] = playerNewName;
|
||||
}
|
||||
|
||||
void Sapphire::World::ServerMgr::loadBNpcTemplates()
|
||||
|
@ -458,10 +458,10 @@ void Sapphire::World::ServerMgr::loadBNpcTemplates()
|
|||
auto bnpcTemplate = std::make_shared< Entity::BNpcTemplate >(
|
||||
id, bNPCBaseId, bNPCNameId, mainWeaponModel, secWeaponModel,
|
||||
aggressionMode, enemyType, 0, pose, modelChara, displayFlags,
|
||||
reinterpret_cast<uint32_t*>( &models[0] ),
|
||||
reinterpret_cast<uint8_t*>( &look[0] ) );
|
||||
reinterpret_cast< uint32_t* >( &models[ 0 ] ),
|
||||
reinterpret_cast< uint8_t* >( &look[ 0 ] ) );
|
||||
|
||||
m_bNpcTemplateMap[name] = bnpcTemplate;
|
||||
m_bNpcTemplateMap[ name ] = bnpcTemplate;
|
||||
}
|
||||
|
||||
Logger::debug( "BNpc Templates loaded: {0}", m_bNpcTemplateMap.size() );
|
||||
|
|
Loading…
Add table
Reference in a new issue