//from Evade by Esk0r public static bool HasSpellShield(Obj_AI_Hero unit) { if (ObjectManager.Player.HasBuffOfType(BuffType.SpellShield)) { return true; } if (ObjectManager.Player.HasBuffOfType(BuffType.SpellImmunity)) { return true; } //Sivir E if (unit.LastCastedSpellName() == "SivirE" && (EvadeUtils.TickCount - Evade.lastSpellCastTime) < 300) { return true; } //Morganas E if (unit.LastCastedSpellName() == "BlackShield" && (EvadeUtils.TickCount - Evade.lastSpellCastTime) < 300) { return true; } //Nocturnes E if (unit.LastCastedSpellName() == "NocturneShit" && (EvadeUtils.TickCount - Evade.lastSpellCastTime) < 300) { return true; } return false; }
/// <summary> /// Gets a value indicating whether the target has protection or not. /// </summary> /// <value> /// <c>true</c> if the has no protection.; otherwise, <c>false</c>. /// </value> public static bool IsSpellShielded(Obj_AI_Hero unit) => unit.HasBuffOfType(BuffType.SpellShield) || unit.HasBuffOfType(BuffType.SpellImmunity) || Utils.TickCount - unit.LastCastedSpellT() < 300 && ( unit.LastCastedSpellName().Equals("SivirE") || unit.LastCastedSpellName().Equals("BlackShield") || unit.LastCastedSpellName().Equals("NocturneShit") );
private static bool IsSpellShielded(Obj_AI_Hero unit) { if (ObjectManager.Player.HasBuffOfType(BuffType.SpellShield)) { return true; } if (ObjectManager.Player.HasBuffOfType(BuffType.SpellImmunity)) { return true; } //Sivir E if (unit.LastCastedSpellName() == "SivirE" && (Environment.TickCount - unit.LastCastedSpellT()) < 300) { return true; } //Morganas E if (unit.LastCastedSpellName() == "BlackShield" && (Environment.TickCount - unit.LastCastedSpellT()) < 300) { return true; } //Nocturnes E if (unit.LastCastedSpellName() == "NocturneShit" && (Environment.TickCount - unit.LastCastedSpellT()) < 300) { return true; } return false; }