Added peace zone check for ground target type skills.
This commit is contained in:
+7
-6
@@ -8710,17 +8710,18 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (isInsideZone(ZoneId.PEACE))
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||||
{
|
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
|
||||||
}
|
}
|
||||||
}
|
else if (getCurrentMp() < usedSkill.getMpConsume())
|
||||||
else
|
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
|
else if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -8769,17 +8769,18 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (isInsideZone(ZoneId.PEACE))
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
sendPacket(SystemMessageId.YOU_CANNOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||||
{
|
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
|
||||||
}
|
}
|
||||||
}
|
else if (getCurrentMp() < usedSkill.getMpConsume())
|
||||||
else
|
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
|
else if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -8804,17 +8804,18 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (isInsideZone(ZoneId.PEACE))
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
sendPacket(SystemMessageId.YOU_CANNOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||||
{
|
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
|
||||||
}
|
}
|
||||||
}
|
else if (getCurrentMp() < usedSkill.getMpConsume())
|
||||||
else
|
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
|
else if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+7
-6
@@ -8643,17 +8643,18 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (isInsideZone(ZoneId.PEACE))
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||||
{
|
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
|
||||||
}
|
}
|
||||||
}
|
else if (getCurrentMp() < usedSkill.getMpConsume())
|
||||||
else
|
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
|
else if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+7
-6
@@ -8888,17 +8888,18 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (isInsideZone(ZoneId.PEACE))
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
sendPacket(SystemMessageId.YOU_CANNOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||||
{
|
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
|
||||||
}
|
}
|
||||||
}
|
else if (getCurrentMp() < usedSkill.getMpConsume())
|
||||||
else
|
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
|
else if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+7
-6
@@ -8888,17 +8888,18 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (isInsideZone(ZoneId.PEACE))
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
sendPacket(SystemMessageId.YOU_CANNOT_ATTACK_IN_A_PEACEFUL_ZONE);
|
||||||
{
|
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
|
||||||
}
|
}
|
||||||
}
|
else if (getCurrentMp() < usedSkill.getMpConsume())
|
||||||
else
|
|
||||||
{
|
{
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
|
else if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user