summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/pc.c8
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/status.c10
3 files changed, 10 insertions, 10 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index b201d3910..8fcac8826 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6886,11 +6886,11 @@ void pc_bleeding (struct map_session_data *sd, unsigned int diff_tick)
//Character regen. Flag is used to know which types of regen can take place.
//&1: HP regen
//&2: SP regen
-void pc_regen (struct map_session_data *sd, unsigned int diff_tick, int flag)
+void pc_regen (struct map_session_data *sd, unsigned int diff_tick)
{
int hp = 0, sp = 0;
- if (sd->hp_regen.value && flag&1) {
+ if (sd->hp_regen.value) {
sd->hp_regen.tick += diff_tick;
while (sd->hp_regen.tick >= sd->hp_regen.rate) {
hp += sd->hp_regen.value;
@@ -6898,7 +6898,7 @@ void pc_regen (struct map_session_data *sd, unsigned int diff_tick, int flag)
}
}
- if (sd->sp_regen.value && flag&2) {
+ if (sd->sp_regen.value) {
sd->sp_regen.tick += diff_tick;
while (sd->sp_regen.tick >= sd->sp_regen.rate) {
sp += sd->sp_regen.value;
@@ -6907,7 +6907,7 @@ void pc_regen (struct map_session_data *sd, unsigned int diff_tick, int flag)
}
if (hp > 0 || sp > 0)
- status_heal(&sd->bl, hp, sp, 2);
+ status_heal(&sd->bl, hp, sp, 0);
return;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index 3b404388d..b5d29a550 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -264,7 +264,7 @@ struct map_session_data *pc_get_mother(struct map_session_data *sd);
struct map_session_data *pc_get_child(struct map_session_data *sd);
void pc_bleeding (struct map_session_data *sd, unsigned int diff_tick);
-void pc_regen (struct map_session_data *sd, unsigned int diff_tick, int flag);
+void pc_regen (struct map_session_data *sd, unsigned int diff_tick);
int pc_set_gm_level(int account_id, int level);
void pc_setstand(struct map_session_data *sd);
diff --git a/src/map/status.c b/src/map/status.c
index 7fe903c2d..226cad91e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -7133,8 +7133,12 @@ static int status_natural_heal(DBKey key,void * data,va_list ap)
))
flag=0;
- if (sd && (sd->hp_loss.value || sd->sp_loss.value))
+ if (sd) {
+ if (sd->hp_loss.value || sd->sp_loss.value)
pc_bleeding(sd, natural_heal_diff_tick);
+ if (sd->hp_regen.value || sd->sp_regen.value)
+ pc_regen(sd, natural_heal_diff_tick);
+ }
if(flag&(RGN_SHP|RGN_SSP) && regen->ssregen &&
(vd = status_get_viewdata(bl)) && vd->dead_sit == 2)
@@ -7237,10 +7241,6 @@ static int status_natural_heal(DBKey key,void * data,va_list ap)
}
}
- //Bonus skill-like regen
- if (sd && (sd->hp_regen.value || sd->sp_regen.value))
- pc_regen(sd, natural_heal_diff_tick, (flag&RGN_SHP?1:0)|(flag&RGN_SSP?2:0));
-
if (!regen->sregen)
return flag;