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 --- Changelog-Trunk.txt | 5 ++++- src/map/pc.c | 20 ++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index adffe8993..bf796d77f 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,8 +3,11 @@ 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. -2008/04/19 +2008/04/21 + * Rev. 12631 Changed Sacrifice status to end on caster's death, not at 25% HP. [L0ne_W0lf] + - Should also fix over-flow damage returning to sacrificed targets. Partially fixes bugreport:1332 * Updated sql files to latest [Toms] +2008/04/19 * Made some cleanup in changesex [Toms] * Fixed a bug in (init/start/stop)npctimer [Toms] 2008/04/18 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