summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-21 21:22:33 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-21 21:22:33 +0000
commit5fc47d9a1162c5ca8a246ad5ab21aad3dee94975 (patch)
treeb9b58015a2f3f02c9fcf8b68d40d1d975d31597c /src/map
parent1f9fc478094e84dd11618bdcd9d88d5daef0a9f1 (diff)
downloadhercules-5fc47d9a1162c5ca8a246ad5ab21aad3dee94975.tar.gz
hercules-5fc47d9a1162c5ca8a246ad5ab21aad3dee94975.tar.bz2
hercules-5fc47d9a1162c5ca8a246ad5ab21aad3dee94975.tar.xz
hercules-5fc47d9a1162c5ca8a246ad5ab21aad3dee94975.zip
* 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
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c20
1 files changed, 8 insertions, 12 deletions
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.hp<sd->battle_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;