status.c
change
// Natural Hp regen
if (flag&RGN_HP) {
rate = (int)(natural_heal_diff_tick * (regen->rate.hp/100. * multi));
if (ud && ud->walktimer != INVALID_TIMER)
rate /= 2;
// Homun HP regen fix (they should regen as if they were sitting (twice as fast)
if(bl->type == BL_HOM)
rate *= 2;
regen->tick.hp += rate;
if(regen->tick.hp >= (unsigned int)battle_config.natural_healhp_interval) {
int val = 0;
do {
val += regen->hp;
regen->tick.hp -= battle_config.natural_healhp_interval;
} while(regen->tick.hp >= (unsigned int)battle_config.natural_healhp_interval);
if (status_heal(bl, val, 0, 1) < val)
flag &= ~RGN_SHP; // Full.
}
}
// Natural SP regen
if(flag&RGN_SP) {
rate = (int)(natural_heal_diff_tick * (regen->rate.sp/100. * multi));
// Homun SP regen fix (they should regen as if they were sitting (twice as fast)
if(bl->type==BL_HOM)
rate *= 2;
#ifdef RENEWAL
if (bl->type == BL_PC && (((TBL_PC*)bl)->class_&MAPID_UPPERMASK) == MAPID_MONK &&
sc && sc->data[SC_EXPLOSIONSPIRITS] && (!sc->data[SC_SPIRIT] || sc->data[SC_SPIRIT]->val2 != SL_MONK))
rate /= 2; // Tick is doubled in Fury state
#endif
regen->tick.sp += rate;
if(regen->tick.sp >= (unsigned int)battle_config.natural_healsp_interval) {
int val = 0;
do {
val += regen->sp;
regen->tick.sp -= battle_config.natural_healsp_interval;
} while(regen->tick.sp >= (unsigned int)battle_config.natural_healsp_interval);
if (status_heal(bl, 0, val, 1) < val)
flag &= ~RGN_SSP; // full.
}
}
if (!regen->sregen)
return flag;
// Skill regen
sregen = regen->sregen;
if(flag&RGN_SHP) { // Skill HP regen
sregen->tick.hp += (int)(natural_heal_diff_tick * (sregen->rate.hp / 100.));
while(sregen->tick.hp >= (unsigned int)battle_config.natural_heal_skill_interval) {
sregen->tick.hp -= battle_config.natural_heal_skill_interval;
if(status_heal(bl, sregen->hp, 0, 3) < sregen->hp)
break; // Full
}
}
if(flag&RGN_SSP) { // Skill SP regen
sregen->tick.sp += (int)(natural_heal_diff_tick * (sregen->rate.sp /100.));
while(sregen->tick.sp >= (unsigned int)battle_config.natural_heal_skill_interval) {
int val = sregen->sp;
if (sd && sd->state.doridori) {
val *= 2;
sd->state.doridori = 0;
if ((rate = pc_checkskill(sd,TK_SPTIME)))
sc_start(bl,bl,status_skill2sc(TK_SPTIME),
100,rate,skill_get_time(TK_SPTIME, rate));
if (
(sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR &&
rnd()%10000 < battle_config.sg_angel_skill_ratio
) { // Angel of the Sun/Moon/Star
clif_feel_hate_reset(sd);
pc_resethate(sd);
pc_resetfeel(sd);
}
}
sregen->tick.sp -= battle_config.natural_heal_skill_interval;
if(status_heal(bl, 0, val, 3) < val)
break; // Full
}
}
return flag;
}
to
// Natural Hp regen
if (flag&RGN_HP) {
rate = (int)(natural_heal_diff_tick * (regen->rate.hp/100. * multi));
if (ud && ud->walktimer != INVALID_TIMER)
rate /= 2;
// Homun HP regen fix (they should regen as if they were sitting (twice as fast)
if(bl->type == BL_HOM)
rate *= 2;
regen->tick.hp += rate;
if(regen->tick.hp >= (unsigned int)battle_config.natural_healhp_interval) {
int val = 0;
do {
val += regen->hp;
val *= multi;
regen->tick.hp -= battle_config.natural_healhp_interval;
} while(regen->tick.hp >= (unsigned int)battle_config.natural_healhp_interval);
if (status_heal(bl, val, 0, 1) < val)
flag &= ~RGN_SHP; // Full.
}
}
// Natural SP regen
if(flag&RGN_SP) {
rate = (int)(natural_heal_diff_tick * (regen->rate.sp/100. * multi));
// Homun SP regen fix (they should regen as if they were sitting (twice as fast)
if(bl->type==BL_HOM)
rate *= 2;
#ifdef RENEWAL
if (bl->type == BL_PC && (((TBL_PC*)bl)->class_&MAPID_UPPERMASK) == MAPID_MONK &&
sc && sc->data[SC_EXPLOSIONSPIRITS] && (!sc->data[SC_SPIRIT] || sc->data[SC_SPIRIT]->val2 != SL_MONK))
rate /= 2; // Tick is doubled in Fury state
#endif
regen->tick.sp += rate;
if(regen->tick.sp >= (unsigned int)battle_config.natural_healsp_interval) {
int val = 0;
do {
val += regen->sp;
val *= multi;
regen->tick.sp -= battle_config.natural_healsp_interval;
} while(regen->tick.sp >= (unsigned int)battle_config.natural_healsp_interval);
if (status_heal(bl, 0, val, 1) < val)
flag &= ~RGN_SSP; // full.
}
}
if (!regen->sregen)
return flag;
// Skill regen
sregen = regen->sregen;
if(flag&RGN_SHP) { // Skill HP regen
sregen->tick.hp += (int)(natural_heal_diff_tick * (sregen->rate.hp / 100.));
while(sregen->tick.hp >= (unsigned int)battle_config.natural_heal_skill_interval) {
sregen->tick.hp -= battle_config.natural_heal_skill_interval;
if(status_heal(bl, sregen->hp, 0, 3) < sregen->hp)
break; // Full
}
}
if(flag&RGN_SSP) { // Skill SP regen
sregen->tick.sp += (int)(natural_heal_diff_tick * (sregen->rate.sp /100.));
while(sregen->tick.sp >= (unsigned int)battle_config.natural_heal_skill_interval) {
int val = sregen->sp;
val *= multi;
if (sd && sd->state.doridori) {
val *= 2;
sd->state.doridori = 0;
if ((rate = pc_checkskill(sd,TK_SPTIME)))
sc_start(bl,bl,status_skill2sc(TK_SPTIME),
100,rate,skill_get_time(TK_SPTIME, rate));
if (
(sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR &&
rnd()%10000 < battle_config.sg_angel_skill_ratio
) { // Angel of the Sun/Moon/Star
clif_feel_hate_reset(sd);
pc_resethate(sd);
pc_resetfeel(sd);
}
}
sregen->tick.sp -= battle_config.natural_heal_skill_interval;
if(status_heal(bl, 0, val, 3) < val)
break; // Full
}
}
return flag;
}
and that should work
and if that doesnt work
change
status.c
if (flag&(RGN_HP|RGN_SP)) {
if(!vd)
vd = status_get_viewdata(bl);
if(vd && vd->dead_sit == 2)
multi += 1; //This causes the interval to be halved
if(regen->state.gc)
multi += 1; //This causes the interval to be halved
}
to
if (flag&(RGN_HP|RGN_SP)) {
if(!vd)
vd = status_get_viewdata(bl);
if(vd && vd->dead_sit == 2)
multi += 3; //This causes the interval to be halved
if(regen->state.gc)
multi += 3; //This causes the interval to be halved
}