-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Calling protected function in combat fails. #24
Comments
Hello there. I tried to perform this but I never got any warning. I also download !Bugrabber and the results were the same. Tried "manually" with _/run MinimapCluster:Show()_ while in-combat and, again, no error. So, dunno if there is an addon that is causing this problem, but could you try changing that line to "_Minimap:Show()_" and see if the problem still persists. Thank you for reporting. |
Change line 285 in CatchTheWind.lua to something like: if (not InCombatLockdown() and MinimapCluster:IsShown()) MinimapCluster:Hide(); end --Minimap icons aren't affected by "SetAlpha" MinimapCluster:Hide() is protected and can't be called in combat... |
Ah yes, I have seen the restricted function error while in combat. |
Woops. I missed out a "then" :) if (not InCombatLockdown() and MinimapCluster:IsShown()) then MinimapCluster:Hide(); end |
After doing more tests, I found out that if ElvUI is enabled and its custom minimap is enabled as well, then you can't call ":Show()" or ":Hide()" while in combat. Dunno if other addons are doing similar things. I will implement a simple workaround for special cases like this. If you find another addon, besides ElvUI, report back. I can't really add a condition to check if the player is in-combat or not. If there was combat, the minimap icons wouldn't disappear, making a little bit wonky. If you are feeling "brave", you can add this line: MMHolder:SetParent(ElvUIParent); inside onPlayerLogin function (line 601). Thanks once again. |
Buggrabber catches this if one is unfortunate enough to get caught in combat mid-quest chat.
1x [ADDON_ACTION_BLOCKED] AddOn 'CatchTheWind' tried to call the protected function 'MinimapCluster:Show()'.
!BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
[C]: in function `Show'
CatchTheWind\CatchTheWind-1.5.lua:243: in function <CatchTheWind\CatchTheWind.lua:237>
CatchTheWind\CatchTheWind-1.5.lua:824: in function <CatchTheWind\CatchTheWind.lua:823>
CatchTheWind\CatchTheWind-1.5.lua:68: in function <CatchTheWind\CatchTheWind.lua:64>
Locals:
The text was updated successfully, but these errors were encountered: