Browse Source

- Fixed "being able to cast" skills while dead.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5685 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 years ago
parent
commit
1223d1adfe
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/map/status.c

+ 4 - 3
src/map/status.c

@@ -356,13 +356,14 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
 
 	mode = src?status_get_mode(src):MD_CANATTACK;
 
+	if (src && status_isdead(src))
+		return 0;
+	
 	if (!skill_num) { //Normal attack checks.
 		if (!(mode&MD_CANATTACK))
 			return 0; //This mode is only needed for melee attacking.
 		//Dead state is not checked for skills as some skills can be used 
-		//by/on dead characters, said checks are left to skill.c [Skotlex]
-		if (src && status_isdead(src))
-			return 0;
+		//on dead characters, said checks are left to skill.c [Skotlex]
 		if (target && status_isdead(target))
 			return 0;
 	}