summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-25 23:05:54 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-25 23:05:54 +0000
commitf7d88ae39c69076f0c8c26251de414b3f447be17 (patch)
tree3c7d7f1bbb612ffa35011d5b2f95463ae02ecbfb /src/map/status.c
parent97162fc3c49631a054532b3ad135cbf24198010f (diff)
downloadhercules-f7d88ae39c69076f0c8c26251de414b3f447be17.tar.gz
hercules-f7d88ae39c69076f0c8c26251de414b3f447be17.tar.bz2
hercules-f7d88ae39c69076f0c8c26251de414b3f447be17.tar.xz
hercules-f7d88ae39c69076f0c8c26251de414b3f447be17.zip
- Cleaned up a bit the implementation of SC_MAXIMIZEPOWER, SC_CHASEWALK and SC_CLOAKING to prevent infinite looping timers.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6283 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 0e4e3d956..677918669 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3948,12 +3948,9 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
clif_emotion(bl,4);
break;
case SC_MAXIMIZEPOWER: /* マキシマイズパワ?(SPが1減る時間,val2にも) */
- if (!(flag&4))
- {
- if(bl->type != BL_PC)
- tick = 5000;
- val2 = tick;
- }
+ if (flag&4)
+ break;
+ val2 = tick>0?tick:60000;
break;
case SC_EDP: // [Celest]
val2 = val1 + 2; /* 猛毒付?確率(%) */
@@ -4179,7 +4176,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
if (flag&4)
break;
calc_flag = 1; // [Celest]
- val2 = tick;
+ val2 = tick>0?tick:60000;
val3 = type==SC_CLOAKING ? 130-val1*3 : 135-val1*5;
if (!val4)
{ //val4 signals eternal cloaking (not cancelled on attack) [Skotlex]