Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- com.l2jfrozen.gameserver.network.clientpacketsRequestEnchantItem.java
- protected void runImpl()
- {
- final L2PcInstance activeChar = getClient().getActiveChar();
- +
- + Collection<L2Character> knowns = activeChar.getKnownList().getKnownCharactersInRadius(400);
- +
- if (activeChar == null || _objectId == 0)
- return;
- +
- + for (L2Object wh1 : knowns)
- + {
- + if (Config.ENCHANT_PROTECTOR)
- + if (wh1 instanceof L2NpcInstance)
- + {
- + activeChar.sendMessage("You Cannot enchant near Npcs.");
- + return;
- + }
- + }
- +
- if (activeChar.isOnline() == 0)
- {
- activeChar.setActiveEnchantItem(null);
- return;
- }
- final L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
- L2ItemInstance scroll = activeChar.getActiveEnchantItem();
- activeChar.setActiveEnchantItem(null);
- Config.java
- +
- + //==========================================================================
- + public static boolean ENCHANT_PROTECTOR;
- + //==========================================================================
- +
- //=================================Search Section Of L2JFrozenSettings.getProperty And Add This Line ======================================
- +
- + //==========================================================================+=============================
- + ENCHANT_PROTECTOR = Boolean.parseBoolean(L2JFrozenSettings.getProperty("EnchantProtector", "true"));
- + //==========================================================================+=============================
- +
- gameserver\config\functions\l2jfrozen.properties
Advertisement
Add Comment
Please, Sign In to add comment