From dcc3af0704f63caefd39d8488f8c6ff28c208bfd Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 4 Jun 2013 11:54:44 +0000 Subject: Added cItem copy-constructor to Lua API, made cItem::IsEqual() and IsStackable() enchantment-aware git-svn-id: http://mc-server.googlecode.com/svn/trunk@1546 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/Debuggers/Debuggers.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'MCServer/Plugins/Debuggers') diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index 1d441d8fb..55a954f47 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -597,9 +597,9 @@ function HandleTestWndCmd(a_Split, a_Player) local Item2 = cItem(E_ITEM_DIAMOND_SWORD, 1, 0, "1=1"); local Item3 = cItem(E_ITEM_DIAMOND_SHOVEL); Item3.m_Enchantments:SetLevel(cEnchantments.enchUnbreaking, 4); - local Item4 = cItem(E_ITEM_DIAMOND_PICKAXE); - Item4.m_Enchantments:SetLevel(cEnchantments.enchUnbreaking, 5); - Item4.m_Enchantments:SetLevel(cEnchantments.enchEfficiency, 3); + local Item4 = cItem(Item3); -- Copy + Item4.m_Enchantments:SetLevel(cEnchantments.enchEfficiency, 3); -- Add enchantment + Item4.m_Enchantments:SetLevel(cEnchantments.enchUnbreaking, 5); -- Overwrite existing level local Item5 = cItem(E_ITEM_DIAMOND_CHESTPLATE, 1, 0, "thorns=1;unbreaking=3"); Window:SetSlot(a_Player, 0, cItem(E_ITEM_DIAMOND, 64)); Window:SetSlot(a_Player, 1, Item2); -- cgit v1.2.3