summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-15 18:39:14 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-15 18:39:14 +0000
commitbe5523649e10d9facffa51a9e11cc13e64e19867 (patch)
tree870c54ec9a6b3a175c13b7b1d42d01e4237f92b1 /src/map
parent4ddfb97167d8c2df8277d6cf484a028e78d93b25 (diff)
downloadhercules-be5523649e10d9facffa51a9e11cc13e64e19867.tar.gz
hercules-be5523649e10d9facffa51a9e11cc13e64e19867.tar.bz2
hercules-be5523649e10d9facffa51a9e11cc13e64e19867.tar.xz
hercules-be5523649e10d9facffa51a9e11cc13e64e19867.zip
- Changed the way SC_HPREGEN works.
- If you parse val1 as negative, heal will be a % of the maxHP. - On positive values it will heal a fixed amount. - Changed this to allow the new attributes of Battleground sets. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12367 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/status.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c
index be3c2c01c..d100dbb69 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5270,12 +5270,12 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick = 10000;
break;
case SC_HPREGEN:
- // val1 = % of Max HP per tick
- val4 = tick/(val2 * 1000);
- if (!val4) val4 = 1;
- tick = val2 * 1000; // val2 = seconds
- break;
+ if( val1 == 0 ) val1 = 1;
+ if( (val4 = tick/(val2 * 1000)) < 1 )
+ val4 = 1; // Number of total heals
+ tick = val2 * 1000; // val2 = Seconds between heals
+ break;
case SC_HIDING:
val2 = tick/1000;
tick = 1000;