forked from 2009Scape/Server
Implemented drop summoning pets
This commit is contained in:
parent
c20770fcb3
commit
f613fb13cd
1 changed files with 6 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ import core.game.node.entity.player.link.audio.Audio
|
|||
import core.game.node.item.GroundItemManager
|
||||
import core.game.node.item.Item
|
||||
import core.game.system.config.ItemConfigParser
|
||||
import content.global.skill.summoning.pet.Pets
|
||||
import org.rs09.consts.Items
|
||||
|
||||
/**
|
||||
|
|
@ -34,6 +35,10 @@ class DropListener : InteractionListener {
|
|||
val option = getUsedOption(player)
|
||||
var item = node as? Item ?: return false
|
||||
if (option == "drop") {
|
||||
if (Pets.forId(item.id) != null) {
|
||||
player.familiarManager.summon(item, true, true)
|
||||
return true
|
||||
}
|
||||
if (GraveController.hasGraveAt(player.location)) {
|
||||
sendMessage(player, "You cannot drop items on top of graves!")
|
||||
return false
|
||||
|
|
@ -63,4 +68,4 @@ class DropListener : InteractionListener {
|
|||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue