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


C# GameObjectProcessSpellCastEventArgs类代码示例

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


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

示例1: OnDoCast

        /// <summary>
        /// Called when a cast has been executed.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The args.</param>
        public static void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            /// <summary>
            /// Load the Ohmwrecker logic.
            /// </summary>
            if (sender != null &&
                args.Target != null &&
                args.Target.IsAlly &&
                sender.IsValid<Obj_AI_Turret>() &&
                args.Target.IsValid<Obj_AI_Hero>() &&
                Variables.Menu.Item($"{Variables.MainMenuName}.defensives").GetValue<bool>())
            {
                Ohmwrecker.Execute(sender, args);
            }

            /// <summary>
            /// Load the Offensive items.
            /// </summary>
            if (sender.IsMe &&
                Orbwalking.IsAutoAttack(args.SData.Name) &&
                Variables.Menu.Item($"{Variables.MainMenuName}.resetters").GetValue<bool>() &&
                (Variables.Menu.Item($"{Variables.MainMenuName}.combo_button").GetValue<KeyBind>().Active ||
                    Variables.Menu.Item($"{Variables.MainMenuName}.laneclear_button").GetValue<KeyBind>().Active))
            {
                Resetters.Execute(sender, args);
            }
        }
开发者ID:ShineSharp,项目名称:ExoryREPO,代码行数:32,代码来源:NabbActivator.cs

示例2: SpellCast

        public static void SpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe) return;
            if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) &&
                 Manager.MenuManager.UseQLC && Variables._Player.ManaPercent >= Manager.MenuManager.UseQLCMana) &&
                Manager.SpellManager.Q.IsReady())
            {
                if (Orbwalker.CanAutoAttack)
                {
                    return;
                }
                foreach (var minion in EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy,
                    Variables._Player.ServerPosition, Variables._Player.GetAutoAttackRange()))
                {
                    if (minion == null) return;
                    var dmg = Variables._Player.GetSpellDamage(minion, SpellSlot.Q) +
                              Variables._Player.GetAutoAttackDamage(minion);
                    if (Prediction.Health.GetPrediction(minion, (int)(Variables._Player.AttackDelay * 1000)) <= dmg / 2 &&
                        (Orbwalker.LastTarget == null || Orbwalker.LastTarget.NetworkId != minion.NetworkId))
                    {
                            Player.CastSpell(SpellSlot.Q, Game.CursorPos);

                    }
                }
            }
        }
开发者ID:Kysamaa,项目名称:EloBuddy,代码行数:26,代码来源:LaneClear.cs

示例3: Weaving

        /// <summary>
        ///     Called on do-cast.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The args.</param>
        public static void Weaving(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!(args.Target is AIHeroClient) ||
                Invulnerable.Check(args.Target as AIHeroClient, DamageType.Magical))
            {
                return;
            }

            /// <summary>
            ///     The Q Combo Weaving Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                (args.Target as AIHeroClient).LSIsValidTarget(Vars.Q.Range) &&
                Vars.getCheckBoxItem(Vars.QMenu, "combo"))
            {
                Vars.Q.Cast(Vars.Q.GetPrediction(args.Target as AIHeroClient).CastPosition);
                return;
            }

            /// <summary>
            ///     The R Combo Weaving Logic.
            /// </summary>
            if (Vars.R.IsReady() &&
                (args.Target as AIHeroClient).HasBuff("dianamoonlight") &&
                (args.Target as AIHeroClient).LSIsValidTarget(Vars.R.Range) &&
                Vars.getCheckBoxItem(Vars.RMenu, "combo"))
            {
                Vars.R.CastOnUnit(args.Target as AIHeroClient);
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:35,代码来源:Weaving.cs

示例4: ProcessSpell_TwitchSprayandPrayAttack

 private void ProcessSpell_TwitchSprayandPrayAttack(Obj_AI_Base hero, GameObjectProcessSpellCastEventArgs args, SpellData spellData, SpecialSpellEventArgs specialSpellArgs)
 {
     if (spellData.spellName == "TwitchSprayandPrayAttack")
     {
         spellData.spellDelay = hero.AttackCastDelay * 1000;
     }
 }
开发者ID:aikoy,项目名称:ezEvade,代码行数:7,代码来源:Twitch.cs

示例5: SpellCast

 internal static void SpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (!Helper.GetBool("Evade.WTS", YasuoMenu.EvadeM) || sender.IsAlly || !SpellSlot.W.IsReady() || (!Helper.GetBool("Evade.FOW", YasuoMenu.EvadeM) && !sender.IsVisible))
     {
         return;
     }
     if (args.SData.Name.Equals("MissFortuneBulletTime"))
     {
         var ssdata = GetSpell(args.SData.Name);
         if (ssdata.IsEnabled)
         {
             var end = args.Start.LSTo2D().LSExtend(args.End.LSTo2D(), 1400);
             EvadeA.Geometry.Rectangle rect = new EvadeA.Geometry.Rectangle(args.Start.LSTo2D(), end, args.SData.LineWidth);
             var topoly = rect.ToPolygon();
             var newls = new LittleStruct { poly = topoly, argss = args, RealEndPos = end, StartTick = YasuoEvade.TickCount, data = ssdata };
             DetectedPolygons.Add(newls);
             LeagueSharp.Common.Utility.DelayAction.Add(3000, () => DetectedPolygons.Clear());
         }
     }
     if (!args.Target.IsMe)
     {
         return;
     }
     //Console.WriteLine(args.SData.Name + " " + sender.BaseSkinName);
     var sdata = GetSpell(args.SData.Name);
     if (sdata != null && sdata.IsEnabled)
     {
         var castpos = Helper.Yasuo.ServerPosition.LSExtend(args.Start, 50);
         LeagueSharp.Common.Utility.DelayAction.Add((int)sdata.delay, () => Helper.Spells[Helper.W].Cast(castpos));
     }
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:31,代码来源:TargettedDanger.cs

示例6: Obj_AI_Base_OnProcessSpellCast

        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            var enabled = Variable.Config["Enabled"].GetValue<MenuBool>().Value;
            if (!enabled || !Variable.Player.IsTargetable || (sender == null || sender.Team == Variable.Player.Team))
            {
                return;
            }

            foreach (var champ in Variable.ExistingChampions)
            {
                var champion = Variable.Config["CAS"][champ.CharName];
                if (champion == null || champion[champ.Slot.ToString()] == null || !champion[champ.Slot.ToString()].GetValue<MenuBool>().Value)
                {
                    continue;
                }

                if (champ.Slot != (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name) ||
                    (!(Variable.Player.Distance(sender.Position) <= champ.Range) && args.Target != Variable.Player))
                {
                    continue;
                }

                var vector =
                    new Vector3(
                        Variable.Player.Position.X +
                        ((sender.Position.X - Variable.Player.Position.X)*(Internal.MoveTo(champ.Movement))/
                         Variable.Player.Distance(sender.Position)),
                        Variable.Player.Position.Y +
                        ((sender.Position.Y - Variable.Player.Position.Y)*(Internal.MoveTo(champ.Movement))/
                         Variable.Player.Distance(sender.Position)), 0);
                Variable.Player.IssueOrder(GameObjectOrder.MoveTo, vector);
                Orbwalker.Movement = false;
                DelayAction.Add((int) (champ.CastTime + 0.1)*1000, () => Orbwalker.Movement = true);
            }
        }
开发者ID:RoachxD,项目名称:LeagueSharp-SDK,代码行数:35,代码来源:Program.cs

示例7: ExecuteComboLogic

        internal static void ExecuteComboLogic(GameObjectProcessSpellCastEventArgs args)
        {
            if (args.Target is Obj_AI_Hero)
            {
                var qReady = Variables.spells[SpellSlot.Q].IsEnabledAndReady();
                var wReady = Variables.spells[SpellSlot.W].IsEnabledAndReady();
                var eReady = Variables.spells[SpellSlot.E].IsEnabledAndReady();
                var target_ex = args.Target as Obj_AI_Hero;

                if (qReady)
                {
                    ExtendedQ();
                }

                if (qReady && (target_ex.Distance(ObjectManager.Player) < Variables.spells[SpellSlot.Q].Range - 65f + 0.25f * target_ex.MoveSpeed) && !LucianHooks.HasPassive)
                {
                    Variables.spells[SpellSlot.Q].CastOnUnit(target_ex);
                    LeagueSharp.Common.Utility.DelayAction.Add((int)(250 + Game.Ping / 2f + ObjectManager.Player.AttackCastDelay + 560f),
                        () =>
                        {
                            ExecuteComboLogic(args);
                        });
                    TargetSelector.SetTarget(args.Target as Obj_AI_Hero);
                }

                if (wReady 
                    && !qReady 
                    && target_ex.IsValidTarget(Variables.spells[SpellSlot.W].Range) 
                    && !LucianHooks.HasPassive)
                {
                    Variables.spells[SpellSlot.W].Cast(Variables.spells[SpellSlot.W].GetPrediction(target_ex).CastPosition);
                    LeagueSharp.Common.Utility.DelayAction.Add((int)(250 + Game.Ping / 2f + ObjectManager.Player.AttackCastDelay + 560f), () =>
                    {
                        ExecuteComboLogic(args);
                    });
                    TargetSelector.SetTarget(args.Target as Obj_AI_Hero);
                }

                if (eReady 
                    && target_ex.IsValidTarget(Variables.spells[SpellSlot.Q].Range + 300f + 65) 
                    && !LucianHooks.HasPassive 
                    && !ObjectManager.Player.IsWindingUp)
                {
                    var eProvider = new EPositionProvider();;
                    var eEndPosition = eProvider.GetEPosition();
                    if (eEndPosition != Vector3.Zero && eEndPosition.Distance(target_ex.ServerPosition) < Orbwalking.GetRealAutoAttackRange(target_ex))
                    {
                        Variables.spells[SpellSlot.E].Cast(eEndPosition);
                        LeagueSharp.Common.Utility.DelayAction.Add((int)(250 + Game.Ping / 2f + ObjectManager.Player.AttackCastDelay + 560f),
                            () =>
                            {
                                Orbwalking.ResetAutoAttackTimer();
                                ExecuteComboLogic(args);
                            });
                        TargetSelector.SetTarget(args.Target as Obj_AI_Hero);
                    }
                }
            }

        }
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:60,代码来源:Combo.cs

示例8: OnProcessSpellCast

 protected override void OnProcessSpellCast(Obj_AI_Base unit, GameObjectProcessSpellCastEventArgs spell)
 {
     if (!unit.IsMe && unit.IsEnemy)
     {
         if (!spell.SData.IsAutoAttack() && spell.Target.IsMe && E.IsReady())
         {
             if (unit.IsChampion(unit.BaseSkinName))
             {
                 if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo)
                 {
                     if (config.Item("UseECombo").GetValue<bool>())
                     {
                         Utility.DelayAction.Add(myUtility.RandomDelay(0, 200), () => E.Cast());
                     }
                 }
                 if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Harass)
                 {
                     if (config.Item("UseEHarass").GetValue<bool>())
                     {
                         Utility.DelayAction.Add(myUtility.RandomDelay(0, 200), () => E.Cast());
                     }
                 }
                 if (config.Item("UseEMisc").GetValue<bool>())
                 {
                     Utility.DelayAction.Add(myUtility.RandomDelay(0, 200), () => E.Cast());
                 }
             }
         }
     }
 }
开发者ID:Shpaamyi,项目名称:LeagueSharp,代码行数:30,代码来源:Sivir.cs

示例9: SpellDetector_OnProcessSpecialSpell

        private void SpellDetector_OnProcessSpecialSpell(Obj_AI_Base hero, GameObjectProcessSpellCastEventArgs args, SpellData spellData, SpecialSpellEventArgs specialSpellArgs)
        {
            if (spellData.spellName == "TaricE")
            {
                var sdata = new SpellData();
                sdata.charName = "Taric";
                sdata.name = "TaricE2";
                sdata.spellName = "TaricE";
                sdata.range = 750;
                sdata.radius = 100;
                sdata.fixedRange = true;
                sdata.spellDelay = 1000;
                sdata.projectileSpeed = int.MaxValue;
                sdata.dangerlevel = 3;

                var partner = HeroManager.Enemies.FirstOrDefault(x => x.HasBuff("taricwleashactive"));
                if (partner != null && partner.ChampionName != "Taric")
                {
                    var start = partner.ServerPosition.LSTo2D();
                    var direction = (args.End.LSTo2D() - start).LSNormalized();
                    var end = start + direction * spellData.range;

                    SpellDetector.CreateSpellData(partner, start.To3D(), end.To3D(), sdata);
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:26,代码来源:Taric.cs

示例10: Obj_AI_Base_OnProcessSpellCast

 private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe)
     {
         _lastAaTick = Environment.TickCount;
     }
 }
开发者ID:Remzooorro,项目名称:Elobuddy-Addons,代码行数:7,代码来源:MeleeOrbwalker.cs

示例11: Obj_AI_Base_OnProcessSpellCast

 private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && args.Slot == QWER.Slot)
     {
         MissileEndPos = args.End;
     }
 }
开发者ID:MrWenzoxfs,项目名称:elobuddy,代码行数:7,代码来源:MissileReturn.cs

示例12: Specials

        /// <summary>
        ///     Called on do-cast.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The args.</param>
        public static void Specials(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!Vars.TypesMenu["defensives"].Cast<CheckBox>().CurrentValue)
            {
                return;
            }

            if (sender != null &&
                args.Target != null)
            {
                /// <summary>
                ///     The Ohmwrecker logic.
                /// </summary>
                if (Items.CanUseItem(3056) &&
                    sender.LSIsValidTarget(750f))
                {
                    if (args.Target.IsAlly &&
                        sender is Obj_AI_Turret &&
                        args.Target is AIHeroClient)
                    {
                        Items.UseItem(3056, sender);
                    }
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:30,代码来源:Specials.cs

示例13: OnDoCast

        /// <summary>
        /// Called when the sender is done doing the windup time for a spell/AA
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="GameObjectProcessSpellCastEventArgs"/> instance containing the event data.</param>
        private void OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            try
            {
                if (sender.IsMe && args.Slot == SpellSlot.R)
                {
                    var QPosition = Provider.GetSOLOVayneQPosition();
                    if (QPosition != Vector3.Zero)
                    {
                        Variables.spells[SpellSlot.Q].Cast(QPosition);
                        return;
                    }

                    var secondaryQPosition = ObjectManager.Player.ServerPosition.Extend(Game.CursorPos, 300f);

                    if (!secondaryQPosition.UnderTurret(true))
                    {
                        Variables.spells[SpellSlot.Q].Cast(secondaryQPosition);
                    }
                }
            }
            catch (Exception e)
            {
                LogHelper.AddToLog(new LogItem("AutoQifR", e, LogSeverity.Error));
            }
            
        }
开发者ID:luizssn,项目名称:LeagueSharp,代码行数:32,代码来源:AutoR.cs

示例14: OnProcessSCast

 private static void OnProcessSCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (sender.IsMe && !args.SData.IsAutoAttack())
     {
         IsRunning = false;
     }
 }
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:7,代码来源:CommandQueue.cs

示例15: Weaving

        /// <summary>
        ///     Called on do-cast.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The args.</param>
        public static void Weaving(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!(args.Target is AIHeroClient) ||
                Invulnerable.Check(args.Target as AIHeroClient))
            {
                return;
            }

            /// <summary>
            ///     The W Weaving Logic.
            /// </summary>
            if (Vars.W.IsReady() &&
                Menus.getCheckBoxItem(Vars.WMenu, "combo"))
            {
                Vars.W.Cast();
                return;
            }

            /// <summary>
            ///     The Q Weaving Logic.
            /// </summary>
            if (Vars.Q.IsReady() &&
                Menus.getCheckBoxItem(Vars.QMenu, "combo"))
            {
                Vars.Q.Cast(
                    Vars.Q.GetPrediction(Targets.Target)
                        .UnitPosition.Extend((Vector2)GameObjects.Player.ServerPosition, -140));
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:34,代码来源:Weaving.cs


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