Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[WOTLK] Raid group info

Featured Replies

  • Author
On 5/7/2021 at 2:14 AM, Sye24 said:

I'd recommend using lua.



			List<string> RaidDatabase = new List<string>();
            int GetRaidMembers = Lua.LuaDoString<int>("return GetNumRaidMembers();");
            for (int i = 0; i <= GetRaidMembers; i++)
            {
                List<string> RaidMemberNames = Lua.LuaDoString<List<string>>("unpack(UnitName(\"raid\".." + i + "));");
                foreach(string Members in RaidMemberNames)
                {
                    if(!RaidDatabase.Contains(Members))
                    {
                        RaidDatabase.Add(Members);
                        Logging.Write("Raid Database built.");
                    }
                }
            }
            return RaidDatabase;

 

Thanks for your anwer.

I'm currently using

        public static int? GetGroupNumber(this WoWUnit instance)
        {
            // Create lua command
            string luaCommand = $@"for i = 1, GetNumRaidMembers() do
                                                    name, rank, groupNumber = GetRaidRosterInfo(i);
                                                    if(name == '{instance.Name}') then
                                                        return groupNumber;
                                                     end
                                                  end
                                                  ";

            // Get index number of the unit
            int result = Framelock.Lock(() =>
            {
                // Return
                return Lua.LuaDoString<int>(command: luaCommand);
            });

            // Failed?
            if (result == 0)
            {
                // Return
                return null;
            }

            // Return
            return result;
        }

But I will compare both methods and check what performs better.

Edited by iMod

  • Author
11 minutes ago, Sye24 said:

I’d recommend locking the frame to run the Lua, makes getting the results faster

Thanks I modified my version above and will test it later.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.