1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-02 00:47:45 +00:00

Merge pull request #838 from dude22072/ThreePointOh

[3.0] Hunting log crash fix
This commit is contained in:
Adam 2023-01-20 11:04:44 +11:00 committed by GitHub
commit 9674cd83e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1826,17 +1826,18 @@ void Player::updateHuntingLog( uint16_t id )
std::vector< uint32_t > rankRewards{ 2500, 10000, 20000, 30000, 40000 };
const auto maxRank = 4;
auto& pExdData = Common::Service< Data::ExdData >::ref();
auto currentClassId = static_cast< uint8_t >( getClass() );
// make sure we get the matching base-class if a job is being used
auto classJobInfo = pExdData.getRow< Excel::ClassJob >( static_cast< uint8_t >( getClass() ) );
if( !classJobInfo )
return;
auto currentClassId = classJobInfo->data().MainClass;
auto& logEntry = m_huntingLogEntries[ currentClassId - 1 ];
bool logChanged = false;
// make sure we get the matching base-class if a job is being used
auto currentClass = currentClassId;
auto classJobInfo = pExdData.getRow< Excel::ClassJob >( currentClass );
if( !classJobInfo )
return;
bool allSectionsComplete = true;
for( int i = 1; i <= 10; ++i )