Advertisement
Guest User

AIO

a guest
Aug 15th, 2011
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.27 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2_GameServer_It
  3. Index: java/net/sf/l2j/gameserver/GameServer.java
  4. ===================================================================
  5. --- java/net/sf/l2j/gameserver/GameServer.java (revision 4840)
  6. +++ java/net/sf/l2j/gameserver/GameServer.java (working copy)
  7. @@ -152,6 +152,7 @@
  8. import net.sf.l2j.gameserver.handler.itemhandlers.SpiritShot;
  9. import net.sf.l2j.gameserver.handler.itemhandlers.SummonItems;
  10. import net.sf.l2j.gameserver.handler.itemhandlers.Maps;
  11. +import net.sf.l2j.gameserver.handler.itemhandlers.AioItem;
  12. import net.sf.l2j.gameserver.handler.skillhandlers.BalanceLife;
  13. import net.sf.l2j.gameserver.handler.skillhandlers.BeastFeed;
  14. import net.sf.l2j.gameserver.handler.skillhandlers.Blow;
  15. @@ -476,6 +477,10 @@
  16. _itemHandler.registerItemHandler(new SpecialXMas());
  17. _itemHandler.registerItemHandler(new SummonItems());
  18. _itemHandler.registerItemHandler(new BeastSpice());
  19. +
  20. + if(Config.AioItem)
  21. + _itemHandler.registerItemHandler(new AioItem());
  22. +
  23. _log.config("ItemHandler: Loaded " + _itemHandler.size() + " handlers.");
  24.  
  25. _skillHandler = SkillHandler.getInstance();
  26. Index: java/net/sf/l2j/Config.java
  27. ===================================================================
  28. --- java/net/sf/l2j/Config.java (revision 4840)
  29. +++ java/net/sf/l2j/Config.java (working copy)
  30. @@ -881,7 +881,8 @@
  31. public static boolean L2JMOD_WEDDING_SAMESEX;
  32. public static boolean L2JMOD_WEDDING_FORMALWEAR;
  33. public static int L2JMOD_WEDDING_DIVORCE_COSTS;
  34. -
  35. + public static boolean AioItem;
  36. +
  37. // Packet information
  38. /** Count the amount of packets per minute ? */
  39. public static boolean COUNT_PACKETS = false;
  40. @@ -1858,7 +1859,8 @@
  41. L2JMOD_WEDDING_SAMESEX = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingAllowSameSex", "False"));
  42. L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
  43. L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
  44. -
  45. + AioItem = Boolean.parseBoolean(L2JModSettings.getProperty ("AioItem"));
  46. +
  47. if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
  48. {
  49. TVT_EVENT_ENABLED = false;
  50. Index: java/config/l2jmods.properties
  51. ===================================================================
  52. --- java/config/l2jmods.properties (revision 4840)
  53. +++ java/config/l2jmods.properties (working copy)
  54. @@ -132,3 +132,8 @@
  55. # ex.: 1;2;3;4;5;6
  56. # no ";" at the start or end
  57. TvTEventDoorsCloseOpenOnStartEnd =
  58. +
  59. +# Aio HTML Item
  60. +# Default : False
  61. +AioItem = False
  62. \ No newline at end of file
  63. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/AioItem.java
  64. ===================================================================
  65. --- java/net/sf/l2j/gameserver/handler/itemhandlers/AioItem.java (revision 0)
  66. +++ java/net/sf/l2j/gameserver/handler/itemhandlers/AioItem.java (revision 0)
  67. @@ -0,0 +1,66 @@
  68. +/*
  69. + * This program is free software; you can redistribute it and/or modify
  70. + * it under the terms of the GNU General Public License as published by
  71. + * the Free Software Foundation; either version 2, or (at your option)
  72. + * any later version.
  73. + *
  74. + * This program is distributed in the hope that it will be useful,
  75. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  76. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  77. + * GNU General Public License for more details.
  78. + *
  79. + * You should have received a copy of the GNU General Public License
  80. + * along with this program; if not, write to the Free Software
  81. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  82. + * 02111-1307, USA.
  83. + *
  84. + * http://www.gnu.org/copyleft/gpl.html
  85. + */
  86. +package net.sf.l2j.gameserver.handler.itemhandlers;
  87. +
  88. +import net.sf.l2j.Config;
  89. +import net.sf.l2j.gameserver.handler.IItemHandler;
  90. +import net.sf.l2j.gameserver.GameServer;
  91. +import net.sf.l2j.gameserver.cache.HtmCache;
  92. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  93. +import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;
  94. +import net.sf.l2j.gameserver.handler.IItemHandler;
  95. +import net.sf.l2j.gameserver.model.L2ItemInstance;
  96. +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  97. +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  98. +
  99. +
  100. +
  101. +/**
  102. + * @author eSet
  103. + *
  104. + */
  105. +public class AioItem implements IItemHandler
  106. +{
  107. + private static final int[] ITEM_IDS = { 6673 };
  108. +
  109. + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
  110. + {
  111. + if (!(playable instanceof L2PcInstance))
  112. + return;
  113. + L2PcInstance activeChar = (L2PcInstance)playable;
  114. + int itemId = item.getItemId();
  115. +
  116. + if (itemId == 6673)
  117. + {
  118. + String htmFile = "data/html/mods/AioItem.htm";
  119. + String htmContent = HtmCache.getInstance().getHtm(htmFile);
  120. +
  121. + NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
  122. + infoHtml.setHtml(htmContent);
  123. + activeChar.sendPacket(infoHtml);
  124. + }
  125. + }
  126. +
  127. +
  128. +
  129. + public int[] getItemIds()
  130. + {
  131. + return ITEM_IDS;
  132. + }
  133. +}
  134. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement