diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-23 20:09:48 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-23 20:09:48 +0000 |
commit | 3a582ad4976cd2672e22a33cd738346e5e09a9bd (patch) | |
tree | 96c96053b68a39b88c7d02d223a0121068360afd | |
parent | 4a1f72fa69ae327bad1d6608a307a625d2c687f2 (diff) | |
download | hercules-3a582ad4976cd2672e22a33cd738346e5e09a9bd.tar.gz hercules-3a582ad4976cd2672e22a33cd738346e5e09a9bd.tar.bz2 hercules-3a582ad4976cd2672e22a33cd738346e5e09a9bd.tar.xz hercules-3a582ad4976cd2672e22a33cd738346e5e09a9bd.zip |
* Added jA 1084's fix to mob.c
* Changed pc_alive_timer to use map_id2sd - should be more accurate
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@758 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog.txt | 3 | ||||
-rw-r--r-- | src/map/mob.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/Changelog.txt b/Changelog.txt index df0e9f718..bc3e0efda 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,8 @@ Date Added 12/23 + * Changed pc_alive_timer to use map_id2sd - should be more accurate [celest] + * Added jA 1084's fix to mob.c - check whether the player is still alive + when calculating exp [celest] * Added clif_changed_dir, clif_adopt_process [celest] * updated Backstab to show the target's new direction [celest] * Corrected the file types of several files in the SVN tree to diff --git a/src/map/mob.c b/src/map/mob.c index f65e27bc0..e8cef9730 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2362,7 +2362,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type) int pid,base_exp,job_exp,flag=1,zeny=0; double per; struct party *p; - if(tmpsd[i]==NULL || tmpsd[i]->bl.m != md->bl.m) + if(tmpsd[i]==NULL || tmpsd[i]->bl.m != md->bl.m || pc_isdead(tmpsd[i])) continue; /* jAthena's exp formula // per = ((double)md->dmglog[i].dmg)*(9.+(double)((count > 6)? 6:count))/10./((double)max_hp) * dmg_rate; diff --git a/src/map/pc.c b/src/map/pc.c index 09ff43733..151ec47a3 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7853,7 +7853,8 @@ int map_night_timer(int tid, unsigned int tick, int id, int data) { // by [yor] */ int pc_alive_timer(int tid,unsigned int tick,int id,int data) { - struct map_session_data *sd=(struct map_session_data*)map_id2bl(id); + //struct map_session_data *sd=(struct map_session_data*)map_id2bl(id); + struct map_session_data *sd=map_id2sd(id); // more accurate [celest] nullpo_retr(0, sd); if(sd->alive_timer != tid) return 0; |