public static Composite ExtraActionButton()
{
return new PrioritySelector(
new Decorator(ret => Me.HasAura(115972) && ObjectManager.GetObjectsOfType<WoWUnit>().Any(x => x.HasAura(116374)), // 115972 = Shroud of Reversal, 116374 = Lightning Charge
new Sequence(new Action(a => CLULogger.TroubleshootLog("[ExtraActionButton] Feng just cast Lightning Fists on someone nearby.")),
new Action(a => ObjectManager.GetObjectsOfType<WoWUnit>().First(x => x.HasAura(116374)).Target()), // 116374 = Lightning Charge
Item.RunMacroText("/click ExtraActionButton1",ret => true, "[ExtraActionButton] Someone has Lightning Charge, stealing it..."),
new Action(a => Me.TargetLastTarget()),
new ActionAlwaysSucceed())),
// Spell Id 116018, 116040 = Epicenter
// Auras 118302, 115730 = Reversal: Lightning Fists
new Decorator(ret => Me.CurrentTarget != null && (Me.CurrentTarget.CastingSpellId == 116040 || Me.CurrentTarget.CastingSpellId == 116018) && (Me.HasAura(118302) || Me.HasAura(115730)),
new Sequence(new Action(a => CLULogger.TroubleshootLog("[ExtraActionButton] Attempting to interrupt Epicenter with Reversal: Lightning Fists.")),
Item.RunMacroText("/click ExtraActionButton1", ret => true, "[ExtraActionButton] Interrupting Epicenter"),
new ActionAlwaysSucceed())),
// Dragon Soul stuff...
new Decorator(x => (IsFadingLight() || IsHourofTwilight()) && CLUSettings.Instance.ClickExtraActionButton, //|| IsShrapnel() todo: removed...cos its retarted.
new Sequence(
new Action(a => CLULogger.TroubleshootLog(" [ExtraActionButton] Time to get Lazy!")),
Item.RunMacroText("/click ExtraActionButton1", ret => true, "[Push Button] ExtraActionButton1"),
new ActionAlwaysFail()))); // continue down the tree
}