From 3cd083809a8227d9abeec38a3608bf9d215e09b0 Mon Sep 17 00:00:00 2001 From: collett Date: Mon, 9 Nov 2020 23:28:58 +0900 Subject: [PATCH] bug fixes --- src/scripts/quest/subquest/gridania/SubFst008.cpp | 2 +- src/world/Actor/Chara.cpp | 3 ++- src/world/Actor/Player.cpp | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/scripts/quest/subquest/gridania/SubFst008.cpp b/src/scripts/quest/subquest/gridania/SubFst008.cpp index ad00c64c..fb556914 100644 --- a/src/scripts/quest/subquest/gridania/SubFst008.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst008.cpp @@ -123,7 +123,7 @@ private: { if( result.param2 == 1 ) { - if( player.giveQuestRewards( getId(), 0 ) ) + if( player.giveQuestRewards( getId(), result.param3 ) ) { player.setQuestUI8BH( getId(), result.param3 ); player.finishQuest( getId() ); diff --git a/src/world/Actor/Chara.cpp b/src/world/Actor/Chara.cpp index 2d9e8ce9..40d69ef3 100644 --- a/src/world/Actor/Chara.cpp +++ b/src/world/Actor/Chara.cpp @@ -598,11 +598,12 @@ void Sapphire::Entity::Chara::removeStatusEffect( uint8_t effectSlotId, bool sen if( pEffectIt == m_statusEffectMap.end() ) return; + auto pEffect = pEffectIt->second; + statusEffectFreeSlot( effectSlotId ); m_statusEffectMap.erase( effectSlotId ); - auto pEffect = pEffectIt->second; pEffect->removeStatus(); sendToInRangeSet( makeActorControl( getId(), StatusEffectLose, pEffect->getId() ), true ); diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 8e157f0a..49980367 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -2153,7 +2153,7 @@ void Sapphire::Entity::Player::updateHuntingLog( uint16_t id ) const auto maxRank = 4; auto& pExdData = Common::Service< Data::ExdDataGenerated >::ref(); - auto& logEntry = m_huntingLogEntries[ static_cast< uint8_t >( getClass() ) - 1 ]; + auto logEntryIndex = static_cast< uint8_t >( getClass() ) - 1; bool logChanged = false; @@ -2162,6 +2162,10 @@ void Sapphire::Entity::Player::updateHuntingLog( uint16_t id ) auto classJobInfo = pExdData.get< Sapphire::Data::ClassJob >( currentClass ); if( !classJobInfo ) return; + if( classJobInfo->classJobParent > 0 ) + logEntryIndex = classJobInfo->classJobParent; + + auto& logEntry = m_huntingLogEntries[ logEntryIndex ]; bool allSectionsComplete = true; for( int i = 1; i <= 10; ++i )