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 5e04a54d95c461576c43965f593e3ff455ade635..ab9839c3639ff2eecd00c3067ab9c277d0039ea8 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) {