From fe84618e4c80ee808cf7beed0e2a5d3e57bc8975 Mon Sep 17 00:00:00 2001 From: Inkfish Date: Sun, 13 Sep 2009 08:31:19 +0000 Subject: * Progressbar aborts when player is attacked. * Do not stand if damage is from yourself or has no source.(bugreport:3582) * Any mobs killed by party members within view range are taken into account in questlog. * 'unit_walktobl' now uses at least 1 as the range since 'unit_can_reach_bl' always sets the target coordinates 1 cell away from the target block. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14057 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index acd583ca1..d0a6d0124 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5375,23 +5375,25 @@ static int pc_respawn_timer(int tid, unsigned int tick, int id, intptr data) void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp) { if (sp) clif_updatestatus(sd,SP_SP); - if (!hp) return; + if (hp) clif_updatestatus(sd,SP_HP); + else return; + + if( !src || src == &sd->bl ) + return; - if(pc_issit(sd)) { + if( pc_issit(sd) ) + { pc_setstand(sd); skill_sit(sd,0); } - clif_updatestatus(sd,SP_HP); + if( sd->progressbar.npc_id ) + clif_progressbar_abort(sd); - if(!src || src == &sd->bl) - return; - - if(sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support) + if( sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support ) pet_target_check(sd,src,1); sd->canlog_tick = gettick(); - return; } int pc_dead(struct map_session_data *sd,struct block_list *src) -- cgit v1.2.3-70-g09d2