From ce3282b903cd137e6091619fe3b7d716a942bd88 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 4 Jan 2019 22:42:06 -0200 Subject: Fix edge cases on Peter which could cause server to crash --- npc/002-1/peter.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'npc/002-1') diff --git a/npc/002-1/peter.txt b/npc/002-1/peter.txt index ea71fd4bf..eed98a55c 100644 --- a/npc/002-1/peter.txt +++ b/npc/002-1/peter.txt @@ -34,7 +34,7 @@ OnTouch: .@q3 = getq3(ShipQuests_Peter); if (BaseLevel < 8) goto L_Stop; - if (.@q && isinstance(.@q3)) goto L_Rfail; + if (.@q && isinstance(.@q3) && .@q3 > 0) goto L_Rfail; doevent "Peter::OnGiveTask"; close; @@ -53,7 +53,7 @@ L_Rfail: .@q3 = getq3(ShipQuests_Peter); if (BaseLevel < 8) goto OnTooWeak; - if (!.@q || !isinstance(.@q3)) goto L_Task; + if (!.@q || !isinstance(.@q3) || .@q3 == 0) goto L_Task; if (.@q2 < 15) goto L_ReturnFail; dispbottom l("I am broken?! Please report! Debug data: @@ (@@)", .@q, .@q2); close; @@ -138,6 +138,7 @@ L_BonusTask: mes l("I'll give you @@ GP for this job.", 1000); mes ""; } + // TODO: This could be done a daily quest if (.@q == 15) { mes l("- I currently need your help with @@, but there's no reward.", getmonsterlink(Ratto)); } -- cgit v1.2.3-60-g2f50