Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2_GameServer_It
- Index: java/net/sf/l2j/gameserver/GameServer.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/GameServer.java (revision 4840)
- +++ java/net/sf/l2j/gameserver/GameServer.java (working copy)
- @@ -152,6 +152,7 @@
- import net.sf.l2j.gameserver.handler.itemhandlers.SpiritShot;
- import net.sf.l2j.gameserver.handler.itemhandlers.SummonItems;
- import net.sf.l2j.gameserver.handler.itemhandlers.Maps;
- +import net.sf.l2j.gameserver.handler.itemhandlers.AioItem;
- import net.sf.l2j.gameserver.handler.skillhandlers.BalanceLife;
- import net.sf.l2j.gameserver.handler.skillhandlers.BeastFeed;
- import net.sf.l2j.gameserver.handler.skillhandlers.Blow;
- @@ -476,6 +477,10 @@
- _itemHandler.registerItemHandler(new SpecialXMas());
- _itemHandler.registerItemHandler(new SummonItems());
- _itemHandler.registerItemHandler(new BeastSpice());
- +
- + if(Config.AioItem)
- + _itemHandler.registerItemHandler(new AioItem());
- +
- _log.config("ItemHandler: Loaded " + _itemHandler.size() + " handlers.");
- _skillHandler = SkillHandler.getInstance();
- Index: java/net/sf/l2j/Config.java
- ===================================================================
- --- java/net/sf/l2j/Config.java (revision 4840)
- +++ java/net/sf/l2j/Config.java (working copy)
- @@ -881,7 +881,8 @@
- public static boolean L2JMOD_WEDDING_SAMESEX;
- public static boolean L2JMOD_WEDDING_FORMALWEAR;
- public static int L2JMOD_WEDDING_DIVORCE_COSTS;
- -
- + public static boolean AioItem;
- +
- // Packet information
- /** Count the amount of packets per minute ? */
- public static boolean COUNT_PACKETS = false;
- @@ -1858,7 +1859,8 @@
- L2JMOD_WEDDING_SAMESEX = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingAllowSameSex", "False"));
- L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
- L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
- -
- + AioItem = Boolean.parseBoolean(L2JModSettings.getProperty ("AioItem"));
- +
- if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
- {
- TVT_EVENT_ENABLED = false;
- Index: java/config/l2jmods.properties
- ===================================================================
- --- java/config/l2jmods.properties (revision 4840)
- +++ java/config/l2jmods.properties (working copy)
- @@ -132,3 +132,8 @@
- # ex.: 1;2;3;4;5;6
- # no ";" at the start or end
- TvTEventDoorsCloseOpenOnStartEnd =
- +
- +# Aio HTML Item
- +# Default : False
- +AioItem = False
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/handler/itemhandlers/AioItem.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/handler/itemhandlers/AioItem.java (revision 0)
- +++ java/net/sf/l2j/gameserver/handler/itemhandlers/AioItem.java (revision 0)
- @@ -0,0 +1,66 @@
- +/*
- + * This program is free software; you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License as published by
- + * the Free Software Foundation; either version 2, or (at your option)
- + * any later version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- + * GNU General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program; if not, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.GameServer;
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.L2ItemInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
- +
- +
- +
- +/**
- + * @author eSet
- + *
- + */
- +public class AioItem implements IItemHandler
- +{
- + private static final int[] ITEM_IDS = { 6673 };
- +
- + public void useItem(L2PlayableInstance playable, L2ItemInstance item)
- + {
- + if (!(playable instanceof L2PcInstance))
- + return;
- + L2PcInstance activeChar = (L2PcInstance)playable;
- + int itemId = item.getItemId();
- +
- + if (itemId == 6673)
- + {
- + String htmFile = "data/html/mods/AioItem.htm";
- + String htmContent = HtmCache.getInstance().getHtm(htmFile);
- +
- + NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
- + infoHtml.setHtml(htmContent);
- + activeChar.sendPacket(infoHtml);
- + }
- + }
- +
- +
- +
- + public int[] getItemIds()
- + {
- + return ITEM_IDS;
- + }
- +}
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement