summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-05 14:20:42 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-05 14:20:42 +0000
commit6fc7c2a2614eeb39ac8a6f62e8d4998b7860fd27 (patch)
tree104270b6f2b30481be7672da3b377ecdccbf0585
parent5c6a9a4f7a53505a31f6d5c9fe16280d1782b264 (diff)
downloadhercules-6fc7c2a2614eeb39ac8a6f62e8d4998b7860fd27.tar.gz
hercules-6fc7c2a2614eeb39ac8a6f62e8d4998b7860fd27.tar.bz2
hercules-6fc7c2a2614eeb39ac8a6f62e8d4998b7860fd27.tar.xz
hercules-6fc7c2a2614eeb39ac8a6f62e8d4998b7860fd27.zip
- Added a check to prevent player invoked-endure from overriding infinite endure.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6488 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/status.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c
index be58f7792..ce195049d 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3932,8 +3932,17 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
break;
case SC_GOSPEL:
//Must not override a casting gospel char.
- if (sc->data[type].val4 == BCT_SELF)
+ if(sc->data[type].val4 == BCT_SELF)
return 0;
+ if(sc->data[type].val1 > val1)
+ return 1;
+ break;
+ case SC_ENDURE:
+ if(sc->data[type].val4 && !val4)
+ return 1; //Don't let you override infinite endure.
+ if(sc->data[type].val1 > val1)
+ return 1;
+ break;
case SC_KAAHI:
if(sc->data[type].val1 > val1)
return 1;
@@ -4302,7 +4311,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_BERSERK: /* ƒo?ƒT?ƒN */
if (sc->data[SC_ENDURE].timer == -1 || !sc->data[SC_ENDURE].val4)
- sc_start4(bl, SC_ENDURE, 100, 1,0,0,1, tick);
+ sc_start4(bl, SC_ENDURE, 100,10,0,0,1, tick);
if(sd && !(flag&4)){
sd->status.hp = sd->status.max_hp * 3;
sd->status.sp = 0;