protected virtual void OnPlayerLeft(RoomPlayerEventArgs e)
        {
            PlayerLeft?.Invoke(this, e);

            RoomDto roomDto = new RoomDto();

            roomDto.RoomId      = (byte)this.Id;
            roomDto.PlayerCount = (byte)this.Players.Count;
            roomDto.PlayerLimit = this.Options.PlayerLimit;
            roomDto.State       = (byte)this.GameRuleManager.GameRule.StateMachine.State;
            roomDto.State2      = (byte)this.GameRuleManager.GameRule.StateMachine.State;
            roomDto.GameRule    = (int)this.Options.GameRule;
            roomDto.Map         = (byte)this.Options.MapID;
            roomDto.WeaponLimit = this.Options.ItemLimit;
            roomDto.Name        = this.Options.Name;
            roomDto.Password    = this.Options.Password;
            roomDto.FMBURNMode  = GetFMBurnModeInfo();
            RoomManager.Channel.Broadcast(new RoomChangeRoomInfoAck2Message(roomDto));
            //RoomManager.Channel.Broadcast(new RoomChangeRoomInfoAckMessage(this.Map<Room, RoomDto>()));
            //RoomManager.Channel.Broadcast(new SUserDataAckMessage(e.Player.Map<Player, UserDataDto>()));
        }
Esempio n. 2
0
 protected virtual void OnPlayerLeft(RoomPlayerEventArgs e)
 {
     PlayerLeft?.Invoke(this, e);
     RoomManager.Channel.Broadcast(new SChangeGameRoomAckMessage(this.Map <Room, RoomDto>()));
     RoomManager.Channel.Broadcast(new SUserDataAckMessage(e.Player.Map <Player, UserDataDto>()));
 }
Esempio n. 3
0
 internal virtual void OnPlayerJoined(RoomPlayerEventArgs e)
 {
     PlayerJoined?.Invoke(this, e);
     RoomManager.Channel.Broadcast(new SUserDataAckMessage(e.Player.Map <Player, UserDataDto>()));
 }