From fa0c6f874cb85db8cac41bf3a7be260686239e65 Mon Sep 17 00:00:00 2001 From: ultramage Date: Thu, 10 Jan 2008 15:35:23 +0000 Subject: Another round of login server cleaning * fixed passwordencrypt on SQL not behaving correctly (since r10753) * corrected some column lengths in the login db (username, password,...) * fixed some places which used wfifo without first reallocating it * removed interserver packet 0x7532 (Request to end connection), as there was no code that actually sent this packet * moved RFIFOSKIP actions to execute as soon as possible git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12043 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/itemdb.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/map/itemdb.c') 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; } -- cgit v1.2.3-70-g09d2