/// <summary> /// Sets the Spell Data to Charged data. /// </summary> /// <param name="spellName"> /// Spell Name /// </param> /// <param name="buffName"> /// Spell Buff Name /// </param> /// <param name="minRange"> /// Spell Minimum Range /// </param> /// <param name="maxRange"> /// Spell Maximum Range /// </param> /// <param name="deltaT"> /// Charge Duration /// </param> /// <returns> /// The <see cref="Spell" />. /// </returns> public Spell SetCharged(string spellName, string buffName, int minRange, int maxRange, float deltaT, double castDelay = 0.25, int?spellSpeed = null, int?spellWidth = null) { this.ChargedSpellName = spellName; this.ChargedBuffName = buffName; this.ChargedMinRange = minRange; this.ChargedMaxRange = maxRange; this.ChargeDuration = (int)(deltaT * 1000); this.chargedCastedT = 0; IsSkillshot = false; IsChargedSpell = true; skillshot = null; charge = new EloBuddy.SDK.Spell.Chargeable(Slot, (uint)minRange, (uint)maxRange - 75, (int)(deltaT * 1000), Convert.ToInt32(castDelay * 1000), spellSpeed, spellWidth); charge.AllowedCollisionCount = int.MaxValue; Game.OnUpdate += (args) => { if (charge != null) { IsCharging = charge.IsCharging; } }; return(this); }
public void SetCharged(int minRange, int maxRange, float fullyChargedTime, double castDelay = 0.25, int?spellSpeed = null, int?spellWidth = null) { ChargedMinRange = minRange; ChargedMaxRange = maxRange; ChargeDuration = (int)(fullyChargedTime * 1000); IsTargeted = false; IsSkillshot = false; IsChargedSpell = true; targeted = null; skillshot = null; charge = new EloBuddy.SDK.Spell.Chargeable(Slot, (uint)minRange, (uint)maxRange - 75, (int)(fullyChargedTime * 1000), (int)castDelay * 1000, spellSpeed, spellWidth); charge.AllowedCollisionCount = int.MaxValue; Game.OnUpdate += (args) => { if (charge != null) { IsCharging = charge.IsCharging; } }; }