eluna-scripts-ornfelt/lua/WowEmulationScriptPack/Lua/Item scripts/Item_Rod_Of_Disenchanting.lua
2024-09-23 07:59:23 +02:00

16 lines
No EOL
511 B
Lua

local function removeEnchants(event, player, item, target)
player:AddItem(38821,1)
local Q = WorldDBQuery("SELECT bonding FROM item_template WHERE entry = "..target:GetEntry())
if(Q:GetUInt32(0) == 2 or Q:GetUInt32(0) == 0) then
target:ClearEnchantment(0)
target:ClearEnchantment(1)
target:ClearEnchantment(2)
target:ClearEnchantment(3)
target:ClearEnchantment(4)
target:ClearEnchantment(5)
target:ClearEnchantment(6)
target:SetBinding(false)
end
end
RegisterItemEvent(38821,2,removeEnchants)