Addition of Teleport effect.

This commit is contained in:
MobiusDevelopment 2020-12-17 22:46:47 +00:00
parent 6a6df848ff
commit 9ac7213232
4 changed files with 24 additions and 9 deletions

View File

@ -316,9 +316,9 @@
<hitTime>3500</hitTime>
</skill>
<skill id="60018" toLevel="1" name="Teleport">
<!-- AUTO GENERATED SKILL TODO: FIX IT -->
<icon>icon.skill0000</icon>
<operateType>A1</operateType>
<hitTime>2000</hitTime>
</skill>
<skill id="60019" toLevel="4" name="Jaban's Blessing">
<!-- AUTO GENERATED SKILL TODO: FIX IT -->

View File

@ -767,14 +767,17 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
// Abort any client actions, casting and remove target.
sendPacket(ActionFailed.get(SkillCastingType.NORMAL));
sendPacket(ActionFailed.get(SkillCastingType.NORMAL_SECOND));
if (isMoving())
if (isPlayer() && !_isImmobilized)
{
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);

View File

@ -58,7 +58,8 @@ public enum CommonSkill
ALCHEMY_CUBE_RANDOM_SUCCESS(17966, 1),
PET_SWITCH_STANCE(6054, 1),
WEIGHT_PENALTY(4270, 1),
POTION_MASTERY(45184, 1);
POTION_MASTERY(45184, 1),
TELEPORT(60018, 1);
private final SkillHolder _holder;

View File

@ -17,12 +17,15 @@
package org.l2jmobius.gameserver.network.clientpackets.teleports;
import org.l2jmobius.Config;
import org.l2jmobius.commons.concurrent.ThreadPool;
import org.l2jmobius.commons.network.PacketReader;
import org.l2jmobius.gameserver.data.xml.TeleportListData;
import org.l2jmobius.gameserver.instancemanager.CastleManager;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.TeleportListHolder;
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.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
@ -105,6 +108,14 @@ public class ExRequestTeleport implements IClientIncomingPacket
player.abortCast();
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);
}
}