summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-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;