View Single Post
02-09-23, 06:12 PM   #9
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Hi all

I didn't want to create a new thread for this issue, instead, I have resurrected this post; (Yes, I am a necromancer).

Using Kanegasi's code did correctly remove all items and placed them in my bags/backpack;
Lua Code:
  1. local EquipmentSlots = {
  2.    AMMOSLOT = 0,
  3.    HEADSLOT = 1,
  4.    NECKSLOT = 2,
  5.    SHOULDERSLOT = 3,
  6.    SHIRTSLOT = 4,
  7.    CHESTSLOT = 5,
  8.    WAISTSLOT = 6,
  9.    LEGSSLOT = 7,
  10.    FEETSLOT = 8,
  11.    WRISTSLOT = 9,
  12.    HANDSSLOT = 10,
  13.    FINGER0SLOT = 11,
  14.    FINGER1SLOT = 12,
  15.    TRINKET0SLOT = 13,
  16.    TRINKET1SLOT = 14,
  17.    BACKSLOT = 15,
  18.    MAINHANDSLOT = 16,
  19.    SECONDHANDSLOT = 17,
  20.    RANGEDSLOT = 18,
  21.    TABARDSLOT = 19
  22. }
  23.  
  24. local ignore,foundspot={[0]={},[1]={},[2]={},[3]={},[4]={},}
  25. for k, v in pairs(EquipmentSlots) do
  26.    PickupInventoryItem(v)
  27.    foundspot = false
  28.    if CursorHasItem() then
  29.       for bag = 4, 0, -1 do
  30.          for slot = 1, C_Container.GetContainerNumSlots(bag) do
  31.             if not ignore[bag][slot] and not C_Container.GetContainerItemID(bag, slot) then
  32.                if bag == 0 then
  33.                   C_Container.PutItemInBackpack()
  34.                else
  35.                   C_Container.PutItemInBag(bag+19)
  36.                end
  37.                ignore[bag][slot] = true
  38.                foundspot = true
  39.                break
  40.             end
  41.          end
  42.          if foundspot then
  43.             break
  44.          end
  45.       end
  46.    end
  47. end

Since the launch of Wrath and Dragonflight 10.05 the code has stopped working, (even after adding the C_Container. where required), and it throws no errors at all.

The code still works in flawlessly Classic.

How do I get this running again?
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote