summaryrefslogtreecommitdiff
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
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
-rw-r--r--db/item_db.txt4
-rw-r--r--src/map/status.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/db/item_db.txt b/db/item_db.txt
index de964976a..20e28e09e 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -4118,8 +4118,8 @@
14531,Accuracy_30_Scroll,Concentration Power Scroll,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCHIT,1800000,30; },{},{}
14532,Battle_Manual25,Field Manual 25%,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXPBOOST,1800000,25; },{},{}
14533,Battle_Manual100,Field Manual 100%,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXPBOOST,1800000,100; },{},{}
-14534,Small_Life_Potion,Small Life Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_HPREGEN,600000,5,5,0,0; },{},{}
-14535,Med_Life_Potion,Medium Life Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_HPREGEN,600000,7,4,0,0; },{},{}
+14534,Small_Life_Potion,Small Life Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_HPREGEN,600000,-5,5,0,0; },{},{}
+14535,Med_Life_Potion,Medium Life Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start4 SC_HPREGEN,600000,-7,4,0,0; },{},{}
14536,Abrasive,Abrasive,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCCRI,300000,30; },{},{}
14537,Regeneration_Potion,Regeneration Potion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCHEALRATE,1800000,20; },{},{}
14538,Glass_of_Illusion,Glass of Illusion,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
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;