From 5fc47d9a1162c5ca8a246ad5ab21aad3dee94975 Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Mon, 21 Apr 2008 21:22:33 +0000 Subject: * Changed Sacrifice status to end on caster's death, not at 25% HP. - Should also fix over-flow damage returning to sacrificed targets. Partially fixes bugreport:1332 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12631 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/map') diff --git a/src/map/pc.c b/src/map/pc.c index 4d64a3182..be9b6bde2 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4936,17 +4936,6 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h clif_updatestatus(sd,SP_HP); - if (sd->battle_status.hpbattle_status.max_hp>>2) - { //25% HP left effects. - int i=0; - for(i = 0; i < 5; i++) - if (sd->devotion[i]){ - struct map_session_data *devsd = map_id2sd(sd->devotion[i]); - if (devsd) status_change_end(&devsd->bl,SC_DEVOTION,-1); - sd->devotion[i] = 0; - } - } - if(!src || src == &sd->bl) return; @@ -4959,12 +4948,19 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h int pc_dead(struct map_session_data *sd,struct block_list *src) { - int i=0,j=0; + int i=0,j=0,k=0; unsigned int tick = gettick(); if(sd->vender_id) vending_closevending(sd); + for(k = 0; k < 5; k++) + if (sd->devotion[k]){ + struct map_session_data *devsd = map_id2sd(sd->devotion[k]); + if (devsd) status_change_end(&devsd->bl,SC_DEVOTION,-1); + sd->devotion[k] = 0; + } + if(sd->status.pet_id > 0 && sd->pd) { struct s_pet *pet = &sd->pd->pet; -- cgit v1.2.3-70-g09d2