summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-03 23:02:55 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-03 23:02:55 +0000
commit56d45e029ebc3e406fd1fce37790d2d72dac6536 (patch)
tree9468c27352f73e9186620adbba3e17c07c70f7b1 /src/map
parentbd3a5a73ae175a4bbb6095b1fda3266433ac5803 (diff)
downloadhercules-56d45e029ebc3e406fd1fce37790d2d72dac6536.tar.gz
hercules-56d45e029ebc3e406fd1fce37790d2d72dac6536.tar.bz2
hercules-56d45e029ebc3e406fd1fce37790d2d72dac6536.tar.xz
hercules-56d45e029ebc3e406fd1fce37790d2d72dac6536.zip
- Made regen work always, like Hp/Sp Loss, it no longer displays healing numbers as well.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11118 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-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;