示例#1
0
 private static void OnSpellbookCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (!Enabled)
     {
         return;
     }
     try
     {
         if (sender.Owner.IsMe)
         {
             var target = args.Target as Obj_AI_Hero;
             if (target != null)
             {
                 switch (args.Slot)
                 {
                 case SpellSlot.Q:
                 case SpellSlot.W:
                 case SpellSlot.E:
                 case SpellSlot.R:
                     Damages.Clean();
                     if (Damages.IsDying(target))
                     {
                         args.Process = false;
                     }
                     break;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }