private static void InGameObject_OnCreate(InGameObject inGameObject)
                {
                    var baseTypes = inGameObject.GetBaseTypes().ToArray();

                    if (baseTypes.Contains("CurveProjectile") || baseTypes.Contains("CurveProjectile2"))
                    {
                        var data = AbilityDatabase.Get(inGameObject.ObjectName);
                        if (data == null)
                        {
                            return;
                        }
                        var pos        = LocalPlayer.Instance.Pos();
                        var projectile = inGameObject.Get <CurveProjectileObject>();

                        var closest = GeometryLib.NearestPointOnFiniteLine(projectile.Position,
                                                                           projectile.TargetPosition, pos);
                        if (pos.Distance(closest) > 6)
                        {
                            return;
                        }

                        var tp = new TrackedCurveProjectile(projectile, data);
                        AddAfterFrame.Add(tp);
                    }
                }
示例#2
0
        private static void Update(EventArgs args)
        {
            if (!MenuHandler.Enabled || !_shouldUse || !_isCasting || Game.CurrentMatchState != MatchState.InRound)
            {
                return;
            }
            var skill = ActiveSkills.Get(_castingId);

            if (skill == null)
            {
                return;
            }

            if (MenuHandler.Get(skill.Slot))
            {
                if (OrbLogic(skill, true))
                {
                    return;
                }
                var pred = TargetSelection.GetTargetPrediction(skill, AbilityDatabase.Get(_castingId));
                if (!pred.CanHit && !OrbLogic(skill))
                {
                    if (MenuHandler.Interrupt)
                    {
                        LocalPlayer.PressAbility(AbilitySlot.Interrupt, true);
                    }
                    LocalPlayer.EditAimPosition = false;
                    return;
                }

                LocalPlayer.EditAimPosition = true;
                LocalPlayer.Aim(pred.CastPosition);
            }
        }
示例#3
0
 private void SpellInit()
 {
     if (LocalPlayer.Instance.CharName == "Shen Rao" || string.IsNullOrEmpty(LocalPlayer.Instance.CharName))
     {
         ActiveSkills.AddFromDatabase();
         AM1Info    = AbilityDatabase.Get("LightningBolt");
         AscendedM1 = new SkillBase(AbilitySlot.Ability1, SkillType.Circle, AM1Info.Range, AM1Info.Speed, AM1Info.Radius, AM1Info.FixedDelay);
     }
 }
示例#4
0
        public static void AddFromDatabase(AbilitySlot slot)
        {
            var data = AbilityDatabase.Get(LocalPlayer.Instance.CharName, slot)[0];

            if (data != null)
            {
                Active.Add(new SkillBase(slot, data.AbilityType.ToSkillType(), data.Range == 0 ? data.MaxRange : data.Range, data.Speed, data.Radius, data.FixedDelay));
                ActiveInfos.Add(data);
            }
        }
                private static void SpellDetector_OnSpellCast(SpellCastArgs args)
                {
                    if (args.Caster.Team == BattleRight.Core.Enumeration.Team.Enemy)
                    {
                        return;
                    }
                    var data = AbilityDatabase.Get(args.Caster.AbilitySystem.CastingAbilityId);

                    if (data == null)
                    {
                        return;
                    }
                    TrackedCasts.Add(new TrackedCast(args.AbilityIndex, args.Caster, data));
                }
示例#6
0
 private void SpellInit()
 {
     if (LocalPlayer.Instance.CharName != "Jumong")
     {
         return;
     }
     ActiveSkills.Active.Add(new SkillBase(AbilitySlot.Ability1, SkillType.Line, 7.9f, 17, 0.3f));
     ActiveSkills.ActiveInfos.AddRange(AbilityDatabase.Get("Jumong", AbilitySlot.Ability1));
     ActiveSkills.Active.Add(new SkillBase(AbilitySlot.Ability2, SkillType.Line, 10.25f, 26.5f, 0.3f));
     ActiveSkills.ActiveInfos.AddRange(AbilityDatabase.Get("Jumong", AbilitySlot.Ability2));
     ActiveSkills.Active.Add(new SkillBase(AbilitySlot.Ability3, SkillType.Line, 7.8f, 13.5f, 0.3f));
     ActiveSkills.ActiveInfos.AddRange(AbilityDatabase.Get("Jumong", AbilitySlot.Ability3));
     ActiveSkills.Active.Add(new SkillBase(AbilitySlot.Ability4, SkillType.Circle, 10, 0, 2, 0.5f));
     ActiveSkills.ActiveInfos.AddRange(AbilityDatabase.Get("Jumong", AbilitySlot.Ability4));
     ActiveSkills.Active.Add(new SkillBase(AbilitySlot.Ability5, SkillType.Circle, 6.8f, 12, 1));
     ActiveSkills.ActiveInfos.AddRange(AbilityDatabase.Get("Jumong", AbilitySlot.Ability5));
     ActiveSkills.Active.Add(new SkillBase(AbilitySlot.Ability7, SkillType.Line, 7.8f, 13.5f, 0.3f));
     ActiveSkills.ActiveInfos.AddRange(AbilityDatabase.Get("Jumong", AbilitySlot.Ability7));
     ActiveSkills.Active.Add(new SkillBase(AbilitySlot.EXAbility1, SkillType.Line, 10.5f, 24.5f, 0.3f));
     ActiveSkills.ActiveInfos.AddRange(AbilityDatabase.Get("Jumong", AbilitySlot.EXAbility1));
     ActiveSkills.Active.Add(new SkillBase(AbilitySlot.EXAbility2, SkillType.Line, 8.8f, 26.5f, 0.3f));
     ActiveSkills.ActiveInfos.AddRange(AbilityDatabase.Get("Jumong", AbilitySlot.EXAbility2));
 }
                private static void InGameObject_OnCreate(InGameObject inGameObject)
                {
                    var projectile = inGameObject as Projectile;

                    if (projectile != null)
                    {
                        var data = AbilityDatabase.Get(inGameObject.ObjectName);
                        if (data == null)
                        {
                            return;
                        }
                        var pos = LocalPlayer.Instance.Pos();

                        var closest = GeometryLib.NearestPointOnFiniteLine(projectile.StartPosition,
                                                                           projectile.CalculatedEndPosition, pos);
                        if (pos.Distance(closest) > 5)
                        {
                            return;
                        }

                        var tp = new TrackedProjectile(projectile, data);
                        AddAfterFrame.Add(tp);
                    }
                }
 public static AbilityInfo Data(this TravelBuffObject travelObject)
 {
     return(AbilityDatabase.Get(travelObject.GameObject.ObjectName));
 }
 public static AbilityInfo Data(this DashObject dashObject)
 {
     return(AbilityDatabase.Get(dashObject.GameObject.ObjectName));
 }
 public static AbilityInfo Data(this ThrowObject throwObject)
 {
     return(AbilityDatabase.Get(throwObject.GameObject.ObjectName));
 }
 public static AbilityInfo Data(this Projectile projectile)
 {
     return(AbilityDatabase.Get(projectile.ObjectName));
 }