Originally Posted by
modestmath
Hey Imo,
Maybe you can help me with this. I had a simple toggle for switching between commanding shout and battle shout pre 6.0. It would just cast whichever you had selected without checking to see if you had the buff. Since the abilities had a cooldown and generated rage this was no problem. Now that they are 60 min buffs instead of rage generators and have no cd I had to remove the toggle and just stick with a check to see if you have battle shout. Now I'm just trying to make a toggle that checks for the buff instead of just spamming it over and over.
{ "Battle Shout", { "!player.buff(Battle Shout)", "toggle.shout" } }
{ "Commanding Shout", { "!player.buff(Commanding Shout)", "!toggle.shout" } },
ProbablyEngine.toggle.create('shout', 'Interface\\ICONS\\ability_warrior_battleshout', 'Battle Shout', 'Toggle usage of Battle Shout vs Commanding Shout')
Does this look right?
First line is missing a trailing comma, look at it this way:
Code:
{ "Battle Shout", {
"!player.buff(Battle Shout)",
"toggle.shout",
}},
{ "Commanding Shout", {
"!player.buff(Commanding Shout)",
"!toggle.shout",
}},
Out side of that, looks proper. I myself think that a check for existing shouts works best, and defaulting to battle should work well, but your method is fine.