Self targeted bad skills should not send a message.
This commit is contained in:
@@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
|
|||||||
|
|
||||||
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
|
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);
|
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
|
||||||
sm.addSkillName(_id);
|
{
|
||||||
activeChar.sendPacket(sm);
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||||
|
sm.addSkillName(_id);
|
||||||
|
activeChar.sendPacket(sm);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
|
|||||||
|
|
||||||
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
|
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);
|
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
|
||||||
sm.addSkillName(_id);
|
{
|
||||||
activeChar.sendPacket(sm);
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||||
|
sm.addSkillName(_id);
|
||||||
|
activeChar.sendPacket(sm);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
|
|||||||
|
|
||||||
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
|
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);
|
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
|
||||||
sm.addSkillName(_id);
|
{
|
||||||
activeChar.sendPacket(sm);
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||||
|
sm.addSkillName(_id);
|
||||||
|
activeChar.sendPacket(sm);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
|
|||||||
|
|
||||||
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
|
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);
|
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
|
||||||
sm.addSkillName(_id);
|
{
|
||||||
activeChar.sendPacket(sm);
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||||
|
sm.addSkillName(_id);
|
||||||
|
activeChar.sendPacket(sm);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
|
|||||||
|
|
||||||
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
|
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);
|
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
|
||||||
sm.addSkillName(_id);
|
{
|
||||||
activeChar.sendPacket(sm);
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||||
|
sm.addSkillName(_id);
|
||||||
|
activeChar.sendPacket(sm);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
|
|||||||
|
|
||||||
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
|
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);
|
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
|
||||||
sm.addSkillName(_id);
|
{
|
||||||
activeChar.sendPacket(sm);
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||||
|
sm.addSkillName(_id);
|
||||||
|
activeChar.sendPacket(sm);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1089,9 +1089,12 @@ public final class Skill implements IIdentifiable
|
|||||||
|
|
||||||
if (!checkConditions(SkillConditionScope.GENERAL, activeChar, object) || !checkConditions(SkillConditionScope.TARGET, activeChar, object))
|
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);
|
if (!((activeChar == object) && isBad())) // Self targeted bad skills should not send a message.
|
||||||
sm.addSkillName(_id);
|
{
|
||||||
activeChar.sendPacket(sm);
|
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||||
|
sm.addSkillName(_id);
|
||||||
|
activeChar.sendPacket(sm);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user