Browse Source

Fixed bugreport:5534 where the SC wasn't ended. This resolves the issues with Sealed Shrine and NPC_INVINCIBLEOFF and NPC_INVINCIBLE.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16647 54d463be-8e91-2dee-dedb-b68131a5f0ec
cookiecrumbs 12 years ago
parent
commit
87c61799f0
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/map/skill.c

+ 9 - 1
src/map/skill.c

@@ -5170,7 +5170,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 	case NPC_MAGICMIRROR:
 	case NPC_MAGICMIRROR:
 	case ST_PRESERVE:
 	case ST_PRESERVE:
 	case NPC_INVINCIBLE:
 	case NPC_INVINCIBLE:
-	case NPC_INVINCIBLEOFF:
+		/* if invincible, end the SC for off state */
+		if(skillid == NPC_INVINCIBLE)
+			status_change_end(bl, SC_INVINCIBLEOFF, INVALID_TIMER);
+
+		/* if invincible off, end the SC for on state */
+    case NPC_INVINCIBLEOFF:
+		if(skillid == NPC_INVINCIBLEOFF)
+			status_change_end(bl, SC_INVINCIBLE, INVALID_TIMER);
+
 	case RK_DEATHBOUND:
 	case RK_DEATHBOUND:
 	case AB_RENOVATIO:
 	case AB_RENOVATIO:
 	case AB_EXPIATIO:
 	case AB_EXPIATIO: