public TalentProxy(GetUnitDelegate del) : base(del) { }
private CacheInternal Cache; // = new CacheInternal(GetUnit); #endregion Fields #region Constructors public TargetProxy(GetUnitDelegate del) : base(del) { health = new HealthProxy(() => GetUnit()); Cache = new CacheInternal(GetUnit,"targetproxy"); //Cache.AddProperty("time_to_die", () => health.TimeToDie); Cache.AddProperty("melee_range", () => GetUnit().IsWithinMeleeRange); Cache.AddProperty("facing", () => Me.IsFacing(GetUnit())); Cache.AddProperty("distance", () => GetUnit().Distance); }
public Composite Cast(String _spell, GetUnitDelegate getTarget, String Reason) { return(Cast(_spell, null, getTarget, Reason)); }
public SpellProxy(GetUnitDelegate del) : base(del) { }
public CooldownProxy(GetUnitDelegate del) : base(del) { potion = new Potion(this); }
public EclipseProxy(GetUnitDelegate del) : base(del) { }
public RageProxy(GetUnitDelegate del) : base(del) { }
public ChiProxy(GetUnitDelegate del) : base(del) { }
public HolyPowerProxy(GetUnitDelegate del) : base(del) { }
public ManaProxy(GetUnitDelegate del) : base(del) { }
public HealthProxy(GetUnitDelegate del) : base(del) { }
public GlyphProxy(GetUnitDelegate del) : base(del) { }
public FocusProxy(GetUnitDelegate del) : base(del) { }
public UnitBasedProxy(GetUnitDelegate del) { GetUnit = del; }
public ResourceProxy(GetUnitDelegate del) : base(del) { cache["regen"].SetRetrievalDelegate(() => { if (simc.main_resource == simc.mana) return (Decimal)Me.ManaInfo.RegenFlatModifier; return LuaGet<double>( "inactiveRegen, activeRegen = GetPowerRegen(); return activeRegen;", 0); }); cache["percent"].SetRetrievalDelegate(() => GetPercent); cache["current"].SetRetrievalDelegate(() => GetCurrent); cache["max"].SetRetrievalDelegate(() => GetMax); }
public BuffProxy(GetUnitDelegate del, AuraProxy ar) : base(del) { Source = ar; pre_steady_focus = new PreSteadyFocus(this); bloodlust = new Bloodlust(this); potion = new Potion(this); anytrinket = new AnyTrinket(this); incanters_flow = new IncantersFlow(this); raging_blow = new BuffInternal(dbc.Spells[131116], this, "raging_blow_special"); colossus_smash = new DebuffProxy.DebuffInternal(dbc.Spells[SimcNames.debuffs["colossus_smash"].First().V2], this, "colossus_smash"); colossus_smash_up = new DebuffProxy.DebuffInternal(dbc.Spells[SimcNames.debuffs["colossus_smash"].First().V2], this, "colossus_smash_up"); }
public RuneProxy(GetUnitDelegate del, RuneType type) : base(del) { this.type = type; }
public ComboPointProxy(GetUnitDelegate del) : base(del) { }
public RunicPowerProxy(GetUnitDelegate del) : base(del) { }
public DebuffProxy(GetUnitDelegate del) : base(del) { casting = new Casting(this); }
protected SpellBasedProxy(GetUnitDelegate del) : base(del) { }
public EnergyProxy(GetUnitDelegate del) : base(del) { }
public Composite Cast(String _spell, CanRunDecoratorDelegate del, GetUnitDelegate getTarget, String Reason) { NameCount++; WoWUnit _target; var actualSpell = LearnedSpellFromToken(_spell); if (actualSpell == null) { Write("Couldnt find " + _spell + " in our spellbook or in the Simcraft table"); return(new ActionAlwaysFail()); } return(new NamedComposite("" + NameCount, actualSpell.name, new Action(delegate { _target = getTarget(); //if (_target != null && _target != Target1()) Write("Checking diff target"); conditionName = NameCount; _conditionSpell = actualSpell; conditionUnit = _target; if (conditionUnit == null || conditionUnit == default(WoWUnit)) { conditionUnit = Me.CurrentTarget; } return RunStatus.Failure; }), new Decorator(_ret => { if (actualSpell.gcd > 0 && SpellManager.GlobalCooldown) { LogDebug("GCD Skip: " + actualSpell.name); return false; } var d = del ?? (ret => true); try { LogDebug(actualSpell.name + " if=" + Reason); var r = d(_ret); LogDebug(actualSpell.name + " => " + r); if (!r) { return false; } return (CanCast(actualSpell.name, conditionUnit)); } catch (Exception e) { //Write(conditionName + " " + _spell + " " + e.ToString()); return false; } }, new Action(delegate { clickUnit = conditionUnit; //if (SpellManager.CanCast(spell.name, conditionUnit)) if (CastSpell(actualSpell, conditionUnit, 3, Reason)) { //if (actualSpell.name.Contains("Fire")) Write("fire:"+conditionUnit.Guid.GetFriendlyString()); //LogDebug(_spell + " => SUCCESS!"); start_line_cd(); return RunStatus.Success; } else { LogDebug(_spell + " => FAIL!"); } return RunStatus.Failure; })))); }