diff options
-rw-r--r-- | src/map/itemdb.c | 6 | ||||
-rw-r--r-- | src/map/itemdb.h | 2 | ||||
-rw-r--r-- | src/map/pc.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index bf23c5280..4e93dc309 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -101,16 +101,16 @@ int itemdb_searchrandomid(int group) /*========================================== * Calculates total item-group related bonuses for the given item *------------------------------------------*/ -int itemdb_group_bonus(const int itemgrouphealrate[MAX_ITEMGROUP], int itemid) +int itemdb_group_bonus(struct map_session_data* sd, int itemid) { int bonus = 0, i, j; for (i=0; i < MAX_ITEMGROUP; i++) { - if (!itemgrouphealrate[i]) + if (!sd->itemgrouphealrate[i]) continue; for (j=0; j < itemgroup_db[i].qty; j++) { if (itemgroup_db[i].nameid[j] == itemid) { - bonus += itemgrouphealrate[i]; + bonus += sd->itemgrouphealrate[i]; break; } } diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 1edd0f96f..425df63de 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -147,8 +147,8 @@ struct item_data* itemdb_exists(int nameid); #define itemdb_available(n) (itemdb_exists(n) && itemdb_search(n)->flag.available) #define itemdb_viewid(n) (itemdb_search(n)->view_id) #define itemdb_autoequip(n) (itemdb_search(n)->flag.autoequip) -int itemdb_group_bonus(const int itemgrouphealrate[MAX_ITEMGROUP], int itemid); +int itemdb_group_bonus(struct map_session_data* sd, int itemid); int itemdb_searchrandomid(int flags); #define itemdb_value_buy(n) itemdb_search(n)->value_buy diff --git a/src/map/pc.c b/src/map/pc.c index 8692599f1..127020e1e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5506,7 +5506,7 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp) if (potion_flag > 1) bonus += bonus*(potion_flag-1)*50/100; //Item Group bonuses - bonus += bonus*itemdb_group_bonus(sd->itemgrouphealrate, itemid)/100; + bonus += bonus*itemdb_group_bonus(sd, itemid)/100; //Individual item bonuses. for(i = 0; i < MAX_PC_BONUS && sd->itemhealrate[i].nameid; i++) { |