Support for applying effect on dead enemy when skill remains after death.

This commit is contained in:
MobiusDevelopment
2020-11-21 10:11:07 +00:00
parent f2267fb5d0
commit 9ceed6b399
68 changed files with 85 additions and 323 deletions

View File

@@ -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;
}

View File

@@ -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;
}