فهرست منبع

NPC_STOP now stops both sides and will be canceled if either side teleports or dies.(bugreport:3099)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13803 54d463be-8e91-2dee-dedb-b68131a5f0ec
Inkfish 16 سال پیش
والد
کامیت
45addf32f8
4فایلهای تغییر یافته به همراه17 افزوده شده و 2 حذف شده
  1. 1 0
      Changelog-Trunk.txt
  2. 5 1
      src/map/skill.c
  3. 9 0
      src/map/status.c
  4. 2 1
      src/map/unit.c

+ 1 - 0
Changelog-Trunk.txt

@@ -12,6 +12,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 	- Splash attack doesn't cause any status effects or autocasts any more.
 	* The delay icon doesn't appear during casting now.
 	* Status icon of ASPD potions doesn't overriding each other now.
+	* NPC_STOP now stops both sides and will be canceled if either side teleports or dies.(bugreport:3099)
 09/05/20
 	* Now fiberlocking a fiberlocked target doesn't renew the timer but instead increases its fireweakness [Inkfish]
 	- This makes doublecasting firebolts on a double fiberlocked target having double damage from both 2 bolts possible = =(bugreport:3061)

+ 5 - 1
src/map/skill.c

@@ -3604,7 +3604,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 	case PF_MEMORIZE:
 	case PA_SACRIFICE:
 	case ASC_EDP:
-	case NPC_STOP:
 	case PF_DOUBLECASTING:
 	case SG_SUN_COMFORT:
 	case SG_MOON_COMFORT:
@@ -3621,6 +3620,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 		clif_skill_nodamage(src,bl,skillid,skilllv,
 			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
 		break;
+	case NPC_STOP:
+		if( clif_skill_nodamage(src,bl,skillid,skilllv,
+			sc_start2(bl,type,100,skilllv,src->id,skill_get_time(skillid,skilllv)) ) )
+			sc_start2(src,type,100,skilllv,bl->id,skill_get_time(skillid,skilllv));
+		break;
 	case HP_ASSUMPTIO:
 		if( sd && dstmd )
 			clif_skill_fail(sd,skillid,0,0);

+ 9 - 0
src/map/status.c

@@ -6553,6 +6553,15 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
 			// from here it's not neccesary to continue
 			return 1;
 			break;
+		case SC_STOP:
+			if( sce->val2 )
+			{
+				struct block_list* tbl = map_id2bl(sce->val2);
+				sce->val2 = 0;
+				if( tbl && (sc = status_get_sc(tbl)) && sc->data[SC_STOP] && sc->data[SC_STOP]->val2 == bl->id )
+					status_change_end(tbl, SC_STOP, -1);
+			}
+			break;
 		}
 
 	opt_flag = 1;

+ 2 - 1
src/map/unit.c

@@ -1750,7 +1750,7 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l
 		status_change_end(bl,SC_BASILICA,-1);
 		status_change_end(bl,SC_ANKLE,-1);
 		status_change_end(bl,SC_TRICKDEAD,-1);
-		status_change_end(bl,SC_BLADESTOP,-1);
+		status_change_end(bl,SC_BLADESTOP_WAIT,-1);
 		status_change_end(bl,SC_RUN,-1);
 		skill_stop_dancing(bl);
 		status_change_end(bl,SC_WARM,-1);
@@ -1765,6 +1765,7 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l
 		if (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF)
 			status_change_end(bl,SC_GOSPEL,-1);
 		status_change_end(bl,SC_CHANGE,-1);
+		status_change_end(bl,SC_STOP,-1);
 	}
 
 	if (bl->type&BL_CHAR) {