Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/config/Skin.properties b/config/Skin.properties
- new file mode 100644
- index 0000000..4c3069e
- --- /dev/null
- +++ b/config/Skin.properties
- @@ -0,0 +1,193 @@
- +#===============================================================
- +# Skin Item
- +#===============================================================
- +#Enable Skin
- +AllowDressMeSystem = True
- +
- +#Como registrar item?
- +#só escolher o id do item no xml e registrar cada skin com exemplo de 1 a 15
- +#<set name="handler" val="Skin1" />,<set name="handler" val="Skin2" /> etc.
- +
- +#Effect Time All Skins
- +# 4000 = 4 Segunds
- +SkillEffectsTime = 4000
- +
- +#Skill ID Skin 1
- +SkillIDSkin1 = 1036
- +
- +#Skill ID Skin 2
- +SkillIDSkin2 = 0
- +
- +#Skill ID Skin 3
- +SkillIDSkin3 = 0
- +
- +#Skill ID Skin 4
- +SkillIDSkin4 = 0
- +
- +#Skill ID Skin 5
- +SkillIDSkin5 = 0
- +
- +#Skill ID Skin 6
- +SkillIDSkin6 = 0
- +
- +#Skill ID Skin 7
- +SkillIDSkin7 = 0
- +
- +#Skill ID Skin 8
- +SkillIDSkin8 = 0
- +
- +#Skill ID Skin 9
- +SkillIDSkin9 = 0
- +
- +#Skill ID Skin 10
- +SkillIDSkin10 = 0
- +
- +#Skill ID Skin 11
- +SkillIDSkin11 = 0
- +
- +#Skill ID Skin 12
- +SkillIDSkin12 = 0
- +
- +#Skill ID Skin 13
- +SkillIDSkin13 = 0
- +
- +#Skill ID Skin 14
- +SkillIDSkin14 = 0
- +
- +#Skill ID Skin 15
- +SkillIDSkin15 = 0
- +
- +#None Quando equipar Item
- +NameArmor1 = Draconic Light
- +NameArmor2 = Titanium Armor Wizzard
- +NameArmor3 = Titanium Armor Heavy
- +NameArmor4 = Dark Knight Heavy
- +NameArmor5 = Dark Knight Light
- +NameArmor6 = Dark Knight Wizzard
- +NameArmor7 = Dynasty Armor Heavy
- +NameArmor8 = Dynasty Armor Light
- +NameArmor9 = Dynasty Armor Wizzard
- +NameArmor10 = Vesper Black Armor Heavy
- +NameArmor11 = Vesper Black Armor Light
- +NameArmor12 = Vesper Black Armor Wizzard
- +NameArmor13 = Moirai Armor Heavy
- +NameArmor14 = Moirai Armor Light
- +NameArmor15 = Moirai Armor Wizzard
- +
- +# DressMe values.
- +#Aqui não pode ultilizar Espaco!
- +# Skin name (Example: "Draconic")
- +SkinName1 = Draconic_light
- +SkinName2 = Titanium_Robe
- +SkinName3 = Titanium_Heavy
- +SkinName4 = Dark_Kinight_Heavy
- +SkinName5 = Dark_Kinight_Light
- +SkinName6 = Dark_Kinight_Robe
- +SkinName7 = Dynasty_Heavy
- +SkinName8 = Dynasty_Light
- +SkinName9 = Dynasty_Robe
- +SkinName10 = VesperBlack_Heavy
- +SkinName11 = VesperBlack_Light
- +SkinName12 = VesperBlack_Robe
- +SkinName13 = Moirai_H
- +SkinName14 = Moirai_L
- +SkinName15 = Moirai_R
- +
- +# Note: It works like name,id;name,id
- +# WARNING: No spaces on names, use _ instead of space.
- +#Hair Accesories
- +DressMeHair = Draconic_light,6842;\
- +Titanium_Robe,21002;\
- +Titanium_Heavy,21002;\
- +Dark_Kinight_Heavy,21003;\
- +Dark_Kinight_Light,21004;\
- +Dark_Kinight_Robe,21005;\
- +Dynasty_Heavy,21006;\
- +Dynasty_Light,21011;\
- +Dynasty_Robe,21010;\
- +VesperBlack_Heavy,21009;\
- +VesperBlack_Light,21008;\
- +VesperBlack_Robe,21007;\
- +Moirai_H,21001;\
- +Moirai_L,21000;\
- +Moirai_R,20097;\
- +Tauti_H,20089;\
- +Tauti_L,20090;\
- +Tauti_R,20091
- +
- +#Armor Chests
- +DressMeChests = Draconic_light,6379;\
- +Titanium_Robe,20071;\
- +Titanium_Heavy,20067;\
- +Dark_Kinight_Heavy,21023;\
- +Dark_Kinight_Light,21028;\
- +Dark_Kinight_Robe,21033;\
- +Dynasty_Heavy,21038;\
- +Dynasty_Light,21043;\
- +Dynasty_Robe,21048;\
- +VesperBlack_Heavy,21053;\
- +VesperBlack_Light,21058;\
- +VesperBlack_Robe,21063;\
- +Moirai_H,21068;\
- +Moirai_L,21073;\
- +Moirai_R,21078;\
- +Tauti_H,21083;\
- +Tauti_L,21088;\
- +Tauti_R,21093
- +
- +# Armor Legs
- +DressMeLegs = Dark_Kinight_Heavy,21024;\
- +Dark_Kinight_Light,21029;\
- +Dark_Kinight_Robe,21034;\
- +Dynasty_Heavy,21039;\
- +Dynasty_Light,21044;\
- +Dynasty_Robe,21049;\
- +VesperBlack_Heavy,21054;\
- +VesperBlack_Light,21059;\
- +VesperBlack_Robe,21064;\
- +Moirai_H,21069;\
- +Moirai_L,21074;\
- +Moirai_R,21079;\
- +Tauti_H,21084;\
- +Tauti_L,21089;\
- +Tauti_R,21094
- +
- +# Armor Gloves
- +DressMeGloves = Draconic_light,6380;\
- +Titanium_Robe,20072;\
- +Titanium_Heavy,20068;\
- +Dark_Kinight_Heavy,21025;\
- +Dark_Kinight_Light,21030;\
- +Dark_Kinight_Robe,21035;\
- +Dynasty_Heavy,21040;\
- +Dynasty_Light,21045;\
- +Dynasty_Robe,21050;\
- +VesperBlack_Heavy,21055;\
- +VesperBlack_Light,21060;\
- +VesperBlack_Robe,21065;\
- +Moirai_H,21070;\
- +Moirai_L,21075;\
- +Moirai_R,21080;\
- +Tauti_H,21085;\
- +Tauti_L,21090;\
- +Tauti_R,21095
- +
- +#Armor Boots
- +DressMeBoots = Draconic_light,6381;\
- +Titanium_Robe,20073;\
- +Titanium_Heavy,20069;\
- +Dark_Kinight_Heavy,21026;\
- +Dark_Kinight_Light,21031;\
- +Dark_Kinight_Robe,21036;\
- +Dynasty_Heavy,21041;\
- +Dynasty_Light,21046;\
- +Dynasty_Robe,21051;\
- +VesperBlack_Heavy,21056;\
- +VesperBlack_Light,21061;\
- +VesperBlack_Robe,21066;\
- +Moirai_H,21071;\
- +Moirai_L,21076;\
- +Moirai_R,21081;\
- +Tauti_H,21086;\
- +Tauti_L,21091;\
- +Tauti_R,21096
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/Config.java b/java/net/sf/l2j/Config.java
- index e27eec0..cdbc650 100644
- --- a/java/net/sf/l2j/Config.java
- +++ b/java/net/sf/l2j/Config.java
- @@ -37,6 +37,7 @@
- public static final String PLAYERS_FILE = "./config/players.properties";
- public static final String SERVER_FILE = "./config/server.properties";
- public static final String SIEGE_FILE = "./config/siege.properties";
- + public static final String SKIN_FILE = "./config/Skin.properties";
- // --------------------------------------------------
- // Clans settings
- @@ -116,6 +117,61 @@
- public static int CH_FRONT1_FEE;
- public static int CH_FRONT2_FEE;
- + public static int SEGUNDS_SKILL_ANIMATION;
- + public static int SKILL_ID_SKIN1;
- + public static int SKILL_ID_SKIN2;
- + public static int SKILL_ID_SKIN3;
- + public static int SKILL_ID_SKIN4;
- + public static int SKILL_ID_SKIN5;
- + public static int SKILL_ID_SKIN6;
- + public static int SKILL_ID_SKIN7;
- + public static int SKILL_ID_SKIN8;
- + public static int SKILL_ID_SKIN9;
- + public static int SKILL_ID_SKIN10;
- + public static int SKILL_ID_SKIN11;
- + public static int SKILL_ID_SKIN12;
- + public static int SKILL_ID_SKIN13;
- + public static int SKILL_ID_SKIN14;
- + public static int SKILL_ID_SKIN15;
- + /** Skins Dressme */
- + public static boolean ALLOW_DRESS_ME_SYSTEM;
- + public static Map<String, Integer> DRESS_ME_HELMET = new HashMap<>();
- + 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 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 String NAME1;
- + public static String NAME2;
- + public static String NAME3;
- + public static String NAME4;
- + public static String NAME5;
- + public static String NAME6;
- + public static String NAME7;
- + public static String NAME8;
- + public static String NAME9;
- + public static String NAME10;
- + public static String NAME11;
- + public static String NAME12;
- + public static String NAME13;
- + public static String NAME14;
- + public static String NAME15;
- +
- // --------------------------------------------------
- // Events settings
- // --------------------------------------------------
- @@ -792,7 +848,100 @@
- CH_FRONT1_FEE = clans.getProperty("ClanHallFrontPlatformFunctionFeeLvl1", 3031);
- CH_FRONT2_FEE = clans.getProperty("ClanHallFrontPlatformFunctionFeeLvl2", 9331);
- }
- -
- + /**
- + * Loads Skin Click settings.<br>
- + */
- + private static final void loadSkin()
- + {
- + final ExProperties Skins = initProperties(SKIN_FILE);
- + SEGUNDS_SKILL_ANIMATION = Integer.parseInt(Skins.getProperty("SkillEffectsTime", "0"));
- + SKILL_ID_SKIN1 = Integer.parseInt(Skins.getProperty("SkillIDSkin1", "0"));
- + SKILL_ID_SKIN2 = Integer.parseInt(Skins.getProperty("SkillIDSkin2", "0"));
- + SKILL_ID_SKIN3 = Integer.parseInt(Skins.getProperty("SkillIDSkin3", "0"));
- + SKILL_ID_SKIN4 = Integer.parseInt(Skins.getProperty("SkillIDSkin4", "0"));
- + SKILL_ID_SKIN5 = Integer.parseInt(Skins.getProperty("SkillIDSkin5", "0"));
- + SKILL_ID_SKIN6 = Integer.parseInt(Skins.getProperty("SkillIDSkin6", "0"));
- + SKILL_ID_SKIN7 = Integer.parseInt(Skins.getProperty("SkillIDSkin7", "0"));
- + SKILL_ID_SKIN8 = Integer.parseInt(Skins.getProperty("SkillIDSkin8", "0"));
- + SKILL_ID_SKIN9 = Integer.parseInt(Skins.getProperty("SkillIDSkin9", "0"));
- + SKILL_ID_SKIN10 = Integer.parseInt(Skins.getProperty("SkillIDSkin10", "0"));
- + SKILL_ID_SKIN11 = Integer.parseInt(Skins.getProperty("SkillIDSkin11", "0"));
- + SKILL_ID_SKIN12 = Integer.parseInt(Skins.getProperty("SkillIDSkin12", "0"));
- + SKILL_ID_SKIN13 = Integer.parseInt(Skins.getProperty("SkillIDSkin13", "0"));
- + SKILL_ID_SKIN14 = Integer.parseInt(Skins.getProperty("SkillIDSkin14", "0"));
- + SKILL_ID_SKIN15 = Integer.parseInt(Skins.getProperty("SkillIDSkin15", "0"));
- + ALLOW_DRESS_ME_SYSTEM = Boolean.parseBoolean(Skins.getProperty("AllowDressMeSystem", "false"));
- + SKIN_NAME1 = String.valueOf(Skins.getProperty("SkinName1", "SkinName"));
- + SKIN_NAME2 = String.valueOf(Skins.getProperty("SkinName2", "SkinName"));
- + SKIN_NAME3 = String.valueOf(Skins.getProperty("SkinName3", "SkinName"));
- + SKIN_NAME4 = String.valueOf(Skins.getProperty("SkinName4", "SkinName"));
- + SKIN_NAME5 = String.valueOf(Skins.getProperty("SkinName5", "SkinName"));
- + SKIN_NAME6 = String.valueOf(Skins.getProperty("SkinName6", "SkinName"));
- + SKIN_NAME7 = String.valueOf(Skins.getProperty("SkinName7", "SkinName"));
- + SKIN_NAME8 = String.valueOf(Skins.getProperty("SkinName8", "SkinName"));
- + SKIN_NAME9 = String.valueOf(Skins.getProperty("SkinName9", "SkinName"));
- + SKIN_NAME10 = String.valueOf(Skins.getProperty("SkinName10", "SkinName"));
- + SKIN_NAME11 = String.valueOf(Skins.getProperty("SkinName11", "SkinName"));
- + SKIN_NAME12 = String.valueOf(Skins.getProperty("SkinName12", "SkinName"));
- + SKIN_NAME13 = String.valueOf(Skins.getProperty("SkinName13", "SkinName"));
- + SKIN_NAME14 = String.valueOf(Skins.getProperty("SkinName14", "SkinName"));
- + SKIN_NAME15 = String.valueOf(Skins.getProperty("SkinName15", "SkinName"));
- +
- + String temp = Skins.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 = Skins.getProperty("DressMeHair", "");
- + temp2 = temp.split(";");
- + for (String s : temp2)
- + {
- + String[] t = s.split(",");
- + DRESS_ME_HELMET.put(t[0], Integer.parseInt(t[1]));
- + }
- +
- +
- + temp = Skins.getProperty("DressMeLegs", "");
- + temp2 = temp.split(";");
- + for (String s : temp2)
- + {
- + String[] t = s.split(",");
- + DRESS_ME_LEGS.put(t[0], Integer.parseInt(t[1]));
- + }
- + temp = Skins.getProperty("DressMeBoots", "");
- + temp2 = temp.split(";");
- + for (String s : temp2)
- + {
- + String[] t = s.split(",");
- + DRESS_ME_BOOTS.put(t[0], Integer.parseInt(t[1]));
- + }
- + temp = Skins.getProperty("DressMeGloves", "");
- + temp2 = temp.split(";");
- + for (String s : temp2)
- + {
- + String[] t = s.split(",");
- + DRESS_ME_GLOVES.put(t[0], Integer.parseInt(t[1]));
- + }
- +
- + NAME1 = Skins.getProperty("NameArmor1", " Skins Dressme");
- + NAME2 = Skins.getProperty("NameArmor2", " Skins Dressme");
- + NAME3 = Skins.getProperty("NameArmor3", " Skins Dressme");
- + NAME4 = Skins.getProperty("NameArmor4", " Skins Dressme");
- + NAME5 = Skins.getProperty("NameArmor5", " Skins Dressme");
- + NAME6 = Skins.getProperty("NameArmor6", " Skins Dressme");
- + NAME7 = Skins.getProperty("NameArmor7", " Skins Dressme");
- + NAME8 = Skins.getProperty("NameArmor8", " Skins Dressme");
- + NAME9 = Skins.getProperty("NameArmor9", " Skins Dressme");
- + NAME10 = Skins.getProperty("NameArmor10", " Skins Dressme");
- + NAME11 = Skins.getProperty("NameArmor11", " Skins Dressme");
- + NAME12 = Skins.getProperty("NameArmor12", " Skins Dressme");
- + NAME13 = Skins.getProperty("NameArmor13", " Skins Dressme");
- + NAME14 = Skins.getProperty("NameArmor14", " Skins Dressme");
- + NAME15 = Skins.getProperty("NameArmor15", " Skins Dressme");
- + }
- /**
- * Loads event settings.<br>
- * Such as olympiad, seven signs festival, four sepulchures, dimensional rift, weddings, lottery, fishing championship.
- @@ -1369,6 +1518,8 @@
- // events settings
- loadEvents();
- + loadSkin();
- +
- // geoengine settings
- loadGeoengine();
- diff --git a/java/net/sf/l2j/gameserver/data/manager/DressMeData.java b/java/net/sf/l2j/gameserver/data/manager/DressMeData.java
- new file mode 100644
- index 0000000..419481d
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/data/manager/DressMeData.java
- @@ -0,0 +1,81 @@
- +package net.sf.l2j.gameserver.data.manager;
- +
- +public class DressMeData
- +{
- + private int chestId,
- + helmetId,
- + legsId,
- + glovesId,
- + feetId,
- + weapId;
- +
- + public DressMeData()
- + {
- + helmetId = 0;
- + chestId = 0;
- + legsId = 0;
- + glovesId = 0;
- + feetId = 0;
- + weapId = 0;
- + }
- +
- + public int getHelmetId()
- + {
- + return helmetId;
- + }
- +
- + 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 setHelmetId(int val)
- + {
- + helmetId = val;
- + }
- +
- + 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
- diff --git a/java/net/sf/l2j/gameserver/handler/ItemHandler.java b/java/net/sf/l2j/gameserver/handler/ItemHandler.java
- index 7add89f..c58fbfd 100644
- --- a/java/net/sf/l2j/gameserver/handler/ItemHandler.java
- +++ b/java/net/sf/l2j/gameserver/handler/ItemHandler.java
- @@ -24,6 +24,21 @@
- import net.sf.l2j.gameserver.handler.itemhandlers.ScrollOfResurrection;
- import net.sf.l2j.gameserver.handler.itemhandlers.SeedHandler;
- import net.sf.l2j.gameserver.handler.itemhandlers.SevenSignsRecord;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin1;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin10;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin11;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin12;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin13;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin14;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin15;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin2;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin3;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin4;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin5;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin6;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin7;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin8;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Skin9;
- import net.sf.l2j.gameserver.handler.itemhandlers.SoulCrystals;
- import net.sf.l2j.gameserver.handler.itemhandlers.SoulShots;
- import net.sf.l2j.gameserver.handler.itemhandlers.SpecialXMas;
- @@ -42,6 +57,21 @@
- protected ItemHandler()
- {
- + 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());
- registerItemHandler(new BeastSoulShot());
- registerItemHandler(new BeastSpice());
- registerItemHandler(new BeastSpiritShot());
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin1.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin1.java
- new file mode 100644
- index 0000000..0251107
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin1.java
- @@ -0,0 +1,68 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin1 implements IItemHandler
- +
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN1, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- +
- + Player activeChar = (Player)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME1);
- + 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.NAME1 + " skin.");
- +
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin10.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin10.java
- new file mode 100644
- index 0000000..a51c139
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin10.java
- @@ -0,0 +1,64 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin10 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN10, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME10);
- + 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.NAME10 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin11.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin11.java
- new file mode 100644
- index 0000000..ce27bec
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin11.java
- @@ -0,0 +1,64 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin11 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN11, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME11);
- + 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.NAME11 + " skin.");
- +
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin12.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin12.java
- new file mode 100644
- index 0000000..af6a595
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin12.java
- @@ -0,0 +1,64 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin12 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN12, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME12);
- + 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.NAME12 + " skin.");
- +
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin13.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin13.java
- new file mode 100644
- index 0000000..824276a
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin13.java
- @@ -0,0 +1,63 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin13 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN13, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME13);
- + 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.NAME13 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin14.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin14.java
- new file mode 100644
- index 0000000..90d1d31
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin14.java
- @@ -0,0 +1,63 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin14 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN14, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME14);
- + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME14);
- + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME14);
- + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME14);
- + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME14);
- +
- + 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.NAME14 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin15.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin15.java
- new file mode 100644
- index 0000000..e246659
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin15.java
- @@ -0,0 +1,67 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin15 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN15, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- +
- + Player activeChar = (Player)playable;
- +
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME15);
- + 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.NAME15 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin2.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin2.java
- new file mode 100644
- index 0000000..edd8aa5
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin2.java
- @@ -0,0 +1,64 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin2 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN2, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME2);
- + 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.NAME2 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin3.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin3.java
- new file mode 100644
- index 0000000..404c5df
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin3.java
- @@ -0,0 +1,64 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin3 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN3, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME3);
- + 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.NAME3 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin4.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin4.java
- new file mode 100644
- index 0000000..ef56658
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin4.java
- @@ -0,0 +1,64 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin4 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN4, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME4);
- + 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.NAME4 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin5.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin5.java
- new file mode 100644
- index 0000000..9c09ea7
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin5.java
- @@ -0,0 +1,64 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin5 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN5, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME5);
- + 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.NAME5 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin6.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin6.java
- new file mode 100644
- index 0000000..65ee725
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin6.java
- @@ -0,0 +1,63 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin6 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN6, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME6);
- + 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.NAME6 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin7.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin7.java
- new file mode 100644
- index 0000000..b1ea7a9
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin7.java
- @@ -0,0 +1,63 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin7 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN7, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME7);
- + 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.NAME7 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin8.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin8.java
- new file mode 100644
- index 0000000..9dfe328
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin8.java
- @@ -0,0 +1,63 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin8 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN8, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if (Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if (!(playable instanceof Player))
- + return;
- + Player activeChar = (Player) playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME8);
- + 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.NAME8 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin9.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin9.java
- new file mode 100644
- index 0000000..359d5c8
- --- /dev/null
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/Skin9.java
- @@ -0,0 +1,63 @@
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.WorldObject;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.instance.Player;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge;
- +import net.sf.l2j.gameserver.network.serverpackets.SetupGauge.GaugeColor;
- +import net.sf.l2j.gameserver.util.Broadcast;
- +
- +public class Skin9 implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item, boolean forceUse)
- + {
- + ThreadPool.schedule(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + playable.setIsParalyzed(false);
- + }
- + }, Config.SEGUNDS_SKILL_ANIMATION);
- + final WorldObject oldTarget = playable.getTarget();
- + playable.setTarget(playable);
- + Broadcast.toSelfAndKnownPlayers(playable, new MagicSkillUse(playable, Config.SKILL_ID_SKIN9, 1, Config.SEGUNDS_SKILL_ANIMATION, 0));
- + playable.setTarget(oldTarget);
- + playable.sendPacket(new SetupGauge(GaugeColor.BLUE, Config.SEGUNDS_SKILL_ANIMATION));
- + playable.setIsParalyzed(true);
- + if(Config.ALLOW_DRESS_ME_SYSTEM)
- + {
- + if(!(playable instanceof Player))
- + return;
- + Player activeChar = (Player)playable;
- + RequestBypassToServer.setPart(activeChar, "helmet", Config.SKIN_NAME9);
- + 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.NAME9 + " skin.");
- + }
- + }
- + else
- + playable.sendMessage("Sorry, admin has disabled skins.");
- + }
- +}
- \ No newline at end of file
- diff --git a/java/net/sf/l2j/gameserver/model/actor/instance/Player.java b/java/net/sf/l2j/gameserver/model/actor/instance/Player.java
- index 82f58e2..5431567 100644
- --- a/java/net/sf/l2j/gameserver/model/actor/instance/Player.java
- +++ b/java/net/sf/l2j/gameserver/model/actor/instance/Player.java
- @@ -39,6 +39,7 @@
- import net.sf.l2j.gameserver.data.SkillTable;
- import net.sf.l2j.gameserver.data.SkillTable.FrequentSkill;
- import net.sf.l2j.gameserver.data.SkillTreeTable;
- +import net.sf.l2j.gameserver.data.manager.DressMeData;
- import net.sf.l2j.gameserver.data.sql.ClanTable;
- import net.sf.l2j.gameserver.data.xml.AdminData;
- import net.sf.l2j.gameserver.data.xml.FishData;
- @@ -10473,7 +10474,27 @@
- {
- _requestedGate = door;
- }
- + 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;
- + }
- @Override
- public boolean polymorph(PolyType type, int npcId)
- {
- diff --git a/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java b/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- index f43c397..499d82a 100644
- --- a/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- +++ b/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- @@ -6,6 +6,7 @@
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.communitybbs.CommunityBoard;
- +import net.sf.l2j.gameserver.data.manager.DressMeData;
- import net.sf.l2j.gameserver.data.xml.AdminData;
- import net.sf.l2j.gameserver.handler.AdminCommandHandler;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- @@ -15,6 +16,7 @@
- import net.sf.l2j.gameserver.model.actor.instance.OlympiadManagerNpc;
- import net.sf.l2j.gameserver.model.actor.instance.Player;
- import net.sf.l2j.gameserver.model.entity.Hero;
- +import net.sf.l2j.gameserver.model.itemcontainer.Inventory;
- import net.sf.l2j.gameserver.model.olympiad.OlympiadManager;
- import net.sf.l2j.gameserver.network.FloodProtectors;
- import net.sf.l2j.gameserver.network.FloodProtectors.Action;
- @@ -175,7 +177,201 @@
- _log.log(Level.WARNING, "Bad RequestBypassToServer: " + e, e);
- }
- }
- -
- + public static void setPart(Player p, String part, String type)
- + {
- + if (p.getDressMeData() == null)
- + {
- + DressMeData dmd = new DressMeData();
- + p.setDressMeData(dmd);
- + }
- +
- + switch (part)
- + {
- +
- + case "helmet":
- + {
- + if (Config.DRESS_ME_HELMET.keySet().contains(type))
- + {
- + p.getDressMeData().setHelmetId(Config.DRESS_ME_HELMET.get(type));
- + }
- +
- + break;
- + }
- +
- +
- + 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;
- + }
- +
- + }
- +
- + p.broadcastUserInfo();
- + // sendEditWindow(p, part);
- + }
- + public static void stealTarget(Player p, String part)
- + {
- + if (p.getTarget() == null || !(p.getTarget() instanceof Player))
- + {
- + p.sendMessage("Invalid target.");
- + return;
- + }
- +
- + Player t = (Player)p.getTarget();
- +
- + if (p.getDressMeData() == null)
- + {
- + DressMeData dmd = new DressMeData();
- + p.setDressMeData(dmd);
- + }
- +
- +
- + switch (part)
- + {
- + case "helmet":
- + {
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FACE) == null)
- + {
- + p.getDressMeData().setHelmetId(0);
- + }
- + else
- + {
- + p.getDressMeData().setHelmetId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FACE).getItemId());
- + }
- + break;
- + }
- +
- + 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 "all":
- + {
- +
- + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FACE) == null)
- + {
- + p.getDressMeData().setHelmetId(0);
- + }
- + else
- + {
- + p.getDressMeData().setHelmetId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FACE).getItemId());
- + }
- +
- + 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());
- + }
- +
- + break;
- + }
- + }
- +
- + p.broadcastUserInfo();
- + }
- private static void playerHelp(Player activeChar, String path)
- {
- if (path.indexOf("..") != -1)
- diff --git a/java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java b/java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
- index 2432514..5219622 100644
- --- a/java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
- +++ b/java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
- @@ -45,7 +45,8 @@
- writeD(_activeChar.getClassId().getId());
- else
- writeD(_activeChar.getBaseClass());
- + if (!_activeChar.isDressMeEnabled())
- + {
- writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
- writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
- writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- @@ -58,7 +59,23 @@
- writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
- writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));
- + }
- + else
- + {
- +
- + writeD(_inv.getPaperdollObjectId(Inventory.PAPERDOLL_HAIRALL));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
- + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- + 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(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE) : (_activeChar.getDressMeData().getHelmetId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE) : _activeChar.getDressMeData().getHelmetId()));
- + writeD(_inv.getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
- + }
- // c6 new h's
- writeH(0x00);
- writeH(0x00);
- diff --git a/java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java b/java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
- index b36c25a..af49dd4 100644
- --- a/java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
- +++ b/java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
- @@ -64,7 +64,8 @@
- writeD(_activeChar.getMaxLoad());
- writeD(_activeChar.getActiveWeaponItem() != null ? 40 : 20); // 20 no weapon, 40 weapon equipped
- + if (!_activeChar.isDressMeEnabled())
- + {
- writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIRALL));
- writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
- writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
- @@ -100,6 +101,47 @@
- writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
- writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));
- + }
- + else
- + {
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL) : (_activeChar.getDressMeData().getHelmetId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL) : _activeChar.getDressMeData().getHelmetId()));
- +
- + 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.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR) : (_activeChar.getDressMeData().getHelmetId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR) : _activeChar.getDressMeData().getHelmetId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE) : (_activeChar.getDressMeData().getHelmetId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE) : _activeChar.getDressMeData().getHelmetId()));
- +
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL) : (_activeChar.getDressMeData().getHelmetId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL) : _activeChar.getDressMeData().getHelmetId()));
- + 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.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR) : (_activeChar.getDressMeData().getHelmetId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR) : _activeChar.getDressMeData().getHelmetId()));
- + writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE) : (_activeChar.getDressMeData().getHelmetId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE) : _activeChar.getDressMeData().getHelmetId()));
- +
- + }
- // c6 new h's
- writeH(0x00);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement