From c8f2dea0bd0068aac6f59a5053d4f0576f21bb23 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 16 Sep 2013 11:04:07 -0700 Subject: Refactor all broken returns into goto L_Return --- world/map/npc/018-2/caul.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'world/map/npc/018-2') diff --git a/world/map/npc/018-2/caul.txt b/world/map/npc/018-2/caul.txt index 8da98bdc..a599f5f8 100644 --- a/world/map/npc/018-2/caul.txt +++ b/world/map/npc/018-2/caul.txt @@ -438,15 +438,16 @@ L_monster_oil_pc_bad_ok: L_monster_oil_auto_bad: if (rand(3) == 0) - return; + goto L_Return; if (rand(readparam(bInt) + 100) > 70) - return; + goto L_Return; mes "The brew begins to bubble more violently."; set @bubble_mode, @bubble_mode + 1; if (@bubble_mode > 2) next; if (@bubble_mode > 2) goto L_monster_oil_explode; + return; L_monster_oil_explode: @@ -1001,7 +1002,7 @@ L_check_explosion: L_check_exp_nof: // in about 95% of the cases anything is fine, so return. - if (rand(1000) > @prob) return; + if (rand(1000) > @prob) goto L_Return; // in some cases it is not: // kabooom! close2; @@ -1069,6 +1070,9 @@ L_close: set @inspector, 0; close; +L_Return: + return; + S_Update_Var: set QUEST_Forestbow_state, (QUEST_Forestbow_state & ~(@Q_MASK) -- cgit v1.2.3-60-g2f50