Skip to content

Commit

Permalink
11.0 API updates for bank and bag
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevcairiel committed Jul 20, 2024
1 parent 4decc8c commit 1a77956
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ read_globals = {

-- API functions
"BankButtonIDToInvSlotID",
"C_Bank.CloseBankFrame",
"C_Container",
"C_Item",
"C_NewItems",
"C_PaperDollInfo",
"CloseBankFrame",
"CreateFrame",
"CursorCanGoInSlot",
"CursorHasItem",
"CursorUpdate",
"DepositReagentBank",
Expand Down Expand Up @@ -74,7 +76,6 @@ read_globals = {

-- FrameXML API
"ClearItemButtonOverlay",
"CloseBankFrame",
"CloseDropDownMenus",
"ContainerFrame_CanContainerUseFilterMenu",
"ContainerFrameItemButton_CalculateItemTooltipAnchors",
Expand Down Expand Up @@ -138,7 +139,6 @@ read_globals = {
"STATICPOPUP_NUMDIALOGS",
"TEXTURE_ITEM_QUEST_BANG",
"TEXTURE_ITEM_QUEST_BORDER",
"UIDROPDOWNMENU_MENU_VALUE",
"YES",

"LE_FRAME_TUTORIAL_EQUIP_REAGENT_BAG",
Expand Down
2 changes: 1 addition & 1 deletion Bag.lua
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ end
function BagMixin:UpdateCursor()
if not self:IsCustomSlot() then return end

if not self:IsCached() and CursorCanGoInSlot(self:GetInventorySlot()) then
if not self:IsCached() and C_PaperDollInfo.CanCursorCanGoInSlot(self:GetInventorySlot()) then
self:LockHighlight()
else
self:UnlockHighlight()
Expand Down
8 changes: 6 additions & 2 deletions Frame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ function FrameMixin:OnHide()

if self:IsBank() then
if self:AtBank() then
CloseBankFrame()
if C_Bank and C_Bank.CloseBankFrame then
C_Bank.CloseBankFrame()
else
CloseBankFrame()
end
end
BankFrame:Hide()
else
Expand Down Expand Up @@ -495,7 +499,7 @@ do

local function CreatePlayerDropdown(self, level)
if level == 2 then
UIDropDownMenu_AddButton({ text = REMOVE, notCheckable = true, value = UIDROPDOWNMENU_MENU_VALUE, func = DeletePlayer}, 2)
UIDropDownMenu_AddButton({ text = REMOVE, notCheckable = true, func = DeletePlayer}, 2)
else
PlayerEntry(ItemCache.PLAYER)

Expand Down

0 comments on commit 1a77956

Please sign in to comment.