diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-09-16 11:04:07 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-09-16 11:28:50 -0700 |
commit | c8f2dea0bd0068aac6f59a5053d4f0576f21bb23 (patch) | |
tree | 6fd01d79a602924b9c56e9e7b8ef014bcdbce6a1 /world/map/npc/027-1 | |
parent | 1f30542a2d0a10e1834bac8d83fb210afc3d618f (diff) | |
download | serverdata-c8f2dea0bd0068aac6f59a5053d4f0576f21bb23.tar.gz serverdata-c8f2dea0bd0068aac6f59a5053d4f0576f21bb23.tar.bz2 serverdata-c8f2dea0bd0068aac6f59a5053d4f0576f21bb23.tar.xz serverdata-c8f2dea0bd0068aac6f59a5053d4f0576f21bb23.zip |
Refactor all broken returns into goto L_Return
Diffstat (limited to 'world/map/npc/027-1')
-rw-r--r-- | world/map/npc/027-1/graves.txt | 5 | ||||
-rw-r--r-- | world/map/npc/027-1/monsters.txt | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/world/map/npc/027-1/graves.txt b/world/map/npc/027-1/graves.txt index b4d9e273..5f522e15 100644 --- a/world/map/npc/027-1/graves.txt +++ b/world/map/npc/027-1/graves.txt @@ -3,9 +3,12 @@ function|script|GraveTooFar|, { if (isin("027-1.gat",89,54,122,76)) - return; + goto L_Return; mes "You are too far away to read the grave."; close; + +L_Return: + return; } 027-1.gat,89,62,0|script|Grave#1|400, diff --git a/world/map/npc/027-1/monsters.txt b/world/map/npc/027-1/monsters.txt index 8daed98c..4b6fdfba 100644 --- a/world/map/npc/027-1/monsters.txt +++ b/world/map/npc/027-1/monsters.txt @@ -28,12 +28,12 @@ _MOBCOUNT_ZOMBIES: set @state, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); if (@state != 1) - return; + goto L_Return; set @ring, @ring + 1; if (@ring < 10) - return; + goto L_Return; if (rand(8) != 0) - return; + goto L_Return; message strcharinfo(0), "You found a ring hidden in the zombie's rotten rags. Maybe this is what Aldred was looking for..."; set @state, 2; callsub S_Update_Mask; @@ -47,17 +47,20 @@ _MOBCOUNT_FALLENS: set @state, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT); if (@state != 1) - return; + goto L_Return; set @ring, @ring + 1; if (@ring < 10) - return; + goto L_Return; if (rand(8) != 0) - return; + goto L_Return; message strcharinfo(0), "You found a ring inside the fallen's broken helmet. Maybe this is what Aldred was looking for..."; set @state, 2; callsub S_Update_Mask; return; +L_Return: + return; + S_Update_Mask: set QUEST_Graveyard_Inn, (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK)) |