forked from 2009Scape/Server
Fixed null pointer exception when runecrafting without a familiar
This commit is contained in:
parent
415aa512fb
commit
4053fdf43c
1 changed files with 6 additions and 4 deletions
|
|
@ -26,10 +26,12 @@ class SnowscapePouchListener : InteractionListener {
|
|||
// Called by the runecraft pulse
|
||||
fun emptyPouches(player: Player) {
|
||||
if (amountInInventory(player, Items.PURE_ESSENCE_7936) > 0 || amountInInventory(player, Items.RUNE_ESSENCE_1436) > 0) return
|
||||
|
||||
val familiar = player.getFamiliarManager().getFamiliar()
|
||||
if (familiar.isBurdenBeast() && (familiar as BurdenBeast).getContainer().containsAtLeastOneItem(Items.PURE_ESSENCE_7936)) {
|
||||
(familiar as BurdenBeast).transfer(Item(Items.PURE_ESSENCE_7936), 99, true)
|
||||
|
||||
if (player.getFamiliarManager().hasFamiliar()) {
|
||||
val familiar = player.getFamiliarManager().getFamiliar()
|
||||
if (familiar.isBurdenBeast() && (familiar as BurdenBeast).getContainer().containsAtLeastOneItem(Items.PURE_ESSENCE_7936)) {
|
||||
(familiar as BurdenBeast).transfer(Item(Items.PURE_ESSENCE_7936), 99, true)
|
||||
}
|
||||
}
|
||||
|
||||
for (pouchId in pouchIds) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue