Example #1
0
 /// <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")
     );
Example #2
0
        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;
        }