I want to force my paladin CC (FPSware Paladin) to use Holy Light whenever the Crusade buff is active, but it doesn't seem to be working.
I added
and
Pretty much a copy+paste job from the Art-of-War buff check, but no go
if (Me.Auras.ContainsKey("Crusader")) return false;
Didn't do the trick either.
EDIT: Doh! Never mind.. I didn't realise the actual buff is called "Crusader" rather than "Crusade", which is the name of the talent providing the buff. Way to confuse me blizz ^^
I added
Code:
// Holy Light with Crusade buff
new NeedToHolyLightCrusade(new HolyLightCrusade()),
and
Code:
#region Holy Light Crusade
public class NeedToHolyLightCrusade : Decorator
{
public NeedToHolyLightCrusade(Composite child) : base(child) { }
protected override bool CanRun(object context)
{
string spellName = "Holy Light";
if (!Utils.IsCommonChecksOk(spellName, false)) return false;
// Credit to Mord and Bobby for this snipit of code.
const string CruBuffName = "Crusader";
Lua.DoString("buffName,_,_,stackCount,_,_,_,_,_=UnitBuff(\"player\",\"" + CruBuffName + "\")");
string buffName = Lua.GetLocalizedText("buffName", Me.BaseAddress);
if (buffName != CruBuffName) return false;
return (Spell.CanCast(spellName));
}
}
public class HolyLightCrusade : Action
{
protected override RunStatus Run(object context)
{
string spellName = "Holy Light";
if (Me.IsMoving) Movement.StopMoving();
bool result = Spell.Cast(spellName);
Utils.LagSleep();
//Utils.WaitWhileCasting(Utils.CastingBreak.HealthIsAbove, Settings.HolyLightHealth, Me);
while (Me.IsCasting)
{
if (!Self.IsHealthAbove(Settings.LayOnHandsHealth)) Spell.StopCasting();
}
return result ? RunStatus.Success : RunStatus.Failure;
}
}
#endregion
Pretty much a copy+paste job from the Art-of-War buff check, but no go

if (Me.Auras.ContainsKey("Crusader")) return false;
Didn't do the trick either.
EDIT: Doh! Never mind.. I didn't realise the actual buff is called "Crusader" rather than "Crusade", which is the name of the talent providing the buff. Way to confuse me blizz ^^
Last edited: