diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-21 19:36:13 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-21 19:36:13 +0000 |
commit | 02f26bfab461a31f5890b4ab2f58b77f5404abf5 (patch) | |
tree | df70c3650ff40ce19274cab3e3388a91d93bc82f /src/map/pc.c | |
parent | 42d26584d4b8e0bfb3c50bdd5112a4c29003ea42 (diff) | |
download | hercules-02f26bfab461a31f5890b4ab2f58b77f5404abf5.tar.gz hercules-02f26bfab461a31f5890b4ab2f58b77f5404abf5.tar.bz2 hercules-02f26bfab461a31f5890b4ab2f58b77f5404abf5.tar.xz hercules-02f26bfab461a31f5890b4ab2f58b77f5404abf5.zip |
- Cleaned up some more the regen_data structure, so that skill/sitting-skill related data is optional (since only players have it).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8410 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 51 |
1 files changed, 1 insertions, 50 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index efc621333..6327719bd 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4807,7 +4807,6 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) pc_setdead(sd); //Reset ticks. - sd->inchealspirithptick = sd->inchealspiritsptick = sd->hp_loss_tick = sd->sp_loss_tick = 0; pc_setglobalreg(sd,"PC_DIE_COUNTER",++sd->die_counter); @@ -6753,54 +6752,6 @@ struct map_session_data *pc_get_child (struct map_session_data *sd) return NULL; } -int pc_spirit_heal_hp(struct map_session_data *sd, unsigned int diff_tick) -{ - int interval = battle_config.natural_heal_skill_interval; - - if(!pc_issit(sd)) - return 0; - - if(sd->regen.state.overweight) - interval += interval; - - sd->inchealspirithptick += diff_tick; - - while(sd->inchealspirithptick >= interval) - { - sd->inchealspirithptick -= interval; - if(status_heal(&sd->bl, sd->nsshealhp, 0, 3) < sd->nsshealhp) - { - sd->inchealspirithptick = 0; - return 1; - } - } - return 0; -} - -int pc_spirit_heal_sp(struct map_session_data *sd, unsigned int diff_tick) -{ - int interval = battle_config.natural_heal_skill_interval; - - if(!pc_issit(sd)) - return 0; - - if(sd->regen.state.overweight) - interval += interval; - - sd->inchealspiritsptick += diff_tick; - - while(sd->inchealspiritsptick >= interval) - { - sd->inchealspiritsptick -= interval; - if(status_heal(&sd->bl, 0, sd->nsshealsp, 3) < sd->nsshealsp) - { - sd->inchealspiritsptick = 0; - return 1; - } - } - return 0; -} - void pc_bleeding (struct map_session_data *sd, unsigned int diff_tick) { int hp = 0, sp = 0; @@ -6985,7 +6936,7 @@ void pc_setstand(struct map_session_data *sd){ status_change_end(&sd->bl,SC_TENSIONRELAX,-1); //Reset sitting tick. - sd->inchealspirithptick = sd->inchealspiritsptick = 0; + sd->ssregen.tick.hp = sd->ssregen.tick.sp = 0; sd->state.dead_sit = sd->vd.dead_sit = 0; } |