diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-15 04:29:05 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-15 04:29:05 +0000 |
commit | b5f526d1ff2351011974c0e4f90e4996fb87c699 (patch) | |
tree | deb3bd1017106c609d00428871df0ce71753469c /src/map/status.c | |
parent | 6f22f0352964d6d00deafbb8ccaf7145d6321865 (diff) | |
download | hercules-b5f526d1ff2351011974c0e4f90e4996fb87c699.tar.gz hercules-b5f526d1ff2351011974c0e4f90e4996fb87c699.tar.bz2 hercules-b5f526d1ff2351011974c0e4f90e4996fb87c699.tar.xz hercules-b5f526d1ff2351011974c0e4f90e4996fb87c699.zip |
- Added 2 new status changes for Life and Regeneration Potions [Zephyrus]
- Fixed some items boxes giving wrong tamings.
- Fixed another item giving 48 gladius[3]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11738 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c index 2c9539b28..926b77162 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4949,6 +4949,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if (sc->data[type].val2 > val2) return 0; break; + case SC_HPREGEN: case SC_STUN: case SC_SLEEP: case SC_POISON: @@ -5263,6 +5264,12 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if (!val4) val4 = 1; 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; case SC_HIDING: val2 = tick/1000; @@ -5860,6 +5867,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val //Place here SCs that have no SCB_* data, no skill associated, no ICON //associated, and yet are not wrong/unknown. [Skotlex] break; + case SC_INCHEALRATE: + if (val1 < 1) + val1 = 1; + break; default: if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 ) { //Status change with no calc, no icon, and no skill associated...? @@ -6783,6 +6794,18 @@ int status_change_timer(int tid, unsigned int tick, int id, int data) } break; + case SC_HPREGEN: + if( sd && (--sc->data[type].val4) >= 0 ) + { + if( status->hp < status->max_hp ) { + int hp = (int)(sd->status.max_hp * sc->data[type].val1 / 100.); + status_heal(bl, hp, 0, 2); + } + sc->data[type].timer = add_timer((sc->data[type].val2 * 1000) + tick, status_change_timer, bl->id, data ); + return 0; + } + break; + case SC_KNOWLEDGE: if (sd) { if(bl->m != sd->feel_map[0].m && bl->m != sd->feel_map[1].m && bl->m != sd->feel_map[2].m) |