Added index to the calculation

Index should always be the number pairs of ingredients used by the time the spell is finished running so multiplying the amount of XP gained (10) by the index should give the proper amount of Crafting XP.
This commit is contained in:
Poseidon 2025-12-03 16:46:06 -05:00
parent 8bdfc43fba
commit da4387d0f4

View file

@ -575,7 +575,7 @@ class LunarListeners : SpellListener("lunar"), Commands {
if(index == size && size != 0) {
removeRunes(player, true)
visualizeSpell(player, Animations.LUNAR_SPELLBOOK_SUPERGLASS_MAKE_4413, Graphics.LUNAR_SPELLBOOK_SUPERGLASS_MAKE_729, 120, Sounds.LUNAR_HEATGLASS_2896)
rewardXP(player, Skills.CRAFTING, 10.0)
rewardXP(player, Skills.CRAFTING, 10.0 * index)
addXP(player, 78.0)
}
}