Baganator

Baganator

1M Downloads

Items do not "grey out" when they're ineligible to be moved (e.g., soulbind items into the Warbank)

Mill3rman opened this issue ยท 1 comments

commented

What version(s) of WoW are you using?

Retail

What version of Baganator?

466

What version of Syndicator?

118

What isn't working? What was supposed to happen?

In the default UI, when you open something such as the warbank or the scrapper, items that are ineligible to be placed in there (such as soulbind items for the Warbank) grey out in your bags. This does not happen in Baganator.

Are you experiencing any lua errors

No response

Anything else?

No response

commented

How another addon (ArkInventory) correctly handles this issue:

I set the itemframe.GetItemContextMatchResult function to my own function

have that function call the base context check - ItemButtonUtil.GetItemContextMatchResultForItem( itemLocation ) - because you dont want to recode the whole thing, and you need it to work for all contexts anyway.

then i do my own checks to see if i have the bank open, which part of the bank is open (bank, reagent bank, or account bank) and calculate the correct value and return that back.

if not C_Bank.IsItemAllowedInBankType( Enum.BankType.Account, itemLocation ) then
	result = ItemButtonUtil.ItemContextMatchResult.Mismatch
end

then everywhere you want the context fading updated, eg when you shift bank types, call ItemButtonUtil.TriggerEvent( ItemButtonUtil.Event.ItemContextChanged ) and the game client will do the rest.