summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 972d351a5..3c2e75810 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -3,6 +3,7 @@
#include "../common/nullpo.h"
#include "../common/malloc.h"
+#include "../common/random.h"
#include "../common/showmsg.h"
#include "../common/strlib.h"
#include "itemdb.h"
@@ -144,7 +145,7 @@ int itemdb_searchrandomid(int group)
return UNKNOWN_ITEM_ID;
}
if (itemgroup_db[group].qty)
- return itemgroup_db[group].nameid[rand()%itemgroup_db[group].qty];
+ return itemgroup_db[group].nameid[rnd()%itemgroup_db[group].qty];
ShowError("itemdb_searchrandomid: No item entries for group id %d\n", group);
return UNKNOWN_ITEM_ID;