summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-03 22:43:20 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-03 22:43:20 +0000
commit852b4f979beee36be105a0037279afdbc9ab8c3f (patch)
tree0d7c12c6f3423802c9f9115b0f0ce7bc716aad09
parentd6fde920ab2c2d98eb5e506c842ecdd9ca8db905 (diff)
downloadhercules-852b4f979beee36be105a0037279afdbc9ab8c3f.tar.gz
hercules-852b4f979beee36be105a0037279afdbc9ab8c3f.tar.bz2
hercules-852b4f979beee36be105a0037279afdbc9ab8c3f.tar.xz
hercules-852b4f979beee36be105a0037279afdbc9ab8c3f.zip
- Added a check to skip the experience share of characters who are dead or on another map.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8117 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/mob.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 496ddee9e..bcc43d65e 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/03
+ * Added a check to skip the experience share of characters who are dead or
+ on another map. [Skotlex]
* Reverted the previous change, chasewalk has no icon, only the str-bonus
has that fist icon now. [Skotlex]
* Allowed chase-walk to display a skill animation when using it. [Skotlex]
diff --git a/src/map/mob.c b/src/map/mob.c
index 8ce7785c0..70b0b0f0c 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1785,6 +1785,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
double per; //Your share of the mob's exp
int bonus; //Bonus on top of your share.
+ if (status_isdead(tmpbl[i]) || tmpbl[i]->m != md->bl.m)
+ continue; //When someone is dead or on another map, their share of exp is gone.
+
if (!battle_config.exp_calc_type && md->tdmg)
//jAthena's exp formula based on total damage.
per = (double)md->dmglog[i].dmg/(double)md->tdmg;