From f00d66aa89b5022dbc6d10f867acca2f72d8cf0c Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 4 Jan 2012 04:45:15 +0000 Subject: fixed grouprandomitem to always create unidentified items, bugreport:2802 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15382 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/script.c b/src/map/script.c index b03f0ede4..de130cd1d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5647,7 +5647,7 @@ BUILDIN_FUNC(getitem) nameid=conv_num(st,data); //Violet Box, Blue Box, etc - random item pick if( nameid < 0 ) { - nameid=itemdb_searchrandomid(-nameid); + nameid = -nameid; flag = 1; } if( nameid <= 0 || !itemdb_exists(nameid) ){ @@ -5746,7 +5746,7 @@ BUILDIN_FUNC(getitem2) c4=(short)script_getnum(st,10); if(nameid<0) { // ランダム - nameid=itemdb_searchrandomid(-nameid); + nameid = -nameid; flag = 1; } @@ -5951,7 +5951,7 @@ BUILDIN_FUNC(grouprandomitem) int group; group = script_getnum(st,2); - script_pushint(st,itemdb_searchrandomid(group)); + script_pushint(st,-itemdb_searchrandomid(group)); return 0; } @@ -5993,7 +5993,7 @@ BUILDIN_FUNC(makeitem) m=map_mapname2mapid(mapname); if(nameid<0) { // ランダム - nameid=itemdb_searchrandomid(-nameid); + nameid = -nameid; flag = 1; } -- cgit v1.2.3-70-g09d2