Fixed getting slayer exp from hunting

This commit is contained in:
randy 2024-11-12 07:52:06 -07:00
parent d92a3f3a8e
commit 9143cd5f47

View file

@ -13,6 +13,8 @@ import org.json.simple.JSONObject
import java.util.*
import org.rs09.consts.Items
import content.global.skill.hunter.HunterNPC
/**
* Manages the players slayer data.
* @author Ceikry
@ -102,7 +104,9 @@ class SlayerManager(val player: Player? = null) : LoginListener, PersistPlayer,
val slayer = getInstance(player)
val flags = slayer.flags
var xp = npc.skills.maximumLifepoints.toDouble()
rewardXP(player, Skills.SLAYER, xp/3)
//Snowscape custom: grant a third of the normal slayer exp on all kills (this stacks with the exp from on-task kills)
if (npc !is HunterNPC)
rewardXP(player, Skills.SLAYER, xp/3)
if (slayer.hasTask() && npc.id in slayer.task!!.npcs) {