Beispiel #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);
                    }
                }
            }
Beispiel #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");
        }
Beispiel #3
0
 public double Angle(IWard ward)
 {
     return(hero.FindRelativeAngle(ward.Position));
 }
Beispiel #4
0
 public WardsController(IWard ward)
 {
     _ward = ward;
 }
Beispiel #5
0
 public WardssController(IWard db)
 {
     this.db = db;
 }
Beispiel #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);
                    }
                }
            }