Exemplo n.º 1
0
            public Ward(AIHeroClient caster, Obj_AI_Base handle, Vector3 position, IWard wardInfo, int duration, GameObjectTeam team)
            {
                // Initialize properties
                Caster       = caster;
                Handle       = handle;
                FakePosition = position;
                Team         = team;
                WardInfo     = wardInfo;
                Duration     = duration * 1000;
                CreationTime = Core.GameTickCount;

                // Initialize rendering
                MinimapSprite = new Sprite(() => MinimapIconTexture);
                TextHandle    = new Text(string.Empty, new Font(FontFamily.GenericSansSerif, 8, FontStyle.Regular));

                // Notify player about placement
                if (!MasterMind.IsSpectatorMode && Team.IsEnemy() &&
                    (Player.Instance.IsInRange(Position, NotifyRange.CurrentValue) || Player.Instance.IsInRange(position, NotifyRange.CurrentValue)))
                {
                    if (NotifyPlace.CurrentValue)
                    {
                        Notifications.Show(new SimpleNotification("A ward has been placed!",
                                                                  string.Format("{0} has placed a {1}", caster != null ? caster.ChampionName : "Unknown", WardInfo.FriendlyName)));
                    }
                    if (NotifyPlacePing.CurrentValue)
                    {
                        TacticalMap.ShowPing(PingCategory.Normal, Position, true);
                    }
                }
            }
Exemplo n.º 2
0
        private void PingWard(IWard ward)
        {
            if (!ward.RequiresUpdate || lastPingTime + 10 > Game.RawGameTime)
            {
                return;
            }

            lastPingTime = Game.RawGameTime;

            Network.MapPing(ward.Position.ToVector2(), (PingType)5);

            // client ping
            mapPingParticleEffect = new ParticleEffect("particles/ui_mouseactions/ping_enemyward.vpcf", ward.Position);
            mapPingParticleEffect.SetControlPoint(1, new Vector3(1));
            mapPingParticleEffect.SetControlPoint(5, new Vector3(10, 0, 0));
            hero.PlaySound("General.Ping");
        }
Exemplo n.º 3
0
 public double Angle(IWard ward)
 {
     return(hero.FindRelativeAngle(ward.Position));
 }
Exemplo n.º 4
0
 public WardsController(IWard ward)
 {
     _ward = ward;
 }
Exemplo n.º 5
0
 public WardssController(IWard db)
 {
     this.db = db;
 }
Exemplo n.º 6
0
            public Ward(AIHeroClient caster, Obj_AI_Base handle, Vector3 position, IWard wardInfo, int duration, GameObjectTeam team)
            {
                // Initialize properties
                Caster = caster;
                Handle = handle;
                FakePosition = position;
                Team = team;
                WardInfo = wardInfo;
                Duration = duration * 1000;
                CreationTime = Core.GameTickCount;

                // Initialize rendering
                MinimapSprite = new Sprite(() => MinimapIconTexture);
                TextHandle = new Text(string.Empty, new Font(FontFamily.GenericSansSerif, 8, FontStyle.Regular));

                // Notify player about placement
                if (!MasterMind.IsSpectatorMode && Team.IsEnemy() &&
                    (Player.Instance.IsInRange(Position, NotifyRange.CurrentValue) || Player.Instance.IsInRange(position, NotifyRange.CurrentValue)))
                {
                    if (NotifyPlace.CurrentValue)
                    {
                        Notifications.Show(new SimpleNotification("A ward has been placed!",
                            string.Format("{0} has placed a {1}", caster != null ? caster.ChampionName : "Unknown", WardInfo.FriendlyName)));
                    }
                    if (NotifyPlacePing.CurrentValue)
                    {
                        TacticalMap.ShowPing(PingCategory.Normal, Position, true);
                    }
                }
            }