[SOLVED] Get list (string) of item enchantments
#1
I'm try to get item enchantments list. How can I do it?
Code:
armor = Player:GetInventory():GetArmorGrid();

local tmp = nil

for i = 0, armor:GetNumSlots()-1 do
  tmp = armor:GetSlot(i):IsEnchantable();
end

Return error.

Code:
error in function 'IsEnchantable'.
argument #1 is 'const cItem'; 'cItem' expected.

Any help me?
Reply
Thanks given by:
#2
cItem:IsEnchantable is static. Use this:

tmp = cItem:IsEnchantable(armor:GetSlot(i).m_ItemType)
Reply
Thanks given by: DrMasik
#3
@NiLSPACE, thank you. I found other solution
Code:
armor:GetSlot(i).m_Enchantments:IsEmpty()
Reply
Thanks given by:
#4
I found solution for my question:
Code:
armor:GetSlot(i).m_Enchantments:ToString()
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)