From cea200a519a8b3e091c7bc11b768843ef70b1424 Mon Sep 17 00:00:00 2001 From: collett Date: Wed, 26 Feb 2020 19:08:11 +0900 Subject: [PATCH] should not gain any exp past max level --- src/world/Actor/Player.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 53afd852..49b2b192 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -696,6 +696,11 @@ bool Sapphire::Entity::Player::isActionLearned( uint8_t actionId ) const void Sapphire::Entity::Player::gainExp( uint32_t amount ) { + if( getLevel() >= Common::MAX_PLAYER_LEVEL ) + { + setExp( 0 ); + return; + } auto pExdData = m_pFw->get< Data::ExdDataGenerated >(); uint32_t currentExp = getExp();