July 8, 201411 yr 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?
July 8, 201411 yr Hello, In the FightClass? If yes: Add condition at yout spell "Target Buff" like this:
July 8, 201411 yr 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
July 10, 201411 yr 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); } }
July 11, 201411 yr 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); } }
July 11, 201411 yr ps: If you want get group players you can use this code: List<WoWPlayer> playerList = Party.GetParty(); foreach (var player in playerList) { // ... }
Create an account or sign in to comment