Addition of Teleport effect.
This commit is contained in:
@@ -316,9 +316,9 @@
|
|||||||
<hitTime>3500</hitTime>
|
<hitTime>3500</hitTime>
|
||||||
</skill>
|
</skill>
|
||||||
<skill id="60018" toLevel="1" name="Teleport">
|
<skill id="60018" toLevel="1" name="Teleport">
|
||||||
<!-- AUTO GENERATED SKILL TODO: FIX IT -->
|
|
||||||
<icon>icon.skill0000</icon>
|
<icon>icon.skill0000</icon>
|
||||||
<operateType>A1</operateType>
|
<operateType>A1</operateType>
|
||||||
|
<hitTime>2000</hitTime>
|
||||||
</skill>
|
</skill>
|
||||||
<skill id="60019" toLevel="4" name="Jaban's Blessing">
|
<skill id="60019" toLevel="4" name="Jaban's Blessing">
|
||||||
<!-- AUTO GENERATED SKILL TODO: FIX IT -->
|
<!-- AUTO GENERATED SKILL TODO: FIX IT -->
|
||||||
|
@@ -767,14 +767,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Abort any client actions, casting and remove target.
|
// Abort any client actions, casting and remove target.
|
||||||
sendPacket(ActionFailed.get(SkillCastingType.NORMAL));
|
if (isPlayer() && !_isImmobilized)
|
||||||
sendPacket(ActionFailed.get(SkillCastingType.NORMAL_SECOND));
|
|
||||||
if (isMoving())
|
|
||||||
{
|
{
|
||||||
stopMove(null);
|
sendPacket(ActionFailed.get(SkillCastingType.NORMAL));
|
||||||
|
sendPacket(ActionFailed.get(SkillCastingType.NORMAL_SECOND));
|
||||||
|
if (isMoving())
|
||||||
|
{
|
||||||
|
stopMove(null);
|
||||||
|
}
|
||||||
|
abortCast();
|
||||||
|
setTarget(null);
|
||||||
}
|
}
|
||||||
abortCast();
|
|
||||||
setTarget(null);
|
|
||||||
|
|
||||||
setTeleporting(true);
|
setTeleporting(true);
|
||||||
|
|
||||||
|
@@ -58,7 +58,8 @@ public enum CommonSkill
|
|||||||
ALCHEMY_CUBE_RANDOM_SUCCESS(17966, 1),
|
ALCHEMY_CUBE_RANDOM_SUCCESS(17966, 1),
|
||||||
PET_SWITCH_STANCE(6054, 1),
|
PET_SWITCH_STANCE(6054, 1),
|
||||||
WEIGHT_PENALTY(4270, 1),
|
WEIGHT_PENALTY(4270, 1),
|
||||||
POTION_MASTERY(45184, 1);
|
POTION_MASTERY(45184, 1),
|
||||||
|
TELEPORT(60018, 1);
|
||||||
|
|
||||||
private final SkillHolder _holder;
|
private final SkillHolder _holder;
|
||||||
|
|
||||||
|
@@ -17,12 +17,15 @@
|
|||||||
package org.l2jmobius.gameserver.network.clientpackets.teleports;
|
package org.l2jmobius.gameserver.network.clientpackets.teleports;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
|
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import org.l2jmobius.commons.network.PacketReader;
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
import org.l2jmobius.gameserver.data.xml.TeleportListData;
|
import org.l2jmobius.gameserver.data.xml.TeleportListData;
|
||||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.holders.TeleportListHolder;
|
import org.l2jmobius.gameserver.model.holders.TeleportListHolder;
|
||||||
import org.l2jmobius.gameserver.model.siege.Castle;
|
import org.l2jmobius.gameserver.model.siege.Castle;
|
||||||
|
import org.l2jmobius.gameserver.model.skills.CommonSkill;
|
||||||
|
import org.l2jmobius.gameserver.model.skills.SkillCaster;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
@@ -105,6 +108,14 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
|||||||
|
|
||||||
player.abortCast();
|
player.abortCast();
|
||||||
player.stopMove(null);
|
player.stopMove(null);
|
||||||
player.teleToLocation(teleport.getX(), teleport.getY(), teleport.getZ());
|
player.setImmobilized(true);
|
||||||
|
|
||||||
|
SkillCaster.triggerCast(player, player, CommonSkill.TELEPORT.getSkill());
|
||||||
|
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
|
{
|
||||||
|
player.teleToLocation(teleport.getX(), teleport.getY(), teleport.getZ());
|
||||||
|
player.setImmobilized(false);
|
||||||
|
}, 2500);
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user