WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Protected call (https://www.wowinterface.com/forums/showthread.php?t=58306)

gmarco 10-16-20 10:38 PM

Protected call
 
Hi,

I have made an addons that deals with displaying guild mates (gmGuild / gmGuildFriends).

It can shows the roster of the guild by pressing the LDB icon.
The problem is when you try to interact with the roster because a lot of function are protected.

Example:

Lua Code:
  1. 1x [ADDON_ACTION_FORBIDDEN] AddOn 'gmGuild' tried to call the protected function 'SetGuildRankOrder()'.
  2. [string "@!BugGrabber\BugGrabber.lua"]:519: in function <!BugGrabber\BugGrabber.lua:519>
  3. [string "=[C]"]: in function `SetGuildRankOrder'
  4. [string "@Blizzard_Communities\GuildRoster.lua"]:174: in function `func'
  5. [string "@SharedXML\UIDropDownMenu.lua"]:905: in function `UIDropDownMenuButton_OnClick'
  6. [string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>


The code I use is this:

Lua Code:
  1. if button == "LeftButton" then
  2.         ToggleGuildFrame()
  3.         if IsInGuild() then    
  4.             CommunitiesFrame:SetDisplayMode(COMMUNITIES_FRAME_DISPLAY_MODES.ROSTER)
  5.         end
  6.     end

Is possible to secure this call ?

Thanks so much for the help.


All times are GMT -6. The time now is 05:40 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI