Inventory Management with virtual bags divided into sections.
See http://old.wowace.com/Baggins for more info!
local link = GetContainerItemLink(bag, slot) local realId = GetContainerItemID(bag, slot) local itemCount = select(2, GetContainerItemInfo(bag, slot)) local itemid if link then if realId == 138019 then -- It's a mythic Keystone itemid = 138019 else itemid = link:match("item:(%d+)") end if itemid then -- it's not a battle pet
If you compare these lines to what is there you should be able to see what is actually different (and I added a comment on what my comparison is doing). I would recommend this over what DarthEberron has. It is still a brittle hack but it's good enough for now for me.
OMG, it works! Thank you so much!
Not sure if I replaced too many lines or what but now very little appears in my bags, but otherwise they work.
This is working for for 7.2 with this patch:
Baggins-filtering.lua line 305, first and last line added by Bruj0 from wowace forums:
if speciesID ~= nil and speciesID ~= '' thenlocal name, icon, petType, creatureID, sourceText, description, isWild, canBattle, tradable, unique= C_PetJournal.GetPetInfoBySpeciesID( speciesID )itemid = - tonumber(petid) -- use negative itemid values for battle-petsif itemid == 0 thenitemid = - tonumber(speciesID)enditeminfo = PET_CAGE_ITEM_ID .. " " .. 1 .. " " .. nameend
So I just paste that into line 305?
See my response on the project site for a better explanation of how to implement this fix:
Thank you so much for this explanation on how to fix Baggins! It's working great for me now.
Thank you for uploading your file Bormes11. I don't know if it is because I'm tired or what, but I just couldn't get the edits to work. You fixed one of my most cherished addons.
Baggins-filtering.lua line 305, first and last line added by me:
Any chance that the addon will get an update with this fix?
I love this addon, I have been using it for like forever, and have a zillion sections and rules, it has now given up on me :(
I am not comfortable with changing the code myself, or even have a clue on how to start with it, so please please make a new version!!
In reply to bruj0:
In reply to c_ba11:
I was confused as well. Not very well explained, but was easy enough to figure out after some mild head scratching.
Basically find the second line of code he pasted above in Baggins-filtering.lua (should be line 305), ie:
local name, icon, petType, creatureID, sourceText, description, isWild, canBattle, tradable, unique= C_PetJournal.GetPetInfoBySpeciesID( speciesID )
And above it paste the first line he added:
if speciesID ~= nil and speciesID ~= '' then
Then go down to below the last line he pasted:
iteminfo = PET_CAGE_ITEM_ID .. " " .. 1 .. " " .. name
And below that line add one more "end":
If for some reason that doesn't work. I uploaded my baggins-filtering.lua file here: https://ufile.io/8f7981
Replace your old Baggins-filtering.lua file with that and you should be good till we get an update, though make sure to change the file name back to Baggins-filtering.lua as that site will add some numbers to the beginning of the file name when you download it.
In reply to Bormes11:
In reply to Drejjmit:
If you compare these lines to what is there you should be able to see what is actually different (and I added a comment on what my comparison is doing). I would recommend this over what bruj0 has.
Or in the smallest amount of change, on line 299, replace
7.2 changed keystones from using Hitem type links to using Hkeystone type links, since the baggins filtering assumes every non Hitem link is an Hbattlepet link type, it chokes. The above should be somewhat future proof if blizz adds more link types for items.
If you want to filter keystones by item id, you will also have to update line 820 using the same replacement as 299
And I don't think this is an issue, but the same code appears for PeriodicTable Sets on line 1435, but since those don't have keystones in them (that I know of), it shouldn't be an issue, update it as needed
In reply to eLQ:
In reply to kthreewow:
gsub(link, "\124", "\124\124");
will keep the chatbox from turning it into a link
\124 is a pipe, and || is the escape for pipes