summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-04 04:45:15 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-04 04:45:15 +0000
commitf00d66aa89b5022dbc6d10f867acca2f72d8cf0c (patch)
treee745488bcb9014af33399a73a21115d62972da74 /src
parent40a6a7e1c90c52a9e69c5ca6532235d53131fc93 (diff)
downloadhercules-f00d66aa89b5022dbc6d10f867acca2f72d8cf0c.tar.gz
hercules-f00d66aa89b5022dbc6d10f867acca2f72d8cf0c.tar.bz2
hercules-f00d66aa89b5022dbc6d10f867acca2f72d8cf0c.tar.xz
hercules-f00d66aa89b5022dbc6d10f867acca2f72d8cf0c.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c8
1 files changed, 4 insertions, 4 deletions
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;
}