summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/pc.c3
2 files changed, 3 insertions, 2 deletions
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;