forked from 2009Scape/Server
Fixed getting slayer exp from hunting
This commit is contained in:
parent
d92a3f3a8e
commit
9143cd5f47
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue