Beispiel #1
0
        public override void OnConnection(VMEODClient client)
        {
            var args = client.Invoker.Thread.TempRegisters;

            // client belongs to a player
            if (client.Avatar != null)
            {
                if ((args != null) && (args[0] > -1) && (args[0] < 4))
                {
                    if (Lobby.Join(client, args[0]))
                    {
                        client.Send("Band_UI_Init", new byte[] { (byte)args[0] });
                        var slot = Lobby.GetSlotData(client);
                        if (slot != null)
                        {
                            slot.AvatarName  = client.Avatar.Name;
                            slot.Instrument  = (VMEODBandInstrumentTypes)Enum.ToObject(typeof(VMEODBandInstrumentTypes), args[0]);
                            slot.SkillAmount = GetAvatarsCurrentSkill(client);

                            if (Lobby.IsFull())
                            {
                                InitGame();
                            }
                        }
                    }
                }
            }
            // client belongs to the smart tile, is contoller
            else
            {
                Controller = client;
            }
            base.OnConnection(client);
        }
Beispiel #2
0
        public override void OnConnection(VMEODClient client)
        {
            var param = client.Invoker.Thread.TempRegisters;

            if (client.Avatar != null)
            {
                var slot = param[0];
                if (Lobby.Join(client, -1))
                {
                    OnConnected(client);
                }
            }
        }
Beispiel #3
0
        public override void OnConnection(VMEODClient client)
        {
            Client = client;
            var param = client.Invoker.Thread.TempRegisters;

            if (client.Avatar != null)
            {
                var rackType = param[0];
                if (!Lobby.Join(client, 0))
                {
                    return;
                }
                RackType = (RackType)rackType;
                client.Send("rack_show", ((short)RackType).ToString());
                BroadcastOutfits(client.vm, false);
            }
        }
Beispiel #4
0
        public override void OnConnection(VMEODClient client)
        {
            var param = client.Invoker.Thread.TempRegisters;

            if (client.Avatar != null)
            {
                var slot = param[0];
                if (Lobby.Join(client, (short)(slot - 1)))
                {
                    client.SendOBJEvent(new VMEODEvent((short)VMEODPaperChaseObjEvent.Idle));

                    if (Lobby.IsFull())
                    {
                        StateMachine.TransitionTo(VMEODPaperChaseState.StartRound);
                    }
                }
            }
            else
            {
                Controller = client;
            }
        }
        public override void OnConnection(VMEODClient client)
        {
            Client = client;
            var param = client.Invoker.Thread.TempRegisters;

            if (client.Avatar != null)
            {
                var rackType = param[0];
                if (!Lobby.Join(client, 0))
                {
                    return;
                }
                RackType = (RackType)rackType;
                client.Send("rack_show", ((short)RackType).ToString());
                if (((VMTSOObjectState)Server.Object.TSOState).OwnerID == client.Avatar.PersistID)
                {
                    BroadcastOutfits(client.vm, true);
                }
                else
                {
                    BroadcastOutfits(client.vm, false);
                }
            }
        }