Fixed possible softlock at Evil Bob event
This commit is contained in:
@@ -22,10 +22,8 @@ class EvilBobDialogue(val rewardDialogue: Boolean = false, val rewardXpSkill: In
|
|||||||
} else if (getAttribute(player!!, EvilBobUtils.eventComplete, false)) {
|
} else if (getAttribute(player!!, EvilBobUtils.eventComplete, false)) {
|
||||||
sendDialogue(player!!, "Evil Bob appears to be sleeping, best not to wake him up.").also { stage = END_DIALOGUE }
|
sendDialogue(player!!, "Evil Bob appears to be sleeping, best not to wake him up.").also { stage = END_DIALOGUE }
|
||||||
} else if (removeItem(player!!, Items.RAW_FISHLIKE_THING_6200)) {
|
} else if (removeItem(player!!, Items.RAW_FISHLIKE_THING_6200)) {
|
||||||
setAttribute(player!!, EvilBobUtils.fishCaught, false)
|
|
||||||
playerl(FacialExpression.NEUTRAL, "Here, I've brought you some fish.").also { stage = 500 }
|
playerl(FacialExpression.NEUTRAL, "Here, I've brought you some fish.").also { stage = 500 }
|
||||||
} else if (removeItem(player!!, Items.RAW_FISHLIKE_THING_6204)) {
|
} else if (removeItem(player!!, Items.RAW_FISHLIKE_THING_6204)) {
|
||||||
setAttribute(player!!, EvilBobUtils.fishCaught, false)
|
|
||||||
setAttribute(player!!, EvilBobUtils.attentive, true)
|
setAttribute(player!!, EvilBobUtils.attentive, true)
|
||||||
setAttribute(player!!, EvilBobUtils.attentiveNewSpot, true)
|
setAttribute(player!!, EvilBobUtils.attentiveNewSpot, true)
|
||||||
playerl(FacialExpression.NEUTRAL, "Here, I've brought you some fish.").also { stage = 600 }
|
playerl(FacialExpression.NEUTRAL, "Here, I've brought you some fish.").also { stage = 600 }
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ class EvilBobListeners : InteractionListener, MapArea {
|
|||||||
sendNPCDialogue(player, NPCs.SERVANT_2481, "You'll need a fishing net. There are plenty scattered around the beach.", FacialExpression.SAD)
|
sendNPCDialogue(player, NPCs.SERVANT_2481, "You'll need a fishing net. There are plenty scattered around the beach.", FacialExpression.SAD)
|
||||||
} else if (freeSlots(player) == 0) {
|
} else if (freeSlots(player) == 0) {
|
||||||
sendDialogue(player, "You don't have enough space in your inventory.")
|
sendDialogue(player, "You don't have enough space in your inventory.")
|
||||||
} else if (getAttribute(player, EvilBobUtils.fishCaught, false)) {
|
} else if (inInventory(player, Items.FISHLIKE_THING_6202) || inInventory(player, Items.FISHLIKE_THING_6206) ||
|
||||||
|
inInventory(player, Items.RAW_FISHLIKE_THING_6200) || inInventory(player, Items.RAW_FISHLIKE_THING_6204)) {
|
||||||
sendNPCDialogue(player, NPCs.SERVANT_2481, "You've already got a fish. Come over here to uncook it, then serve it to Evil Bob.", FacialExpression.SAD)
|
sendNPCDialogue(player, NPCs.SERVANT_2481, "You've already got a fish. Come over here to uncook it, then serve it to Evil Bob.", FacialExpression.SAD)
|
||||||
} else {
|
} else {
|
||||||
lock(player, 6)
|
lock(player, 6)
|
||||||
@@ -68,7 +69,6 @@ class EvilBobListeners : InteractionListener, MapArea {
|
|||||||
}
|
}
|
||||||
sendItemDialogue(player, Items.FISHLIKE_THING_6202, "You catch a... what is this?? Is this a fish?? And it's cooked already??")
|
sendItemDialogue(player, Items.FISHLIKE_THING_6202, "You catch a... what is this?? Is this a fish?? And it's cooked already??")
|
||||||
resetAnimator(player)
|
resetAnimator(player)
|
||||||
setAttribute(player, EvilBobUtils.fishCaught, true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return@on true
|
return@on true
|
||||||
|
|||||||
Reference in New Issue
Block a user