- 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://svn.code.sf.net/p/rathena/svn/trunk@12367 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
zephyrus 2008-03-15 18:39:14 +00:00
parent 19415079fa
commit dbe768cf91
2 changed files with 7 additions and 7 deletions

View File

@ -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,,,,,,{},{},{}

View File

@ -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;