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.

Check wow unit or wow player for debuff

Featured Replies

How can I check if a player has a specific debuff, for example I am interating through wowplayers that are friendly and want to check if user has "Curse of Weakness" for example, how would I do that?

  • Author

I'm trying to do it in a plugin I am working on

 

I was messing with a lot of things but none of em worked to find players debuffs, I have

 

                        foreach(WoWPlayer Player in ObjectManager.ObjectList) {
                            // Friendly, InLineOfSight, HasDebuff
                            if (Player.Reaction == Reaction.Friendly) {
                                Logging.Write("[MyPlugin] Player Name: " + Player.Name);
                                //LuaEventsId.UNIT_AURA

                                
                                
                            }
                        }

 

to interate through characters, haven't fully tested it yet if WoWPlayer is all players near character or if its only localplayer and if it is I will change that to wowunit.

 

How would I run a whole lua function or use the libraries to return all of the debuffs a player has

Hello,

 

try this:

        List<WoWPlayer> playerList = ObjectManager.GetObjectWoWPlayer();
        string debuffName = "SpellNameInEnglish";
        foreach (var player in playerList)
        {
            if (player.IsValid && ObjectManager.Me.PlayerFaction == player.PlayerFaction)
            {
                if (player.HaveBuff(debuffName))
                    Logging.Write("[MyPlugin] Player " + player.Name + " have debuff " + debuffName);
            }
        }

For get player role for the moment you can use lua: http://wowprogramming.com/docs/api/UnitGetAvailableRoles

 

In the next version I have added "AvailableRoles" function, you can use it like:

	List<WoWPlayer> playerList = ObjectManager.GetObjectWoWPlayer();
	bool canTank, canHealer, canDps;
        string debuffName = "SpellNameInEnglish";
        foreach (var player in playerList)
        {
            if (player.IsValid && ObjectManager.Me.PlayerFaction == player.PlayerFaction)
            {
		player.AvailableRoles(out canTank, out canHealer, out canDps);
		Logging.Write("[MyPlugin] Player " + player.Name + " canTank: " + canTank + ", canHealer: " + canHealer + ", canDps: " + canDps);
                if (player.HaveBuff(debuffName))
                    Logging.Write("[MyPlugin] Player " + player.Name + " have debuff " + debuffName);
            }
        }

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.