예제 #1
0
        public static void Initialize(ChampionTrackerFlags flags)
        {
            if (_initialized && Flags.HasFlag(flags))
            {
                return;
            }

            Flags |= flags;

            if (Flags.HasFlag(ChampionTrackerFlags.VisibilityTracker))
            {
                foreach (var aiHeroClient in EntityManager.Heroes.Enemies)
                {
                    ChampionVisibility.Add(new VisibilityTracker {
                        Hero = aiHeroClient
                    });
                }
                Game.OnTick += Game_OnTick;
            }
            if (Flags.HasFlag(ChampionTrackerFlags.LongCastTimeTracker))
            {
                Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            }

            if (Flags.HasFlag(ChampionTrackerFlags.PostBasicAttackTracker))
            {
                Obj_AI_Base.OnSpellCast += Obj_AI_Base_OnSpellCast;
                GameObject.OnCreate     += GameObject_OnCreate;
                GameObject.OnDelete     += GameObject_OnDelete;
                Game.OnUpdate           += PostBasicAttackHandler;
            }

            _initialized = true;
        }
예제 #2
0
        public static void Initialize(ChampionTrackerFlags flags)
        {
            if (_initialized && Flags.HasFlag(flags))
            {
                return;
            }

            Flags |= flags;

            if (Flags.HasFlag(ChampionTrackerFlags.VisibilityTracker))
            {
                foreach (var aiHeroClient in EntityManager.Heroes.Enemies)
                {
                    ChampionVisibility.Add(new VisibilityTracker {
                        Hero = aiHeroClient
                    });
                }
                Game.OnTick += Game_OnTick;
            }
            if (Flags.HasFlag(ChampionTrackerFlags.LongCastTimeTracker))
            {
                Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            }

            if (Flags.HasFlag(ChampionTrackerFlags.PostBasicAttackTracker))
            {
                Obj_AI_Base.OnSpellCast += Obj_AI_Base_OnSpellCast;
                GameObject.OnCreate     += GameObject_OnCreate;
                GameObject.OnDelete     += GameObject_OnDelete;
                Game.OnUpdate           += PostBasicAttackHandler;
            }

            if (Flags.HasFlag(ChampionTrackerFlags.PathingTracker))
            {
                PathingDirection   = new Dictionary <int, Vector3>();
                LastPathDictionary = new Dictionary <int, Vector3>();

                Obj_AI_Base.OnNewPath += Obj_AI_Base_OnNewPath;

                Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
                {
                    PathingDirection[sender.NetworkId] = sender.ServerPosition.Extend(args.End, args.End.Distance(sender) + 100).To3D();
                };
                Obj_AI_Base.OnBasicAttack += (sender, args) =>
                {
                    PathingDirection[sender.NetworkId] = sender.ServerPosition.Extend(args.End, args.End.Distance(sender) + 100).To3D();
                };
            }

            _initialized = true;
        }
예제 #3
0
        public static void Initialize(ChampionTrackerFlags flags)
        {
            Flags = flags;

            if (Flags.HasFlag(ChampionTrackerFlags.VisibilityTracker))
            {
                foreach (var aiHeroClient in EntityManager.Heroes.Enemies)
                {
                    ChampionVisibility.Add(new VisibilityTracker {
                        Hero = aiHeroClient
                    });
                }
                Game.OnTick += Game_OnTick;
            }
            if (Flags.HasFlag(ChampionTrackerFlags.LongCastTimeTracker))
            {
                Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            }
        }