All pastes #46158 Raw Edit

Mine

public text v1 · immutable
#46158 ·published 2006-03-18 20:44 UTC
rendered paste body
Index: C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java
===================================================================
--- C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java	(revision 1620)
+++ C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java	(working copy)
@@ -61,7 +61,8 @@
 			return;
 		}
 		
-		scroll = activeChar.getInventory().destroyItem("Enchant", scroll, activeChar, item);
+		//scroll = activeChar.getInventory().destroyItem("Enchant", scroll, activeChar, item);
+		scroll = activeChar.getInventory().getItemByObjectId(scroll.getObjectId());
         if(scroll == null)
         {
         	activeChar.sendMessage("You dont have such an enchant scroll");
@@ -221,6 +222,7 @@
 		activeChar.sendPacket(su);		
 		
 		activeChar.sendPacket(new EnchantResult(item.getEnchantLevel())); //FIXME i'm really not sure about this...
+		activeChar.getInventory().destroyItem("Enchant", scroll, activeChar, item);
 		activeChar.sendPacket(new ItemList(activeChar, false)); //TODO update only the enchanted item
 		activeChar.broadcastUserInfo();
 	}