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.

ObjectManager.Target.HaveBuff Array

Featured Replies

private static List<string> MagicEffects = new List<string>();
MagicEffects.Add("Amplify Magic");
MagicEffects.Add("Avenging Wrath");
MagicEffects.Add("Barkskin");
MagicEffects.Add("Bloodlust");
MagicEffects.Add("Dampen Magic");
MagicEffects.Add("Divine Favor");
MagicEffects.Add("Earth Shield");
MagicEffects.Add("Fade");
MagicEffects.Add("Fel Domination");
MagicEffects.Add("Hand of Protection");
MagicEffects.Add("Heroism");
MagicEffects.Add("Ice Barrier");
MagicEffects.Add("Innervate");
MagicEffects.Add("Lightning Shield");
MagicEffects.Add("Mana Shield");
MagicEffects.Add("Nether Protection");
MagicEffects.Add("Pain Suppression");
MagicEffects.Add("Power Infusion");
MagicEffects.Add("Power Word: Shield");
MagicEffects.Add("Prayer of Mending");
MagicEffects.Add("Presence of Mind");
MagicEffects.Add("Regrowth");
MagicEffects.Add("Rejuvenation");
MagicEffects.Add("Renew");
MagicEffects.Add("Sacrifice");
MagicEffects.Add("Thorns");
MagicEffects.Add("Water Shield");
foreach(string effect in MagicEffects)
{
    if (ObjectManager.Target.HaveBuff(new Spell(effect).Ids))
    {
        _spellName.Launch();
        Logging.WriteDebug("*** Dispelled " + effect + " from " + ObjectManager.Target.Name + " ***");
        Thread.Sleep(SpellManager.GlobalCooldownTimeLeft() + Usefuls.Latency);
        return true;
    }
}

 

Could try that..

  • Author
19 minutes ago, Apexx said:

private static List<string> MagicEffects = new List<string>();

MagicEffects.Add("Amplify Magic");
MagicEffects.Add("Avenging Wrath");
MagicEffects.Add("Barkskin");
MagicEffects.Add("Bloodlust");
MagicEffects.Add("Dampen Magic");
MagicEffects.Add("Divine Favor");
MagicEffects.Add("Earth Shield");
MagicEffects.Add("Fade");
MagicEffects.Add("Fel Domination");
MagicEffects.Add("Hand of Protection");
MagicEffects.Add("Heroism");
MagicEffects.Add("Ice Barrier");
MagicEffects.Add("Innervate");
MagicEffects.Add("Lightning Shield");
MagicEffects.Add("Mana Shield");
MagicEffects.Add("Nether Protection");
MagicEffects.Add("Pain Suppression");
MagicEffects.Add("Power Infusion");
MagicEffects.Add("Power Word: Shield");
MagicEffects.Add("Prayer of Mending");
MagicEffects.Add("Presence of Mind");
MagicEffects.Add("Regrowth");
MagicEffects.Add("Rejuvenation");
MagicEffects.Add("Renew");
MagicEffects.Add("Sacrifice");
MagicEffects.Add("Thorns");
MagicEffects.Add("Water Shield");

foreach(string effect in MagicEffects)
{
    if (ObjectManager.Target.HaveBuff(new Spell(effect).Ids))
    {
        _spellName.Launch();
        Logging.WriteDebug("*** Dispelled " + effect + " from " + ObjectManager.Target.Name + " ***");
        Thread.Sleep(SpellManager.GlobalCooldownTimeLeft() + Usefuls.Latency);
        return true;
    }
}

 

Could try that..

Cheers will try it out tomorrow. :)

3 hours ago, Ordush said:

@Apexx
I figured why this method doesn't work well.
It sure does work cross language, but you won't be able to rank check with this.
If you have rank 1 of an ability, it will never do nil no matter what ID you use, be it rank 1 or rank 5 of a spell.
Reason this has a consequence: Say i want it to buy mats for buffs. Then i won't be able to specify what mats to buy based on what rank is available.

could just use the wow api to do it all

  • Author
Just now, Icesythe7 said:

could just use the wow api to do it all

what wow api would that be?
If you are talking about IsSpellKnown then i can't.
Since that is not in TBC.
Or are you talking about some other function in the wow api?

  • Author

LOL I just realized i posted in the wrong forum hahaha

nevermind lol
The method he posted obviously works fine, he is just using list instead of array.
My question was simply if i could use array when checking for buffs.
His answer lead me to the short answer which is no. And the long answer is: Yes if you do a foreach and check every buff 1 buff at a time.
Sorry Icesythe lol

1 minute ago, Ordush said:

LOL I just realized i posted in the wrong forum hahaha

nevermind lol
The method he posted obviously works fine, he is just using list instead of array.
My question was simply if i could use array when checking for buffs.
His answer lead me to the short answer which is no. And the long answer is: Yes if you do a foreach and check every buff 1 buff at a time.
Sorry Icesythe lol

np lol

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.