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; | ||||
| 			} | ||||
| 			 | ||||
|   | ||||
| @@ -874,7 +874,7 @@ public class EffectList | ||||
| 		} | ||||
| 		 | ||||
| 		// Prevent adding and initializing buffs/effects on dead creatures. | ||||
| 		if (info.getEffected().isDead()) | ||||
| 		if (info.getEffected().isDead() && !info.getSkill().isStayAfterDeath()) | ||||
| 		{ | ||||
| 			return; | ||||
| 		} | ||||
| @@ -904,7 +904,7 @@ public class EffectList | ||||
| 		final Skill skill = info.getSkill(); | ||||
| 		 | ||||
| 		// Cannot add active buff to dead creature. Even in retail if you are dead with Lv. 3 Shillien's Breath, it will disappear instead of going 1 level down. | ||||
| 		if (info.getEffected().isDead()) | ||||
| 		if (info.getEffected().isDead() && !info.getSkill().isStayAfterDeath()) | ||||
| 		{ | ||||
| 			return; | ||||
| 		} | ||||
|   | ||||
| @@ -322,7 +322,7 @@ public class BuffInfo | ||||
| 		 | ||||
| 		for (AbstractEffect effect : _effects) | ||||
| 		{ | ||||
| 			if (effect.isInstant() || (_effected.isDead() && !_skill.isPassive())) | ||||
| 			if (effect.isInstant() || (_effected.isDead() && !_skill.isPassive() && !_skill.isStayAfterDeath())) | ||||
| 			{ | ||||
| 				continue; | ||||
| 			} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment