diff --git a/src/scripts/quest/classquest/ARC/ClsArc998.cpp b/src/scripts/quest/classquest/ARC/ClsArc998.cpp index e7f536f2..f5eea04c 100644 --- a/src/scripts/quest/classquest/ARC/ClsArc998.cpp +++ b/src/scripts/quest/classquest/ARC/ClsArc998.cpp @@ -100,7 +100,7 @@ private: { player.finishQuest( getId() ); player.setLevelForClass( 1, Sapphire::Common::ClassJob::Archer ); - player.setMaxGearSets( player.getMaxGearSets() + 1 ); + player.addGearSet(); } } }; diff --git a/src/scripts/quest/classquest/BTN/ClsHrv001.cpp b/src/scripts/quest/classquest/BTN/ClsHrv001.cpp index d043179d..78f360dd 100644 --- a/src/scripts/quest/classquest/BTN/ClsHrv001.cpp +++ b/src/scripts/quest/classquest/BTN/ClsHrv001.cpp @@ -101,7 +101,7 @@ private: //TODO:Unlock gathering log? Maybe? player.finishQuest( getId() ); player.setLevelForClass( 1, Sapphire::Common::ClassJob::Botanist ); - player.setMaxGearSets( player.getMaxGearSets() + 1 ); + player.addGearSet(); } } }; diff --git a/src/scripts/quest/classquest/MIN/ClsMin011.cpp b/src/scripts/quest/classquest/MIN/ClsMin011.cpp index f9bfa126..8e08b141 100644 --- a/src/scripts/quest/classquest/MIN/ClsMin011.cpp +++ b/src/scripts/quest/classquest/MIN/ClsMin011.cpp @@ -100,7 +100,7 @@ private: //TODO:Unlock gathering log? player.finishQuest( getId() ); player.setLevelForClass( 1, Sapphire::Common::ClassJob::Miner ); - player.setMaxGearSets( player.getMaxGearSets() + 1 ); + player.addGearSet(); } } }; diff --git a/src/scripts/quest/classquest/WHM/JobWhm300.cpp b/src/scripts/quest/classquest/WHM/JobWhm300.cpp index 885f331b..10787dce 100644 --- a/src/scripts/quest/classquest/WHM/JobWhm300.cpp +++ b/src/scripts/quest/classquest/WHM/JobWhm300.cpp @@ -214,7 +214,7 @@ private: { //TODO: Unlock Skill player.finishQuest( getId() ); - player.setMaxGearSets( player.getMaxGearSets() + 1 ); + player.addGearSet(); } }; diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 1271e9af..f22053e7 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -1227,14 +1227,25 @@ void Player::setAchievementData( const Player::AchievementData& achievementData void Player::setMaxGearSets( uint8_t amount ) { - if( amount == 1 ) - amount = 5; - m_equippedMannequin = amount; queuePacket( makeActorControlSelf( getId(), SetMaxGearSets, m_equippedMannequin ) ); } +void Player::addGearSet() +{ + uint8_t amount = 1; + + if( getMaxGearSets() == 0 ) + { + // unlock 5 gearsets the first time + amount = 5; + setRewardFlag( UnlockEntry::GearSets ); + } + + setMaxGearSets( getMaxGearSets() + amount ); +} + uint8_t Player::getMaxGearSets() const { return m_equippedMannequin; diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index 5fca0000..cf90a4bb 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -387,6 +387,9 @@ namespace Sapphire::Entity /*! set number of gear sets */ void setMaxGearSets( uint8_t amount ); + /*! add a gear set */ + void addGearSet(); + /*! get number of gear sets */ uint8_t getMaxGearSets() const;