diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-11 06:08:50 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-11 06:08:50 +0000 |
commit | e916abd7b1e3bc8ddd27c827e132400816513029 (patch) | |
tree | 12a9d4bb26cf17011afdb3e2429bc908c4e8b3ff /src | |
parent | 47152b35f71d694faaa7339b125aca2a2a51ad4e (diff) | |
download | hercules-e916abd7b1e3bc8ddd27c827e132400816513029.tar.gz hercules-e916abd7b1e3bc8ddd27c827e132400816513029.tar.bz2 hercules-e916abd7b1e3bc8ddd27c827e132400816513029.tar.xz hercules-e916abd7b1e3bc8ddd27c827e132400816513029.zip |
Fixed bugreport:5524 Epiclesis now heals every 3 seconds instead of 1.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15851 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index dec212257..d3ddc5562 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10465,26 +10465,25 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns case UNT_EPICLESIS: if( bl->type == BL_PC && !battle_check_undead(tstatus->race, tstatus->def_ele) && tstatus->race != RC_DEMON ) { - int hp, sp; - switch( sg->skill_lv ) - { - case 1: case 2: hp = 3; sp = 2; break; - case 3: case 4: hp = 4; sp = 3; break; - case 5: default: hp = 5; sp = 4; break; + if( ++sg->val2 % 3 == 0 ) { + int hp, sp; + switch( sg->skill_lv ) + { + case 1: case 2: hp = 3; sp = 2; break; + case 3: case 4: hp = 4; sp = 3; break; + case 5: default: hp = 5; sp = 4; break; + } + hp = tstatus->max_hp * hp / 100; + sp = tstatus->max_sp * sp / 100; + status_heal(bl, hp, sp, 0); + if( tstatus->hp < tstatus->max_hp ) + clif_skill_nodamage(&src->bl, bl, AL_HEAL, hp, 1); + if( tstatus->sp < tstatus->max_sp ) + clif_skill_nodamage(&src->bl, bl, MG_SRECOVERY, sp, 1); + sc_start(bl, type, 100, sg->skill_lv, (sg->interval * 3) + 100); } - hp = tstatus->max_hp * hp / 100; - sp = tstatus->max_sp * sp / 100; - status_heal(bl, hp, sp, 0); - if( tstatus->hp < tstatus->max_hp ) - clif_skill_nodamage(&src->bl, bl, AL_HEAL, hp, 1); - if( tstatus->sp < tstatus->max_sp ) - clif_skill_nodamage(&src->bl, bl, MG_SRECOVERY, sp, 1); - sc_start(bl, type, 100, sg->skill_lv, sg->interval + 100); - sg->val2++; // Reveal hidden players every 5 seconds. - if( sg->val2 >= 5 ) - { - sg->val2 = 0; + if( sg->val2 % 5 == 0 ) { // TODO: check if other hidden status can be removed. status_change_end(bl,SC_HIDING,-1); status_change_end(bl,SC_CLOAKING,-1); |