summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/status.c11
2 files changed, 6 insertions, 7 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 8deda6944..d291f08d4 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ 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.
2006/04/25
+ * Cleaned up a bit the implementation of SC_MAXIMIZEPOWER, SC_CHASEWALK and
+ SC_CLOAKING to prevent infinite looping timers. [Skotlex]
* Fixed NPC_SUICIDE dropping items. [Skotlex]
* Moved the mapflag skill restrictions from skill_checkcondition to
skillnotok, this makes auto-spells not work in maps where they aren't
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]