From 8e6aef9108d5a276b817e475c653383e5ff2bba7 Mon Sep 17 00:00:00 2001 From: Rumen Nikiforov <unafraid89@gmail.com> Date: Wed, 9 May 2012 01:39:16 +0000 Subject: [PATCH] BETA: Restrictions added in [8814] must apply only for admin_transform command --- .../admincommandhandlers/AdminPolymorph.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminPolymorph.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminPolymorph.java index 5e04a54d95..ab9839c363 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminPolymorph.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminPolymorph.java @@ -52,26 +52,8 @@ public class AdminPolymorph implements IAdminCommandHandler return false; } - if (activeChar.isTransformed() || activeChar.isInStance()) - { - activeChar.sendPacket(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN); - return false; - } - - if (activeChar.isInWater()) - { - activeChar.sendPacket(SystemMessageId.YOU_CANNOT_POLYMORPH_INTO_THE_DESIRED_FORM_IN_WATER); - return false; - } - - if (activeChar.isFlyingMounted() || activeChar.isMounted() || activeChar.isRidingStrider()) - { - activeChar.sendPacket(SystemMessageId.YOU_CANNOT_POLYMORPH_WHILE_RIDING_A_PET); - return false; - } - if (command.startsWith("admin_untransform")) - { + { L2Object obj = activeChar.getTarget(); if (obj instanceof L2Character) { @@ -84,6 +66,24 @@ public class AdminPolymorph implements IAdminCommandHandler } else if (command.startsWith("admin_transform")) { + if (activeChar.isTransformed() || activeChar.isInStance()) + { + activeChar.sendPacket(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN); + return false; + } + + else if (activeChar.isInWater()) + { + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_POLYMORPH_INTO_THE_DESIRED_FORM_IN_WATER); + return false; + } + + else if (activeChar.isFlyingMounted() || activeChar.isMounted() || activeChar.isRidingStrider()) + { + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_POLYMORPH_WHILE_RIDING_A_PET); + return false; + } + L2Object obj = activeChar.getTarget(); if (obj instanceof L2PcInstance) { -- GitLab