There is no need to check transformations.

This commit is contained in:
MobiusDev
2018-05-15 14:44:26 +00:00
parent 5dd6dcd18a
commit 1926a69233
16 changed files with 139 additions and 255 deletions

View File

@@ -467,11 +467,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
public void untransform()
{
if (isPlayer() && getActingPlayer().isFlyingMounted() && !getActingPlayer().canDismount())
{
return;
}
_transform.ifPresent(t -> t.onUntransform(this));
_transform = Optional.empty();

View File

@@ -6144,31 +6144,6 @@ public final class L2PcInstance extends L2Playable
}
public boolean dismount()
{
if (!canDismount())
{
return false;
}
final boolean wasFlying = isFlying();
sendPacket(new SetupGauge(3, 0, 0));
final int petId = _mountNpcId;
setMount(0, 0);
stopFeed();
clearPetData();
if (wasFlying)
{
removeSkill(CommonSkill.WYVERN_BREATH.getSkill());
}
broadcastPacket(new Ride(this));
setMountObjectID(0);
storePetFood(petId);
// Notify self and others about speed change
broadcastUserInfo();
return true;
}
public boolean canDismount()
{
L2WaterZone water = null;
for (L2ZoneType zone : ZoneManager.getInstance().getZones(getX(), getY(), getZ() - 300))
@@ -6203,6 +6178,22 @@ public final class L2PcInstance extends L2Playable
}
}, 1500);
}
final boolean wasFlying = isFlying();
sendPacket(new SetupGauge(3, 0, 0));
final int petId = _mountNpcId;
setMount(0, 0);
stopFeed();
clearPetData();
if (wasFlying)
{
removeSkill(CommonSkill.WYVERN_BREATH.getSkill());
}
broadcastPacket(new Ride(this));
setMountObjectID(0);
storePetFood(petId);
// Notify self and others about speed change
broadcastUserInfo();
return true;
}