diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-22 03:11:04 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-22 03:11:04 +0000 |
commit | ba64401d27d855d33280015e3bea523aeda0af37 (patch) | |
tree | 1d0b4692072393149aa5afb38985c2b87f63379e /src/map/mob.c | |
parent | 44f70b76b2048b175e7454014c65a4f455850267 (diff) | |
download | hercules-ba64401d27d855d33280015e3bea523aeda0af37.tar.gz hercules-ba64401d27d855d33280015e3bea523aeda0af37.tar.bz2 hercules-ba64401d27d855d33280015e3bea523aeda0af37.tar.xz hercules-ba64401d27d855d33280015e3bea523aeda0af37.zip |
- Corrected crash if itemskill is used without an attached player.
- Removed range checks for autospells as per UltraMage Aegis tests.
- Added chatID skill fail check to skill_check_condition
- Corrected @refresh not re-displaying your spirit spheres nor re-setting your cloth dye.
- Now the "number of attackers" in mob_dead is counted only from online characters on the same map.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10307 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index e211faf2e..63bd76d91 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1790,12 +1790,18 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } } - for(i=0,mvp_damage=0;i<DAMAGELOG_SIZE && md->dmglog[i].id;i++) + for(i=count=0,mvp_damage=0;i<DAMAGELOG_SIZE && md->dmglog[i].id;i++) { tmpsd[i] = map_charid2sd(md->dmglog[i].id); if(tmpsd[i] == NULL) continue; - if(tmpsd[i]->bl.m != m || pc_isdead(tmpsd[i])) + if(tmpsd[i]->bl.m != m) + { + tmpsd[i] = NULL; + continue; + } + count++; //Only logged into same map chars are counted for the total. + if (pc_isdead(tmpsd[i])) { tmpsd[i] = NULL; continue; @@ -1805,7 +1811,6 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) tmpsd[i] = NULL; continue; } - if(mvp_damage<(unsigned int)md->dmglog[i].dmg){ third_sd = second_sd; second_sd = mvp_sd; @@ -1813,7 +1818,6 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) mvp_damage=md->dmglog[i].dmg; } } - count = i; //Total number of attackers. if(!battle_config.exp_calc_type && count > 1) { //Apply first-attacker 200% exp share bonus |