Esempio n. 1
0
 private void OnCreate(GameObject sender, EventArgs args)
 {
     if (sender == null || !sender.IsValid)
     {
         return;
     }
     if (Config.Item(Name + "surviveW").GetValue <bool>() && SkillW.IsReady() && SkillW.Instance.Name == "BlindMonkWOne")
     {
         var missle = (Obj_SpellMissile)sender;
         var unit   = missle.SpellCaster;
         if (unit.IsEnemy)
         {
             if (LXOrbwalker.IsAutoAttack(missle.SData.Name))
             {
                 if (missle.Target.IsMe && Player.Health <= unit.GetAutoAttackDamage(Player, true))
                 {
                     SkillW.Cast(PacketCast);
                     return;
                 }
             }
             else if (missle.Target.IsMe || Player.Distance(missle.Position) <= 200)
             {
                 if (missle.SData.Name == "summonerdot")
                 {
                     if (Player.Health <= (unit as Obj_AI_Hero).GetSummonerSpellDamage(Player, Damage.SummonerSpell.Ignite))
                     {
                         SkillW.Cast(PacketCast);
                         return;
                     }
                 }
                 else if (Player.Health <= (unit as Obj_AI_Hero).GetSpellDamage(Player, (unit as Obj_AI_Hero).GetSpellSlot(missle.SData.Name, false), 1))
                 {
                     SkillW.Cast(PacketCast);
                     return;
                 }
             }
         }
     }
 }