当前位置: 首页>>代码示例>>C#>>正文


C# SpellbookCastSpellEventArgs类代码示例

本文整理汇总了C#中SpellbookCastSpellEventArgs的典型用法代码示例。如果您正苦于以下问题:C# SpellbookCastSpellEventArgs类的具体用法?C# SpellbookCastSpellEventArgs怎么用?C# SpellbookCastSpellEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SpellbookCastSpellEventArgs类属于命名空间,在下文中一共展示了SpellbookCastSpellEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Spellbook_OnCastSpell

        public static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
        {
            if (sender.Owner.IsMe)
            {
                lock (m_lock)
                {
                    if (SPredictioner.Config.Item("ENABLED").GetValue<bool>() && (SPredictioner.Config.Item("COMBOKEY").GetValue<KeyBind>().Active || SPredictioner.Config.Item("HARASSKEY").GetValue<KeyBind>().Active))
                    {
                        if (!ShineCommon.Utility.IsValidSlot(args.Slot))
                            return;

                        if (SPredictioner.Spells[(int)args.Slot] == null)
                            return;

                        if (handleEvent[(int)args.Slot])
                        {
                            args.Process = false;
                            handleEvent[(int)args.Slot] = false;
                            var enemy = args.EndPosition.GetEnemiesInRange(200f).OrderByDescending(p => ShineCommon.Utility.GetPriority(p.ChampionName)).FirstOrDefault();
                            if (enemy == null)
                                enemy = TargetSelector.GetTarget(SPredictioner.Spells[(int)args.Slot].Range, TargetSelector.DamageType.Physical);

                            if (enemy != null)
                                SPredictioner.Spells[(int)args.Slot].SPredictionCast(enemy, ShineCommon.Utility.HitchanceArray[SPredictioner.Config.Item("SPREDHITC").GetValue<StringList>().SelectedIndex]);
                        }
                    }
                }
            }
        }
开发者ID:47110572,项目名称:LeagueSharp,代码行数:29,代码来源:EventHandlers.cs

示例2: Spellbook_OnCastSpell

 private void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E)
     {
         passRdy = true;
     }
 }
开发者ID:qq2128969,项目名称:LeagueRepo,代码行数:7,代码来源:Lucian.cs

示例3: OnCastSpell

        static void OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
        {
            if (sender == null || !sender.Owner.IsMe) {
                return;
            }
            var antiswitch = Config.Item("antiswitchenabled").GetValue<bool>();
            var useforthis = Config.Item("Spells." + args.Slot).GetValue<bool>();
            var target = args.Target as Obj_AI_Hero;
            var mindelay = Config.Item("mindelay").GetValue<Slider>().Value;

            if (antiswitch && target != null)
            {
                if (target != Player.LastCastedSpellTarget() && Utils.TickCount - Player.LastCastedSpellT() <= mindelay)
                {
                    args.Process = false;
                    return;
                }
            }

            var humanizerenabled = Config.Item("humanizerenabled").GetValue<bool>();
            var delayforthis = Config.Item(args.Slot + "delay").GetValue<Slider>().Value;
            if (humanizerenabled && useforthis)
            {
                if (Utils.TickCount - Player.LastCastedSpellT() <= delayforthis)
                {
                    args.Process = false;
                }
            }
        }
开发者ID:ninja1234567,项目名称:LeagueSharp,代码行数:29,代码来源:Program.cs

示例4: PassiveControl

 private void PassiveControl(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E)
     {
         ProcessSpell();
     }
 }
开发者ID:47110572,项目名称:LeagueSharp-9,代码行数:7,代码来源:Core.cs

示例5: OnSpell

 public static void OnSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (args.Slot == SpellSlot.Q)
     {
         PortAIO.OrbwalkerManager.ResetAutoAttackTimer();
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:7,代码来源:QSpell.cs

示例6: Spellbook_OnCastSpell

        private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
        {
            if (sender.Owner.IsMe)
            {
                switch (args.Slot)
                {
                    case SpellSlot.Q:
                    case SpellSlot.W:
                    case SpellSlot.E:
                    case SpellSlot.R:

                        if (IsReady)
                        {
                            // We are safe to cast a spell
                            _sendTime = TickCount;
                        }
                        else
                        {
                            // Don't allow the spellcast
                            args.Process = false;
                        }
                        break;
                }
            }
        }
开发者ID:tingtop747,项目名称:EloBuddy-Addons-1,代码行数:25,代码来源:SpellQueue.cs

示例7: OnCastSpell

 public static void OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (sender.Owner.IsMe && args.Slot == SpellSlot.Q && Program.Player.IsDashing())
     {
         args.Process = false;
     }
 }
开发者ID:Faqer,项目名称:Leaguesharp-2,代码行数:7,代码来源:Helper.cs

示例8: Spellbook_OnCastSpell

        void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
        {
            if (!IsActive() || SummonerSpells.GetFlashSlot() == args.Slot || !sender.Owner.IsMe)
                return;

            var startWall = GetStartWall();
            if (!startWall.IsZero && Game.CursorPos.IsWall() && ObjectManager.Player.Distance(startWall) < 1000)
            {
                args.Process = false;
                ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, startWall);

                return;
            }

            for (var dist = ObjectManager.Player.Distance(Game.CursorPos); dist < 800; dist += 25)
            {
                var curPos = ObjectManager.Player.Position.Extend(Game.CursorPos, dist);
                if (!curPos.IsWall())
                {
                    ObjectManager.Player.Spellbook.CastSpell(args.Slot, curPos, false);
                    return;
                }
            }

            if (ObjectManager.Player.ServerPosition.To2D().Distance(args.StartPosition) < 390f)
            {
                args.Process = false;
                ObjectManager.Player.Spellbook.CastSpell(args.Slot, ObjectManager.Player.ServerPosition.Extend(args.StartPosition, 400f));
            }
        }
开发者ID:BlueSun99,项目名称:SAwarenessBeta,代码行数:30,代码来源:SafeFlash.cs

示例9: OnSpell

 public static void OnSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (args.Slot == SpellSlot.Q)
     {
         Orbwalker.ResetAutoAttack();
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:7,代码来源:QSpell.cs

示例10: Spellbook_OnCastSpell

 private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (sender.Owner.IsMe)
     {
         if (args.Slot == SpellSlot.Q)
         {
             args.Process = Orbwalker.CanMove;
             QCastSpellTime = Core.GameTickCount;
         }
         else if (args.Slot == SpellSlot.W)
         {
             args.Process = Core.GameTickCount - Champion.ShouldWaitTime > W.CastDelay && Orbwalker.CanMove;
             if (args.Process)
             {
                 WCastSpellTime = Core.GameTickCount;
             }
         }
         else if (args.Slot == SpellSlot.R)
         {
             if (args.Process)
             {
                 RCastSpellTime = Core.GameTickCount;
             }
         }
     }
 }
开发者ID:mezer123,项目名称:EloBuddy,代码行数:26,代码来源:SpellManager.cs

示例11: Spellbook_OnCastSpell

 private void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (args.Slot == SpellSlot.E)
     {
         NextCicleOn = Game.Time + 9.8f;
     }
 }
开发者ID:47110572,项目名称:LeagueSharp-9,代码行数:7,代码来源:KeepEAlive.cs

示例12: OnCastSpell

 protected override void OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (sender.Owner.IsMe && args.Slot == SpellSlot.Q)
     {
         LastCast = myUtility.TickCount;
     }
 }
开发者ID:Shpaamyi,项目名称:LeagueSharp,代码行数:7,代码来源:Fiora.cs

示例13: Spellbook_OnCastSpell

        private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
        {
            if (sender.Owner.IsMe && args.Slot == F.Slot)
            {
                var wall = SummMenu["wall"].Cast<CheckBox>().CurrentValue
                           && (NavMesh.GetCollisionFlags(args.EndPosition) == CollisionFlags.Wall
                               || NavMesh.GetCollisionFlags(args.EndPosition) == CollisionFlags.Building);

                if (wall && SummMenu["wall"].Cast<CheckBox>().CurrentValue
                    || args.EndPosition.Distance(Player.Instance) < 450 && SummMenu["extend"].Cast<CheckBox>().CurrentValue)
                {
                    args.Process = false;
                }

                if (args.EndPosition.Distance(Player.Instance) < 450 && SummMenu["extend"].Cast<CheckBox>().CurrentValue)
                {
                    if (wall && SummMenu["wall"].Cast<CheckBox>().CurrentValue)
                    {
                        args.Process = false;
                    }

                    F.Cast(Player.Instance.Position.Extend(Game.CursorPos, 450).To3D());
                }
            }
        }
开发者ID:FireBuddy,项目名称:karthus,代码行数:25,代码来源:Flash.cs

示例14: OnSpellbookCastSpell

 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));
     }
 }
开发者ID:juan2202,项目名称:LeagueSharp-Standalones,代码行数:34,代码来源:OverkillManager.cs

示例15: OnCastSpell

 protected override void OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (sender.Owner.IsMe && args.Slot == SpellSlot.E && Player.IsDashing())
     {
         args.Process = false;
     }
 }
开发者ID:Shpaamyi,项目名称:LeagueSharp,代码行数:7,代码来源:Thresh.cs


注:本文中的SpellbookCastSpellEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。