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.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index b27074866..fcd6c804d 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -161,13 +161,9 @@ int itemdb_group_bonus(struct map_session_data* sd, int itemid)
for (i=0; i < MAX_ITEMGROUP; i++) {
if (!sd->itemgrouphealrate[i])
continue;
- for (j=0; j < itemgroup_db[i].qty; j++) {
- if (itemgroup_db[i].nameid[j] == itemid)
- {
- bonus += sd->itemgrouphealrate[i];
- break;
- }
- }
+ ARR_FIND( 0, itemgroup_db[i].qty, j, itemgroup_db[i].nameid[j] == itemid );
+ if( j < itemgroup_db[i].qty )
+ bonus += sd->itemgrouphealrate[i];
}
return bonus;
}