diff options
author | Stefan Beller <stefanbeller@googlemail.com> | 2011-02-27 10:37:13 +0100 |
---|---|---|
committer | Stefan Beller <stefanbeller@googlemail.com> | 2011-02-27 10:43:20 +0100 |
commit | 877018d1296c984afe72b79f076265d6d27c3a7c (patch) | |
tree | 39588fc26059c99fc2e8799cb0b5604d7e9e7979 /src/map/script.c | |
parent | a3c9810fdc9d090d02c75dce7a261c64d192502d (diff) | |
download | tmwa-877018d1296c984afe72b79f076265d6d27c3a7c.tar.gz tmwa-877018d1296c984afe72b79f076265d6d27c3a7c.tar.bz2 tmwa-877018d1296c984afe72b79f076265d6d27c3a7c.tar.xz tmwa-877018d1296c984afe72b79f076265d6d27c3a7c.zip |
making buildin_getareadropitems last argument optional
buildin_getareadropitem takes at last argument, if the items should be deleted.
This is now optional
Reviewed by: Jessica Tölke
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index fc0169b..00f4b0b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -551,7 +551,7 @@ struct { buildin_getareausers, "getareausers", "siiii"}, { - buildin_getareadropitem, "getareadropitem", "siiiiii"}, + buildin_getareadropitem, "getareadropitem", "siiiii*"}, { buildin_enablenpc, "enablenpc", "s"}, { @@ -4769,7 +4769,8 @@ int buildin_getareadropitem (struct script_state *st) else item = conv_num (st, data); - delitems = conv_num (st, &(st->stack->stack_data[st->start + 8])); + if (st->end > st->start + 8) + delitems = conv_num (st, &(st->stack->stack_data[st->start + 8])); if ((m = map_mapname2mapid (str)) < 0) { |