summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-13 08:14:12 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-13 08:14:12 +0000
commita07d9f1bac5a32799d359476cdf23d154b0a97ee (patch)
treeebf1c4562962dc29b7df344b79932d183de1152c
parentf880e17a93f809e5cd3954764c9e350d0676116e (diff)
downloadhercules-a07d9f1bac5a32799d359476cdf23d154b0a97ee.tar.gz
hercules-a07d9f1bac5a32799d359476cdf23d154b0a97ee.tar.bz2
hercules-a07d9f1bac5a32799d359476cdf23d154b0a97ee.tar.xz
hercules-a07d9f1bac5a32799d359476cdf23d154b0a97ee.zip
* Corrected skill-based hp/sp regen (SM_RECOVERY, MG_SRECOVERY, MO_SPIRITSRECOVERY, NJ_NINPOU, TK_HPTIME, TK_SPTIME)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10991 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/status.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index caf4ec6bd..a3c94fa9c 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2007/08/13
+ * Corrected skill-based hp/sp regen, expect slight increase [ultramage]
2007/08/10
* Updated item_db.sql [Playtester]
2007/08/09
diff --git a/src/map/status.c b/src/map/status.c
index 3f2fda92f..7fb2c870e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2485,14 +2485,14 @@ void status_calc_regen(struct block_list *bl, struct status_data *status, struct
val = 0;
if((skill=pc_checkskill(sd,SM_RECOVERY)) > 0)
- val += skill*(5 + status->max_hp/500);
+ val += skill*5 + skill*status->max_hp/500;
sregen->hp = cap_value(val, 0, SHRT_MAX);
val = 0;
if((skill=pc_checkskill(sd,MG_SRECOVERY)) > 0)
- val += skill*(3 + status->max_sp/500);
+ val += skill*3 + skill*status->max_sp/500;
if((skill=pc_checkskill(sd,NJ_NINPOU)) > 0)
- val += skill*(3 + status->max_sp/500);
+ val += skill*3 + skill*status->max_sp/500;
sregen->sp = cap_value(val, 0, SHRT_MAX);
// Skill-related recovery (only when sit)
@@ -2500,21 +2500,21 @@ void status_calc_regen(struct block_list *bl, struct status_data *status, struct
val = 0;
if((skill=pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
- val += skill*(4 + status->max_hp/500);
+ val += skill*4 + skill*status->max_hp/500;
if((skill=pc_checkskill(sd,TK_HPTIME)) > 0 && sd->state.rest)
- val += skill*(30 + status->max_hp/500);
+ val += skill*30 + skill*status->max_hp/500;
sregen->hp = cap_value(val, 0, SHRT_MAX);
val = 0;
if((skill=pc_checkskill(sd,TK_SPTIME)) > 0 && sd->state.rest)
{
- val += skill*(3 + status->max_sp/500);
+ val += skill*3 + skill*status->max_sp/500;
if ((skill=pc_checkskill(sd,SL_KAINA)) > 0) //Power up Enjoyable Rest
val += (30+10*skill)*val/100;
}
if((skill=pc_checkskill(sd,MO_SPIRITSRECOVERY)) > 0)
- val += skill*(2 + status->max_sp/500);
+ val += skill*2 + skill*status->max_sp/500;
sregen->sp = cap_value(val, 0, SHRT_MAX);
}