summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-08 15:11:25 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-08 15:11:25 +0000
commit0cd2095db1f8373b8b1b253ef850c2a4059316d0 (patch)
tree9ff401051665a8856cae8e128bde902db728d625 /src/map/status.c
parent210788081168459afc15b7f970d6ff6d60611a4e (diff)
downloadhercules-0cd2095db1f8373b8b1b253ef850c2a4059316d0.tar.gz
hercules-0cd2095db1f8373b8b1b253ef850c2a4059316d0.tar.bz2
hercules-0cd2095db1f8373b8b1b253ef850c2a4059316d0.tar.xz
hercules-0cd2095db1f8373b8b1b253ef850c2a4059316d0.zip
- Removed SP_DISGUISE from the bonus list.
- Moved Sharp Shooting display to the block with Auto-Counter (since that's the other skill that can show critical as well) - Corrected some fields in the still packet (guild emblem being stored as a Long when it should be Short) - Modified most fields of view_data to be unsigned shorts rather than signed ones. - On-Touch NPCs will now make you stop walking when you trigger them. - Reduced stun duration of most skills to 3 secs. - ShadowJump/JumpKick will make you land on the target's cell now. - Fixed Kaahi triggering only once per skill duration. - Added the kaahi_heal_timer to the list of status change functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6516 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 87142832a..18d10bd0a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1465,8 +1465,7 @@ int status_calc_pc(struct map_session_data* sd,int first)
// Skill-related HP recovery (only when sit)
if((skill=pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
sd->nsshealhp = skill*4 + (sd->status.max_hp*skill/500);
- if((skill=pc_checkskill(sd,TK_HPTIME)) > 0 &&
- (sd->state.rest || sd->sc.data[SC_TKREST].timer!=-1))
+ if((skill=pc_checkskill(sd,TK_HPTIME)) > 0 && sd->state.rest)
sd->nsshealhp = skill*30 + (sd->status.max_hp*skill/500);
if(sd->nshealhp > SHRT_MAX) sd->nshealhp = SHRT_MAX;
@@ -1535,8 +1534,7 @@ int status_calc_pc(struct map_session_data* sd,int first)
// Skill-related SP recovery (only when sit)
if((skill = pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
sd->nsshealsp = skill*2 + (sd->status.max_sp*skill/500);
- if((skill=pc_checkskill(sd,TK_SPTIME)) > 0 &&
- (sd->state.rest || sd->sc.data[SC_TKREST].timer!=-1))
+ if((skill=pc_checkskill(sd,TK_SPTIME)) > 0 && sd->state.rest)
{
sd->nsshealsp = skill*3 + (sd->status.max_sp*skill/500);
if ((skill=pc_checkskill(sd,SL_KAINA)) > 0) //Power up Enjoyable Rest
@@ -3894,6 +3892,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
status_change_end(bl,SC_DECREASEAGI,-1);
return 0;
}
+ break;
case SC_FUSION:
if(sc->data[SC_SPIRIT].timer!=-1 )
status_change_end(bl,SC_SPIRIT,-1);
@@ -5394,9 +5393,17 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, int data)
sc=status_get_sc(bl);
if (!sc || data != SC_KAAHI || sc->data[data].timer==-1)
return 0;
-
- if (bl->type == BL_PC && ((TBL_PC*)bl)->status.sp < sc->data[data].val3)
+ if(sc->data[data].val4 != tid) {
+ if (battle_config.error_log)
+ ShowError("kaahi_heal_timer: Timer mismatch: %d != %d\n", tid, sc->data[data].val4);
+ sc->data[data].val4=-1;
+ return 0;
+ }
+
+ if (bl->type == BL_PC && ((TBL_PC*)bl)->status.sp < sc->data[data].val3) {
+ sc->data[data].val4=-1;
return 0;
+ }
hp = status_get_max_hp(bl) - status_get_hp(bl);
if (hp > sc->data[data].val2)
@@ -5405,6 +5412,7 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, int data)
battle_heal(bl, bl, hp, -sc->data[data].val3, 1);
clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
}
+ sc->data[data].val4=-1;
return 1;
}
@@ -6097,6 +6105,7 @@ int do_init_status(void)
exit(1);
}
add_timer_func_list(status_change_timer,"status_change_timer");
+ add_timer_func_list(kaahi_heal_timer,"kaahi_heal_timer");
initChangeTables();
status_readdb();
status_calc_sigma();