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

should not gain any exp past max level

This commit is contained in:
collett 2020-02-26 19:08:11 +09:00
parent 628c1e20f5
commit cea200a519

View file

@ -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();