Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- # L2jFrozen Project - www.l2jfrozen.com
- Index: java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/network/serverpackets/UserInfo.java (revision 683)
- +++ java/head-src/com/l2jfrozen/gameserver/network/serverpackets/UserInfo.java (working copy)
- @@ -102,43 +102,82 @@
- writeD(_cha.getActiveWeaponItem() != null ? 40 : 20); // 20 no weapon, 40 weapon equipped
- - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_UNDER));
- - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
- - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
- - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
- - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
- - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
- + if (!_activeChar.isDressMeEnabled())
- + {
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_DHAIR));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));
- +
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_DHAIR));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));
- + }
- + else
- + {
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_DHAIR));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES) : (_activeChar.getDressMeData().getGlovesId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES) : _activeChar.getDressMeData().getGlovesId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST) : (_activeChar.getDressMeData().getChestId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST) : _activeChar.getDressMeData().getChestId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS) : (_activeChar.getDressMeData().getLegsId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS) : _activeChar.getDressMeData().getLegsId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET) : (_activeChar.getDressMeData().getBootsId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET) : _activeChar.getDressMeData().getBootsId()));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
- + writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));
- +
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_DHAIR));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : (_activeChar.getDressMeData().getGlovesId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : _activeChar.getDressMeData().getGlovesId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : (_activeChar.getDressMeData().getChestId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : _activeChar.getDressMeData().getChestId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : (_activeChar.getDressMeData().getLegsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : _activeChar.getDressMeData().getLegsId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : (_activeChar.getDressMeData().getBootsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : _activeChar.getDressMeData().getBootsId()));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
- + writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));
- + }
- writeH(0x00);
- writeH(0x00);
- writeH(0x00);
- Index: java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin14.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin14.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin14.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin1 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME1);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME1);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME1);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME1);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME1 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_1
- + };
- +}
- \ No newline at end of file
- Index: java/head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/DressMe.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/DressMe.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/DressMe.java (working copy)
- @@ -0,0 +1,59 @@
- +package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
- +
- +import com.l2jfrozen.gameserver.datatables.sql.ItemTable;
- +import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
- +
- +/**
- + * @author Anarchy
- + * @adaptacion Todos
- + *
- + */
- +public class DressMe implements IVoicedCommandHandler
- +{
- + private static final String[] VOICED_COMMANDS = { "dressme" };
- +
- +
- + @Override
- + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
- + {
- + if (command.equals("dressme"))
- + {
- + sendMainWindow(activeChar);
- + }
- +
- + return true;
- + }
- +
- + public static void sendMainWindow(L2PcInstance activeChar)
- + {
- + NpcHtmlMessage htm = new NpcHtmlMessage(0);
- + htm.setFile("./data/html/custom/dressme/main.htm");
- + htm.replace("%enabled%", activeChar.isDressMeEnabled() ? "enabled" : "disabled");
- + if (activeChar.getDressMeData() == null)
- + {
- + htm.replace("%chestinfo%", "You have no custom chest.");
- + htm.replace("%legsinfo%", "You have no custom legs.");
- + htm.replace("%bootsinfo%", "You have no custom boots.");
- + htm.replace("%glovesinfo%", "You have no custom gloves.");
- + htm.replace("%weapinfo%", "You have no custom weapon.");
- + }
- + else
- + {
- + htm.replace("%chestinfo%", activeChar.getDressMeData().getChestId() == 0 ? "You have no custom chest." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getChestId()).getName());
- + htm.replace("%legsinfo%", activeChar.getDressMeData().getLegsId() == 0 ? "You have no custom legs." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getLegsId()).getName());
- + htm.replace("%bootsinfo%", activeChar.getDressMeData().getBootsId() == 0 ? "You have no custom boots." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getBootsId()).getName());
- + htm.replace("%glovesinfo%", activeChar.getDressMeData().getGlovesId() == 0 ? "You have no custom gloves." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getGlovesId()).getName());
- + htm.replace("%weapinfo%", activeChar.getDressMeData().getWeapId() == 0 ? "You have no custom weapon." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getWeapId()).getName());
- + }
- +
- + activeChar.sendPacket(htm);
- + }
- +
- + @Override
- + public String[] getVoicedCommandList()
- + {
- + return VOICED_COMMANDS;
- + }
- +}
- \ No newline at end of file
- Index: java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin12.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin12.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin12.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin12 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME12);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME12);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME12);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME12);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME12 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_12
- + };
- +}
- \ No newline at end of file
- Index: java/head-src/com/l2jfrozen/Config.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/Config.java (revision 683)
- +++ java/head-src/com/l2jfrozen/Config.java (working copy)
- @@ -764,6 +764,45 @@
- public static boolean OFFLINE_SET_NAME_COLOR;
- /** Color for offline mode */
- public static int OFFLINE_NAME_COLOR;
- +
- + public static boolean ALLOW_DRESS_ME_SYSTEM;
- + public static Map<String, Integer> DRESS_ME_CHESTS = new HashMap<>();
- + public static Map<String, Integer> DRESS_ME_LEGS = new HashMap<>();
- + public static Map<String, Integer> DRESS_ME_BOOTS = new HashMap<>();
- + public static Map<String, Integer> DRESS_ME_GLOVES = new HashMap<>();
- + public static Map<String, Integer> DRESS_ME_WEAPONS = new HashMap<>();
- + public static String SKIN_NAME1;
- + public static String SKIN_NAME2;
- + public static String SKIN_NAME3;
- + public static String SKIN_NAME4;
- + public static String SKIN_NAME5;
- + public static String SKIN_NAME6;
- + public static String SKIN_NAME7;
- + public static String SKIN_NAME8;
- + public static String SKIN_NAME9;
- + public static String SKIN_NAME10;
- + public static String SKIN_NAME11;
- + public static String SKIN_NAME12;
- + public static String SKIN_NAME13;
- + public static String SKIN_NAME14;
- + public static String SKIN_NAME15;
- + public static int SKIN_ITEM_1;
- + public static int SKIN_ITEM_2;
- + public static int SKIN_ITEM_3;
- + public static int SKIN_ITEM_4;
- + public static int SKIN_ITEM_5;
- + public static int SKIN_ITEM_6;
- + public static int SKIN_ITEM_7;
- + public static int SKIN_ITEM_8;
- + public static int SKIN_ITEM_9;
- + public static int SKIN_ITEM_10;
- + public static int SKIN_ITEM_11;
- + public static int SKIN_ITEM_12;
- + public static int SKIN_ITEM_13;
- + public static int SKIN_ITEM_14;
- + public static int SKIN_ITEM_15;
- +
- +
- /** Allow teleporting to towns that are under siege ? */
- public static boolean ALLOW_SIEGE_TELEPORT;
- @@ -2089,11 +2128,78 @@
- FARM1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm1CustomMeesage", "You have been teleported to Farm Zone 1!");
- FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!");
- PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!");
- PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
- + ALLOW_DRESS_ME_SYSTEM = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowDressMeSystem", "false"));
- + SKIN_NAME1 = String.valueOf(L2JFrozenSettings.getProperty("SkinName1", "SkinName"));
- + SKIN_NAME2 = String.valueOf(L2JFrozenSettings.getProperty("SkinName2", "SkinName"));
- + SKIN_NAME3 = String.valueOf(L2JFrozenSettings.getProperty("SkinName3", "SkinName"));
- + SKIN_NAME4 = String.valueOf(L2JFrozenSettings.getProperty("SkinName4", "SkinName"));
- + SKIN_NAME5 = String.valueOf(L2JFrozenSettings.getProperty("SkinName5", "SkinName"));
- + SKIN_NAME6 = String.valueOf(L2JFrozenSettings.getProperty("SkinName6", "SkinName"));
- + SKIN_NAME7 = String.valueOf(L2JFrozenSettings.getProperty("SkinName7", "SkinName"));
- + SKIN_NAME8 = String.valueOf(L2JFrozenSettings.getProperty("SkinName8", "SkinName"));
- + SKIN_NAME9 = String.valueOf(L2JFrozenSettings.getProperty("SkinName9", "SkinName"));
- + SKIN_NAME10 = String.valueOf(L2JFrozenSettings.getProperty("SkinName10", "SkinName"));
- + SKIN_NAME11 = String.valueOf(L2JFrozenSettings.getProperty("SkinName11", "SkinName"));
- + SKIN_NAME12 = String.valueOf(L2JFrozenSettings.getProperty("SkinName12", "SkinName"));
- + SKIN_NAME13 = String.valueOf(L2JFrozenSettings.getProperty("SkinName13", "SkinName"));
- + SKIN_NAME14 = String.valueOf(L2JFrozenSettings.getProperty("SkinName14", "SkinName"));
- + SKIN_NAME15 = String.valueOf(L2JFrozenSettings.getProperty("SkinName15", "SkinName"));
- + SKIN_ITEM_1 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem1", "0"));
- + SKIN_ITEM_2 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem2", "0"));
- + SKIN_ITEM_3 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem3", "0"));
- + SKIN_ITEM_4 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem4", "0"));
- + SKIN_ITEM_5 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem5", "0"));
- + SKIN_ITEM_6 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem6", "0"));
- + SKIN_ITEM_7 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem7", "0"));
- + SKIN_ITEM_8 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem8", "0"));
- + SKIN_ITEM_9 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem9", "0"));
- + SKIN_ITEM_10 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem10", "0"));
- + SKIN_ITEM_11 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem11", "0"));
- + SKIN_ITEM_12 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem12", "0"));
- + SKIN_ITEM_13 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem13", "0"));
- + SKIN_ITEM_14 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem14", "0"));
- + SKIN_ITEM_15 = Integer.parseInt(L2JFrozenSettings.getProperty("SkinItem15", "0"));
- + String temp = L2JFrozenSettings.getProperty("DressMeChests", "");
- + String[] temp2 = temp.split(";");
- + for (String s : temp2)
- + {
- + String[] t = s.split(",");
- + DRESS_ME_CHESTS.put(t[0], Integer.parseInt(t[1]));
- + }
- + temp = L2JFrozenSettings.getProperty("DressMeLegs", "");
- + temp2 = temp.split(";");
- + for (String s : temp2)
- + {
- + String[] t = s.split(",");
- + DRESS_ME_LEGS.put(t[0], Integer.parseInt(t[1]));
- + }
- + temp = L2JFrozenSettings.getProperty("DressMeBoots", "");
- + temp2 = temp.split(";");
- + for (String s : temp2)
- + {
- + String[] t = s.split(",");
- + DRESS_ME_BOOTS.put(t[0], Integer.parseInt(t[1]));
- + }
- + temp = L2JFrozenSettings.getProperty("DressMeGloves", "");
- + temp2 = temp.split(";");
- + for (String s : temp2)
- + {
- + String[] t = s.split(",");
- + DRESS_ME_GLOVES.put(t[0], Integer.parseInt(t[1]));
- + }
- + temp = L2JFrozenSettings.getProperty("DressMeWeapons", "");
- + temp2 = temp.split(";");
- + for (String s : temp2)
- + {
- + String[] t = s.split(",");
- + DRESS_ME_WEAPONS.put(t[0], Integer.parseInt(t[1]));
- + }
- +
- ENCHANT_PROTECTOR = Boolean.parseBoolean(L2JFrozenSettings.getProperty("EnchantProtector", "true"));
- }
- catch (final Exception e)
- {
- e.printStackTrace();
- throw new Error("Failed to Load " + L2JFROZEN + " File.");
- Index: java/head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 683)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy)
- @@ -23,6 +23,7 @@
- import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.TvTCmd;
- import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.VersionCmd;
- import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Voting;
- import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Wedding;
- +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.DressMe;
- /**
- * This class ...
- @@ -51,8 +52,10 @@
- if (Config.OFFLINE_TRADE_ENABLE && Config.OFFLINE_COMMAND2)
- {
- registerVoicedCommandHandler(new OfflineShop());
- }
- + if (Config.ALLOW_DRESS_ME_SYSTEM)
- + registerVoicedCommandHandler(new DressMe());
- +
- LOGGER.info("VoicedCommandHandler: Loaded " + _datatable.size() + " handlers.");
- }
- Index: java/head-src/com/l2jfrozen/gameserver/handler/custom/DressMeData.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/custom/DressMeData.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/custom/DressMeData.java (working copy)
- @@ -0,0 +1,74 @@
- +package com.l2jfrozen.gameserver.handler.custom;
- +
- +/**
- + * @author Anarchy
- + * @adaptacion Todos
- + *
- + */
- +public class DressMeData
- +{
- + private int chestId,
- + legsId,
- + glovesId,
- + feetId,
- + weapId;
- +
- + public DressMeData()
- + {
- + chestId = 0;
- + legsId = 0;
- + glovesId = 0;
- + feetId = 0;
- + weapId = 0;
- + }
- +
- + public int getChestId()
- + {
- + return chestId;
- + }
- +
- + public int getLegsId()
- + {
- + return legsId;
- + }
- +
- + public int getGlovesId()
- + {
- + return glovesId;
- + }
- +
- + public int getBootsId()
- + {
- + return feetId;
- + }
- +
- + public int getWeapId()
- + {
- + return weapId;
- + }
- +
- + public void setChestId(int val)
- + {
- + chestId = val;
- + }
- +
- + public void setLegsId(int val)
- + {
- + legsId = val;
- + }
- +
- + public void setGlovesId(int val)
- + {
- + glovesId = val;
- + }
- +
- + public void setBootsId(int val)
- + {
- + feetId = val;
- + }
- +
- + public void setWeapId(int val)
- + {
- + weapId = val;
- + }
- +}
- \ No newline at end of file
- Index: java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin10.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin10.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin10.java (working copy)
- +@@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin10 implements IItemHandler
- {
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME10);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME10);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME10);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME10);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME10 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_10
- + };
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/ItemHandler.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/ItemHandler.java (revision 683)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/ItemHandler.java (working copy)
- @@ -49,6 +49,21 @@
- import com.l2jfrozen.gameserver.handler.itemhandlers.SoulCrystals;
- import com.l2jfrozen.gameserver.handler.itemhandlers.SoulShots;
- import com.l2jfrozen.gameserver.handler.itemhandlers.SpecialXMas;
- import com.l2jfrozen.gameserver.handler.itemhandlers.SpiritShot;
- import com.l2jfrozen.gameserver.handler.itemhandlers.SummonItems;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin1;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin2;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin3;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin4;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin5;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin6;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin7;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin8;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin9;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin10;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin11;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin12;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin13;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin14;
- +import com.l2jfrozen.gameserver.handler.itemhandlers.skin15;
- /**
- * This class manages handlers of items
- @@ -109,7 +124,23 @@
- registerItemHandler(new ExtractableItems());
- registerItemHandler(new SummonItems());
- registerItemHandler(new BeastSpice());
- + registerItemHandler(new skin1());
- + registerItemHandler(new skin2());
- + registerItemHandler(new skin3());
- + registerItemHandler(new skin4());
- + registerItemHandler(new skin5());
- + registerItemHandler(new skin6());
- + registerItemHandler(new skin7());
- + registerItemHandler(new skin8());
- + registerItemHandler(new skin9());
- + registerItemHandler(new skin10());
- + registerItemHandler(new skin11());
- + registerItemHandler(new skin12());
- + registerItemHandler(new skin13());
- + registerItemHandler(new skin14());
- + registerItemHandler(new skin15());
- +
- _log.config("ItemHandler: Loaded " + _dataTable.size() + " handlers.");
- }
- Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin8.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin8.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin8.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin8 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME8);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME8);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME8);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME8);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME8 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_8
- + };
- +}
- \ No newline at end of file
- Index: java/head-src/com/l2jfrozen/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 683)
- +++ java/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- @@ -202,6 +202,7 @@
- import com.l2jfrozen.gameserver.geo.GeoData;
- import com.l2jfrozen.gameserver.handler.IItemHandler;
- import com.l2jfrozen.gameserver.handler.ItemHandler;
- import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminEditChar;
- +import com.l2jfrozen.gameserver.handler.custom.DressMeData;
- /**
- * This class represents all player characters in the world.
- @@ -367,6 +368,31 @@
- /** The _cur weight penalty. */
- private int _curWeightPenalty = 0;
- + private DressMeData _dressmedata = null;
- + private boolean _dressed = false;
- +
- +
- + public DressMeData getDressMeData()
- + {
- + return _dressmedata;
- + }
- +
- + public void setDressMeData(DressMeData val)
- + {
- + _dressmedata = val;
- + }
- +
- + public boolean isDressMeEnabled()
- + {
- + return _dressed;
- + }
- +
- + public void setDressMeEnabled(boolean val)
- + {
- + _dressed = val;
- + }
- +
- +
- /** The _last compass zone. */
- private int _lastCompassZone; // the last compass zone update send to the client
- Index: java/head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java
- ===================================================================
- --- java/nhead-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (revision 683)
- +++ java/head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
- @@ -18,6 +18,7 @@
- import java.util.StringTokenizer;
- import org.apache.log4j.Logger;
- +import com.l2jfrozen.Config;
- import com.l2jfrozen.gameserver.ai.CtrlIntention;
- import com.l2jfrozen.gameserver.communitybbs.CommunityBoard;
- import com.l2jfrozen.gameserver.datatables.sql.AdminCommandAccessRights;
- @@ -35,6 +36,10 @@
- import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad;
- import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
- import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
- +import com.l2jfrozen.gameserver.datatables.sql.ItemTable;
- +import com.l2jfrozen.gameserver.handler.custom.DressMeData;
- +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.DressMe;
- +import com.l2jfrozen.gameserver.model.Inventory;
- /**
- * This class ...
- @@ -46,7 +51,7 @@
- private static Logger _log = Logger.getLogger(RequestBypassToServer.class.getName());
- // S
- - private String _command;
- + public static String _command;
- @Override
- protected void readImpl()
- @@ -95,6 +100,51 @@
- ach.useAdminCommand(_command, activeChar);
- }
- + else if (_command.equals("bp_changedressmestatus"))
- + {
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + }
- +
- + DressMe.sendMainWindow(activeChar);
- + }
- + else if (_command.startsWith("bp_editWindow"))
- + {
- + String bp = _command.substring(14);
- + StringTokenizer st = new StringTokenizer(bp);
- +
- + sendEditWindow(activeChar, st.nextToken());
- + }
- + else if (_command.startsWith("bp_setpart"))
- + {
- + String bp = _command.substring(11);
- + StringTokenizer st = new StringTokenizer(bp);
- +
- + String part = st.nextToken();
- + String type = st.nextToken();
- +
- + setPart(activeChar, part, type);
- + }
- + else if (_command.startsWith("bp_gettarget"))
- + {
- + String bp = _command.substring(13);
- + StringTokenizer st = new StringTokenizer(bp);
- +
- + String part = st.nextToken();
- +
- + stealTarget(activeChar, part);
- + }
- + else if (_command.equals("bp_main"))
- + {
- + DressMe.sendMainWindow(activeChar);
- + }
- else if (_command.startsWith("voice "))
- {
- String text = _command.substring(5);
- @@ -249,6 +299,303 @@
- activeChar.sendPacket(html);
- }
- + public void stealTarget(L2PcInstance p, String part)
- + {
- + if (p.getTarget() == null || !(p.getTarget() instanceof L2PcInstance))
- + {
- + p.sendMessage("Invalid target.");
- + return;
- + }
- +
- + L2PcInstance t = (L2PcInstance)p.getTarget();
- +
- + if (p.getDressMeData() == null)
- + {
- + DressMeData dmd = new DressMeData();
- + p.setDressMeData(dmd);
- + }
- +
- + boolean returnMain = false;
- +
- + switch (part)
- + {
- + case "chest":
- + {
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) == null)
- + {
- + p.getDressMeData().setChestId(0);
- + }
- + else
- + {
- + p.getDressMeData().setChestId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItemId());
- + }
- + break;
- + }
- + case "legs":
- + {
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) == null)
- + {
- + p.getDressMeData().setLegsId(0);
- + }
- + else
- + {
- + p.getDressMeData().setLegsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS).getItemId());
- + }
- + break;
- + }
- + case "gloves":
- + {
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) == null)
- + {
- + p.getDressMeData().setGlovesId(0);
- + }
- + else
- + {
- + p.getDressMeData().setGlovesId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES).getItemId());
- + }
- + break;
- + }
- + case "boots":
- + {
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) == null)
- + {
- + p.getDressMeData().setBootsId(0);
- + }
- + else
- + {
- + p.getDressMeData().setBootsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET).getItemId());
- + }
- + break;
- + }
- + case "weap":
- + {
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null)
- + {
- + p.getDressMeData().setWeapId(0);
- + }
- + else
- + {
- + p.getDressMeData().setWeapId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getItemId());
- + }
- + break;
- + }
- + case "all":
- + {
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) == null)
- + {
- + p.getDressMeData().setChestId(0);
- + }
- + else
- + {
- + p.getDressMeData().setChestId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItemId());
- + }
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) == null)
- + {
- + p.getDressMeData().setLegsId(0);
- + }
- + else
- + {
- + p.getDressMeData().setLegsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS).getItemId());
- + }
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) == null)
- + {
- + p.getDressMeData().setGlovesId(0);
- + }
- + else
- + {
- + p.getDressMeData().setGlovesId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES).getItemId());
- + }
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) == null)
- + {
- + p.getDressMeData().setBootsId(0);
- + }
- + else
- + {
- + p.getDressMeData().setBootsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET).getItemId());
- + }
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null)
- + {
- + p.getDressMeData().setWeapId(0);
- + }
- + else
- + {
- + p.getDressMeData().setWeapId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getItemId());
- + }
- + returnMain = true;
- + break;
- + }
- + }
- +
- + p.broadcastUserInfo();
- + if (!returnMain)
- + sendEditWindow(p, part);
- + else
- + DressMe.sendMainWindow(p);
- + }
- +
- + public static void setPart(L2PcInstance p, String part, String type)
- + {
- + if (p.getDressMeData() == null)
- + {
- + DressMeData dmd = new DressMeData();
- + p.setDressMeData(dmd);
- + }
- +
- + switch (part)
- + {
- + case "chest":
- + {
- + if (Config.DRESS_ME_CHESTS.keySet().contains(type))
- + {
- + p.getDressMeData().setChestId(Config.DRESS_ME_CHESTS.get(type));
- + }
- +
- + break;
- + }
- + case "legs":
- + {
- + if (Config.DRESS_ME_LEGS.keySet().contains(type))
- + {
- + p.getDressMeData().setLegsId(Config.DRESS_ME_LEGS.get(type));
- + }
- +
- + break;
- + }
- + case "gloves":
- + {
- + if (Config.DRESS_ME_GLOVES.keySet().contains(type))
- + {
- + p.getDressMeData().setGlovesId(Config.DRESS_ME_GLOVES.get(type));
- + }
- +
- + break;
- + }
- + case "boots":
- + {
- + if (Config.DRESS_ME_BOOTS.keySet().contains(type))
- + {
- + p.getDressMeData().setBootsId(Config.DRESS_ME_BOOTS.get(type));
- + }
- +
- + break;
- + }
- + case "weap":
- + {
- + if (Config.DRESS_ME_WEAPONS.keySet().contains(type))
- + {
- + p.getDressMeData().setWeapId(Config.DRESS_ME_WEAPONS.get(type));
- + }
- +
- + break;
- + }
- + }
- +
- + p.broadcastUserInfo();
- +// sendEditWindow(p, part);
- + }
- +
- + public static void sendEditWindow(L2PcInstance p, String part)
- + {
- + NpcHtmlMessage htm = new NpcHtmlMessage(0);
- + htm.setFile("./data/html/custom/dressme/edit.htm");
- + htm.replace("%part%", part);
- + switch (part)
- + {
- + case "chest":
- + {
- + if (p.getDressMeData() == null)
- + {
- + htm.replace("%partinfo%", "You have no custom chest.");
- + }
- + else
- + {
- + htm.replace("%partinfo%", p.getDressMeData().getChestId() == 0 ? "You have no custom chest." : ItemTable.getInstance().getTemplate(p.getDressMeData().getChestId()).getName());
- + }
- + String temp = "";
- + for (String s : Config.DRESS_ME_CHESTS.keySet())
- + {
- + temp += s+";";
- + }
- + htm.replace("%dropboxdata%", temp);
- + break;
- + }
- + case "legs":
- + {
- + if (p.getDressMeData() == null)
- + {
- + htm.replace("%partinfo%", "You have no custom legs.");
- + }
- + else
- + {
- + htm.replace("%partinfo%", p.getDressMeData().getLegsId() == 0 ? "You have no custom legs." : ItemTable.getInstance().getTemplate(p.getDressMeData().getLegsId()).getName());
- + }
- + String temp = "";
- + for (String s : Config.DRESS_ME_LEGS.keySet())
- + {
- + temp += s+";";
- + }
- + htm.replace("%dropboxdata%", temp);
- + break;
- + }
- + case "gloves":
- + {
- + if (p.getDressMeData() == null)
- + {
- + htm.replace("%partinfo%", "You have no custom gloves.");
- + }
- + else
- + {
- + htm.replace("%partinfo%", p.getDressMeData().getGlovesId() == 0 ? "You have no custom gloves." : ItemTable.getInstance().getTemplate(p.getDressMeData().getGlovesId()).getName());
- + }
- + String temp = "";
- + for (String s : Config.DRESS_ME_GLOVES.keySet())
- + {
- + temp += s+";";
- + }
- + htm.replace("%dropboxdata%", temp);
- + break;
- + }
- + case "boots":
- + {
- + if (p.getDressMeData() == null)
- + {
- + htm.replace("%partinfo%", "You have no custom boots.");
- + }
- + else
- + {
- + htm.replace("%partinfo%", p.getDressMeData().getBootsId() == 0 ? "You have no custom boots." : ItemTable.getInstance().getTemplate(p.getDressMeData().getBootsId()).getName());
- + }
- + String temp = "";
- + for (String s : Config.DRESS_ME_BOOTS.keySet())
- + {
- + temp += s+";";
- + }
- + htm.replace("%dropboxdata%", temp);
- + break;
- + }
- + case "weap":
- + {
- + if (p.getDressMeData() == null)
- + {
- + htm.replace("%partinfo%", "You have no custom weapon.");
- + }
- + else
- + {
- + htm.replace("%partinfo%", p.getDressMeData().getWeapId() == 0 ? "You have no custom weapon." : ItemTable.getInstance().getTemplate(p.getDressMeData().getWeapId()).getName());
- + }
- + String temp = "";
- + for (String s : Config.DRESS_ME_WEAPONS.keySet())
- + {
- + temp += s+";";
- + }
- + htm.replace("%dropboxdata%", temp);
- + break;
- + }
- + }
- +
- + p.sendPacket(htm);
- + }
- +
- /*
- * (non-Javadoc)
- * @see net.sf.l2j.gameserver.clientpackets.L2GameClientPacket#getType()
- Index: java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin15.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin15.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin15.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin15 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME15);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME15);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME15);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME15);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME15 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_15
- + };
- +}
- \ No newline at end of file
- Index: java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin13.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin13.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin13.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin13 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME13);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME13);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME13);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME13);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME13 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_13
- + };
- +}
- \ No newline at end of file
- Index: java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin11.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin11.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin11.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin11 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME11);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME11);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME11);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME11);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME11 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_11
- + };
- +}
- \ No newline at end of file
- Index: java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin9.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin9.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin9.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin9 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME9);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME9);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME9);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME9);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME9 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_9
- + };
- +}
- \ No newline at end of file
- Index: java/config/Custom.properties
- ===================================================================
- --- java/config/functions/l2jfrozen.properties (revision 683)
- +++ java/config/functions/l2jfrozen.properties (working copy)
- @@ -331,4 +331,53 @@
- OfflineSetNameColor = False
- # Color of the name in offline mode (if OfflineSetNameColor = True)
- -OfflineNameColor = 808080
- \ No newline at end of file
- +OfflineNameColor = 808080
- +
- +# -----------------------------------------
- +# DressMe system -
- +# -----------------------------------------
- +#
- +AllowDressMeSystem = False
- +
- +# DressMe values.
- +# Skin name (Example: "Draconic")
- +SkinName1 = Draconic
- +SkinName2 = Imperial
- +SkinName3 = Arcana
- +SkinName4 = SkinName4
- +SkinName5 = SkinName5
- +SkinName6 = SkinName6
- +SkinName7 = SkinName7
- +SkinName8 = SkinName8
- +SkinName9 = SkinName9
- +SkinName10 = SkinName10
- +SkinName11 = SkinName11
- +SkinName12 = SkinName12
- +SkinName13 = SkinName13
- +SkinName14 = SkinName14
- +SkinName15 = SkinName15
- +
- +# Skin item id (Example: "6673")
- +SkinItem1 = 0
- +SkinItem2 = 0
- +SkinItem3 = 0
- +SkinItem4 = 0
- +SkinItem5 = 0
- +SkinItem6 = 0
- +SkinItem7 = 0
- +SkinItem8 = 0
- +SkinItem9 = 0
- +SkinItem10 = 0
- +SkinItem11 = 0
- +SkinItem12 = 0
- +SkinItem13 = 0
- +SkinItem14 = 0
- +SkinItem15 = 0
- +
- +# Note: It works like name,id;name,id
- +# WARNING: No spaces on names, use _ instead of space.
- +DressMeChests = Draconic,6379;Imperial,6373;Arcana,6383
- +DressMeLegs = Imperial,6374
- +DressMeBoots = Draconic,6381;Imperial,6376;Arcana,6385
- +DressMeGloves = Draconic,6380;Imperial,6375;Arcana,6384
- +DressMeWeapons = Draconic_Bow,7577;Shining_Bow,6594;Arcana_Mace,6608
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin7.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin7.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin7.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin7 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME7);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME7);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME7);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME7);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME7 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_7
- + };
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin6.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin6.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin6.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin6 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME6);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME6);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME6);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME6);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME6 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_6
- + };
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin5.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin5.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin5.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin5 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME5);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME5);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME5);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME5);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME5 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_5
- + };
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin4.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin4.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin4.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin4 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME4);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME4);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME4);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME4);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME4 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_4
- + };
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/custom/DressMeData.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/custom/DressMeData.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/custom/DressMeData.java (working copy)
- @@ -0,0 +1,74 @@
- +package com.l2jfrozen.gameserver.handler.custom;
- +
- +/**
- + * @author Anarchy
- + * @adaptacion Todos
- + *
- + */
- +public class DressMeData
- +{
- + private int chestId,
- + legsId,
- + glovesId,
- + feetId,
- + weapId;
- +
- + public DressMeData()
- + {
- + chestId = 0;
- + legsId = 0;
- + glovesId = 0;
- + feetId = 0;
- + weapId = 0;
- + }
- +
- + public int getChestId()
- + {
- + return chestId;
- + }
- +
- + public int getLegsId()
- + {
- + return legsId;
- + }
- +
- + public int getGlovesId()
- + {
- + return glovesId;
- + }
- +
- + public int getBootsId()
- + {
- + return feetId;
- + }
- +
- + public int getWeapId()
- + {
- + return weapId;
- + }
- +
- + public void setChestId(int val)
- + {
- + chestId = val;
- + }
- +
- + public void setLegsId(int val)
- + {
- + legsId = val;
- + }
- +
- + public void setGlovesId(int val)
- + {
- + glovesId = val;
- + }
- +
- + public void setBootsId(int val)
- + {
- + feetId = val;
- + }
- +
- + public void setWeapId(int val)
- + {
- + weapId = val;
- + }
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin3.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin3.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin3.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin3 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME3);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME3);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME3);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME3);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME3 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_3
- + };
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin2.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin2.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin2.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin2 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME2);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME2);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME2);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME2);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME2 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_2
- + };
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin1.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin1.java (nonexistent)
- +++ java/head-src/com/l2jfrozen/gameserver/handler/itemhandlers/skin1.java (working copy)
- @@ -0,0 +1,52 @@
- +package com.l2jfrozen.gameserver.handler.itemhandlers;
- +
- +import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.handler.IItemHandler;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance;
- +import com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer;
- +
- +public class skin1 implements IItemHandler
- +{
- + @Override
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME1);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME1);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME1);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME1);
- +
- + if (activeChar.isDressMeEnabled())
- + {
- + activeChar.setDressMeEnabled(false);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have disabled skin.");
- + }
- + else
- + {
- + activeChar.setDressMeEnabled(true);
- + activeChar.broadcastUserInfo();
- + activeChar.sendMessage("You have activated " + Config.SKIN_NAME1 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- + @Override
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +
- + private static final int ITEM_IDS[] = {
- + Config.SKIN_ITEM_1
- + };
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
- ===================================================================
- --- java/head-src/com/l2jfrozen/gameserver/network/serverpackets/CharInfo.java (revision 683)
- +++ java/head-src/com/l2jfrozen/gameserver/network/serverpackets/CharInfo.java (working copy)
- @@ -210,16 +210,32 @@
- }
- writeD(0); // Hair All, but there are no such items in C4
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LRHAND));
- - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
- + if (!_activeChar.isDressMeEnabled())
- + {
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_DHAIR));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));
- + }
- + else
- + {
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_DHAIR));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : (_activeChar.getDressMeData().getGlovesId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : _activeChar.getDressMeData().getGlovesId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : (_activeChar.getDressMeData().getChestId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : _activeChar.getDressMeData().getChestId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : (_activeChar.getDressMeData().getLegsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : _activeChar.getDressMeData().getLegsId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : (_activeChar.getDressMeData().getBootsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : _activeChar.getDressMeData().getBootsId()));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));
- + }
- // c6 new h's
- writeH(0x00);
- writeH(0x00);
Add Comment
Please, Sign In to add comment