Sync with L2jServer HighFive Apr 21st 2015.

This commit is contained in:
MobiusDev
2015-04-22 09:59:28 +00:00
parent c896c6cd51
commit 1a6970e30d
37 changed files with 1518 additions and 1298 deletions

View File

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

View File

@@ -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)
{