Guest User

Untitled

a guest
Jun 4th, 2020
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 73.90 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P Lisvus_GameServer
  3. Index: java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
  4. ===================================================================
  5. --- java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java (revision 683)
  6. +++ java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java (working copy)
  7. @@ -102,43 +102,82 @@
  8.  
  9. writeD(_cha.getActiveWeaponItem() != null ? 40 : 20); // 20 no weapon, 40 weapon equipped
  10.  
  11. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_UNDER));
  12. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
  13. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
  14. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
  15. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
  16. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
  17. + if (!_cha.isDressMeEnabled())
  18. + {
  19. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_UNDER));
  20. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
  21. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
  22. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
  23. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
  24. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
  25. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD));
  26. +
  27. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
  28. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND));
  29. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES));
  30. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST));
  31. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS));
  32. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET));
  33. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK));
  34. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LRHAND));
  35. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
  36. +
  37. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_UNDER));
  38. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR));
  39. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
  40. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK));
  41. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
  42. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
  43. +
  44. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
  45. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
  46. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
  47. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
  48. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
  49. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
  50. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET));
  51. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK));
  52. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LRHAND));
  53. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
  54. + }
  55. + else
  56. + {
  57. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_UNDER));
  58. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
  59. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
  60. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
  61. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
  62. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
  63. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD));
  64. +
  65. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : (_cha.getDressMeData().getWeapId() == 0 ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : _cha.getDressMeData().getWeapId()));
  66. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND));
  67. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES) : (_cha.getDressMeData().getGlovesId() == 0 ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES) : _cha.getDressMeData().getGlovesId()));
  68. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST) : (_cha.getDressMeData().getChestId() == 0 ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST) : _cha.getDressMeData().getChestId()));
  69. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS) : (_cha.getDressMeData().getLegsId() == 0 ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS) : _cha.getDressMeData().getLegsId()));
  70. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET) : (_cha.getDressMeData().getBootsId() == 0 ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET) : _cha.getDressMeData().getBootsId()));
  71. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK));
  72. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LRHAND) : (_cha.getDressMeData().getWeapId() == 0 ? _cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LRHAND) : _cha.getDressMeData().getWeapId()));
  73. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
  74. +
  75. + writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_UNDER));
  76. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR));
  77. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
  78. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK));
  79. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
  80. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
  81. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
  82. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_cha.getDressMeData().getWeapId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _cha.getDressMeData().getWeapId()));
  83. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
  84. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : (_cha.getDressMeData().getGlovesId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : _cha.getDressMeData().getGlovesId()));
  85. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : (_cha.getDressMeData().getChestId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : _cha.getDressMeData().getChestId()));
  86. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : (_cha.getDressMeData().getLegsId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : _cha.getDressMeData().getLegsId()));
  87. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : (_cha.getDressMeData().getBootsId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : _cha.getDressMeData().getBootsId()));
  88. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK));
  89. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LRHAND) : (_cha.getDressMeData().getWeapId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LRHAND) : _cha.getDressMeData().getWeapId()));
  90. + writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
  91. + }
  92.  
  93. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD));
  94. -
  95. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
  96. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND));
  97. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES));
  98. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST));
  99. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS));
  100. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET));
  101. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK));
  102. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LRHAND));
  103. - writeD(_cha.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
  104. -
  105. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_UNDER));
  106. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR));
  107. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
  108. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK));
  109. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
  110. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
  111. -
  112. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
  113. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
  114. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
  115. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
  116. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
  117. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
  118. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET));
  119. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK));
  120. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LRHAND));
  121. - writeD(_cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
  122. -
  123. writeD(_cha.getPAtk(null));
  124. writeD(_cha.getPAtkSpd());
  125. writeD(_cha.getPDef(null));
  126. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin14.java
  127. ===================================================================
  128. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin14.java (nonexistent)
  129. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin14.java (working copy)
  130. @@ -0,0 +1,52 @@
  131. +package net.sf.l2j.gameserver.handler.itemhandlers;
  132. +
  133. +import net.sf.l2j.Config;
  134. +import net.sf.l2j.gameserver.handler.IItemHandler;
  135. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  136. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  137. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  138. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  139. +
  140. +public class skin14 implements IItemHandler
  141. +{
  142. + @Override
  143. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  144. + {
  145. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  146. + {
  147. + if(!(playable instanceof L2PcInstance))
  148. + return;
  149. + L2PcInstance activeChar = (L2PcInstance)playable;
  150. +
  151. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME14);
  152. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME14);
  153. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME14);
  154. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME14);
  155. +
  156. + if (activeChar.isDressMeEnabled())
  157. + {
  158. + activeChar.setDressMeEnabled(false);
  159. + activeChar.broadcastUserInfo();
  160. + activeChar.sendMessage("You have disabled skin.");
  161. + }
  162. + else
  163. + {
  164. + activeChar.setDressMeEnabled(true);
  165. + activeChar.broadcastUserInfo();
  166. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME14 + " skin.");
  167. + }
  168. + }
  169. + else
  170. + playable.sendMessage("Sorry, admin has disabled skins.");
  171. + }
  172. +
  173. + @Override
  174. + public int[] getItemIds()
  175. + {
  176. + return ITEM_IDS;
  177. + }
  178. +
  179. + private static final int ITEM_IDS[] = {
  180. + Config.SKIN_ITEM_14
  181. + };
  182. +}
  183. \ No newline at end of file
  184. Index: java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/DressMe.java
  185. ===================================================================
  186. --- java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/DressMe.java (nonexistent)
  187. +++ java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/DressMe.java (working copy)
  188. @@ -0,0 +1,59 @@
  189. +package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
  190. +
  191. +import net.sf.l2j.gameserver.datatables.ItemTable;
  192. +import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
  193. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  194. +import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
  195. +
  196. +/**
  197. + * @author Anarchy
  198. + * @adaptação Tayran.JavaDev
  199. + *
  200. + */
  201. +public class DressMe implements IVoicedCommandHandler
  202. +{
  203. + private static final String[] VOICED_COMMANDS = { "dressme" };
  204. +
  205. +
  206. + @Override
  207. + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  208. + {
  209. + if (command.equals("dressme"))
  210. + {
  211. + sendMainWindow(activeChar);
  212. + }
  213. +
  214. + return true;
  215. + }
  216. +
  217. + public static void sendMainWindow(L2PcInstance activeChar)
  218. + {
  219. + NpcHtmlMessage htm = new NpcHtmlMessage(0);
  220. + htm.setFile("./data/html/custom/dressme/main.htm");
  221. + htm.replace("%enabled%", activeChar.isDressMeEnabled() ? "enabled" : "disabled");
  222. + if (activeChar.getDressMeData() == null)
  223. + {
  224. + htm.replace("%chestinfo%", "You have no custom chest.");
  225. + htm.replace("%legsinfo%", "You have no custom legs.");
  226. + htm.replace("%bootsinfo%", "You have no custom boots.");
  227. + htm.replace("%glovesinfo%", "You have no custom gloves.");
  228. + htm.replace("%weapinfo%", "You have no custom weapon.");
  229. + }
  230. + else
  231. + {
  232. + htm.replace("%chestinfo%", activeChar.getDressMeData().getChestId() == 0 ? "You have no custom chest." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getChestId()).getName());
  233. + htm.replace("%legsinfo%", activeChar.getDressMeData().getLegsId() == 0 ? "You have no custom legs." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getLegsId()).getName());
  234. + htm.replace("%bootsinfo%", activeChar.getDressMeData().getBootsId() == 0 ? "You have no custom boots." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getBootsId()).getName());
  235. + htm.replace("%glovesinfo%", activeChar.getDressMeData().getGlovesId() == 0 ? "You have no custom gloves." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getGlovesId()).getName());
  236. + htm.replace("%weapinfo%", activeChar.getDressMeData().getWeapId() == 0 ? "You have no custom weapon." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getWeapId()).getName());
  237. + }
  238. +
  239. + activeChar.sendPacket(htm);
  240. + }
  241. +
  242. + @Override
  243. + public String[] getVoicedCommandList()
  244. + {
  245. + return VOICED_COMMANDS;
  246. + }
  247. +}
  248. \ No newline at end of file
  249. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin12.java
  250. ===================================================================
  251. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin12.java (nonexistent)
  252. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin12.java (working copy)
  253. @@ -0,0 +1,52 @@
  254. +package net.sf.l2j.gameserver.handler.itemhandlers;
  255. +
  256. +import net.sf.l2j.Config;
  257. +import net.sf.l2j.gameserver.handler.IItemHandler;
  258. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  259. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  260. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  261. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  262. +
  263. +public class skin12 implements IItemHandler
  264. +{
  265. + @Override
  266. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  267. + {
  268. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  269. + {
  270. + if(!(playable instanceof L2PcInstance))
  271. + return;
  272. + L2PcInstance activeChar = (L2PcInstance)playable;
  273. +
  274. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME12);
  275. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME12);
  276. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME12);
  277. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME12);
  278. +
  279. + if (activeChar.isDressMeEnabled())
  280. + {
  281. + activeChar.setDressMeEnabled(false);
  282. + activeChar.broadcastUserInfo();
  283. + activeChar.sendMessage("You have disabled skin.");
  284. + }
  285. + else
  286. + {
  287. + activeChar.setDressMeEnabled(true);
  288. + activeChar.broadcastUserInfo();
  289. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME12 + " skin.");
  290. + }
  291. + }
  292. + else
  293. + playable.sendMessage("Sorry, admin has disabled skins.");
  294. + }
  295. +
  296. + @Override
  297. + public int[] getItemIds()
  298. + {
  299. + return ITEM_IDS;
  300. + }
  301. +
  302. + private static final int ITEM_IDS[] = {
  303. + Config.SKIN_ITEM_12
  304. + };
  305. +}
  306. \ No newline at end of file
  307. Index: java/net/sf/l2j/Config.java
  308. ===================================================================
  309. --- java/net/sf/l2j/Config.java (revision 683)
  310. +++ java/net/sf/l2j/Config.java (working copy)
  311. @@ -764,6 +764,45 @@
  312. public static boolean OFFLINE_SET_NAME_COLOR;
  313. /** Color for offline mode */
  314. public static int OFFLINE_NAME_COLOR;
  315. +
  316. + public static boolean ALLOW_DRESS_ME_SYSTEM;
  317. + public static Map<String, Integer> DRESS_ME_CHESTS = new HashMap<>();
  318. + public static Map<String, Integer> DRESS_ME_LEGS = new HashMap<>();
  319. + public static Map<String, Integer> DRESS_ME_BOOTS = new HashMap<>();
  320. + public static Map<String, Integer> DRESS_ME_GLOVES = new HashMap<>();
  321. + public static Map<String, Integer> DRESS_ME_WEAPONS = new HashMap<>();
  322. + public static String SKIN_NAME1;
  323. + public static String SKIN_NAME2;
  324. + public static String SKIN_NAME3;
  325. + public static String SKIN_NAME4;
  326. + public static String SKIN_NAME5;
  327. + public static String SKIN_NAME6;
  328. + public static String SKIN_NAME7;
  329. + public static String SKIN_NAME8;
  330. + public static String SKIN_NAME9;
  331. + public static String SKIN_NAME10;
  332. + public static String SKIN_NAME11;
  333. + public static String SKIN_NAME12;
  334. + public static String SKIN_NAME13;
  335. + public static String SKIN_NAME14;
  336. + public static String SKIN_NAME15;
  337. + public static int SKIN_ITEM_1;
  338. + public static int SKIN_ITEM_2;
  339. + public static int SKIN_ITEM_3;
  340. + public static int SKIN_ITEM_4;
  341. + public static int SKIN_ITEM_5;
  342. + public static int SKIN_ITEM_6;
  343. + public static int SKIN_ITEM_7;
  344. + public static int SKIN_ITEM_8;
  345. + public static int SKIN_ITEM_9;
  346. + public static int SKIN_ITEM_10;
  347. + public static int SKIN_ITEM_11;
  348. + public static int SKIN_ITEM_12;
  349. + public static int SKIN_ITEM_13;
  350. + public static int SKIN_ITEM_14;
  351. + public static int SKIN_ITEM_15;
  352. +
  353. +
  354. /** Allow teleporting to towns that are under siege ? */
  355. public static boolean ALLOW_SIEGE_TELEPORT;
  356.  
  357. @@ -2089,11 +2128,78 @@
  358. OFFLINE_DISCONNECT_FINISHED = Boolean.parseBoolean(customSettings.getProperty("OfflineDisconnectFinished", "True"));
  359. OFFLINE_SET_NAME_COLOR = Boolean.valueOf(customSettings.getProperty("OfflineSetNameColor", "False"));
  360. OFFLINE_NAME_COLOR = Integer.decode("0x" + customSettings.getProperty("OfflineNameColor", "808080"));
  361. + ALLOW_DRESS_ME_SYSTEM = Boolean.parseBoolean(customSettings.getProperty("AllowDressMeSystem", "false"));
  362. + SKIN_NAME1 = String.valueOf(customSettings.getProperty("SkinName1", "SkinName"));
  363. + SKIN_NAME2 = String.valueOf(customSettings.getProperty("SkinName2", "SkinName"));
  364. + SKIN_NAME3 = String.valueOf(customSettings.getProperty("SkinName3", "SkinName"));
  365. + SKIN_NAME4 = String.valueOf(customSettings.getProperty("SkinName4", "SkinName"));
  366. + SKIN_NAME5 = String.valueOf(customSettings.getProperty("SkinName5", "SkinName"));
  367. + SKIN_NAME6 = String.valueOf(customSettings.getProperty("SkinName6", "SkinName"));
  368. + SKIN_NAME7 = String.valueOf(customSettings.getProperty("SkinName7", "SkinName"));
  369. + SKIN_NAME8 = String.valueOf(customSettings.getProperty("SkinName8", "SkinName"));
  370. + SKIN_NAME9 = String.valueOf(customSettings.getProperty("SkinName9", "SkinName"));
  371. + SKIN_NAME10 = String.valueOf(customSettings.getProperty("SkinName10", "SkinName"));
  372. + SKIN_NAME11 = String.valueOf(customSettings.getProperty("SkinName11", "SkinName"));
  373. + SKIN_NAME12 = String.valueOf(customSettings.getProperty("SkinName12", "SkinName"));
  374. + SKIN_NAME13 = String.valueOf(customSettings.getProperty("SkinName13", "SkinName"));
  375. + SKIN_NAME14 = String.valueOf(customSettings.getProperty("SkinName14", "SkinName"));
  376. + SKIN_NAME15 = String.valueOf(customSettings.getProperty("SkinName15", "SkinName"));
  377. + SKIN_ITEM_1 = Integer.parseInt(customSettings.getProperty("SkinItem1", "0"));
  378. + SKIN_ITEM_2 = Integer.parseInt(customSettings.getProperty("SkinItem2", "0"));
  379. + SKIN_ITEM_3 = Integer.parseInt(customSettings.getProperty("SkinItem3", "0"));
  380. + SKIN_ITEM_4 = Integer.parseInt(customSettings.getProperty("SkinItem4", "0"));
  381. + SKIN_ITEM_5 = Integer.parseInt(customSettings.getProperty("SkinItem5", "0"));
  382. + SKIN_ITEM_6 = Integer.parseInt(customSettings.getProperty("SkinItem6", "0"));
  383. + SKIN_ITEM_7 = Integer.parseInt(customSettings.getProperty("SkinItem7", "0"));
  384. + SKIN_ITEM_8 = Integer.parseInt(customSettings.getProperty("SkinItem8", "0"));
  385. + SKIN_ITEM_9 = Integer.parseInt(customSettings.getProperty("SkinItem9", "0"));
  386. + SKIN_ITEM_10 = Integer.parseInt(customSettings.getProperty("SkinItem10", "0"));
  387. + SKIN_ITEM_11 = Integer.parseInt(customSettings.getProperty("SkinItem11", "0"));
  388. + SKIN_ITEM_12 = Integer.parseInt(customSettings.getProperty("SkinItem12", "0"));
  389. + SKIN_ITEM_13 = Integer.parseInt(customSettings.getProperty("SkinItem13", "0"));
  390. + SKIN_ITEM_14 = Integer.parseInt(customSettings.getProperty("SkinItem14", "0"));
  391. + SKIN_ITEM_15 = Integer.parseInt(customSettings.getProperty("SkinItem15", "0"));
  392. + String temp = customSettings.getProperty("DressMeChests", "");
  393. + String[] temp2 = temp.split(";");
  394. + for (String s : temp2)
  395. + {
  396. + String[] t = s.split(",");
  397. + DRESS_ME_CHESTS.put(t[0], Integer.parseInt(t[1]));
  398. + }
  399. + temp = customSettings.getProperty("DressMeLegs", "");
  400. + temp2 = temp.split(";");
  401. + for (String s : temp2)
  402. + {
  403. + String[] t = s.split(",");
  404. + DRESS_ME_LEGS.put(t[0], Integer.parseInt(t[1]));
  405. + }
  406. + temp = customSettings.getProperty("DressMeBoots", "");
  407. + temp2 = temp.split(";");
  408. + for (String s : temp2)
  409. + {
  410. + String[] t = s.split(",");
  411. + DRESS_ME_BOOTS.put(t[0], Integer.parseInt(t[1]));
  412. + }
  413. + temp = customSettings.getProperty("DressMeGloves", "");
  414. + temp2 = temp.split(";");
  415. + for (String s : temp2)
  416. + {
  417. + String[] t = s.split(",");
  418. + DRESS_ME_GLOVES.put(t[0], Integer.parseInt(t[1]));
  419. + }
  420. + temp = customSettings.getProperty("DressMeWeapons", "");
  421. + temp2 = temp.split(";");
  422. + for (String s : temp2)
  423. + {
  424. + String[] t = s.split(",");
  425. + DRESS_ME_WEAPONS.put(t[0], Integer.parseInt(t[1]));
  426. + }
  427. ALLOW_SIEGE_TELEPORT = Boolean.valueOf(customSettings.getProperty("AllowSiegeTeleport", "False"));
  428. KEEP_SUBCLASS_SKILLS = Boolean.valueOf(customSettings.getProperty("KeepSubClassSkills", "False"));
  429. ALLOW_CLASS_MASTERS = Boolean.valueOf(customSettings.getProperty("AllowClassMasters", "False"));
  430. ALLOW_ENTIRE_TREE = Boolean.valueOf(customSettings.getProperty("AllowEntireTree", "False"));
  431. ALTERNATE_CLASS_MASTER = Boolean.valueOf(customSettings.getProperty("AlternateClassMaster", "False"));
  432. if (ALLOW_CLASS_MASTERS || ALTERNATE_CLASS_MASTER)
  433. {
  434. CLASS_MASTER_SETTINGS = new ClassMasterSettings(String.valueOf(customSettings.getProperty("ConfigClassMaster")));
  435. Index: java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
  436. ===================================================================
  437. --- java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java (revision 683)
  438. +++ java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java (working copy)
  439. @@ -23,6 +23,7 @@
  440. import net.sf.l2j.gameserver.handler.voicedcommandhandlers.TvTCommand;
  441. import net.sf.l2j.gameserver.handler.voicedcommandhandlers.VoiceExperience;
  442. import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Wedding;
  443. +import net.sf.l2j.gameserver.handler.voicedcommandhandlers.DressMe;
  444.  
  445. /**
  446. * This class ...
  447. @@ -51,8 +52,10 @@
  448. registerVoicedCommandHandler(new ChangePassword());
  449. registerVoicedCommandHandler(new TvTCommand());
  450. registerVoicedCommandHandler(new VoiceExperience());
  451. - registerVoicedCommandHandler(new Wedding());
  452. -
  453. + registerVoicedCommandHandler(new Wedding());
  454. + if (Config.ALLOW_DRESS_ME_SYSTEM)
  455. + registerVoicedCommandHandler(new DressMe());
  456. +
  457. _log.config("VoicedCommandHandler: Loaded " + _dataTable.size() + " handlers.");
  458. }
  459.  
  460. Index: java/net/sf/l2j/gameserver/handler/custom/DressMeData.java
  461. ===================================================================
  462. --- java/net/sf/l2j/gameserver/handler/custom/DressMeData.java (nonexistent)
  463. +++ java/net/sf/l2j/gameserver/handler/custom/DressMeData.java (working copy)
  464. @@ -0,0 +1,74 @@
  465. +package net.sf.l2j.gameserver.handler.custom;
  466. +
  467. +/**
  468. + * @author Anarchy
  469. + * @adaptação Tayran.JavaDev
  470. + *
  471. + */
  472. +public class DressMeData
  473. +{
  474. + private int chestId,
  475. + legsId,
  476. + glovesId,
  477. + feetId,
  478. + weapId;
  479. +
  480. + public DressMeData()
  481. + {
  482. + chestId = 0;
  483. + legsId = 0;
  484. + glovesId = 0;
  485. + feetId = 0;
  486. + weapId = 0;
  487. + }
  488. +
  489. + public int getChestId()
  490. + {
  491. + return chestId;
  492. + }
  493. +
  494. + public int getLegsId()
  495. + {
  496. + return legsId;
  497. + }
  498. +
  499. + public int getGlovesId()
  500. + {
  501. + return glovesId;
  502. + }
  503. +
  504. + public int getBootsId()
  505. + {
  506. + return feetId;
  507. + }
  508. +
  509. + public int getWeapId()
  510. + {
  511. + return weapId;
  512. + }
  513. +
  514. + public void setChestId(int val)
  515. + {
  516. + chestId = val;
  517. + }
  518. +
  519. + public void setLegsId(int val)
  520. + {
  521. + legsId = val;
  522. + }
  523. +
  524. + public void setGlovesId(int val)
  525. + {
  526. + glovesId = val;
  527. + }
  528. +
  529. + public void setBootsId(int val)
  530. + {
  531. + feetId = val;
  532. + }
  533. +
  534. + public void setWeapId(int val)
  535. + {
  536. + weapId = val;
  537. + }
  538. +}
  539. \ No newline at end of file
  540. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin10.java
  541. ===================================================================
  542. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin10.java (nonexistent)
  543. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin10.java (working copy)
  544. @@ -0,0 +1,52 @@
  545. +package net.sf.l2j.gameserver.handler.itemhandlers;
  546. +
  547. +import net.sf.l2j.Config;
  548. +import net.sf.l2j.gameserver.handler.IItemHandler;
  549. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  550. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  551. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  552. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  553. +
  554. +public class skin10 implements IItemHandler
  555. +{
  556. + @Override
  557. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  558. + {
  559. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  560. + {
  561. + if(!(playable instanceof L2PcInstance))
  562. + return;
  563. + L2PcInstance activeChar = (L2PcInstance)playable;
  564. +
  565. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME10);
  566. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME10);
  567. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME10);
  568. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME10);
  569. +
  570. + if (activeChar.isDressMeEnabled())
  571. + {
  572. + activeChar.setDressMeEnabled(false);
  573. + activeChar.broadcastUserInfo();
  574. + activeChar.sendMessage("You have disabled skin.");
  575. + }
  576. + else
  577. + {
  578. + activeChar.setDressMeEnabled(true);
  579. + activeChar.broadcastUserInfo();
  580. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME10 + " skin.");
  581. + }
  582. + }
  583. + else
  584. + playable.sendMessage("Sorry, admin has disabled skins.");
  585. + }
  586. +
  587. + @Override
  588. + public int[] getItemIds()
  589. + {
  590. + return ITEM_IDS;
  591. + }
  592. +
  593. + private static final int ITEM_IDS[] = {
  594. + Config.SKIN_ITEM_10
  595. + };
  596. +}
  597. \ No newline at end of file
  598. Index: java/net/sf/l2j/gameserver/handler/ItemHandler.java
  599. ===================================================================
  600. --- java/net/sf/l2j/gameserver/handler/ItemHandler.java (revision 683)
  601. +++ java/net/sf/l2j/gameserver/handler/ItemHandler.java (working copy)
  602. @@ -49,6 +49,21 @@
  603. import net.sf.l2j.gameserver.handler.itemhandlers.SpiritShot;
  604. import net.sf.l2j.gameserver.handler.itemhandlers.SummonItems;
  605. import net.sf.l2j.gameserver.handler.itemhandlers.WorldMap;
  606. +import net.sf.l2j.gameserver.handler.itemhandlers.skin1;
  607. +import net.sf.l2j.gameserver.handler.itemhandlers.skin2;
  608. +import net.sf.l2j.gameserver.handler.itemhandlers.skin3;
  609. +import net.sf.l2j.gameserver.handler.itemhandlers.skin4;
  610. +import net.sf.l2j.gameserver.handler.itemhandlers.skin5;
  611. +import net.sf.l2j.gameserver.handler.itemhandlers.skin6;
  612. +import net.sf.l2j.gameserver.handler.itemhandlers.skin7;
  613. +import net.sf.l2j.gameserver.handler.itemhandlers.skin8;
  614. +import net.sf.l2j.gameserver.handler.itemhandlers.skin9;
  615. +import net.sf.l2j.gameserver.handler.itemhandlers.skin10;
  616. +import net.sf.l2j.gameserver.handler.itemhandlers.skin11;
  617. +import net.sf.l2j.gameserver.handler.itemhandlers.skin12;
  618. +import net.sf.l2j.gameserver.handler.itemhandlers.skin13;
  619. +import net.sf.l2j.gameserver.handler.itemhandlers.skin14;
  620. +import net.sf.l2j.gameserver.handler.itemhandlers.skin15;
  621.  
  622. /**
  623. * This class manages handlers of items
  624. @@ -109,7 +124,23 @@
  625. registerItemHandler(new ExtractableItems());
  626. registerItemHandler(new SummonItems());
  627. registerItemHandler(new BeastSpice());
  628. + registerItemHandler(new skin1());
  629. + registerItemHandler(new skin2());
  630. + registerItemHandler(new skin3());
  631. + registerItemHandler(new skin4());
  632. + registerItemHandler(new skin5());
  633. + registerItemHandler(new skin6());
  634. + registerItemHandler(new skin7());
  635. + registerItemHandler(new skin8());
  636. + registerItemHandler(new skin9());
  637. + registerItemHandler(new skin10());
  638. + registerItemHandler(new skin11());
  639. + registerItemHandler(new skin12());
  640. + registerItemHandler(new skin13());
  641. + registerItemHandler(new skin14());
  642. + registerItemHandler(new skin15());
  643.  
  644. +
  645. _log.config("ItemHandler: Loaded " + _dataTable.size() + " handlers.");
  646. }
  647.  
  648. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin8.java
  649. ===================================================================
  650. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin8.java (nonexistent)
  651. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin8.java (working copy)
  652. @@ -0,0 +1,52 @@
  653. +package net.sf.l2j.gameserver.handler.itemhandlers;
  654. +
  655. +import net.sf.l2j.Config;
  656. +import net.sf.l2j.gameserver.handler.IItemHandler;
  657. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  658. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  659. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  660. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  661. +
  662. +public class skin8 implements IItemHandler
  663. +{
  664. + @Override
  665. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  666. + {
  667. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  668. + {
  669. + if(!(playable instanceof L2PcInstance))
  670. + return;
  671. + L2PcInstance activeChar = (L2PcInstance)playable;
  672. +
  673. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME8);
  674. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME8);
  675. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME8);
  676. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME8);
  677. +
  678. + if (activeChar.isDressMeEnabled())
  679. + {
  680. + activeChar.setDressMeEnabled(false);
  681. + activeChar.broadcastUserInfo();
  682. + activeChar.sendMessage("You have disabled skin.");
  683. + }
  684. + else
  685. + {
  686. + activeChar.setDressMeEnabled(true);
  687. + activeChar.broadcastUserInfo();
  688. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME8 + " skin.");
  689. + }
  690. + }
  691. + else
  692. + playable.sendMessage("Sorry, admin has disabled skins.");
  693. + }
  694. +
  695. + @Override
  696. + public int[] getItemIds()
  697. + {
  698. + return ITEM_IDS;
  699. + }
  700. +
  701. + private static final int ITEM_IDS[] = {
  702. + Config.SKIN_ITEM_8
  703. + };
  704. +}
  705. \ No newline at end of file
  706. Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
  707. ===================================================================
  708. --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 683)
  709. +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
  710. @@ -202,6 +202,7 @@
  711. import net.sf.l2j.gameserver.util.Util;
  712. import net.sf.l2j.util.Point3D;
  713. import net.sf.l2j.util.Rnd;
  714. +import net.sf.l2j.gameserver.handler.custom.DressMeData;
  715.  
  716. /**
  717. * This class represents all player characters in the world.
  718. @@ -367,6 +368,31 @@
  719.  
  720. private int _curWeightPenalty = 0;
  721.  
  722. + private DressMeData _dressmedata = null;
  723. + private boolean _dressed = false;
  724. +
  725. +
  726. + public DressMeData getDressMeData()
  727. + {
  728. + return _dressmedata;
  729. + }
  730. +
  731. + public void setDressMeData(DressMeData val)
  732. + {
  733. + _dressmedata = val;
  734. + }
  735. +
  736. + public boolean isDressMeEnabled()
  737. + {
  738. + return _dressed;
  739. + }
  740. +
  741. + public void setDressMeEnabled(boolean val)
  742. + {
  743. + _dressed = val;
  744. + }
  745. +
  746. +
  747. /** The Siege state of the L2PcInstance */
  748. private byte _siegeState = 0;
  749.  
  750. Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
  751. ===================================================================
  752. --- java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 683)
  753. +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
  754. @@ -18,6 +18,7 @@
  755. import java.util.logging.Level;
  756. import java.util.logging.Logger;
  757.  
  758. +import net.sf.l2j.Config;
  759. import net.sf.l2j.gameserver.ai.CtrlIntention;
  760. import net.sf.l2j.gameserver.communitybbs.CommunityBoard;
  761. import net.sf.l2j.gameserver.datatables.AdminCommandRightsData;
  762. @@ -35,6 +36,10 @@
  763. import net.sf.l2j.gameserver.model.olympiad.Olympiad;
  764. import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
  765. import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
  766. +import net.sf.l2j.gameserver.datatables.ItemTable;
  767. +import net.sf.l2j.gameserver.handler.custom.DressMeData;
  768. +import net.sf.l2j.gameserver.handler.voicedcommandhandlers.DressMe;
  769. +import net.sf.l2j.gameserver.model.itemcontainer.Inventory;
  770.  
  771. /**
  772. * This class ...
  773. @@ -46,7 +51,7 @@
  774. private static Logger _log = Logger.getLogger(RequestBypassToServer.class.getName());
  775.  
  776. // S
  777. - private String _command;
  778. + public static String _command;
  779.  
  780. @Override
  781. protected void readImpl()
  782. @@ -95,6 +100,51 @@
  783.  
  784. ach.useAdminCommand(_command, activeChar);
  785. }
  786. + else if (_command.equals("bp_changedressmestatus"))
  787. + {
  788. + if (activeChar.isDressMeEnabled())
  789. + {
  790. + activeChar.setDressMeEnabled(false);
  791. + activeChar.broadcastUserInfo();
  792. + }
  793. + else
  794. + {
  795. + activeChar.setDressMeEnabled(true);
  796. + activeChar.broadcastUserInfo();
  797. + }
  798. +
  799. + DressMe.sendMainWindow(activeChar);
  800. + }
  801. + else if (_command.startsWith("bp_editWindow"))
  802. + {
  803. + String bp = _command.substring(14);
  804. + StringTokenizer st = new StringTokenizer(bp);
  805. +
  806. + sendEditWindow(activeChar, st.nextToken());
  807. + }
  808. + else if (_command.startsWith("bp_setpart"))
  809. + {
  810. + String bp = _command.substring(11);
  811. + StringTokenizer st = new StringTokenizer(bp);
  812. +
  813. + String part = st.nextToken();
  814. + String type = st.nextToken();
  815. +
  816. + setPart(activeChar, part, type);
  817. + }
  818. + else if (_command.startsWith("bp_gettarget"))
  819. + {
  820. + String bp = _command.substring(13);
  821. + StringTokenizer st = new StringTokenizer(bp);
  822. +
  823. + String part = st.nextToken();
  824. +
  825. + stealTarget(activeChar, part);
  826. + }
  827. + else if (_command.equals("bp_main"))
  828. + {
  829. + DressMe.sendMainWindow(activeChar);
  830. + }
  831. else if (_command.startsWith("voice "))
  832. {
  833. String text = _command.substring(5);
  834. @@ -249,6 +299,303 @@
  835. activeChar.sendPacket(html);
  836. }
  837.  
  838. + public void stealTarget(L2PcInstance p, String part)
  839. + {
  840. + if (p.getTarget() == null || !(p.getTarget() instanceof L2PcInstance))
  841. + {
  842. + p.sendMessage("Invalid target.");
  843. + return;
  844. + }
  845. +
  846. + L2PcInstance t = (L2PcInstance)p.getTarget();
  847. +
  848. + if (p.getDressMeData() == null)
  849. + {
  850. + DressMeData dmd = new DressMeData();
  851. + p.setDressMeData(dmd);
  852. + }
  853. +
  854. + boolean returnMain = false;
  855. +
  856. + switch (part)
  857. + {
  858. + case "chest":
  859. + {
  860. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) == null)
  861. + {
  862. + p.getDressMeData().setChestId(0);
  863. + }
  864. + else
  865. + {
  866. + p.getDressMeData().setChestId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItemId());
  867. + }
  868. + break;
  869. + }
  870. + case "legs":
  871. + {
  872. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) == null)
  873. + {
  874. + p.getDressMeData().setLegsId(0);
  875. + }
  876. + else
  877. + {
  878. + p.getDressMeData().setLegsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS).getItemId());
  879. + }
  880. + break;
  881. + }
  882. + case "gloves":
  883. + {
  884. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) == null)
  885. + {
  886. + p.getDressMeData().setGlovesId(0);
  887. + }
  888. + else
  889. + {
  890. + p.getDressMeData().setGlovesId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES).getItemId());
  891. + }
  892. + break;
  893. + }
  894. + case "boots":
  895. + {
  896. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) == null)
  897. + {
  898. + p.getDressMeData().setBootsId(0);
  899. + }
  900. + else
  901. + {
  902. + p.getDressMeData().setBootsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET).getItemId());
  903. + }
  904. + break;
  905. + }
  906. + case "weap":
  907. + {
  908. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null)
  909. + {
  910. + p.getDressMeData().setWeapId(0);
  911. + }
  912. + else
  913. + {
  914. + p.getDressMeData().setWeapId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getItemId());
  915. + }
  916. + break;
  917. + }
  918. + case "all":
  919. + {
  920. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) == null)
  921. + {
  922. + p.getDressMeData().setChestId(0);
  923. + }
  924. + else
  925. + {
  926. + p.getDressMeData().setChestId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItemId());
  927. + }
  928. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) == null)
  929. + {
  930. + p.getDressMeData().setLegsId(0);
  931. + }
  932. + else
  933. + {
  934. + p.getDressMeData().setLegsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS).getItemId());
  935. + }
  936. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) == null)
  937. + {
  938. + p.getDressMeData().setGlovesId(0);
  939. + }
  940. + else
  941. + {
  942. + p.getDressMeData().setGlovesId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES).getItemId());
  943. + }
  944. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) == null)
  945. + {
  946. + p.getDressMeData().setBootsId(0);
  947. + }
  948. + else
  949. + {
  950. + p.getDressMeData().setBootsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET).getItemId());
  951. + }
  952. + if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null)
  953. + {
  954. + p.getDressMeData().setWeapId(0);
  955. + }
  956. + else
  957. + {
  958. + p.getDressMeData().setWeapId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getItemId());
  959. + }
  960. + returnMain = true;
  961. + break;
  962. + }
  963. + }
  964. +
  965. + p.broadcastUserInfo();
  966. + if (!returnMain)
  967. + sendEditWindow(p, part);
  968. + else
  969. + DressMe.sendMainWindow(p);
  970. + }
  971. +
  972. + public static void setPart(L2PcInstance p, String part, String type)
  973. + {
  974. + if (p.getDressMeData() == null)
  975. + {
  976. + DressMeData dmd = new DressMeData();
  977. + p.setDressMeData(dmd);
  978. + }
  979. +
  980. + switch (part)
  981. + {
  982. + case "chest":
  983. + {
  984. + if (Config.DRESS_ME_CHESTS.keySet().contains(type))
  985. + {
  986. + p.getDressMeData().setChestId(Config.DRESS_ME_CHESTS.get(type));
  987. + }
  988. +
  989. + break;
  990. + }
  991. + case "legs":
  992. + {
  993. + if (Config.DRESS_ME_LEGS.keySet().contains(type))
  994. + {
  995. + p.getDressMeData().setLegsId(Config.DRESS_ME_LEGS.get(type));
  996. + }
  997. +
  998. + break;
  999. + }
  1000. + case "gloves":
  1001. + {
  1002. + if (Config.DRESS_ME_GLOVES.keySet().contains(type))
  1003. + {
  1004. + p.getDressMeData().setGlovesId(Config.DRESS_ME_GLOVES.get(type));
  1005. + }
  1006. +
  1007. + break;
  1008. + }
  1009. + case "boots":
  1010. + {
  1011. + if (Config.DRESS_ME_BOOTS.keySet().contains(type))
  1012. + {
  1013. + p.getDressMeData().setBootsId(Config.DRESS_ME_BOOTS.get(type));
  1014. + }
  1015. +
  1016. + break;
  1017. + }
  1018. + case "weap":
  1019. + {
  1020. + if (Config.DRESS_ME_WEAPONS.keySet().contains(type))
  1021. + {
  1022. + p.getDressMeData().setWeapId(Config.DRESS_ME_WEAPONS.get(type));
  1023. + }
  1024. +
  1025. + break;
  1026. + }
  1027. + }
  1028. +
  1029. + p.broadcastUserInfo();
  1030. +// sendEditWindow(p, part);
  1031. + }
  1032. +
  1033. + public static void sendEditWindow(L2PcInstance p, String part)
  1034. + {
  1035. + NpcHtmlMessage htm = new NpcHtmlMessage(0);
  1036. + htm.setFile("./data/html/custom/dressme/edit.htm");
  1037. + htm.replace("%part%", part);
  1038. + switch (part)
  1039. + {
  1040. + case "chest":
  1041. + {
  1042. + if (p.getDressMeData() == null)
  1043. + {
  1044. + htm.replace("%partinfo%", "You have no custom chest.");
  1045. + }
  1046. + else
  1047. + {
  1048. + htm.replace("%partinfo%", p.getDressMeData().getChestId() == 0 ? "You have no custom chest." : ItemTable.getInstance().getTemplate(p.getDressMeData().getChestId()).getName());
  1049. + }
  1050. + String temp = "";
  1051. + for (String s : Config.DRESS_ME_CHESTS.keySet())
  1052. + {
  1053. + temp += s+";";
  1054. + }
  1055. + htm.replace("%dropboxdata%", temp);
  1056. + break;
  1057. + }
  1058. + case "legs":
  1059. + {
  1060. + if (p.getDressMeData() == null)
  1061. + {
  1062. + htm.replace("%partinfo%", "You have no custom legs.");
  1063. + }
  1064. + else
  1065. + {
  1066. + htm.replace("%partinfo%", p.getDressMeData().getLegsId() == 0 ? "You have no custom legs." : ItemTable.getInstance().getTemplate(p.getDressMeData().getLegsId()).getName());
  1067. + }
  1068. + String temp = "";
  1069. + for (String s : Config.DRESS_ME_LEGS.keySet())
  1070. + {
  1071. + temp += s+";";
  1072. + }
  1073. + htm.replace("%dropboxdata%", temp);
  1074. + break;
  1075. + }
  1076. + case "gloves":
  1077. + {
  1078. + if (p.getDressMeData() == null)
  1079. + {
  1080. + htm.replace("%partinfo%", "You have no custom gloves.");
  1081. + }
  1082. + else
  1083. + {
  1084. + htm.replace("%partinfo%", p.getDressMeData().getGlovesId() == 0 ? "You have no custom gloves." : ItemTable.getInstance().getTemplate(p.getDressMeData().getGlovesId()).getName());
  1085. + }
  1086. + String temp = "";
  1087. + for (String s : Config.DRESS_ME_GLOVES.keySet())
  1088. + {
  1089. + temp += s+";";
  1090. + }
  1091. + htm.replace("%dropboxdata%", temp);
  1092. + break;
  1093. + }
  1094. + case "boots":
  1095. + {
  1096. + if (p.getDressMeData() == null)
  1097. + {
  1098. + htm.replace("%partinfo%", "You have no custom boots.");
  1099. + }
  1100. + else
  1101. + {
  1102. + htm.replace("%partinfo%", p.getDressMeData().getBootsId() == 0 ? "You have no custom boots." : ItemTable.getInstance().getTemplate(p.getDressMeData().getBootsId()).getName());
  1103. + }
  1104. + String temp = "";
  1105. + for (String s : Config.DRESS_ME_BOOTS.keySet())
  1106. + {
  1107. + temp += s+";";
  1108. + }
  1109. + htm.replace("%dropboxdata%", temp);
  1110. + break;
  1111. + }
  1112. + case "weap":
  1113. + {
  1114. + if (p.getDressMeData() == null)
  1115. + {
  1116. + htm.replace("%partinfo%", "You have no custom weapon.");
  1117. + }
  1118. + else
  1119. + {
  1120. + htm.replace("%partinfo%", p.getDressMeData().getWeapId() == 0 ? "You have no custom weapon." : ItemTable.getInstance().getTemplate(p.getDressMeData().getWeapId()).getName());
  1121. + }
  1122. + String temp = "";
  1123. + for (String s : Config.DRESS_ME_WEAPONS.keySet())
  1124. + {
  1125. + temp += s+";";
  1126. + }
  1127. + htm.replace("%dropboxdata%", temp);
  1128. + break;
  1129. + }
  1130. + }
  1131. +
  1132. + p.sendPacket(htm);
  1133. + }
  1134. +
  1135. /*
  1136. * (non-Javadoc)
  1137. * @see net.sf.l2j.gameserver.clientpackets.L2GameClientPacket#getType()
  1138. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin15.java
  1139. ===================================================================
  1140. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin15.java (nonexistent)
  1141. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin15.java (working copy)
  1142. @@ -0,0 +1,52 @@
  1143. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1144. +
  1145. +import net.sf.l2j.Config;
  1146. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1147. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1148. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1149. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1150. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1151. +
  1152. +public class skin15 implements IItemHandler
  1153. +{
  1154. + @Override
  1155. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1156. + {
  1157. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1158. + {
  1159. + if(!(playable instanceof L2PcInstance))
  1160. + return;
  1161. + L2PcInstance activeChar = (L2PcInstance)playable;
  1162. +
  1163. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME15);
  1164. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME15);
  1165. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME15);
  1166. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME15);
  1167. +
  1168. + if (activeChar.isDressMeEnabled())
  1169. + {
  1170. + activeChar.setDressMeEnabled(false);
  1171. + activeChar.broadcastUserInfo();
  1172. + activeChar.sendMessage("You have disabled skin.");
  1173. + }
  1174. + else
  1175. + {
  1176. + activeChar.setDressMeEnabled(true);
  1177. + activeChar.broadcastUserInfo();
  1178. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME15 + " skin.");
  1179. + }
  1180. + }
  1181. + else
  1182. + playable.sendMessage("Sorry, admin has disabled skins.");
  1183. + }
  1184. +
  1185. + @Override
  1186. + public int[] getItemIds()
  1187. + {
  1188. + return ITEM_IDS;
  1189. + }
  1190. +
  1191. + private static final int ITEM_IDS[] = {
  1192. + Config.SKIN_ITEM_15
  1193. + };
  1194. +}
  1195. \ No newline at end of file
  1196. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin13.java
  1197. ===================================================================
  1198. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin13.java (nonexistent)
  1199. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin13.java (working copy)
  1200. @@ -0,0 +1,52 @@
  1201. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1202. +
  1203. +import net.sf.l2j.Config;
  1204. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1205. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1206. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1207. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1208. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1209. +
  1210. +public class skin13 implements IItemHandler
  1211. +{
  1212. + @Override
  1213. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1214. + {
  1215. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1216. + {
  1217. + if(!(playable instanceof L2PcInstance))
  1218. + return;
  1219. + L2PcInstance activeChar = (L2PcInstance)playable;
  1220. +
  1221. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME13);
  1222. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME13);
  1223. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME13);
  1224. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME13);
  1225. +
  1226. + if (activeChar.isDressMeEnabled())
  1227. + {
  1228. + activeChar.setDressMeEnabled(false);
  1229. + activeChar.broadcastUserInfo();
  1230. + activeChar.sendMessage("You have disabled skin.");
  1231. + }
  1232. + else
  1233. + {
  1234. + activeChar.setDressMeEnabled(true);
  1235. + activeChar.broadcastUserInfo();
  1236. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME13 + " skin.");
  1237. + }
  1238. + }
  1239. + else
  1240. + playable.sendMessage("Sorry, admin has disabled skins.");
  1241. + }
  1242. +
  1243. + @Override
  1244. + public int[] getItemIds()
  1245. + {
  1246. + return ITEM_IDS;
  1247. + }
  1248. +
  1249. + private static final int ITEM_IDS[] = {
  1250. + Config.SKIN_ITEM_13
  1251. + };
  1252. +}
  1253. \ No newline at end of file
  1254. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin11.java
  1255. ===================================================================
  1256. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin11.java (nonexistent)
  1257. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin11.java (working copy)
  1258. @@ -0,0 +1,52 @@
  1259. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1260. +
  1261. +import net.sf.l2j.Config;
  1262. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1263. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1264. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1265. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1266. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1267. +
  1268. +public class skin11 implements IItemHandler
  1269. +{
  1270. + @Override
  1271. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1272. + {
  1273. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1274. + {
  1275. + if(!(playable instanceof L2PcInstance))
  1276. + return;
  1277. + L2PcInstance activeChar = (L2PcInstance)playable;
  1278. +
  1279. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME11);
  1280. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME11);
  1281. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME11);
  1282. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME11);
  1283. +
  1284. + if (activeChar.isDressMeEnabled())
  1285. + {
  1286. + activeChar.setDressMeEnabled(false);
  1287. + activeChar.broadcastUserInfo();
  1288. + activeChar.sendMessage("You have disabled skin.");
  1289. + }
  1290. + else
  1291. + {
  1292. + activeChar.setDressMeEnabled(true);
  1293. + activeChar.broadcastUserInfo();
  1294. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME11 + " skin.");
  1295. + }
  1296. + }
  1297. + else
  1298. + playable.sendMessage("Sorry, admin has disabled skins.");
  1299. + }
  1300. +
  1301. + @Override
  1302. + public int[] getItemIds()
  1303. + {
  1304. + return ITEM_IDS;
  1305. + }
  1306. +
  1307. + private static final int ITEM_IDS[] = {
  1308. + Config.SKIN_ITEM_11
  1309. + };
  1310. +}
  1311. \ No newline at end of file
  1312. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin9.java
  1313. ===================================================================
  1314. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin9.java (nonexistent)
  1315. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin9.java (working copy)
  1316. @@ -0,0 +1,52 @@
  1317. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1318. +
  1319. +import net.sf.l2j.Config;
  1320. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1321. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1322. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1323. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1324. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1325. +
  1326. +public class skin9 implements IItemHandler
  1327. +{
  1328. + @Override
  1329. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1330. + {
  1331. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1332. + {
  1333. + if(!(playable instanceof L2PcInstance))
  1334. + return;
  1335. + L2PcInstance activeChar = (L2PcInstance)playable;
  1336. +
  1337. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME9);
  1338. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME9);
  1339. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME9);
  1340. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME9);
  1341. +
  1342. + if (activeChar.isDressMeEnabled())
  1343. + {
  1344. + activeChar.setDressMeEnabled(false);
  1345. + activeChar.broadcastUserInfo();
  1346. + activeChar.sendMessage("You have disabled skin.");
  1347. + }
  1348. + else
  1349. + {
  1350. + activeChar.setDressMeEnabled(true);
  1351. + activeChar.broadcastUserInfo();
  1352. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME9 + " skin.");
  1353. + }
  1354. + }
  1355. + else
  1356. + playable.sendMessage("Sorry, admin has disabled skins.");
  1357. + }
  1358. +
  1359. + @Override
  1360. + public int[] getItemIds()
  1361. + {
  1362. + return ITEM_IDS;
  1363. + }
  1364. +
  1365. + private static final int ITEM_IDS[] = {
  1366. + Config.SKIN_ITEM_9
  1367. + };
  1368. +}
  1369. \ No newline at end of file
  1370. Index: java/config/Custom.properties
  1371. ===================================================================
  1372. --- java/config/Custom.properties (revision 683)
  1373. +++ java/config/Custom.properties (working copy)
  1374. @@ -331,4 +331,53 @@
  1375. OfflineSetNameColor = False
  1376.  
  1377. # Color of the name in offline mode (if OfflineSetNameColor = True)
  1378. -OfflineNameColor = 808080
  1379. \ No newline at end of file
  1380. +OfflineNameColor = 808080
  1381. +
  1382. +# -----------------------------------------
  1383. +# DressMe system -
  1384. +# -----------------------------------------
  1385. +#
  1386. +AllowDressMeSystem = False
  1387. +
  1388. +# DressMe values.
  1389. +# Skin name (Example: "Draconic")
  1390. +SkinName1 = Draconic
  1391. +SkinName2 = Imperial
  1392. +SkinName3 = Arcana
  1393. +SkinName4 = SkinName4
  1394. +SkinName5 = SkinName5
  1395. +SkinName6 = SkinName6
  1396. +SkinName7 = SkinName7
  1397. +SkinName8 = SkinName8
  1398. +SkinName9 = SkinName9
  1399. +SkinName10 = SkinName10
  1400. +SkinName11 = SkinName11
  1401. +SkinName12 = SkinName12
  1402. +SkinName13 = SkinName13
  1403. +SkinName14 = SkinName14
  1404. +SkinName15 = SkinName15
  1405. +
  1406. +# Skin item id (Example: "6673")
  1407. +SkinItem1 = 0
  1408. +SkinItem2 = 0
  1409. +SkinItem3 = 0
  1410. +SkinItem4 = 0
  1411. +SkinItem5 = 0
  1412. +SkinItem6 = 0
  1413. +SkinItem7 = 0
  1414. +SkinItem8 = 0
  1415. +SkinItem9 = 0
  1416. +SkinItem10 = 0
  1417. +SkinItem11 = 0
  1418. +SkinItem12 = 0
  1419. +SkinItem13 = 0
  1420. +SkinItem14 = 0
  1421. +SkinItem15 = 0
  1422. +
  1423. +# Note: It works like name,id;name,id
  1424. +# WARNING: No spaces on names, use _ instead of space.
  1425. +DressMeChests = Draconic,6379;Imperial,6373;Arcana,6383
  1426. +DressMeLegs = Imperial,6374
  1427. +DressMeBoots = Draconic,6381;Imperial,6376;Arcana,6385
  1428. +DressMeGloves = Draconic,6380;Imperial,6375;Arcana,6384
  1429. +DressMeWeapons = Draconic_Bow,7577;Shining_Bow,6594;Arcana_Mace,6608
  1430. \ No newline at end of file
  1431. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin7.java
  1432. ===================================================================
  1433. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin7.java (nonexistent)
  1434. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin7.java (working copy)
  1435. @@ -0,0 +1,52 @@
  1436. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1437. +
  1438. +import net.sf.l2j.Config;
  1439. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1440. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1441. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1442. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1443. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1444. +
  1445. +public class skin7 implements IItemHandler
  1446. +{
  1447. + @Override
  1448. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1449. + {
  1450. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1451. + {
  1452. + if(!(playable instanceof L2PcInstance))
  1453. + return;
  1454. + L2PcInstance activeChar = (L2PcInstance)playable;
  1455. +
  1456. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME7);
  1457. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME7);
  1458. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME7);
  1459. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME7);
  1460. +
  1461. + if (activeChar.isDressMeEnabled())
  1462. + {
  1463. + activeChar.setDressMeEnabled(false);
  1464. + activeChar.broadcastUserInfo();
  1465. + activeChar.sendMessage("You have disabled skin.");
  1466. + }
  1467. + else
  1468. + {
  1469. + activeChar.setDressMeEnabled(true);
  1470. + activeChar.broadcastUserInfo();
  1471. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME7 + " skin.");
  1472. + }
  1473. + }
  1474. + else
  1475. + playable.sendMessage("Sorry, admin has disabled skins.");
  1476. + }
  1477. +
  1478. + @Override
  1479. + public int[] getItemIds()
  1480. + {
  1481. + return ITEM_IDS;
  1482. + }
  1483. +
  1484. + private static final int ITEM_IDS[] = {
  1485. + Config.SKIN_ITEM_7
  1486. + };
  1487. +}
  1488. \ No newline at end of file
  1489. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin6.java
  1490. ===================================================================
  1491. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin6.java (nonexistent)
  1492. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin6.java (working copy)
  1493. @@ -0,0 +1,52 @@
  1494. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1495. +
  1496. +import net.sf.l2j.Config;
  1497. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1498. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1499. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1500. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1501. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1502. +
  1503. +public class skin6 implements IItemHandler
  1504. +{
  1505. + @Override
  1506. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1507. + {
  1508. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1509. + {
  1510. + if(!(playable instanceof L2PcInstance))
  1511. + return;
  1512. + L2PcInstance activeChar = (L2PcInstance)playable;
  1513. +
  1514. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME6);
  1515. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME6);
  1516. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME6);
  1517. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME6);
  1518. +
  1519. + if (activeChar.isDressMeEnabled())
  1520. + {
  1521. + activeChar.setDressMeEnabled(false);
  1522. + activeChar.broadcastUserInfo();
  1523. + activeChar.sendMessage("You have disabled skin.");
  1524. + }
  1525. + else
  1526. + {
  1527. + activeChar.setDressMeEnabled(true);
  1528. + activeChar.broadcastUserInfo();
  1529. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME6 + " skin.");
  1530. + }
  1531. + }
  1532. + else
  1533. + playable.sendMessage("Sorry, admin has disabled skins.");
  1534. + }
  1535. +
  1536. + @Override
  1537. + public int[] getItemIds()
  1538. + {
  1539. + return ITEM_IDS;
  1540. + }
  1541. +
  1542. + private static final int ITEM_IDS[] = {
  1543. + Config.SKIN_ITEM_6
  1544. + };
  1545. +}
  1546. \ No newline at end of file
  1547. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin5.java
  1548. ===================================================================
  1549. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin5.java (nonexistent)
  1550. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin5.java (working copy)
  1551. @@ -0,0 +1,52 @@
  1552. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1553. +
  1554. +import net.sf.l2j.Config;
  1555. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1556. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1557. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1558. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1559. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1560. +
  1561. +public class skin5 implements IItemHandler
  1562. +{
  1563. + @Override
  1564. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1565. + {
  1566. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1567. + {
  1568. + if(!(playable instanceof L2PcInstance))
  1569. + return;
  1570. + L2PcInstance activeChar = (L2PcInstance)playable;
  1571. +
  1572. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME5);
  1573. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME5);
  1574. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME5);
  1575. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME5);
  1576. +
  1577. + if (activeChar.isDressMeEnabled())
  1578. + {
  1579. + activeChar.setDressMeEnabled(false);
  1580. + activeChar.broadcastUserInfo();
  1581. + activeChar.sendMessage("You have disabled skin.");
  1582. + }
  1583. + else
  1584. + {
  1585. + activeChar.setDressMeEnabled(true);
  1586. + activeChar.broadcastUserInfo();
  1587. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME5 + " skin.");
  1588. + }
  1589. + }
  1590. + else
  1591. + playable.sendMessage("Sorry, admin has disabled skins.");
  1592. + }
  1593. +
  1594. + @Override
  1595. + public int[] getItemIds()
  1596. + {
  1597. + return ITEM_IDS;
  1598. + }
  1599. +
  1600. + private static final int ITEM_IDS[] = {
  1601. + Config.SKIN_ITEM_5
  1602. + };
  1603. +}
  1604. \ No newline at end of file
  1605. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin4.java
  1606. ===================================================================
  1607. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin4.java (nonexistent)
  1608. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin4.java (working copy)
  1609. @@ -0,0 +1,52 @@
  1610. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1611. +
  1612. +import net.sf.l2j.Config;
  1613. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1614. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1615. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1616. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1617. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1618. +
  1619. +public class skin4 implements IItemHandler
  1620. +{
  1621. + @Override
  1622. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1623. + {
  1624. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1625. + {
  1626. + if(!(playable instanceof L2PcInstance))
  1627. + return;
  1628. + L2PcInstance activeChar = (L2PcInstance)playable;
  1629. +
  1630. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME4);
  1631. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME4);
  1632. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME4);
  1633. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME4);
  1634. +
  1635. + if (activeChar.isDressMeEnabled())
  1636. + {
  1637. + activeChar.setDressMeEnabled(false);
  1638. + activeChar.broadcastUserInfo();
  1639. + activeChar.sendMessage("You have disabled skin.");
  1640. + }
  1641. + else
  1642. + {
  1643. + activeChar.setDressMeEnabled(true);
  1644. + activeChar.broadcastUserInfo();
  1645. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME4 + " skin.");
  1646. + }
  1647. + }
  1648. + else
  1649. + playable.sendMessage("Sorry, admin has disabled skins.");
  1650. + }
  1651. +
  1652. + @Override
  1653. + public int[] getItemIds()
  1654. + {
  1655. + return ITEM_IDS;
  1656. + }
  1657. +
  1658. + private static final int ITEM_IDS[] = {
  1659. + Config.SKIN_ITEM_4
  1660. + };
  1661. +}
  1662. \ No newline at end of file
  1663. Index: java/net/sf/l2j/gameserver/handler/custom/DressMeData.java
  1664. ===================================================================
  1665. --- java/net/sf/l2j/gameserver/handler/custom/DressMeData.java (nonexistent)
  1666. +++ java/net/sf/l2j/gameserver/handler/custom/DressMeData.java (working copy)
  1667. @@ -0,0 +1,74 @@
  1668. +package net.sf.l2j.gameserver.handler.custom;
  1669. +
  1670. +/**
  1671. + * @author Anarchy
  1672. + * @adaptação Tayran.JavaDev
  1673. + *
  1674. + */
  1675. +public class DressMeData
  1676. +{
  1677. + private int chestId,
  1678. + legsId,
  1679. + glovesId,
  1680. + feetId,
  1681. + weapId;
  1682. +
  1683. + public DressMeData()
  1684. + {
  1685. + chestId = 0;
  1686. + legsId = 0;
  1687. + glovesId = 0;
  1688. + feetId = 0;
  1689. + weapId = 0;
  1690. + }
  1691. +
  1692. + public int getChestId()
  1693. + {
  1694. + return chestId;
  1695. + }
  1696. +
  1697. + public int getLegsId()
  1698. + {
  1699. + return legsId;
  1700. + }
  1701. +
  1702. + public int getGlovesId()
  1703. + {
  1704. + return glovesId;
  1705. + }
  1706. +
  1707. + public int getBootsId()
  1708. + {
  1709. + return feetId;
  1710. + }
  1711. +
  1712. + public int getWeapId()
  1713. + {
  1714. + return weapId;
  1715. + }
  1716. +
  1717. + public void setChestId(int val)
  1718. + {
  1719. + chestId = val;
  1720. + }
  1721. +
  1722. + public void setLegsId(int val)
  1723. + {
  1724. + legsId = val;
  1725. + }
  1726. +
  1727. + public void setGlovesId(int val)
  1728. + {
  1729. + glovesId = val;
  1730. + }
  1731. +
  1732. + public void setBootsId(int val)
  1733. + {
  1734. + feetId = val;
  1735. + }
  1736. +
  1737. + public void setWeapId(int val)
  1738. + {
  1739. + weapId = val;
  1740. + }
  1741. +}
  1742. \ No newline at end of file
  1743. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin3.java
  1744. ===================================================================
  1745. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin3.java (nonexistent)
  1746. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin3.java (working copy)
  1747. @@ -0,0 +1,52 @@
  1748. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1749. +
  1750. +import net.sf.l2j.Config;
  1751. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1752. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1753. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1754. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1755. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1756. +
  1757. +public class skin3 implements IItemHandler
  1758. +{
  1759. + @Override
  1760. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1761. + {
  1762. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1763. + {
  1764. + if(!(playable instanceof L2PcInstance))
  1765. + return;
  1766. + L2PcInstance activeChar = (L2PcInstance)playable;
  1767. +
  1768. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME3);
  1769. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME3);
  1770. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME3);
  1771. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME3);
  1772. +
  1773. + if (activeChar.isDressMeEnabled())
  1774. + {
  1775. + activeChar.setDressMeEnabled(false);
  1776. + activeChar.broadcastUserInfo();
  1777. + activeChar.sendMessage("You have disabled skin.");
  1778. + }
  1779. + else
  1780. + {
  1781. + activeChar.setDressMeEnabled(true);
  1782. + activeChar.broadcastUserInfo();
  1783. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME3 + " skin.");
  1784. + }
  1785. + }
  1786. + else
  1787. + playable.sendMessage("Sorry, admin has disabled skins.");
  1788. + }
  1789. +
  1790. + @Override
  1791. + public int[] getItemIds()
  1792. + {
  1793. + return ITEM_IDS;
  1794. + }
  1795. +
  1796. + private static final int ITEM_IDS[] = {
  1797. + Config.SKIN_ITEM_3
  1798. + };
  1799. +}
  1800. \ No newline at end of file
  1801. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin2.java
  1802. ===================================================================
  1803. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin2.java (nonexistent)
  1804. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin2.java (working copy)
  1805. @@ -0,0 +1,52 @@
  1806. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1807. +
  1808. +import net.sf.l2j.Config;
  1809. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1810. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1811. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1812. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1813. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1814. +
  1815. +public class skin2 implements IItemHandler
  1816. +{
  1817. + @Override
  1818. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1819. + {
  1820. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1821. + {
  1822. + if(!(playable instanceof L2PcInstance))
  1823. + return;
  1824. + L2PcInstance activeChar = (L2PcInstance)playable;
  1825. +
  1826. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME2);
  1827. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME2);
  1828. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME2);
  1829. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME2);
  1830. +
  1831. + if (activeChar.isDressMeEnabled())
  1832. + {
  1833. + activeChar.setDressMeEnabled(false);
  1834. + activeChar.broadcastUserInfo();
  1835. + activeChar.sendMessage("You have disabled skin.");
  1836. + }
  1837. + else
  1838. + {
  1839. + activeChar.setDressMeEnabled(true);
  1840. + activeChar.broadcastUserInfo();
  1841. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME2 + " skin.");
  1842. + }
  1843. + }
  1844. + else
  1845. + playable.sendMessage("Sorry, admin has disabled skins.");
  1846. + }
  1847. +
  1848. + @Override
  1849. + public int[] getItemIds()
  1850. + {
  1851. + return ITEM_IDS;
  1852. + }
  1853. +
  1854. + private static final int ITEM_IDS[] = {
  1855. + Config.SKIN_ITEM_2
  1856. + };
  1857. +}
  1858. \ No newline at end of file
  1859. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/skin1.java
  1860. ===================================================================
  1861. --- java/net/sf/l2j/gameserver/handler/itemhandlers/skin1.java (nonexistent)
  1862. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/skin1.java (working copy)
  1863. @@ -0,0 +1,52 @@
  1864. +package net.sf.l2j.gameserver.handler.itemhandlers;
  1865. +
  1866. +import net.sf.l2j.Config;
  1867. +import net.sf.l2j.gameserver.handler.IItemHandler;
  1868. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  1869. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  1870. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  1871. +import net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer;
  1872. +
  1873. +public class skin1 implements IItemHandler
  1874. +{
  1875. + @Override
  1876. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  1877. + {
  1878. + if(Config.ALLOW_DRESS_ME_SYSTEM)
  1879. + {
  1880. + if(!(playable instanceof L2PcInstance))
  1881. + return;
  1882. + L2PcInstance activeChar = (L2PcInstance)playable;
  1883. +
  1884. + RequestBypassToServer.setPart(activeChar, "chest", Config.SKIN_NAME1);
  1885. + RequestBypassToServer.setPart(activeChar, "legs", Config.SKIN_NAME1);
  1886. + RequestBypassToServer.setPart(activeChar, "gloves", Config.SKIN_NAME1);
  1887. + RequestBypassToServer.setPart(activeChar, "boots", Config.SKIN_NAME1);
  1888. +
  1889. + if (activeChar.isDressMeEnabled())
  1890. + {
  1891. + activeChar.setDressMeEnabled(false);
  1892. + activeChar.broadcastUserInfo();
  1893. + activeChar.sendMessage("You have disabled skin.");
  1894. + }
  1895. + else
  1896. + {
  1897. + activeChar.setDressMeEnabled(true);
  1898. + activeChar.broadcastUserInfo();
  1899. + activeChar.sendMessage("You have activated " + Config.SKIN_NAME1 + " skin.");
  1900. + }
  1901. + }
  1902. + else
  1903. + playable.sendMessage("Sorry, admin has disabled skins.");
  1904. + }
  1905. +
  1906. + @Override
  1907. + public int[] getItemIds()
  1908. + {
  1909. + return ITEM_IDS;
  1910. + }
  1911. +
  1912. + private static final int ITEM_IDS[] = {
  1913. + Config.SKIN_ITEM_1
  1914. + };
  1915. +}
  1916. \ No newline at end of file
  1917. Index: java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
  1918. ===================================================================
  1919. --- java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java (revision 683)
  1920. +++ java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java (working copy)
  1921. @@ -210,16 +210,32 @@
  1922. }
  1923.  
  1924. writeD(0); // Hair All, but there are no such items in C4
  1925. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
  1926. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
  1927. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
  1928. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
  1929. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
  1930. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
  1931. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
  1932. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
  1933. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LRHAND));
  1934. - writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
  1935. + if (!_cha.isDressMeEnabled())
  1936. + {
  1937. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
  1938. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
  1939. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
  1940. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
  1941. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
  1942. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
  1943. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
  1944. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
  1945. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LRHAND));
  1946. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
  1947. + }
  1948. + else
  1949. + {
  1950. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
  1951. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_cha.getDressMeData().getWeapId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _cha.getDressMeData().getWeapId()));
  1952. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
  1953. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : (_cha.getDressMeData().getGlovesId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : _cha.getDressMeData().getGlovesId()));
  1954. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : (_cha.getDressMeData().getChestId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : _cha.getDressMeData().getChestId()));
  1955. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : (_cha.getDressMeData().getLegsId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : _cha.getDressMeData().getLegsId()));
  1956. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : (_cha.getDressMeData().getBootsId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : _cha.getDressMeData().getBootsId()));
  1957. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
  1958. + writeD(_cha.getDressMeData() == null ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_cha.getDressMeData().getWeapId() == 0 ? _cha.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _cha.getDressMeData().getWeapId()));
  1959. + writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
  1960. + }
  1961.  
  1962. writeD(_cha.getPvpFlag());
  1963. writeD(_cha.getKarma());
Add Comment
Please, Sign In to add comment