Exemplo n.º 1
0
 public static async Task GetGameStatus(CommandContext ctx, GameId gameId)
 {
     if (_games.ContainsKey(gameId))
     {
         await _games[gameId].GetStatus(ctx);
     }
 }
Exemplo n.º 2
0
Arquivo: Set.cs Projeto: wlk0/OCTGN
        public void ExtractImages()
        {
            PackageRelationship defRelationship = Package.GetRelationshipsByType("http://schemas.octgn.org/set/definition").First();
            PackagePart         definition      = Package.GetPart(defRelationship.TargetUri);
            XmlNodeList         cards           = Doc.GetElementsByTagName("card");
            var    markers    = Doc.GetElementsByTagName("marker");
            string extractDir = Path.Combine(UnpackBase, "SetImages", GameId.ToString(), "Sets", Id.ToString(), "Cards");

            foreach (XmlNode card in cards)
            {
                Guid        cardID    = new Guid(card.Attributes["id"].Value);
                Uri         cardImage = definition.GetRelationship("C" + cardID.ToString("N")).TargetUri;
                string      imageUri  = cardImage.ToString();
                string      fileName  = cardID.ToString() + imageUri.Substring(imageUri.LastIndexOf('.'));
                PackagePart part      = Package.GetPart(cardImage);
                ExtractPart(part, extractDir, fileName);
            }
            extractDir = Path.Combine(UnpackBase, "SetImages", GameId.ToString(), "Sets", Id.ToString(), "Markers");
            foreach (XmlNode marker in markers)
            {
                var         id        = new Guid(marker.Attributes["id"].Value);
                Uri         cardImage = definition.GetRelationship("M" + id.ToString("N")).TargetUri;
                string      imageUri  = cardImage.ToString();
                string      fileName  = id.ToString() + imageUri.Substring(imageUri.LastIndexOf('.'));
                PackagePart part      = Package.GetPart(cardImage);
                ExtractPart(part, extractDir, fileName);
            }
        }
Exemplo n.º 3
0
        public void JoinGame(UserId userId, GameId gameId, Color?color)
        {
            var user = _unitOfWork.WithUserTransaction(tran => {
                var user = _userRepository.FindById(userId);
                return(tran.CommitWith(user));
            });

            _unitOfWork.WithGameTransaction(tran => {
                var game = _gameRepository.FindByIdOrNull(gameId);

                if (game is null)
                {
                    throw new ManualValidationException("Game not found");
                }

                var idPool   = _idGenerator.ReservePool();
                var userInfo = new UserInfo(user.Id, user.Username, user.Rank);
                var player   = _gameFactory.BuildPlayer(idPool, userInfo, color ?? GetRemainingColor(game));
                game.JoinGame(player, player.CreatedAt);

                _gameRepository.Save(game);

                tran.Commit();
            });
        }
Exemplo n.º 4
0
        private void SaveBut_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(IDEdit.Text) ||
                string.IsNullOrEmpty(NameEdit.Text) ||
                string.IsNullOrEmpty(TargetId.Text) ||
                string.IsNullOrEmpty(Weight.Text) ||
                string.IsNullOrEmpty(IntranetAddress.Text) ||
                string.IsNullOrEmpty(BaseUrl.Text)
                )
            {
                MessageBox.Show("有些事情,你不能空着的", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
                return;
            }
            var    query = new Dictionary <string, string>();
            string queryString;
            string Url;

            if (editType == CommandMode.Insert)
            {
                query["serverID"]        = IDEdit.Text;
                query["gameID"]          = GameId.ToString();
                query["serverName"]      = NameEdit.Text;
                query["serverUrl"]       = BaseUrl.Text;
                query["status"]          = string.Format("{0}", Status.SelectedIndex);
                query["intranetAddress"] = IntranetAddress.Text;
                queryString = HttpUtils.BuildPostParams(query);
                Url         = HttpHelp.getInst().URL + "/DirService.asmx/AddServer";
                HttpHelp.getInst().httpPost(Url, queryString, Encoding.UTF8);
            }
            else
            {
                query["serverID"]        = IDEdit.Text;
                query["gameID"]          = GameId.ToString();
                query["serverName"]      = NameEdit.Text;
                query["serverUrl"]       = BaseUrl.Text;
                query["status"]          = string.Format("{0}", Status.SelectedIndex);
                query["weight"]          = Weight.Text;
                query["intranetAddress"] = IntranetAddress.Text;
                queryString = HttpUtils.BuildPostParams(query);
                Url         = HttpHelp.getInst().URL + "/DirService.asmx/SetServer";
                HttpHelp.getInst().httpPost(Url, queryString, Encoding.UTF8);
            }
            //还要设置是否开启
            query.Clear();
            query["serverID"] = IDEdit.Text;
            query["gameID"]   = GameId.ToString();
            query["isEnable"] = string.Format("{0}", EnabledBox.SelectedIndex != 0 ? true : false);
            queryString       = HttpUtils.BuildPostParams(query);
            Url = HttpHelp.getInst().URL + "/DirService.asmx/EnableServer";
            HttpHelp.getInst().httpPost(Url, queryString, Encoding.UTF8);
            //开启时间
            query.Clear();
            query["serverID"]   = IDEdit.Text;
            query["gameID"]     = GameId.ToString();
            query["enableDate"] = tpStartDate.Text;
            queryString         = HttpUtils.BuildPostParams(query);
            Url = HttpHelp.getInst().URL + "/DirService.asmx/SetServerEnableDate";
            HttpHelp.getInst().httpPost(Url, queryString, Encoding.UTF8);
            Close();
        }
    public static GameDetailInfo parseGameInfo(GameId gameId, int index, GMUser user)
    {
        MoneyItemDetail item = getMoneyItem(index, user);

        if (item == null)
        {
            return(null);
        }

        object info = null;

        switch (gameId)
        {
        case GameId.baccarat:
        {
            info = parseInfoBaccarat(item.m_exInfo);
        }
        break;

        case GameId.cows:
        {
            info = parseInfoCows(item.m_exInfo, user);
        }
        break;

        case GameId.crocodile:
        {
            info = parseInfoCrocodile(item.m_exInfo);
        }
        break;

        case GameId.dice:
        {
            info = parseInfoDice(item.m_exInfo);
        }
        break;

        case GameId.fishpark:
        {
            info = parseInfoFishPark(item.m_exInfo);
        }
        break;

        case GameId.shcd:
        {
            info = parseInfoShcd(item.m_exInfo);
        }
        break;
        }
        if (info == null)
        {
            return(null);
        }

        GameDetailInfo resInfo = new GameDetailInfo();

        resInfo.m_item       = item;
        resInfo.m_detailInfo = info;
        return(resInfo);
    }
Exemplo n.º 6
0
        public void Update()
        {
            var currentFrame = ZetaDia.Memory.Executor.FrameCount;

            if (!ZetaDia.IsInGame)
            {
                return;
            }

            var gameId = ZetaDia.Service.CurrentGameId;

            if (_gameId != gameId)
            {
                s_logger.Debug($"[{nameof(Update)}] Game Change Detected");
                ZetaDia.Actors.Update();
                _gameId = gameId;
                return;
            }

            if (ZetaDia.Actors.Me == null || !ZetaDia.Actors.Me.IsFullyValid())
            {
                ZetaDia.Actors.Update();
            }

            ActivePlayerRActorId = ZetaDia.ActivePlayerRActorId;
            ActivePlayerPosition = ZetaDia.Me.Position;

            UpdateRActors();
            UpdateInventory();

            LastUpdatedFrame = currentFrame;
            LastWorldSnoId   = ZetaDia.Globals.WorldSnoId;
        }
Exemplo n.º 7
0
        public static void FullRandomGame(
            SabberStonePython.API.SabberStonePython.SabberStonePythonClient stub,
            string deck, int count)
        {
            var rnd = new Random();

            Game game = stub.NewGame(new DeckStrings
            {
                Deck1 = deck,
                Deck2 = deck
            });

            var id = new GameId(game.Id);

            for (int i = 0; i < count; i++)
            {
                while (game.State != Game.Types.State.Complete)
                {
                    Options options = stub.GetOptions(id);
                    Option  option  = options.List[rnd.Next(options.List.Count)];
                    game = stub.Process(option);
                }

                game = stub.Reset(id);

                Console.WriteLine($"{i + 1}th game is finished.");
            }
        }
Exemplo n.º 8
0
        public HttpResponseMessage Post([FromBody] PostFromBody postFromBody)
        {
            if (postFromBody == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NotAcceptable,
                                              "You must provide a player name."));
            }

            if (string.IsNullOrEmpty(postFromBody.Name))
            {
                return(Request.CreateResponse(HttpStatusCode.NotAcceptable,
                                              "You must provide a player name."));
            }

            Game game = new Game(postFromBody.Name);

            if (Games == null)
            {
                Games = new Dictionary <string, Game>();
            }

            Games.Add(game.ID, game);

            // Checks that everything went fine during the creation of the new game session
            GameId gameId = new GameId(game.ID);

            if (gameId.Game.IsVoid)
            {
                return(Request.CreateResponse(gameId.StatusCode, gameId.Message));
            }

            return(Request.CreateResponse(HttpStatusCode.OK,
                                          new PlayerEnteredGame(game.ID, postFromBody.Name)));
        }
Exemplo n.º 9
0
        public State GetState(GameId gameId)
        {
            var game = gameRepository.GetById(gameId);
            var acceptingAnswersResult = Domain.Game.isAcceptingAnswers(game);

            if (acceptingAnswersResult.IsNotEnoughPlayers)
            {
                var notEnoughPlayers = ((Domain.Game.IsAcceptingAnswers.NotEnoughPlayers)acceptingAnswersResult).Item;
                return(new NotEnoughPlayers(notEnoughPlayers.NumberOfMorePlayersNeeded));
            }
            var question = Domain.Game.currentQuestion(game).Value;

            if (question.IsSingleAnswerQuestion)
            {
                var singleQuestion = ((DomainTypes.Question.SingleAnswerQuestion)question).Item;

                return(new ActiveQuestion(
                           Domain.Game.targetPlayer(game).Value.Name,
                           singleQuestion.Text
                           ));

                //return new SingleAnswerAnsweredQuestion(
                //    Guid.Empty,
                //    singleQuestion.Text,
                //    singleQuestion.Options.Select(option => new SingleAnswerAnsweredQuestion.Option(option.Value.Text, option.Key.Item)),
                //    new List<SingleAnswerAnsweredQuestion.Answer>()
                //);
            }

            return(null);
        }
Exemplo n.º 10
0
        public override IDictionary <string, object> CreateQueryMap()
        {
            var dict = new Dictionary <string, object>();

            if (First.IsSpecified)
            {
                dict["first"] = First.ToString();
            }
            if (After.IsSpecified)
            {
                dict["after"] = After.ToString();
            }
            if (GameId.IsSpecified)
            {
                dict["game_id"] = GameId.ToString();
            }
            if (StartedAt.IsSpecified)
            {
                dict["started_at"] = XmlConvert.ToString(StartedAt.Value, XmlDateTimeSerializationMode.Utc);
            }
            if (EndedAt.IsSpecified)
            {
                dict["ended_at"] = XmlConvert.ToString(EndedAt.Value, XmlDateTimeSerializationMode.Utc);
            }
            if (Type.IsSpecified)
            {
                dict["type"] = Type.ToString();
            }
            return(dict);
        }
Exemplo n.º 11
0
        public ActionResult NextDay(GameId gameId)
        {
            var cmd    = new NextDayCommand(repo);
            var result = cmd.Execute(gameId);

            return(Json(result));
        }
Exemplo n.º 12
0
        public async Task <Game> JoinGame(GameId gameId, PlayerId playerId)
        {
            var game = games.FirstOrDefault(x => x.Id == gameId);

            if (game is null || game.Players.Count() > 5)
            {
                return(null);
            }

            var player   = GetPlayer(playerId);
            var isInGame = games.Any(x => x.Players.Contains(player));

            if (player is null || isInGame)
            {
                return(null);
            }

            game.AddPlayer(player);
            await gameHub.Clients.All.SendAsync("Message", new Message
            {
                Name = "GameUpdated",
                Body = game.Id.ToString(),
            });

            return(game);
        }
        public FootballGame Find(GameId gameId)
        {
            using (var context = new TimeLineContext())
            {
                var entity = context.FootballGames.SingleOrDefault(g =>
                                                                   g.AwayTeam == gameId.AwayTeam &&
                                                                   g.HomeTeam == gameId.HomeTeam &&
                                                                   g.League == gameId.League
                                                                   );

                if (entity == null)
                {
                    return(FootballGame.Null);
                }

                List <EventData> eventDatas = context.EventDatas
                                              .Where(x => x.FootballGameId == entity.Id)
                                              .ToList();

                var events = eventDatas
                             .Select(ConvertToModel);

                var game = new FootballGameProxy(entity);
                game.LoadEvents(events);
                return(game);
            }
        }
Exemplo n.º 14
0
        public async Task AddPlayerAsync(IEndPlayerInfo endPlayerInfo)
        {
            Logger.LogInformation("Game.AddPlayer {@endPlayerInfo}", endPlayerInfo);

            var newPlayer = (Status == GameStatus.WaitingForPlayers)
                ? new Player(endPlayerInfo, CheeseCount, _allNumbers)
                : new Player(endPlayerInfo);

            if (PlayerDictionary.TryAdd(endPlayerInfo.PlayerId, newPlayer))
            {
                if (Status == GameStatus.WaitingForPlayers && PlayerDictionary.Count >= Size)
                {
                    Status = GameStatus.Playing;
                }

                await LobbyHubContext.Groups.AddToGroupAsync(endPlayerInfo.ConnectionId, GameId.ToString()).ConfigureAwait(false);

                if (newPlayer.Status == PlayerStatus.Playing)
                {
                    // Tell the player their numbers
                    await LobbyHubContext.Clients.Client(endPlayerInfo.ConnectionId).LobbyPlayerNumbers(this, newPlayer as IPlayerData).ConfigureAwait(false);

                    // Tell everyone else in the game the text message version
                    await LobbyHubContext.Clients.GroupExcept(GameId.ToString(), endPlayerInfo.ConnectionId).LobbyUserJoinedGame(this, $"{newPlayer.Info.User} joined game with numbers {string.Join(",", newPlayer.Draws.Select(d => d.Number))}").ConfigureAwait(false);
                }
            }
            else
            {
                Logger.LogWarning("Unable to add player {user} on {connectionId} to {gameId}",
                                  newPlayer.Info.User,
                                  endPlayerInfo.ConnectionId,
                                  GameId);
            }
        }
Exemplo n.º 15
0
        public void ShouldIgnoreMagixByteIfOnlyFoundOnce()
        {
            TestContext.WriteLine("gameId.search should ignore magic byte if only found once");

            var result = GameId.search(MAGIC_STRING, new byte[] { });

            Assert.That(result, Is.EqualTo(null));
        }
Exemplo n.º 16
0
        public void ShouldReturnUndefinedIfMagixByteFound()
        {
            TestContext.WriteLine("gameId.search should return undefined if magix byte found");

            var result = GameId.search(new byte[] {}, new byte[] {});

            Assert.That(result, Is.EqualTo(null));
        }
Exemplo n.º 17
0
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = new GameId();
     Field0.Parse(buffer);
     Field1 = new EntityId();
     Field1.Parse(buffer);
     Field2 = buffer.ReadInt(5) + (-1);
 }
Exemplo n.º 18
0
 public static bool IsInGroup(this GameId id, GameIdGroup group)
 {
     if (!_groups.TryGetValue(id, out var groups))
     {
         return(false);
     }
     return(groups.Contains(group));
 }
Exemplo n.º 19
0
        public JoinPageViewModel(INavigationService navigationService) : base(navigationService)
        {
            GameId.SetValidateAttribute(() => GameId);

            EnterCommand = GameId.ObserveHasErrors.Inverse()
                           .ToAsyncReactiveCommand()
                           .WithSubscribe(() => NavigationService.GoBackAsync((GameIdParameterKey, GameId.Value)));
        }
Exemplo n.º 20
0
 public Game(GameId id, string gameLayout = "")
 {
     Id         = id;
     boardState = BoardState.Empty;
     status     = GameStatus.Playing;
     board      = new Board();
     SetGameLayout(gameLayout);
 }
        private (Team homeTeam, Team awayTeam) GetTeams(GameId gameId, Season season)
        {
            var teams    = GetTeams(season);
            var homeTeam = teams.Single(t => t.team_name == gameId.HomeTeam);
            var awayTeam = teams.Single(t => t.team_name == gameId.AwayTeam);

            return(homeTeam, awayTeam);
        }
Exemplo n.º 22
0
        public void Handle(JoinGameCommand command)
        {
            var gameId    = GameId.NewGameId(command.GameId);
            var playerId  = PlayerId.NewPlayerId(command.PlayerId);
            var joinEvent = Domain.Game.join(playerId, command.PlayerName);

            eventStore.Add(gameId, joinEvent);
        }
Exemplo n.º 23
0
 public GameInitialEvent(string id, int version, DateTimeOffset occuredDate, GameId gameId, IReadOnlyCollection <Team> teams, GameStatus status, string score)
     : base(id, version, occuredDate)
 {
     GameId = gameId;
     Teams  = teams;
     Status = status;
     Score  = score;
 }
Exemplo n.º 24
0
        public async Task AddEventAsync(GameId gameId, GameEvent gameEvent, CancellationToken cancellationToken)
        {
            if (gameId == null)
            {
                throw new ArgumentNullException(nameof(gameId));
            }

            if (gameEvent == null)
            {
                throw new ArgumentNullException(nameof(gameEvent));
            }

            cancellationToken.ThrowIfCancellationRequested();

            using var connection = await _connectionFactory.CreateAndOpenAsync(cancellationToken);

            using var transaction = connection.BeginTransaction();

            int surrogateGameId;

            {
                var command = new CommandDefinition(
                    commandText: "SELECT id FROM game WHERE game_id = @gameId;",
                    parameters: new { gameId },
                    transaction,
                    cancellationToken: cancellationToken
                    );

                surrogateGameId = await connection.QuerySingleAsync <int>(command);
            }

            // Couldn't figure out how to support INSERT with composite types with Dapper, so ADO.NET to the rescue.
            using (var command = connection.CreateCommand())
            {
                var commandText = @"
                        INSERT INTO
                            game_event (game_id, idx, by_player_id, card_drawn, card_used, chip, coord, next_player_id, sequences, winner)
                        VALUES
                            (@gameId, @idx, @byPlayerId, @cardDrawn, @cardUsed, @chip, @coord, @nextPlayerId, @sequences, @winner);";

                command.CommandText = commandText;
                command.Parameters.AddWithValue("@gameId", surrogateGameId);
                command.Parameters.AddWithValue("@idx", gameEvent.Index);
                command.Parameters.AddWithValue("@byPlayerId", gameEvent.ByPlayerId.Value);
                command.Parameters.AddWithValue("@cardDrawn", CardComposite.FromCard(gameEvent.CardDrawn) as object ?? DBNull.Value);
                command.Parameters.AddWithValue("@cardUsed", CardComposite.FromCard(gameEvent.CardUsed) !);
                command.Parameters.AddWithValue("@chip", gameEvent.Chip as object ?? DBNull.Value);
                command.Parameters.AddWithValue("@coord", CoordComposite.FromCoord(gameEvent.Coord));
                command.Parameters.AddWithValue("@nextPlayerId", gameEvent.NextPlayerId?.Value as object ?? DBNull.Value);
                command.Parameters.AddWithValue("@sequences", gameEvent.Sequences.Select(SequenceComposite.FromSequence).ToArray());
                command.Parameters.AddWithValue("@winner", gameEvent.Winner as object ?? DBNull.Value);
                command.Transaction = transaction;

                await command.ExecuteNonQueryAsync(cancellationToken);
            }

            await transaction.CommitAsync(cancellationToken);
        }
Exemplo n.º 25
0
        public void Add(GameId gameId, GameEvent @event)
        {
            if (!events.ContainsKey(gameId))
            {
                events.Add(gameId, new List <GameEvent>());
            }

            events[gameId].Add(@event);
        }
Exemplo n.º 26
0
 public static string GetFilePath(string path, GameId gameId)
 {
     if (!_fileDirectories.TryGetValue(gameId, out string fileDirectory))
     {
         return(null);
     }
     path = Path.Combine(fileDirectory, path);
     return(File.Exists(path) ? path : null);
 }
Exemplo n.º 27
0
        public async Task <ActionResult> Get(
            [FromRoute] Guid id,
            CancellationToken cancellationToken)
        {
            var gameId = new GameId(id);
            var moves  = await _handler.GetMovesForPlayerAsync(gameId, Player, cancellationToken);

            return(Ok(moves));
        }
Exemplo n.º 28
0
        protected async Task AddEventAsync(
            NpgsqlConnectionFactory connectionFactory,
            GameId gameId,
            GameEvent gameEvent)
        {
            var gameEventStore = new PostgresGameEventStore(connectionFactory);

            await gameEventStore.AddEventAsync(gameId, gameEvent, CancellationToken.None);
        }
Exemplo n.º 29
0
        public override int GetHashCode()
        {
            var hashCode = -497176057;

            hashCode = hashCode * -1521134295 + GameId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <Guid> .Default.GetHashCode(PlayerGuid);

            return(hashCode);
        }
Exemplo n.º 30
0
        public async Task DeleteGame(GameId id)
        {
            var game = await context.Games.FindAsync((Guid)id);

            if (game != null)
            {
                context.Games.Remove(game);
            }
        }
Exemplo n.º 31
0
Arquivo: Game.cs Projeto: BUFORD/Funky
        internal bool RefreshGameId()
        {
            GameId curgameID = _currentGameId;
            using (ZetaDia.Memory.AcquireFrame())
            {
                curgameID = ZetaDia.Service.CurrentGameId;
            }

            if (!curgameID.Equals(_currentGameId))
            {

                Logger.Write(LogLevel.OutOfCombat, "New Game Started");

                //Merge last GameStats with the Total
                TrackingStats.GameChanged(ref CurrentGameStats);

                //Create new GameStats
                CurrentGameStats = new GameStats();

                //Update Account Details
                Bot.Character.Account.UpdateCurrentAccountDetails();

                //Clear TrinityLoadOnce Used Profiles!
                TrinityLoadOnce.UsedProfiles.Clear();

                //Clear Interactable Cache
                Profile.InteractableObjectCache.Clear();

                //Clear Health Average
                ObjectCache.Objects.ClearHealthAverageStats();

                //Renew bot
                Funky.ResetBot();

                //Gold Inactivity
                GoldTimeoutChecker.LastCoinageUpdate = DateTime.Now;

                _currentGameId = curgameID;
                return true;
            }

            return false;
        }
Exemplo n.º 32
0
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = new GameId();
     Field0.Parse(buffer);
     Field1 = new EntityId();
     Field1.Parse(buffer);
     Field2 = buffer.ReadInt(5) + (-1);
 }
Exemplo n.º 33
0
        public uint Property(ImuseProperty prop, uint value)
        {
            lock (_mutex)
            {
                switch (prop)
                {
                    case ImuseProperty.TempoBase:
                    // This is a specified as a percentage of normal
                    // music speed. The number must be an integer
                    // ranging from 50 to 200(for 50% to 200% normal speed).
                        if (value >= 50 && value <= 200)
                            TempoFactor = (int)value;
                        break;

                    case ImuseProperty.NativeMt32:
                        _native_mt32 = (value > 0);
                        Instrument.NativeMT32(_native_mt32);
                        if (_midi_native != null && _native_mt32)
                            InitMT32(_midi_native);
                        break;

                    case ImuseProperty.Gs:
                        _enable_gs = (value > 0);

                    // GS Mode emulates MT-32 on a GS device, so _native_mt32 should always be true
                        if (_midi_native != null && _enable_gs)
                        {
                            _native_mt32 = true;
                            InitGM(_midi_native);
                        }
                        break;

                    case ImuseProperty.LimitPlayers:
                        if (value > 0 && value <= _players.Length)
                            _player_limit = (int)value;
                        break;

                    case ImuseProperty.RecyclePlayers:
                        _recycle_players = (value != 0);
                        break;

                    case ImuseProperty.GameId:
                        _game_id = (GameId)value;
                        break;

                    case ImuseProperty.PcSpeaker:
                        PcSpeaker = (value != 0);
                        break;
                }

                return 0;
            }
        }
 public void Parse(GameBitBuffer buffer)
 {
     Field0 = new RequiredMessageHeader();
     Field0.Parse(buffer);
     Field1 = new GameId();
     Field1.Parse(buffer);
 }
 public void Parse(GameBitBuffer buffer)
 {
     Field0 = new RequiredMessageHeader();
     Field0.Parse(buffer);
     Field1 = new EntityId();
     Field1.Parse(buffer);
     Field2 = new GameId();
     Field2.Parse(buffer);
     Field3 = buffer.ReadInt(32);
     Field4 = buffer.ReadInt64(64);
     Field5 = buffer.ReadInt(4) + (2);
     Field6 = buffer.ReadInt(32);
     Field7 = buffer.ReadInt(32);
 }
 public void Parse(GameBitBuffer buffer)
 {
     Field0 = new RequiredMessageHeader();
     Field0.Parse(buffer);
     Field1 = buffer.ReadInt(3) + (-1);
     Field2 = new GameId();
     Field2.Parse(buffer);
     Field3 = buffer.ReadInt64(64);
     Field4 = buffer.ReadInt(3) + (-1);
     Field5 = buffer.ReadInt(32);
     Field6 = buffer.ReadInt(16);
     Field7 = buffer.ReadInt(32);
     Field8 = (ushort)buffer.ReadInt(16);
 }
Exemplo n.º 37
0
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = buffer.ReadInt(2);
     Field1 = new GameId();
     Field1.Parse(buffer);
 }
 public void Parse(GameBitBuffer buffer)
 {
     Field0 = new RequiredMessageHeader();
     Field0.Parse(buffer);
     Field1 = new GameId();
     Field1.Parse(buffer);
     Field2 = new EntityId();
     Field2.Parse(buffer);
     Field3 = buffer.ReadInt(5) + (-1);
 }
 public void Parse(GameBitBuffer buffer)
 {
     Field0 = new RequiredMessageHeader();
     Field0.Parse(buffer);
     Field1 = buffer.ReadInt(2);
     Field2 = new GameId();
     Field2.Parse(buffer);
 }
Exemplo n.º 40
0
 public BackupHandler(GameId game_id, string archive_name, List<DetectedFile> saves)
 {
     game = game_id;
     this.archive_name = archive_name;
     this.saves = saves;
 }
Exemplo n.º 41
0
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = buffer.ReadInt(3) + (-1);
     Field1 = new GameId();
     Field1.Parse(buffer);
     Field2 = buffer.ReadInt64(64);
     Field3 = buffer.ReadInt(3) + (-1);
     Field4 = buffer.ReadInt(32);
     Field5 = buffer.ReadInt(16);
     Field6 = buffer.ReadInt(32);
     Field7 = (ushort)buffer.ReadInt(16);
 }
Exemplo n.º 42
0
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = new EntityId();
     Field0.Parse(buffer);
     Field1 = new GameId();
     Field1.Parse(buffer);
     Field2 = buffer.ReadInt(32);
     Field3 = buffer.ReadInt64(64);
     Field4 = buffer.ReadInt(4) + (2);
     Field5 = buffer.ReadInt(32);
     Field6 = buffer.ReadInt(32);
 }
Exemplo n.º 43
0
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = new GameId();
     Field0.Parse(buffer);
 }