diff --git a/core/Core.lua b/core/Core.lua index 24c4c279..d63dd01c 100644 --- a/core/Core.lua +++ b/core/Core.lua @@ -117,6 +117,11 @@ function addon:OnInitialize() end --@end-alpha@ + -- Disable the reagent bag tutorial + C_CVar.SetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_EQUIP_REAGENT_BAG, true) + C_CVar.SetCVarBool("professionToolSlotsExampleShown", true) + C_CVar.SetCVarBool("professionAccessorySlotsExampleShown", true) + self:Debug('Initialized') end @@ -179,15 +184,15 @@ end function addon:EnableHooks() self:RawHook("OpenAllBags", true) - self:RawHook("CloseAllBags", true) + self:SecureHook("CloseAllBags") self:RawHook("ToggleAllBags", true) self:RawHook("ToggleBackpack", true) self:RawHook("ToggleBag", true) self:RawHook("OpenBag", true) - self:RawHook("CloseBag", true) + self:SecureHook("CloseBag") self:RawHook("OpenBackpack", true) - self:RawHook("CloseBackpack", true) - self:RawHook('CloseSpecialWindows', true) + self:SecureHook("CloseBackpack") + self:SecureHook('CloseSpecialWindows') end function addon:DisableHooks() diff --git a/core/Hooks.lua b/core/Hooks.lua index 64216a5a..cb5b7022 100644 --- a/core/Hooks.lua +++ b/core/Hooks.lua @@ -64,7 +64,11 @@ do function IterateBuiltInContainers() if addon:GetInteractingWindow() == "BANKFRAME" then - return iter, NUM_BAG_SLOTS + NUM_BANKBAGSLOTS, -1 + if addon.isRetail then + return iter, NUM_TOTAL_EQUIPPED_BAG_SLOTS+1 + NUM_BANKBAGSLOTS, -1 + else + return iter, NUM_BAG_SLOTS + NUM_BANKBAGSLOTS, -1 + end else return iter, NUM_BAG_SLOTS, -1 end diff --git a/widgets/ItemButton.lua b/widgets/ItemButton.lua index 18522cd3..faaa51f0 100644 --- a/widgets/ItemButton.lua +++ b/widgets/ItemButton.lua @@ -78,7 +78,7 @@ else buttonClass, buttonProto = addon:NewClass("ItemButton", "Button", "ContainerFrameItemButtonTemplate", "ABEvent-1.0") end -local childrenNames = { "Cooldown", "IconTexture", "IconQuestTexture", "Count", "Stock", "NormalTexture", "NewItemTexture" } +local childrenNames = { "Cooldown", "IconTexture", "IconQuestTexture", "Count", "Stock", "NormalTexture", "NewItemTexture", "IconOverlay2" } function buttonProto:OnCreate() local name = self:GetName() @@ -341,6 +341,7 @@ function buttonProto:Update() self:UpdateNew() if addon.isRetail then self:UpdateUpgradeIcon() + self:UpdateOverlay() end if self.UpdateSearch then self:UpdateSearch() @@ -477,6 +478,11 @@ function buttonProto:UpdateBorder(isolatedEvent) end end +function buttonProto:UpdateOverlay() + local _, _, _, quality = GetContainerItemInfo(self.bag, self.slot) + SetItemButtonOverlay(self, self.itemId or self.itemLink or 0, quality) +end + -------------------------------------------------------------------------------- -- Item stack button --------------------------------------------------------------------------------