summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-13 18:50:35 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-13 18:50:35 +0000
commitf1a641e260f983fa0f5d0e1b4d8097f2c7fc5432 (patch)
tree04ef48d46927e6a1cf6edbc91dd368653210b590 /src/map/pc.c
parente99a963da3b832e442003ef53ef94375d34a8417 (diff)
downloadhercules-f1a641e260f983fa0f5d0e1b4d8097f2c7fc5432.tar.gz
hercules-f1a641e260f983fa0f5d0e1b4d8097f2c7fc5432.tar.bz2
hercules-f1a641e260f983fa0f5d0e1b4d8097f2c7fc5432.tar.xz
hercules-f1a641e260f983fa0f5d0e1b4d8097f2c7fc5432.zip
- Shield Reflect is now passed through Devotion as well.
- Devotion won't work on guildmates now (only party-members) - Devoted to characters lose the devotion effect when the Crusader is at less than 25% Hp. - Changed Gravity Field's element to earth so that it may hit hidden chars. - chrif_scdata_save will not send a save scdata request when the char has been already tagged as in the final save. - Cleaned up status_change_start a bit to make status_change_end calls on a separate switch, before it is cancelled by the switch about "sc already active". If it fails because the sc is already active, now it returns 1. - Cleaned SC_SUITON a bit to get rid of that compile warning. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5589 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index af5e362e0..e20f15f75 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2145,11 +2145,11 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4
switch(type){
case SP_AUTOSPELL:
if(sd->state.lr_flag != 2)
- pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, val?type2:-type2, type3, type4, current_equip_card_id);
+ pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, (val?type2:-type2), type3, type4, current_equip_card_id);
break;
case SP_AUTOSPELL_WHENHIT:
if(sd->state.lr_flag != 2)
- pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, val?type2:-type2, type3, type4, current_equip_card_id);
+ pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, (val?type2:-type2), type3, type4, current_equip_card_id);
break;
default:
if(battle_config.error_log)
@@ -5272,14 +5272,21 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
clif_updatestatus(sd,SP_HP);
- if(sd->status.hp>0){
- if(sd->status.hp<sd->status.max_hp>>2 && sd->sc.data[SC_AUTOBERSERK].timer != -1 &&
+
+ if (sd->status.hp<sd->status.max_hp>>2) { //25% HP left effects.
+ if(sd->status.hp>0 && sd->sc.data[SC_AUTOBERSERK].timer != -1 &&
(sd->sc.data[SC_PROVOKE].timer==-1 || sd->sc.data[SC_PROVOKE].val2==0 ))
- // オ?トバ?サ?ク?動
sc_start4(&sd->bl,SC_PROVOKE,100,10,1,0,0,0);
- sd->canlog_tick = gettick();
+ 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);
+ }
+ }
+ if(sd->status.hp>0){
+ sd->canlog_tick = gettick();
return damage;
}
@@ -5416,12 +5423,6 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
sd->state.snovice_flag = 4;
}
- 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);
- }
-
pc_setdead(sd);
skill_unit_move(&sd->bl,gettick(),4);
if (battle_config.clear_unit_ondeath)