WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Addon to change new default bag behavior (https://www.wowinterface.com/forums/showthread.php?t=39870)

NiQil 04-28-11 12:43 PM

Addon to change new default bag behavior
 
So blizzard made a change in the latest patch that causes all of your bags to automatically open whenever you visit a vendor, your bank, or the mailbox, instead of the previous behavior that only caused this to happen with your base backpack. This does not appear to be a bug, but rather an intentional change. I hate this change. With the large bags I have, they overlay vendor and mailbox screens, making this very, very annoying. I am wondering if an addon exists that will allow me to change this default behavior to either back to the way it was (backpack only) or to eliminate the bags auto opening entirely. Any help anyone can provide would be greatly appreciated.

p3lim 04-28-11 01:04 PM

Code:

function OpenAllBags() end
Put this in any .lua file in any addon.

Ketho 04-28-11 01:28 PM

that's a nice and simple solution p3lim posted (without the typo) :)

.. as for the previous behavior (backpack only), I would use this code .. although I have little experience with "hooking"
Code:

local oldOpenAllBags = OpenAllBags

function OpenAllBags(frame)
        OpenBackpack()
        oldOpenAllBags(frame)
end


help137 04-28-11 01:53 PM

I use a one-bag type addon anyway, so this doens't really bother me, but what does is that B no longer CLOSES the bags. It's no longer a toggle. Anyone have a solution to that?

-K

p3lim 04-28-11 02:00 PM

Quote:

Originally Posted by Ketho (Post 235923)
that's a nice and simple solution p3lim posted (without the typo) :)

.. as for the previous behavior (backpack only), I would use this code .. although I have little experience with "hooking"
Code:

local oldOpenAllBags = OpenAllBags

function OpenAllBags(frame)
        OpenBackpack()
        oldOpenAllBags(frame)
end


'OpenAllBags = OpenBackpack' would do the trick, having the original function run afterwards wouldnt do anything good :p

Ketho 04-28-11 02:02 PM

I'd quote Dainton from this thread
Quote:

Originally Posted by Dainton (Post 235617)
Keybind "Toggle Backpack" instead of "Open All Bags".

Edit: @ p3lim
I 'm not sure what else OpenAllBags does, but I know that it stops when one of the bags are already opened, so my logic was, to just pre-hook it and open a bag before that function runs ..

p3lim 04-28-11 02:02 PM

Quote:

Originally Posted by help137 (Post 235927)
I use a one-bag type addon anyway, so this doens't really bother me, but what does is that B no longer CLOSES the bags. It's no longer a toggle. Anyone have a solution to that?

-K

Code:

function OpenAllBags()
    if(IsBagOpen(0)) then
        OpenBackpack()
    else
        CloseBackpack()
    end
end

or just this
Code:

OpenBackpack = ToggleBackpack


All times are GMT -6. The time now is 04:34 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI