Support for applying effect on dead enemy when skill remains after death.
This commit is contained in:
		| @@ -58,18 +58,16 @@ public class Enemy implements ITargetTypeHandler | ||||
| 			{ | ||||
| 				creature.sendPacket(SystemMessageId.INVALID_TARGET); | ||||
| 			} | ||||
| 			 | ||||
| 			return null; | ||||
| 		} | ||||
| 		 | ||||
| 		// You cannot attack dead targets. | ||||
| 		if (target.isDead()) | ||||
| 		if (target.isDead() && !skill.isStayAfterDeath()) | ||||
| 		{ | ||||
| 			if (sendMessage) | ||||
| 			{ | ||||
| 				creature.sendPacket(SystemMessageId.INVALID_TARGET); | ||||
| 			} | ||||
| 			 | ||||
| 			return null; | ||||
| 		} | ||||
| 		 | ||||
| @@ -80,7 +78,6 @@ public class Enemy implements ITargetTypeHandler | ||||
| 			{ | ||||
| 				creature.sendPacket(SystemMessageId.INVALID_TARGET); | ||||
| 			} | ||||
| 			 | ||||
| 			return null; | ||||
| 		} | ||||
| 		 | ||||
| @@ -94,7 +91,6 @@ public class Enemy implements ITargetTypeHandler | ||||
| 				{ | ||||
| 					creature.sendPacket(SystemMessageId.THE_DISTANCE_IS_TOO_FAR_AND_SO_THE_CASTING_HAS_BEEN_CANCELLED); | ||||
| 				} | ||||
| 				 | ||||
| 				return null; | ||||
| 			} | ||||
| 			 | ||||
| @@ -105,7 +101,6 @@ public class Enemy implements ITargetTypeHandler | ||||
| 				{ | ||||
| 					creature.sendPacket(SystemMessageId.CANNOT_SEE_TARGET); | ||||
| 				} | ||||
| 				 | ||||
| 				return null; | ||||
| 			} | ||||
| 			 | ||||
| @@ -116,7 +111,6 @@ public class Enemy implements ITargetTypeHandler | ||||
| 				{ | ||||
| 					creature.sendPacket(SystemMessageId.YOU_CANNOT_USE_SKILLS_THAT_MAY_HARM_OTHER_PLAYERS_IN_HERE); | ||||
| 				} | ||||
| 				 | ||||
| 				return null; | ||||
| 			} | ||||
| 			 | ||||
| @@ -127,7 +121,6 @@ public class Enemy implements ITargetTypeHandler | ||||
| 				{ | ||||
| 					creature.sendPacket(SystemMessageId.FORCE_ATTACK_IS_IMPOSSIBLE_AGAINST_A_TEMPORARY_ALLIED_MEMBER_DURING_A_SIEGE); | ||||
| 				} | ||||
| 				 | ||||
| 				return null; | ||||
| 			} | ||||
| 			 | ||||
|   | ||||
| @@ -58,18 +58,16 @@ public class EnemyOnly implements ITargetTypeHandler | ||||
| 			{ | ||||
| 				creature.sendPacket(SystemMessageId.INVALID_TARGET); | ||||
| 			} | ||||
| 			 | ||||
| 			return null; | ||||
| 		} | ||||
| 		 | ||||
| 		// You cannot attack dead targets. | ||||
| 		if (target.isDead()) | ||||
| 		if (target.isDead() && !skill.isStayAfterDeath()) | ||||
| 		{ | ||||
| 			if (sendMessage) | ||||
| 			{ | ||||
| 				creature.sendPacket(SystemMessageId.INVALID_TARGET); | ||||
| 			} | ||||
| 			 | ||||
| 			return null; | ||||
| 		} | ||||
| 		 | ||||
| @@ -80,7 +78,6 @@ public class EnemyOnly implements ITargetTypeHandler | ||||
| 			{ | ||||
| 				creature.sendPacket(SystemMessageId.INVALID_TARGET); | ||||
| 			} | ||||
| 			 | ||||
| 			return null; | ||||
| 		} | ||||
| 		 | ||||
| @@ -94,7 +91,6 @@ public class EnemyOnly implements ITargetTypeHandler | ||||
| 				{ | ||||
| 					creature.sendPacket(SystemMessageId.THE_DISTANCE_IS_TOO_FAR_AND_SO_THE_CASTING_HAS_BEEN_CANCELLED); | ||||
| 				} | ||||
| 				 | ||||
| 				return null; | ||||
| 			} | ||||
| 			 | ||||
| @@ -105,7 +101,6 @@ public class EnemyOnly implements ITargetTypeHandler | ||||
| 				{ | ||||
| 					creature.sendPacket(SystemMessageId.CANNOT_SEE_TARGET); | ||||
| 				} | ||||
| 				 | ||||
| 				return null; | ||||
| 			} | ||||
| 			 | ||||
| @@ -116,7 +111,6 @@ public class EnemyOnly implements ITargetTypeHandler | ||||
| 				{ | ||||
| 					creature.sendPacket(SystemMessageId.YOU_CANNOT_USE_SKILLS_THAT_MAY_HARM_OTHER_PLAYERS_IN_HERE); | ||||
| 				} | ||||
| 				 | ||||
| 				return null; | ||||
| 			} | ||||
| 			 | ||||
| @@ -127,7 +121,6 @@ public class EnemyOnly implements ITargetTypeHandler | ||||
| 				{ | ||||
| 					creature.sendPacket(SystemMessageId.FORCE_ATTACK_IS_IMPOSSIBLE_AGAINST_A_TEMPORARY_ALLIED_MEMBER_DURING_A_SIEGE); | ||||
| 				} | ||||
| 				 | ||||
| 				return null; | ||||
| 			} | ||||
| 			 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment