From ff35e6448d38510b727c2f381260aac9969cf784 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 4 Sep 2007 05:21:17 +0000 Subject: - Removed usage of MAX_PC_BONUS all over the code, it is now only used in map.h (this is done so that individual bonuses can have their array length modified without having to change all the other bonuses as well). - Removed bonus bAddDamageByClass since it is not needed, and implemented bAddDefClass which can be used for the same (but previously was doing nothing). - Cleaned up the weapon_data structure to use a sub-structure to hold the add_dmg information. - Cleaned up some of the add dmg/def bonuses so the 'count' variable is not needed anymore. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11121 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index 1802500cc..cd1fe1cc7 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2007,10 +2007,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) if(sd) { // process script-granted extra drop bonuses int itemid = 0; - for (i = 0; i < sd->add_drop_count; i++) + for (i = 0; i < ARRAYLENGTH(sd->add_drop) && (sd->add_drop[i].id || sd->add_drop[i].group); i++) { - if (sd->add_drop[i].id < 0) - continue; if (sd->add_drop[i].race & (1<race) || sd->add_drop[i].race & 1<<(status->mode&MD_BOSS?RC_BOSS:RC_NONBOSS)) { -- cgit v1.2.3-60-g2f50