N0ich / dialogkey-DF

GNU General Public License v3.0
11 stars 3 forks source link

Patch 10.1.5 Lua error #32

Closed Fraktyl closed 1 year ago

Fraktyl commented 1 year ago

Getting the following lua error:

10x [ADDON_ACTION_BLOCKED] AddOn 'DialogKey' tried to call the protected function 'DialogKeyFrame:SetPropagateKeyboardInput()'.
[string "@!BugGrabber/BugGrabber.lua"]:481: in function 
[string "=[C]"]: in function `SetPropagateKeyboardInput'
[string "@DialogKey/main.lua"]:90: in function 
[string "@DialogKey/main.lua"]:151: in function 

Locals:
_ = Frame {
 RegisterEvent =  defined @!BugGrabber/BugGrabber.lua:487
 0 = 
 UnregisterEvent =  defined @!BugGrabber/BugGrabber.lua:487
 SetScript =  defined @!BugGrabber/BugGrabber.lua:487
}
event = "ADDON_ACTION_BLOCKED"
events =  {
 ADDON_ACTION_BLOCKED =  defined @!BugGrabber/BugGrabber.lua:553
 ADDON_ACTION_FORBIDDEN =  defined @!BugGrabber/BugGrabber.lua:553
 PLAYER_LOGIN =  defined @!BugGrabber/BugGrabber.lua:547
 LUA_WARNING =  defined @!BugGrabber/BugGrabber.lua:562
 ADDON_LOADED =  defined @!BugGrabber/BugGrabber.lua:507
}

Looks like Blizzard's API changes locked a bunch of other things down.

I fixed it by adding the following line to the ignoreInput() function in main.lua (line 97) if InCombatLockdown() then return true end

So the function looks like:

local function ignoreInput()
    if InCombatLockdown() then return true end
    DialogKey.frame:SetPropagateKeyboardInput(true)
    -- Ignore input while typing, unless at the Send Mail confirmation while typing into it!
    local focus = GetCurrentKeyBoardFocus()