static bool willSpellKillMe(QSSSpell spell) { SpellSlot Spells = SpellSlot.R; if (spell.SpellName.Contains(spell.ChampName + " R")) { Spells = SpellSlot.R; } if (spell.SpellName.Contains(spell.ChampName + " Q")) { Spells = SpellSlot.Q; } if (spell.SpellName.Contains(spell.ChampName + " W")) { Spells = SpellSlot.W; } if (spell.SpellName.Contains(spell.ChampName + " E")) { Spells = SpellSlot.E; } var TheDamage = getByChampName(spell.ChampName).GetDamageSpell(Player, Spells).CalculatedDamage; BuffInstance theBuff = null; foreach (var Buff in Player.Buffs) { if (Buff.Name == spell.SpellBuff) { theBuff = Buff; } } var EndTime = theBuff.EndTime; var difference = EndTime - Environment.TickCount; //TODO Factor Player Regen if (TheDamage >= (Player.Health)) { return(true); } return(false); }
static bool willSpellKillMe(QSSSpell spell) { SpellSlot Spells = SpellSlot.R; if (spell.SpellName.Contains(spell.ChampName + " R")) Spells = SpellSlot.R; if (spell.SpellName.Contains(spell.ChampName + " Q")) Spells = SpellSlot.Q; if (spell.SpellName.Contains(spell.ChampName + " W")) Spells = SpellSlot.W; if (spell.SpellName.Contains(spell.ChampName + " E")) Spells = SpellSlot.E; var TheDamage = getByChampName(spell.ChampName).GetDamageSpell(Player, Spells).CalculatedDamage; BuffInstance theBuff = null; foreach (var Buff in Player.Buffs) { if (Buff.Name == spell.SpellBuff) { theBuff = Buff; } } var EndTime = theBuff.EndTime; var difference = EndTime - Environment.TickCount; //TODO Factor Player Regen if (TheDamage >= (Player.Health)) { return true; } return false; }