Fixed tree spirit spawning issue.

This commit is contained in:
NixWigton
2021-08-06 15:53:53 -05:00
parent 768e69bc1e
commit c0e5a5c443
@@ -41,7 +41,7 @@ class EnchantedValleyListeners : InteractionListener() {
fun getSpirit(player: Player): NPC {
val level = player.properties.currentCombatLevel
var index = Math.ceil(level / 20.0).toInt()
if(index > TREE_SPIRIT_IDS.size) index = TREE_SPIRIT_IDS.size
if(index >= TREE_SPIRIT_IDS.size) index = TREE_SPIRIT_IDS.size - 1
return NPC(TREE_SPIRIT_IDS[index])
}
}