Bläddra i källkod

- Cleaned up a bit the implementation of SC_MAXIMIZEPOWER, SC_CHASEWALK and SC_CLOAKING to prevent infinite looping timers.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6283 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 år sedan
förälder
incheckning
65a1e97ed5
2 ändrade filer med 6 tillägg och 7 borttagningar
  1. 2 0
      Changelog-Trunk.txt
  2. 4 7
      src/map/status.c

+ 2 - 0
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

+ 4 - 7
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]