Sync with L2jServer HighFive Apr 21st 2015.
This commit is contained in:
@@ -139,6 +139,7 @@ import com.l2jserver.gameserver.network.serverpackets.ChangeWaitType;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CharInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExRotation;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExTeleportToLocationActivate;
|
||||
import com.l2jserver.gameserver.network.serverpackets.FlyToLocation.FlyType;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MagicSkillCanceld;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MagicSkillLaunched;
|
||||
@@ -2062,7 +2063,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
*/
|
||||
public boolean checkDoCastConditions(Skill skill)
|
||||
{
|
||||
if ((skill == null) || isSkillDisabled(skill) || (((skill.getFlyRadius() > 0) || (skill.getFlyType() != null)) && isMovementDisabled()))
|
||||
if ((skill == null) || isSkillDisabled(skill) || ((skill.getFlyType() == FlyType.CHARGE) && isMovementDisabled()))
|
||||
{
|
||||
// Send a Server->Client packet ActionFailed to the L2PcInstance
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
|
@@ -9083,29 +9083,6 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
}
|
||||
|
||||
if (skill.hasEffectType(L2EffectType.TELEPORT_TO_TARGET))
|
||||
{
|
||||
// You cannot jump while rooted right ;)
|
||||
if (isMovementDisabled())
|
||||
{
|
||||
// Sends message that skill cannot be used...
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
|
||||
sm.addSkillName(skill.getId());
|
||||
sendPacket(sm);
|
||||
// Send a Server->Client packet ActionFailed to the L2PcInstance
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return false;
|
||||
}
|
||||
// And this skill cannot be used in peace zone, not even on NPCs!
|
||||
if (isInsideZone(ZoneId.PEACE))
|
||||
{
|
||||
// Sends a sys msg to client
|
||||
sendPacket(SystemMessageId.YOU_MAY_NOT_ATTACK_THIS_TARGET_IN_A_PEACEFUL_ZONE);
|
||||
// Send a Server->Client packet ActionFailed to the L2PcInstance
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Check if the skill is a good magic, target is a monster and if force attack is set, if not then we don't want to cast.
|
||||
if ((skill.getEffectPoint() > 0) && target.isMonster() && !forceUse)
|
||||
{
|
||||
|
Reference in New Issue
Block a user