Explorar el Código

- Added a check to skip the experience share of characters who are dead or on another map.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8117 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex hace 19 años
padre
commit
da6ee09ccc
Se han modificado 2 ficheros con 5 adiciones y 0 borrados
  1. 2 0
      Changelog-Trunk.txt
  2. 3 0
      src/map/mob.c

+ 2 - 0
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]

+ 3 - 0
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;