Esempio n. 1
0
        public void NotifyInhibitorState(IInhibitor inhibitor, IGameObject killer = null, List <IChampion> assists = null)
        {
            UnitAnnounce announce;

            switch (inhibitor.InhibitorState)
            {
            case InhibitorState.DEAD:
                announce = new UnitAnnounce(UnitAnnounces.INHIBITOR_DESTROYED, inhibitor, killer, assists);
                _packetHandlerManager.BroadcastPacket(announce, Channel.CHL_S2C);

                var anim = new InhibitorDeathAnimation(inhibitor, killer);
                _packetHandlerManager.BroadcastPacket(anim, Channel.CHL_S2C);
                break;

            case InhibitorState.ALIVE:
                announce = new UnitAnnounce(UnitAnnounces.INHIBITOR_SPAWNED, inhibitor, killer, assists);
                _packetHandlerManager.BroadcastPacket(announce, Channel.CHL_S2C);
                break;
            }
            var packet = new InhibitorStateUpdate(inhibitor);

            _packetHandlerManager.BroadcastPacket(packet, Channel.CHL_S2C);
        }
Esempio n. 2
0
        public void NotifyInhibitorState(Inhibitor inhibitor, GameObject killer = null, List <Champion> assists = null)
        {
            UnitAnnounce announce;

            switch (inhibitor.getState())
            {
            case InhibitorState.Dead:
                announce = new UnitAnnounce(UnitAnnounces.InhibitorDestroyed, inhibitor, killer, assists);
                _game.PacketHandlerManager.broadcastPacket(announce, Channel.CHL_S2C);

                var anim = new InhibitorDeathAnimation(inhibitor, killer);
                _game.PacketHandlerManager.broadcastPacket(anim, Channel.CHL_S2C);
                break;

            case InhibitorState.Alive:
                announce = new UnitAnnounce(UnitAnnounces.InhibitorSpawned, inhibitor, killer, assists);
                _game.PacketHandlerManager.broadcastPacket(announce, Channel.CHL_S2C);
                break;
            }
            var packet = new InhibitorStateUpdate(inhibitor);

            _game.PacketHandlerManager.broadcastPacket(packet, Channel.CHL_S2C);
        }