mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-01 08:27:46 +00:00
getPlayerFreeCompany now returning the real result
This commit is contained in:
parent
38b92fafa9
commit
ded211a6b5
2 changed files with 7 additions and 9 deletions
|
@ -267,16 +267,14 @@ void FreeCompanyMgr::sendFreeCompanyStatus( Entity::Player& player )
|
|||
|
||||
}
|
||||
|
||||
FreeCompanyPtr FreeCompanyMgr::getPlayerFreeCompany( Entity::Player& player ) const
|
||||
FreeCompanyPtr FreeCompanyMgr::getPlayerFreeCompany( Entity::Player& player )
|
||||
{
|
||||
for( const auto &[ key, value ] : m_fcIdMap )
|
||||
{
|
||||
if( value->getMasterId() == player.getCharacterId() )
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
auto it = m_charaIdToFcIdMap.find( player.getCharacterId() );
|
||||
if( it != m_charaIdToFcIdMap.end() )
|
||||
return getFreeCompanyById( it->second );
|
||||
|
||||
return nullptr;
|
||||
|
||||
}
|
||||
|
||||
void FreeCompanyMgr::sendFcInviteList( Entity::Player& player )
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace Sapphire::World::Manager
|
|||
void sendFreeCompanyStatus( Entity::Player& player );
|
||||
|
||||
// get fc associated with player
|
||||
FreeCompanyPtr getPlayerFreeCompany( Entity::Player& player ) const;
|
||||
FreeCompanyPtr getPlayerFreeCompany( Entity::Player& player );
|
||||
FreeCompanyPtr getFreeCompanyById( uint64_t fcId );
|
||||
FreeCompanyPtr getFreeCompanyByName( const std::string& name );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue