Self targeted bad skills should not send a message.

This commit is contained in:
MobiusDev 2018-09-03 21:05:41 +00:00
parent a9045910af
commit c1e1d9083b
7 changed files with 42 additions and 21 deletions

View File

@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
}
return false;
}

View File

@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
}
return false;
}

View File

@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
}
return false;
}

View File

@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
}
return false;
}

View File

@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
}
return false;
}

View File

@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
}
return false;
}

View File

@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(_id);
activeChar.sendPacket(sm);
}
return false;
}