From eb57aba0e4bc096d4b93f8bbdeac3874693cb95e Mon Sep 17 00:00:00 2001 From: Winfidonarleyan Date: Sun, 26 May 2024 21:36:37 +0700 Subject: [PATCH] fix(Modules/ILU): correct give player level --- modules/mod-item-level-up/src/ItemLevelUp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/mod-item-level-up/src/ItemLevelUp.cpp b/modules/mod-item-level-up/src/ItemLevelUp.cpp index e95c061d2..4797f4e2c 100644 --- a/modules/mod-item-level-up/src/ItemLevelUp.cpp +++ b/modules/mod-item-level-up/src/ItemLevelUp.cpp @@ -92,6 +92,9 @@ bool ItemLevelUpMgr::OnPlayerItemUse(Player* player, Item* item) if (newLevel == 1) newLevel = playerLevel + 1; + if (newLevel > _maxConfigLevel) + newLevel = _maxConfigLevel; + player->GiveLevel(newLevel); if (!_isSaveExpEnable) @@ -180,4 +183,4 @@ void ItemLevelUpMgr::SetMaxWeaponSkills(Player* player) player->SaveToDB(false, false); player->UpdateSkillsToMaxSkillsForLevel(); -} +} \ No newline at end of file