Simple Item Levels

Simple Item Levels

2M Downloads

Baganator hook again…

tflo opened this issue · 5 comments

commented
SimpleItemLevel/addon.lua:679: Usage: hooksecurefunc([table,] "function", hookfunc)
1x SimpleItemLevel/addon.lua:679: Usage: hooksecurefunc([table,] "function", hookfunc)
[string "=[C]"]: in function `hooksecurefunc'
[string "@SimpleItemLevel/addon.lua"]:679: in function `baganator_hookmain'
[string "@SimpleItemLevel/addon.lua"]:685: in function `callback'
[string "@SimpleItemLevel/addon.lua"]:20: in function `RegisterAddonHook'
[string "@SimpleItemLevel/addon.lua"]:638: in main chunk

Locals:
(*temporary) = <table> {
 UpdateOnBarHighlightMarksBySpell = <function> defined @Blizzard_ActionBar/Mainline/ActionButton.lua:73
 ERR_OUT_OF_CHI = "Not enough chi"
 DH_HAVOC_CORE_ABILITY_2 = "Strong melee attack that consumes Fury. If it critical strikes, some Fury is refunded."
 MultiCastActionButton6Cooldown = MultiCastActionButton6Cooldown {
 }
 MerchantItem9ItemButtonStock = MerchantItem9ItemButtonStock {
 }
 GetTrainerServiceTypeFilter = <function> defined =[C]:-1
 UNIT_NAMES_COMBATLOG_TOOLTIP = "Color unit names."
 HUD_EDIT_MODE_SETTING_ACTION_BAR_HIDE_BAR_ART = "Hide Bar Art"
 LE_GAME_ERR_CHAT_RAID_RESTRICTED_TRIAL = 780
 SPELL_FAILED_CUSTOM_ERROR_71 = "This partygoer wants to dance with you."
 LE_GAME_ERR_PET_SPELL_TARGETS_DEAD = 419
 ERROR_CLUB_TICKET_COUNT_AT_MAX_COMMUNITY = "Can't create any more invite links for this community."
 RecruitAFriendFrame = RecruitAFriendFrame {
 }
 TutorialFrameLeft19 = TutorialFrameLeft19 {
 }
 MultiCastActionButton2Cooldown = MultiCastActionButton2Cooldown {
 }
 ERR_TRADE_EQUIPPED_BAG = "You can't trade equipped bags."
 PVP_RANK_6_1 = "Corporal"
 BOOKTYPE_PROFESSION = "professions"
 OPTION_TOOLTIP_SHOW_MULTIBAR4 = "Attached to the left side of Right Action Bar 1 by default"
 LE_GAME_ERR_INVALID_FOLLOW_PVP_COMBAT = 373
 MerchantItem3AltCurrencyFrameItem1Text = MerchantItem3AltCurrencyFrameItem1Text {
 }
 PROFESSIONS_COLUMN_REAGENTS_NONE = "None"
 OPTION_TOOLTIP_ACTION_BUTTON_USE_KEY_DOWN = "Action button keybinds will respond on key down, rather than on key up."
 BINDING_NAME_NAMEPLATES = "Show Enemy Nameplates"
 INSTANCE_UNAVAILABLE_OTHER_TEMPORARILY_DISABLED = "%s cannot enter. This instance is temporarily disabled."
 Dejunk_MainWindow_OptionsFrame_ScrollFrame_ScrollChild_OptionButton9_CheckBox = Dejunk_MainWindow_OptionsFrame_ScrollFrame_ScrollChild_OptionButton9_CheckBox {
 }
 MultiBarBottomRightButton8Shine5 = MultiBarBottomRightButton8Shine5 {
 }
 COVENANT_MISSIONS_HEALTH = "Health"
 MAIL_LETTER_TOOLTIP = "Click to make a permanent
copy of this letter."
 UnitFrameManaBar_UnregisterDefaultEvents = <function> defined @Blizzard_UnitFrame/UnitFrame.lua:821
 PVPReadyDialogBottomArt = PVPReadyDialogBottomArt {
 }
 MultiBar6Button4Flash = MultiBar6Button4Flash {
 }
 ERR_NOAMMO_S = "%s"
 CHAT_CONFIG_OTHER_COMBAT = <table> {
 }
 RematchGameTooltipTexture13 = RematchGameTooltipTexture13 {
 }
 ClassNameplateBarPaladinFrameRune5 = ClassNameplateBarPaladinFrameRune5 {
 }
 FCFDockOverflowButton_OnClick = <function> defined @Blizzard_ChatFrameBase/Mainline/FloatingChatFrame.lua:2414
 TutorialFrameRight19 = TutorialFrameRight19 {
 }
 BOOST2_WARRIOR_COLOSSUSSMASH = "Use |cFFFFFFFFColossus Smash|r.

|cFFFFFFFFColossus Smash|r increases your damage."
 BN_UNABLE_TO_RESOLVE_NAME = "Unable to whisper '%s'. Blizzard services may be unavailable."
 CinematicFrameRaidBossEmoteFrame = CinematicFrameRaidBossEmoteFrame {
 }
 CompactRaidFrameManagerDisplayFrameHiddenModeToggleTopRight = CompactRaidFrameManagerDisplayFrameHiddenModeToggleTopRight {
 }
 LFGTeleport = <function> defined =[C]:-1
 LE_GAME_ERR_ONLY_ONE_QUIVER = 36
 SpellButton6Cooldown = SpellButton6Cooldown {
 }
 SLASH_LibQTip1 = "/qtip"
 ToggleEncounterJournal = <function> defined @Blizzard_UIParent/Mainline/UIParent.lua:994
 LOSS_OF_CONTROL_DISPLAY_FEAR = "Feared"
 FactionAddictLogEntry12NewsIcon = FactionAddictLogEntry12NewsIcon {
 }
 GRM_BirthdayTooltipStatusBar = GRM_BirthdayTooltipStatusBar {
 }
 OverrideActionBarButton6Shine11 = OverrideActionBarButton6Shine11 {
 }
 POWERBAR_PREDICTION_COLOR_MAELSTROM_CODE = "|cff003366"
 JoinSkirmish = <function> defined =[C]:-1
 MultiBarRightButton7Shine9 = MultiBarRightButton7Shine9 {
 }
 BankFrameItem17SearchOverlay = BankFrameItem17SearchOverlay {
 }
 AUCTIONATOR_L_DEFAULT_LIST_HEADER = "Default Shopping List"
 DMG_LCD = "DMG"
 ACTION_SPELL_MISSED_POSSESSIVE = "1"
 Is64BitClient = <function> defined =[C]:-1
 SecureCmdItemParse = <function> defined @Blizzard_ChatFrameBase/Mainline/ChatFrame.lua:1177
 SLASH_STOPAT

There is now a CharacterView for the bank (as opposed to the new WarbandView, Baganator/Baganator@d5a45bc)

ATM, this fixes it for me:

diff --git a/SimpleItemLevel/addon.lua b/SimpleItemLevel/addon.lua
--- a/SimpleItemLevel/addon.lua
+++ b/SimpleItemLevel/addon.lua
@@ -671,12 +671,12 @@
     local function baganator_hookmain()
         local backpack = Baganator_SingleViewBackpackViewFrame or Baganator_BackpackViewFrame
         local bank = Baganator_SingleViewBankViewFrame or Baganator_BankViewFrame
         if Baganator_SingleViewBackpackViewFrame then
             hooksecurefunc(Baganator_SingleViewBackpackViewFrame.BagLive, "RebuildLayout", baganator_rebuildlayout)
             hooksecurefunc(Baganator_SingleViewBackpackViewFrame.BagCached, "RebuildLayout", baganator_rebuildlayout)
         end
         if Baganator_SingleViewBankViewFrame then
-            hooksecurefunc(Baganator_SingleViewBankViewFrame.BankLive, "RebuildLayout", baganator_rebuildlayout)
-            hooksecurefunc(Baganator_SingleViewBankViewFrame.BankCached, "RebuildLayout", baganator_rebuildlayout)
+            hooksecurefunc(Baganator_SingleViewBankViewFrame.Character.BankLive, "RebuildLayout", baganator_rebuildlayout)
+            hooksecurefunc(Baganator_SingleViewBankViewFrame.Character.BankCached, "RebuildLayout", baganator_rebuildlayout)
         end
     end
commented

I've updated it a bit more to fix some issues with that initial commit.

commented

Okay, I've got it actually using the API now rather than hooking, so these breakages should be a thing of the past. Might have to go in and explicitly add these in Baganator's settings now, though.

commented

Since I've just seen the Baganator.API.RegisterCornerWidget("sIlvl: Soulbound"… in your commit:

Actually, the "free" positioning as it was up to now was pretty good, since Baganator knows only the 4 corner spots. SIL's small Soulbound icon fit well either in the middle-middle, or in the center-bottom position between the 2 Baganator corner displays.

commented

Right thing to do here might be to ask plusmouse for more slots in Baganator, I guess.

commented

Yes, it's great even with "only" four spots now.

If I place them more strategically, I can fit almost all widgets with no (or little) loss of information. For example with these gear-relevant priorities in one corner:

1 BoA
2 sIlvl: Soulbound
3 Can I Mog It

sIlvl: Soulbound overwrites Can I Mog It, which is fine, since the transmog status of bound gear is far less interesting than that of BoE gear. Baganator's BoA in turn overwrites sIlvl: Soulbound, which is good because sIlvl's 'soulbound' is actually an 'isBound' (not just soulbound), so the BoA adds more specific information (via tooltip scan probably).

The only thing of interest that gets lost here is the transmog status of BoA gear (often cosmetics), but I can live with that since the "BoA" label keeps me from carelessly trashing the item.

I could even add sIlvl: Upgrade to that spot (with prio 1 or 2), but it also fits elsewhere.