Skip to content

Commit

Permalink
Brodomir cave: on reward, skip calling getitem if there is no item to…
Browse files Browse the repository at this point in the history
… give.
  • Loading branch information
vincent-petithory committed May 4, 2013
1 parent e364c11 commit 262912f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion world/map/npc/009-6/brodomir.txt
Expand Up @@ -170,7 +170,7 @@ L_Warp:

L_Warpfail:
mapannounce "009-6.gat", "There are not enough players around to start!", 0;
if ($@BRODOMIR_ITEM_AMOUNT == 0)
if ($@BRODOMIR_ITEM_AMOUNT == 0 || $@BRODOMIR_ITEM$ == "")
goto L_Cleanup;
if (attachrid($@BRODOMIR_SPONSOR) == 0)
goto L_SkipItemback;
Expand Down Expand Up @@ -199,6 +199,8 @@ onReward:
goto L_Dead;
message strcharinfo(0), "Congratulations you won!";
set Zeny, Zeny + ($@BRODOMIR_MONEY + 150 * $@BRODOMIR_PLAYERS);
if ($@BRODOMIR_ITEM_AMOUNT == 0 || $@BRODOMIR_ITEM$ == "")
goto L_SkipItem;

// we need this loop because for items that can't be stacked, getitem will stack them nevertheless
L_Getitem:
Expand All @@ -207,6 +209,7 @@ L_Getitem:
if ($@BRODOMIR_ITEM_AMOUNT > 0)
goto L_Getitem;

L_SkipItem:
set $@BRODOMIR_ITEM$, "";
set $@BRODOMIR_SPONSOR, 0;
set $@BRODOMIR_MONEY, 0;
Expand Down

0 comments on commit 262912f

Please sign in to comment.