mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 05:20:22 -07:00
Add slayer task content API functions in preparation for coming work
This commit is contained in:
parent
b094fe5b0c
commit
c3a37d5cbf
1 changed files with 22 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ import rs09.game.content.dialogue.DialogueFile
|
||||||
import rs09.game.content.dialogue.SkillDialogueHandler
|
import rs09.game.content.dialogue.SkillDialogueHandler
|
||||||
import rs09.game.content.global.GlobalKillCounter
|
import rs09.game.content.global.GlobalKillCounter
|
||||||
import rs09.game.interaction.InteractionListeners
|
import rs09.game.interaction.InteractionListeners
|
||||||
|
import rs09.game.node.entity.skill.slayer.SlayerManager
|
||||||
import rs09.game.system.SystemLogger
|
import rs09.game.system.SystemLogger
|
||||||
import rs09.game.system.config.ItemConfigParser
|
import rs09.game.system.config.ItemConfigParser
|
||||||
import rs09.game.system.config.ServerConfigParser
|
import rs09.game.system.config.ServerConfigParser
|
||||||
|
|
@ -1564,3 +1565,24 @@ fun getPathableRandomLocalCoordinate(target: Entity, radius: Int, center: Locati
|
||||||
|
|
||||||
return target.location
|
return target.location
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the name of the player's active slayer task.
|
||||||
|
* @author bushtail
|
||||||
|
* @param player the player whose task we are checking.
|
||||||
|
* @return the name of the slayer task.
|
||||||
|
*/
|
||||||
|
fun getSlayerTaskName(player : Player) : String {
|
||||||
|
return SlayerManager.getInstance(player).taskName
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the player's remaining kills for their active slayer task.
|
||||||
|
* @author bushtail
|
||||||
|
* @param player the player whose task we are checking.
|
||||||
|
* @return the remaining kills of the slayer task.
|
||||||
|
*/
|
||||||
|
fun getSlayerTaskKillsRemaining(player : Player) : Int {
|
||||||
|
return SlayerManager.getInstance(player).amount
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue