Skip to content

Commit

Permalink
Fixed ItemCost is invalid when specified level (rathena#6796)
Browse files Browse the repository at this point in the history
* Fixed rathena#6573.
* Fixes ItemCost being invalid when specifying level.
Thanks to @dimasshotta and @CairoLee!
  • Loading branch information
CairoLee authored Apr 8, 2022
1 parent ff3b731 commit 3b47def
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/map/skill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18224,6 +18224,13 @@ struct s_skill_condition skill_get_requirement(struct map_session_data* sd, uint
break;
}
}
else {
// Process level_dependent requirement
if (level_dependent && skill_lv <= MAX_SKILL_ITEM_REQUIRE) {
req.itemid[0] = skill->require.itemid[skill_lv - 1];
req.amount[0] = skill->require.amount[skill_lv - 1];
}
}

// Check requirement for gemstone.
if (itemdb_group.item_exists(IG_GEMSTONE, req.itemid[i])) {
Expand Down

0 comments on commit 3b47def

Please sign in to comment.