public DebuffInternal(spell_data_t spell, SpellBasedProxy owner, String sn) : base(spell, owner, sn) { Properties["up"] = () => GetAuraUp(Owner.GetUnit(), Spell, true); Properties["remains"] = () => GetAuraTimeLeft(Owner.GetUnit(), Spell, true).TotalSeconds; }
public CooldownInternal(spell_data_t spell, SpellBasedProxy owner, String safename) : base(spell, owner, "cooldown::"+safename) { Properties.Add("remains", () => GetSpellCooldown(Spell).TotalSeconds); Properties.Add("duration", () => spell.cooldown); }
public AuraInternal(spell_data_t spell, SpellBasedProxy owner, String safeName) : base(spell, owner, owner.GetType().ToString().Replace("Simcraft.SimcraftImpl+","")+"::"+safeName) { safename = safeName; if (spell == null) Write("Aura "+safename+" initialized with null"); GetTickingEffect(); Properties["Spell"] = () => 1; Properties["duration"] = () => this["up"] ? (Decimal)GetAura(Owner.GetUnit(), Spell, true).Duration / 1000 : (Decimal)Spell.duration / 1000; Properties["up"] = () => GetAuraUp(Owner.GetUnit(), Spell); Properties["remains"] = () => GetAuraTimeLeft(Owner.GetUnit(), Spell).TotalSeconds; Properties["stack"] = () => { //Write("AI: " + safeName); return GetAuraStacks(Owner.GetUnit(), Spell, true); }; Properties["down"] = () => !this["up"]; Properties["react"] = () => this["stack"] > 0 ? this["stack"] : this["up"]; Properties["ticking"] = () => this["up"]; Properties["tick_time"] = () => 1; Properties["ticks_remain"] = () => 1; }
public SpellInternal(spell_data_t spell, SpellBasedProxy owner, String safename) : base(spell, owner,"spell::"+safename) { _hasMe = SpellManager.HasSpell((int) spell.id); AddProperty("gcd", () => { var sgcd = ((Decimal)Spell.gcd)/1000; sgcd = sgcd / ((100 + simc.spell_haste) / 100); return Math.Max(sgcd,1); }); AddProperty("execute_time", () => { if (this["cast_time"] > this["gcd"]) return this["cast_time"]; return this["gcd"]; }); AddProperty("range", () => { if (!_hasMe) return Spell.max_range; var _spell = GetSpell(Spell); return new MagicValueType(_spell.HasRange ? _spell.MaxRange : Me.CombatReach + 5); }); AddProperty("charges", () => !_hasMe ? 0 : LuaGet<int>( "currentCharges,_,_,_,_ = GetSpellCharges(" + Spell.id + "); return currentCharges", 0)); AddProperty("cast_time", () => { if (Spell.IsChanneled()) return this["channel_time"]; if (!_hasMe) return Math.Max(((Decimal)Spell.cast_max / 1000), this["gcd"]); return Math.Max(((Decimal)GetSpell(Spell).CastTime / 1000), this["gcd"]); }); AddProperty("channel_time", () => { if (!Spell.IsChanneled()) return MagicValueType.Zero; if (!_hasMe) return Math.Max((Decimal)Spell.duration / 1000, this["gcd"]); return Math.Max((Decimal)GetSpell(Spell).MaxDuration / 1000, this["gcd"]); }); AddProperty("duration", () => !_hasMe ? Spell.duration/1000 : GetSpell(Spell).BaseDuration/1000); AddProperty("in_flight", () => false); AddProperty("recharge_time", () => !_hasMe ? 0 : LuaGet<double>( "currentCharges, maxCharges, cooldownStart, cooldownDuration = GetSpellCharges(\"" + Spell.id + "\"); cd = (cooldownDuration-(GetTime()-cooldownStart)); if (cd > cooldownDuration or cd < 0) then cd = 0; end return cd", 0)); AddProperty("charges_fractional", () => !_hasMe ? 0 : LuaGet<double>( "currentCharges, maxCharges, cooldownStart, cooldownDuration = GetSpellCharges(\"" + Spell.id + "\"); cd = (cooldownDuration-(GetTime()-cooldownStart)); if (cd > cooldownDuration or cd < 0) then cd = 0; end return (cd*100/cooldownDuration)", 0) + this["charges"]); Write("Created Spell: " + safename + " ex:" + this["execute_time"] + " r:" + this["range"] + " c:" + this["charges"] + " clt:" + this["channel_time"] + " dur:" + this["duration"] + " ct:" + this["cast_time"]+" id: "+Spell.id); }
public SpellInternal(spell_data_t spell, SpellBasedProxy owner) { Spell = spell; Owner = owner; }
public SpellCacheInternal(spell_data_t spell, SpellBasedProxy owner, String bossname) : base(owner.GetUnit, bossname) { Spell = spell; //Write(""+Spell); Owner = owner; }