Prince* Posted August 28, 2011 Posted August 28, 2011 (edited) Fix for that: http://maxcheaters.com/forum/index.php?topic=218257.0 and for enchant phx. and other enchant like near wh.. --- /trunk/gameserver/java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java +++ /trunk/gameserver/java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java @@ 20,1 @@ +import java.util.Collection; import java.util.logging.Logger; import net.sf.l2j.gameserver.model.Inventory; +import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2WarehouseInstance; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.model.L2ItemInstance; +import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.L2World; @@ -61,7 +61,15 @@ { L2PcInstance activeChar = getClient().getActiveChar(); + Collection<L2Character> knowns = activeChar.getKnownList().getKnownCharactersInRadius(400); if (activeChar == null || _objectId == 0) return; + + for (L2Object wh : knowns) + { + if (wh instanceof L2WarehouseInstance) + { + activeChar.sendMessage("You cannot enchant near warehouse."); + return; + } + } L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); L2ItemInstance scroll = activeChar.getActiveEnchantItem(); i have search on forum and i don't found any post with that code :) Edited April 12, 2020 by Fanky Quote
one_1 Posted August 29, 2011 Posted August 29, 2011 it's good!but if i would like for example to spawn a wh manager in giran will it work there too?or only at the warehouse buildings? Quote
Vkouk Posted August 29, 2011 Posted August 29, 2011 it's good!but if i would like for example to spawn a wh manager in giran will it work there too?or only at the warehouse buildings? yes it will Quote
Prince* Posted August 29, 2011 Author Posted August 29, 2011 old fix.thanks though i 'm sorry ventic but i don't have found any post with that code.. -------------------------------------- thanx a lot all :P Quote
Vkouk Posted August 29, 2011 Posted August 29, 2011 i 'm sorry ventic but i don't have found any post with that code.. -------------------------------------- thanx a lot all :P didnt say the opposite i just said its old :) Quote
Prince* Posted August 29, 2011 Author Posted August 29, 2011 Thank you for this great share! thanks you a lot ;) Quote
'Baggos' Posted August 30, 2011 Posted August 30, 2011 Sorry but your code is Wrong. Too many errors. Because Don't Needed " - " Working Code: --- /trunk/gameserver/java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java +++ /trunk/gameserver/java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java @@ 20,1 @@ +import java.util.Collection; import java.util.logging.Logger; import net.sf.l2j.gameserver.model.Inventory; +import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2WarehouseInstance; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.model.L2ItemInstance; +import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.L2World; @@ -61,7 +61,15 @@ { L2PcInstance activeChar = getClient().getActiveChar(); + Collection<L2Character> knowns = activeChar.getKnownList().getKnownCharactersInRadius(400); if (activeChar == null || _objectId == 0) return; if (activeChar.isProcessingTransaction()) { activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION)); activeChar.setActiveEnchantItem(null); return; } + for (L2Object wh : knowns) + { + if (wh instanceof L2WarehouseInstance) + { + activeChar.sendMessage("You cannot enchant near warehouse."); + return; + } + } L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); L2ItemInstance scroll = activeChar.getActiveEnchantItem(); Tested And Work. See The PHOTO Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.