mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-11 13:07:45 +00:00
WIP fixing contentfinder
This commit is contained in:
parent
6a7261a22b
commit
b1ecbb7446
2 changed files with 24 additions and 5 deletions
|
@ -216,7 +216,8 @@ namespace Sapphire::Network::Packets
|
||||||
CancelLogoutCountdown = 0x264,
|
CancelLogoutCountdown = 0x264,
|
||||||
FateDebugCommand = 0x265,
|
FateDebugCommand = 0x265,
|
||||||
ContentAction = 0x266,
|
ContentAction = 0x266,
|
||||||
RequestPenalties = 0x267,
|
//RequestPenalties = 0x267,
|
||||||
|
RequestPenalties = 0x2CB,
|
||||||
Logout = 0x269,
|
Logout = 0x269,
|
||||||
|
|
||||||
HousingHouseName = 0x026A,
|
HousingHouseName = 0x026A,
|
||||||
|
|
|
@ -153,7 +153,11 @@ void Sapphire::World::ContentFinder::completeRegistration( const Sapphire::Entit
|
||||||
auto queuedContent = m_queuedContent[ m_queuedPlayer[ player.getId() ]->getActiveRegisterId() ];
|
auto queuedContent = m_queuedContent[ m_queuedPlayer[ player.getId() ]->getActiveRegisterId() ];
|
||||||
|
|
||||||
auto& exdData = Service< Data::ExdData >::ref();
|
auto& exdData = Service< Data::ExdData >::ref();
|
||||||
auto content = exdData.getRow< Excel::InstanceContent >( queuedContent->getContentFinderId() );
|
auto contentFinderCondition = exdData.getRow< Excel::ContentFinderCondition >( queuedContent->getContentFinderId() );
|
||||||
|
if( !contentFinderCondition )
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto content = exdData.getRow< Excel::InstanceContent >( contentFinderCondition->data().InstanceContentId );
|
||||||
|
|
||||||
// Undersized
|
// Undersized
|
||||||
if( flags & 0x01 )
|
if( flags & 0x01 )
|
||||||
|
@ -368,7 +372,11 @@ void Sapphire::World::ContentFinder::accept( Entity::Player& player )
|
||||||
auto queuedPlayer = m_queuedPlayer[ player.getId() ];
|
auto queuedPlayer = m_queuedPlayer[ player.getId() ];
|
||||||
auto queuedContent = m_queuedContent[ queuedPlayer->getActiveRegisterId() ];
|
auto queuedContent = m_queuedContent[ queuedPlayer->getActiveRegisterId() ];
|
||||||
|
|
||||||
auto content = exdData.getRow< Excel::InstanceContent >( queuedContent->getContentFinderId() );
|
auto contentFinderCondition = exdData.getRow< Excel::ContentFinderCondition >( queuedContent->getContentFinderId() );
|
||||||
|
if( !contentFinderCondition )
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto content = exdData.getRow< Excel::InstanceContent >( contentFinderCondition->data().InstanceContentId );
|
||||||
|
|
||||||
// Something has gone quite wrong..
|
// Something has gone quite wrong..
|
||||||
if( queuedContent->getState() != WaitingForAccept )
|
if( queuedContent->getState() != WaitingForAccept )
|
||||||
|
@ -413,7 +421,12 @@ void Sapphire::World::ContentFinder::withdraw( Entity::Player& player )
|
||||||
auto& exdData = Service< Data::ExdData >::ref();
|
auto& exdData = Service< Data::ExdData >::ref();
|
||||||
|
|
||||||
auto queuedPlayer = m_queuedPlayer[ player.getId() ];
|
auto queuedPlayer = m_queuedPlayer[ player.getId() ];
|
||||||
auto contentInfo = exdData.getRow< Excel::InstanceContent >( m_queuedContent[ queuedPlayer->getActiveRegisterId() ]->getContentFinderId() );
|
|
||||||
|
auto contentFinderCondition = exdData.getRow< Excel::ContentFinderCondition >( m_queuedContent[ queuedPlayer->getActiveRegisterId() ]->getContentFinderId() );
|
||||||
|
if( !contentFinderCondition )
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto contentInfo = exdData.getRow< Excel::InstanceContent >( contentFinderCondition->data().InstanceContentId );
|
||||||
|
|
||||||
// remove the player from the global CF list
|
// remove the player from the global CF list
|
||||||
m_queuedPlayer.erase( player.getId() );
|
m_queuedPlayer.erase( player.getId() );
|
||||||
|
@ -442,7 +455,12 @@ void Sapphire::World::ContentFinder::withdraw( Entity::Player& player )
|
||||||
if( updateRegisterIdSet.count( regId ) == 0 )
|
if( updateRegisterIdSet.count( regId ) == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto queuedContentInfo = exdData.getRow< Excel::InstanceContent >( content.second->getContentFinderId() );
|
auto contentFinderCondition = exdData.getRow< Excel::ContentFinderCondition >( content.second->getContentFinderId() );
|
||||||
|
if( !contentFinderCondition )
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto queuedContentInfo = exdData.getRow< Excel::InstanceContent >( contentFinderCondition->data().InstanceContentId );
|
||||||
|
|
||||||
auto& playerList = content.second->m_players;
|
auto& playerList = content.second->m_players;
|
||||||
for( const auto& pPlayer : playerList )
|
for( const auto& pPlayer : playerList )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue