Condemned Posted October 29, 2017 Share Posted October 29, 2017 How do I remove a box that is on the screen from a group loot after my addon has already rolled on that item? Every time an item appears my addon rolls greed but the box still remains on the screen. Is there a way to close the box once the loot choice is made? Quote Link to comment Share on other sites More sharing options...
narinoa Posted October 29, 2017 Share Posted October 29, 2017 The easiest way is to reboot the system addon ContextUniMessageBox: function CloseMsgboxes() common.StateUnloadManagedAddon( "ContextUniMessageBox" ) common.StateLoadManagedAddon( "ContextUniMessageBox" ) end Quote Link to comment Share on other sites More sharing options...
Condemned Posted October 29, 2017 Author Share Posted October 29, 2017 I was able to do it with this code by using the Widgets addon and finding the name of the window local MsgBox = stateMainForm:GetChildChecked("LootMaster", false):GetChildChecked("MainPanel", false) if MsgBox:IsVisible() then MsgBox:Show(false) end Quote Link to comment Share on other sites More sharing options...
Condemned Posted October 29, 2017 Author Share Posted October 29, 2017 I'm still having issues with the loot code not working correctly. Also I can't seem to get common.LogInfo("",text) to ever log anything to chat so I can try to debug parts of the code to see which parts are not working. How do I get loginfo to work? Quote Link to comment Share on other sites More sharing options...
narinoa Posted October 29, 2017 Share Posted October 29, 2017 common.LogInfo( "common", text ), where text is a string or WString https://alloder.pro/md/LuaApi/FunctionCommonLogInfo.html if you want it simpler and faster, you can add the system LogInfo in the AddonDesc. (UIAddon) .xdb to the system LogInfo: <Item href="/Mods/SampleCommon/SampleAddonBase.lua"/> And just use the function LogInfo(something). Quote Link to comment Share on other sites More sharing options...
Recommended Posts