diff options
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r-- | src/map/itemdb.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index d575e8a77..91ec58c81 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -26,9 +26,9 @@ static struct dbt* item_db; -static struct random_item_data blue_box[MAX_RANDITEM],violet_box[MAX_RANDITEM],card_album[MAX_RANDITEM],gift_box[MAX_RANDITEM],scroll[MAX_RANDITEM]; -static int blue_box_count=0,violet_box_count=0,card_album_count=0,gift_box_count=0,scroll_count=0; -static int blue_box_default=0,violet_box_default=0,card_album_default=0,gift_box_default=0,scroll_default=0; +static struct random_item_data blue_box[MAX_RANDITEM], violet_box[MAX_RANDITEM], card_album[MAX_RANDITEM], gift_box[MAX_RANDITEM], scroll[MAX_RANDITEM], finding_ore[MAX_RANDITEM]; +static int blue_box_count=0, violet_box_count=0, card_album_count=0, gift_box_count=0, scroll_count=0, finding_ore_count = 0; +static int blue_box_default=0, violet_box_default=0, card_album_default=0, gift_box_default=0, scroll_default=0, finding_ore_default = 0; // Function declarations @@ -102,7 +102,7 @@ int itemdb_searchrandomid(int flags) struct { int nameid,count; struct random_item_data *list; - } data[6]; + } data[7]; // for BCC32 compile error data[0].nameid = 0; data[0].count = 0; data[0].list = NULL; @@ -111,8 +111,9 @@ int itemdb_searchrandomid(int flags) data[3].nameid = card_album_default; data[3].count = card_album_count; data[3].list = card_album; data[4].nameid = gift_box_default; data[4].count = gift_box_count; data[4].list = gift_box; data[5].nameid = scroll_default; data[5].count = scroll_count; data[5].list = scroll; + data[6].nameid = finding_ore_default; data[6].count = finding_ore_count; data[6].list = finding_ore; - if(flags>=1 && flags<=5){ + if(flags>=1 && flags<=6){ nameid=data[flags].nameid; count=data[flags].count; list=data[flags].list; @@ -410,8 +411,9 @@ static int itemdb_read_randomitem() {"db/item_bluebox.txt", blue_box, &blue_box_count, &blue_box_default }, {"db/item_violetbox.txt", violet_box, &violet_box_count, &violet_box_default }, {"db/item_cardalbum.txt", card_album, &card_album_count, &card_album_default }, - {"db/item_giftbox.txt", gift_box, &gift_box_count, &gift_box_default }, - {"db/item_scroll.txt", scroll, &scroll_count, &scroll_default }, + {"db/item_giftbox.txt", gift_box, &gift_box_count, &gift_box_default }, + {"db/item_scroll.txt", scroll, &scroll_count, &scroll_default }, + {"db/item_findingore.txt", finding_ore,&finding_ore_count, &finding_ore_default }, }; for(i=0;i<sizeof(data)/sizeof(data[0]);i++){ |