summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-19 19:10:21 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-19 19:10:21 +0000
commitca003ef941f7a039a4251f28d0a60b61de66f186 (patch)
treeb17aa8d8af48deaf368920122b2ca40b31e6bb77
parent4a285529f27656f6330578a6402ba7ccd608f1d3 (diff)
downloadhercules-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
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--src/map/status.c12
2 files changed, 12 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 63d6cc450..693b380c6 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2007/10/19
+ * Applied some cleanups that should correct "Infinite Endure" ending
+ sometimes. [Skotlex]
2007/10/18
* Rev. 11516 Uncommented the showwarning and showdebug from 11508. [L0ne_W0lf]
* Fixed the incorrect map names on the debug messages (mapid->mapindex
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;