View Single Post
01-07-23, 04:04 PM   #7
pasiv
A Murloc Raider
Join Date: Jul 2019
Posts: 7
I made my big ol table ��and then went to sleep. But I'll play around with those. Thanks!

How does the game decide whether that item you have will actually get equipped when you click it?


These are the results. Not sure whether I can use them. I'm testing whether a paladin can equip a plat helm that is already equipped.
Lua Code:
  1. local slot,id = 1,nil
  2. local itemLoc = ItemLocation:CreateFromEquipmentSlot(INVSLOT_HEAD)
  3. if itemLoc:IsValid() then
  4.    id = C_Item.GetItemID(itemLoc)
  5. end
  6.  
  7. print(id) --157961
  8. print(IsEquippableItem(id)) --true, although it would be true for any class
  9. print(C_Item.IsItemSpecificToPlayerClass(id)) --false.
  10. --print(C_Item.IsItemSpecificToPlayerClass(GetItemInfo(id))) --also false.  Not sure what I'm doing wrong.
  11. print(C_Item.IsItemConvertibleAndValidForPlayer(itemLoc)) --false

This might be the solution to my problem. Neeeds more testing

Lua Code:
  1. local table = GetItemSpecInfo(id)
  2. for k,v in pairs(table) do
  3.    print(k,v)
  4. end
  5. --Output
  6. --1, 65 -- PaladinHoly
  7. --2, 66 -- PaladinProtection
  8. --3, 70 -- Paladin Ret

Far as I can tell this only show true for armor + back (but haven't tried with weapons yet.)

Last edited by pasiv : 01-07-23 at 10:05 PM.
  Reply With Quote