diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-19 19:10:21 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-19 19:10:21 +0000 |
commit | ca003ef941f7a039a4251f28d0a60b61de66f186 (patch) | |
tree | b17aa8d8af48deaf368920122b2ca40b31e6bb77 /src | |
parent | 4a285529f27656f6330578a6402ba7ccd608f1d3 (diff) | |
download | hercules-ca003ef941f7a039a4251f28d0a60b61de66f186.tar.gz hercules-ca003ef941f7a039a4251f28d0a60b61de66f186.tar.bz2 hercules-ca003ef941f7a039a4251f28d0a60b61de66f186.tar.xz hercules-ca003ef941f7a039a4251f28d0a60b61de66f186.zip |
- Applied some cleanups that should correct "Infinite Endure" ending sometimes.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11518 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/status.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c index 666ec386c..7148005c9 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -5000,6 +5000,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val status_change_start(&tsd->bl,type,10000,val1,val2,val3,val4,tick,1); } } + //val4 signals infinite endure (if val4 == 2 it is infinite endure from Berserk) break; case SC_AUTOBERSERK: if (status->hp < status->max_hp>>2 && @@ -5347,7 +5348,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val case SC_BERSERK: if (sc->data[SC_ENDURE].timer == -1 || !sc->data[SC_ENDURE].val4) - sc_start4(bl, SC_ENDURE, 100,10,0,0,1, tick); + sc_start4(bl, SC_ENDURE, 100,10,0,0,2, tick); //HP healing is performing after the calc_status call. //Val2 holds HP penalty if (!val4) val4 = skill_get_time2(StatusSkillChangeTable[type],val1); @@ -6214,10 +6215,12 @@ int status_change_end( struct block_list* bl , int type,int tid ) status_change_end(bl,SC_PROVOKE,-1); break; + case SC_ENDURE: + if (sc->data[SC_ENDURE].val4) + return 0; //Do not end infinite endure. case SC_DEFENDER: case SC_REFLECTSHIELD: case SC_AUTOGUARD: - case SC_ENDURE: if (sd) { struct map_session_data *tsd; int i; @@ -6353,8 +6356,11 @@ int status_change_end( struct block_list* bl , int type,int tid ) //If val2 is removed, no HP penalty (dispelled?) [Skotlex] if(status->hp > 100 && sc->data[type].val2) status_set_hp(bl, 100, 0); - if(sc->data[SC_ENDURE].timer != -1) + if(sc->data[SC_ENDURE].timer != -1 && sc->data[SC_ENDURE].val4 == 2) + { + sc->data[SC_ENDURE].val4 = 0; status_change_end(bl, SC_ENDURE, -1); + } sc_start4(bl, SC_REGENERATION, 100, 10,0,0,(RGN_HP|RGN_SP), skill_get_time(LK_BERSERK, sc->data[type].val1)); break; |