[DiscordArchive] Can't you scan your bag for itemlink?
[DiscordArchive] Can't you scan your bag for itemlink?
Archived author: Nix • Posted: 2024-05-04T21:50:32.757000+00:00
Original source
Can't you scan your bag for itemlink?
Archived author: Nix • Posted: 2024-05-04T21:50:48.279000+00:00
Original source
```lua
local function GetBagPosition(itemLink)
for bag = 0, NUM_BAG_SLOTS do
for slot = 1, GetContainerNumSlots(bag) do
if(GetContainerItemLink(bag, slot) == itemLink) then
return bag, slot
end
end
end
end
-- Get bag position of the Hearthstone
local _, itemLink = GetItemInfo(6948)
local bag, slot = GetBagPosition(itemLink)
```
Archived author: Nix • Posted: 2024-05-04T21:51:03.058000+00:00
Original source
or when you click to move the item into crafting ui, store which bag/slot was picked from
Archived author: Rymercyble • Posted: 2024-05-04T21:51:13.504000+00:00
Original source
what if u got multiple of same item ? item link only contains item_template id
Archived author: Nix • Posted: 2024-05-04T21:51:27.206000+00:00
Original source
item link will contain enchants gems etc
Archived author: Nix • Posted: 2024-05-04T21:51:44.824000+00:00
Original source
So you'll always ensure its either an identical item changed or that item
Archived author: Nix • Posted: 2024-05-04T21:51:56.110000+00:00
Original source
but can't you track what bag/slot something was moved to the crafting UI from?
Archived author: Rymercyble • Posted: 2024-05-04T21:52:07.759000+00:00
Original source
when i tried printing item link as raw string it for some reason didnt contain it
Archived author: Rymercyble • Posted: 2024-05-04T21:52:18.715000+00:00
Original source
but there is GetItemGems or something like that in wow api
Archived author: Rymercyble • Posted: 2024-05-04T21:52:38.551000+00:00
Original source
as far as im aware thats not a thing in wotlk