// Token: 0x06001C95 RID: 7317 RVA: 0x000905E0 File Offset: 0x0008E7E0
    public static bool CanJoinGame(GameRoomData game)
    {
        bool flag = !game.IsFull && GameRoomHelper.IsLevelAllowed(game, PlayerDataManager.PlayerLevel);

        flag |= (PlayerDataManager.AccessLevel >= MemberAccessLevel.Moderator);
        return(flag & Singleton <MapManager> .Instance.HasMapWithId(game.MapID));
    }
Exemple #2
0
    // Token: 0x06001D74 RID: 7540 RVA: 0x000929DC File Offset: 0x00090BDC
    protected override int OnCompare(GameRoomData a, GameRoomData b)
    {
        int result = 0;

        if (GameDataComparer.SortAscending)
        {
            if (!a.IsPasswordProtected && !b.IsPasswordProtected)
            {
                result = 2;
            }
            else if (!a.IsPasswordProtected)
            {
                result = 1;
            }
            else if (!b.IsPasswordProtected)
            {
                result = -1;
            }
        }
        else if (a.IsPasswordProtected && b.IsPasswordProtected)
        {
            result = 2;
        }
        else if (a.IsPasswordProtected)
        {
            result = 1;
        }
        else if (b.IsPasswordProtected)
        {
            result = -1;
        }
        return(result);
    }
        // Token: 0x060010CC RID: 4300 RVA: 0x0001744C File Offset: 0x0001564C
        public static GameRoomData Deserialize(Stream bytes)
        {
            int          num          = Int32Proxy.Deserialize(bytes);
            GameRoomData gameRoomData = new GameRoomData();

            gameRoomData.ConnectedPlayers = Int32Proxy.Deserialize(bytes);
            gameRoomData.GameFlags        = Int32Proxy.Deserialize(bytes);
            gameRoomData.GameMode         = EnumProxy <GameModeType> .Deserialize(bytes);

            if ((num & 1) != 0)
            {
                gameRoomData.Guid = StringProxy.Deserialize(bytes);
            }
            gameRoomData.IsPasswordProtected = BooleanProxy.Deserialize(bytes);
            gameRoomData.IsPermanentGame     = BooleanProxy.Deserialize(bytes);
            gameRoomData.KillLimit           = Int32Proxy.Deserialize(bytes);
            gameRoomData.LevelMax            = ByteProxy.Deserialize(bytes);
            gameRoomData.LevelMin            = ByteProxy.Deserialize(bytes);
            gameRoomData.MapID = Int32Proxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                gameRoomData.Name = StringProxy.Deserialize(bytes);
            }
            gameRoomData.Number      = Int32Proxy.Deserialize(bytes);
            gameRoomData.PlayerLimit = Int32Proxy.Deserialize(bytes);
            if ((num & 4) != 0)
            {
                gameRoomData.Server = ConnectionAddressProxy.Deserialize(bytes);
            }
            gameRoomData.TimeLimit = Int32Proxy.Deserialize(bytes);
            return(gameRoomData);
        }
Exemple #4
0
 // Token: 0x06001D7B RID: 7547 RVA: 0x00092AB4 File Offset: 0x00090CB4
 protected override int OnCompare(GameRoomData x, GameRoomData y)
 {
     if (GameRoomHelper.HasLevelRestriction(x) || GameRoomHelper.HasLevelRestriction(y))
     {
         return((this._playerLevel >= 5) ? this.VeteranLevelsUp(x, y) : this.NoobLevelsUp(x, y));
     }
     return(this._baseComparer.Compare(x, y));
 }
Exemple #5
0
 // Token: 0x060012F1 RID: 4849 RVA: 0x00021184 File Offset: 0x0001F384
 private void RoomEntered(byte[] _bytes)
 {
     using (MemoryStream memoryStream = new MemoryStream(_bytes))
     {
         GameRoomData game = GameRoomDataProxy.Deserialize(memoryStream);
         this.OnRoomEntered(game);
     }
 }
Exemple #6
0
        // Token: 0x060012F8 RID: 4856 RVA: 0x00021394 File Offset: 0x0001F594
        private void GetGameInformation(byte[] _bytes)
        {
            using (MemoryStream memoryStream = new MemoryStream(_bytes))
            {
                GameRoomData         room    = GameRoomDataProxy.Deserialize(memoryStream);
                List <GameActorInfo> players = ListProxy <GameActorInfo> .Deserialize(memoryStream, new ListProxy <GameActorInfo> .Deserializer <GameActorInfo>(GameActorInfoProxy.Deserialize));

                int endTime = Int32Proxy.Deserialize(memoryStream);
                this.OnGetGameInformation(room, players, endTime);
            }
        }
 // Token: 0x060019AD RID: 6573 RVA: 0x00088564 File Offset: 0x00086764
 public void CreateGame(GameRoomData data, string password)
 {
     if (base.IsConnected)
     {
         base.Operations.SendCreateRoom(data, password, "4.7.1", PlayerDataManager.AuthToken, PlayerDataManager.MagicHash);
     }
     else
     {
         this.onConnectAction = delegate()
         {
             this.Operations.SendCreateRoom(data, password, "4.7.1", PlayerDataManager.AuthToken, PlayerDataManager.MagicHash);
         };
         base.Connect(data.Server.ConnectionString);
     }
 }
        // Token: 0x060010CB RID: 4299 RVA: 0x00017308 File Offset: 0x00015508
        public static void Serialize(Stream stream, GameRoomData instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, instance.ConnectedPlayers);
                Int32Proxy.Serialize(memoryStream, instance.GameFlags);
                EnumProxy <GameModeType> .Serialize(memoryStream, instance.GameMode);

                if (instance.Guid != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Guid);
                }
                else
                {
                    num |= 1;
                }
                BooleanProxy.Serialize(memoryStream, instance.IsPasswordProtected);
                BooleanProxy.Serialize(memoryStream, instance.IsPermanentGame);
                Int32Proxy.Serialize(memoryStream, instance.KillLimit);
                ByteProxy.Serialize(memoryStream, instance.LevelMax);
                ByteProxy.Serialize(memoryStream, instance.LevelMin);
                Int32Proxy.Serialize(memoryStream, instance.MapID);
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 2;
                }
                Int32Proxy.Serialize(memoryStream, instance.Number);
                Int32Proxy.Serialize(memoryStream, instance.PlayerLimit);
                if (instance.Server != null)
                {
                    ConnectionAddressProxy.Serialize(memoryStream, instance.Server);
                }
                else
                {
                    num |= 4;
                }
                Int32Proxy.Serialize(memoryStream, instance.TimeLimit);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemple #9
0
    // Token: 0x0600132D RID: 4909 RVA: 0x00070390 File Offset: 0x0006E590
    internal string GetServerName(GameRoomData room)
    {
        string result = string.Empty;

        if (room != null && room.Server != null)
        {
            foreach (PhotonServer photonServer in this._gameServers.Values)
            {
                if (photonServer.ConnectionString == room.Server.ConnectionString)
                {
                    result = photonServer.Name;
                    break;
                }
            }
        }
        return(result);
    }
    // Token: 0x06001349 RID: 4937 RVA: 0x00070AE0 File Offset: 0x0006ECE0
    public void JoinNetworkGame(GameRoomData data)
    {
        if (data.Server != null)
        {
            float time = Time.time;
            ProgressPopupDialog dialog = PopupSystem.ShowProgress("Authentication", "Connecting to Server", () => Mathf.Clamp(Time.time - time, 0f, 3f));
            dialog.SetCancelable(delegate
            {
                PopupSystem.HideMessage(dialog);
            });
            Singleton <ChatManager> .Instance.InGameDialog.Clear();

            this.Client.JoinGame(data.Server.ConnectionString, data.Number, string.Empty);
        }
        else
        {
            PopupSystem.ShowError("Game not found", "The game doesn't exist anymore.", PopupSystem.AlertType.OK);
        }
    }
 // Token: 0x060012B7 RID: 4791 RVA: 0x0001FD84 File Offset: 0x0001DF84
 public void SendCreateRoom(GameRoomData metaData, string password, string clientVersion, string authToken, string magicHash)
 {
     using (MemoryStream memoryStream = new MemoryStream())
     {
         GameRoomDataProxy.Serialize(memoryStream, metaData);
         StringProxy.Serialize(memoryStream, password);
         StringProxy.Serialize(memoryStream, clientVersion);
         StringProxy.Serialize(memoryStream, authToken);
         StringProxy.Serialize(memoryStream, magicHash);
         Dictionary <byte, object> customOpParameters = new Dictionary <byte, object>
         {
             {
                 this.__id,
                 memoryStream.ToArray()
             }
         };
         if (this.sendOperation != null)
         {
             this.sendOperation(6, customOpParameters, true, 0, false);
         }
     }
 }
Exemple #12
0
        public ActionResult <GameRoomData> Create(GameRoomData roomData)
        {
            var name = roomData.Name;

            if (string.IsNullOrWhiteSpace(name))
            {
                throw new System.ArgumentException("invalid room name given");
            }
            if (_repo.ExistsWithName(name))
            {
                return(BadRequest($"Room name '{name}' taken"));
            }

            var players = roomData.Players
                          .Select(p => new PlayerInfo(p.Name, p.IsHuman ? PlayerType.Human : PlayerType.Bot))
                          .ToList();
            var room = new EumelGameRoomDefinition(name, players);

            _repo.Insert(room);

            return(NoContent());
            // return CreatedAtRoute(nameof(GetRoom), new { name = room.Name }, room);
        }
    // Token: 0x06001348 RID: 4936 RVA: 0x00070A08 File Offset: 0x0006EC08
    public void CreateNetworkGame(string server, int mapId, GameModeType mode, string name, string password, int timeMinutes, int killLimit, int playerLimit, int minLevel, int maxLevel, GameFlags.GAME_FLAGS flags)
    {
        GameRoomData data = new GameRoomData
        {
            Name        = name,
            Server      = new ConnectionAddress(server),
            MapID       = mapId,
            TimeLimit   = timeMinutes,
            PlayerLimit = playerLimit,
            GameMode    = mode,
            GameFlags   = (int)flags,
            KillLimit   = killLimit,
            LevelMin    = (byte)Mathf.Clamp(minLevel, 0, 255),
            LevelMax    = (byte)Mathf.Clamp(maxLevel, 0, 255)
        };
        float time = Time.time;
        ProgressPopupDialog dialog = PopupSystem.ShowProgress("Authentication", "Connecting to Server", () => Mathf.Clamp(Time.time - time, 0f, 3f));

        dialog.SetCancelable(delegate
        {
            PopupSystem.HideMessage(dialog);
        });
        this.Client.CreateGame(data, password);
    }
Exemple #14
0
    // Token: 0x060019C7 RID: 6599 RVA: 0x0008899C File Offset: 0x00086B9C
    public TeamDeathMatchRoom(GameRoomData gameData, GamePeer peer)
    {
        GameState.Current.MatchState.RegisterState(GameStateId.MatchRunning, new MatchRunningState(GameState.Current.MatchState));
        GameState.Current.MatchState.RegisterState(GameStateId.PregameLoadout, new PregameLoadoutState(GameState.Current.MatchState));
        GameState.Current.MatchState.RegisterState(GameStateId.PrepareNextRound, new PrepareNextRoundState(GameState.Current.MatchState));
        GameState.Current.MatchState.RegisterState(GameStateId.EndOfMatch, new EndOfMatchState(GameState.Current.MatchState));
        GameState.Current.MatchState.RegisterState(GameStateId.WaitingForPlayers, new WaitingForPlayersState(GameState.Current.MatchState));
        GameState.Current.MatchState.RegisterState(GameStateId.AfterRound, new AfterRoundState(GameState.Current.MatchState));
        GameState.Current.PlayerState.RegisterState(PlayerStateId.Overview, new PlayerOverviewState(GameState.Current.PlayerState));
        GameState.Current.PlayerState.RegisterState(PlayerStateId.Playing, new PlayerPlayingState(GameState.Current.PlayerState));
        GameState.Current.PlayerState.RegisterState(PlayerStateId.PrepareForMatch, new PlayerPrepareState(GameState.Current.PlayerState));
        GameState.Current.PlayerState.RegisterState(PlayerStateId.Killed, new PlayerKilledState(GameState.Current.PlayerState));
        GameState.Current.PlayerState.RegisterState(PlayerStateId.Paused, new PlayerPausedState(GameState.Current.PlayerState));
        GameState.Current.PlayerState.RegisterState(PlayerStateId.AfterRound, new PlayerAfterRoundState(GameState.Current.PlayerState));
        GameState.Current.PlayerState.RegisterState(PlayerStateId.Spectating, new PlayerSpectatingState(GameState.Current.PlayerState));
        GameState.Current.PlayerData.SendJumpUpdate     += base.Operations.SendJump;
        GameState.Current.PlayerData.SendMovementUpdate += base.Operations.SendUpdatePositionAndRotation;
        GameState.Current.RoomData                       = gameData;
        GameState.Current.Actions.ChangeTeam             = new Action(base.Operations.SendSwitchTeam);
        GameState.Current.Actions.IncreaseHealthAndArmor = delegate(int health, int armor)
        {
            base.Operations.SendIncreaseHealthAndArmor((byte)health, (byte)armor);
        };
        GameState.Current.Actions.RequestRespawn = new Action(base.Operations.SendRespawnRequest);
        GameState.Current.Actions.PickupPowerup  = delegate(int pickupID, PickupItemType type, int value)
        {
            base.Operations.SendPowerUpPicked(pickupID, (byte)type, (byte)value);
        };
        GameState.Current.Actions.OpenDoor       = new Action <int>(base.Operations.SendOpenDoor);
        GameState.Current.Actions.EmitQuickItem  = new Action <Vector3, Vector3, int, byte, int>(base.Operations.SendEmitQuickItem);
        GameState.Current.Actions.EmitProjectile = delegate(Vector3 origin, Vector3 direction, global::LoadoutSlotType slot, int projectileID, bool explode)
        {
            base.Operations.SendEmitProjectile(origin, direction, (byte)slot, projectileID, explode);
        };
        GameState.Current.Actions.RemoveProjectile = new Action <int, bool>(base.Operations.SendRemoveProjectile);
        GameState.Current.Actions.SingleBulletFire = new Action(base.Operations.SendSingleBulletFire);
        GameState.Current.Actions.KillPlayer       = delegate()
        {
            if (GameState.Current.IsInGame && GameState.Current.PlayerData.IsAlive)
            {
                base.Operations.SendDirectDeath();
            }
        };
        GameState.Current.Actions.DirectHitDamage = delegate(int targetCmid, ushort damage, BodyPart part, Vector3 force, byte slot, byte bullets)
        {
            base.Operations.SendDirectHitDamage(targetCmid, (byte)part, bullets, slot);
            if (PlayerDataManager.Cmid == targetCmid)
            {
                GameStateHelper.PlayerHit(targetCmid, damage, part, force);
            }
        };
        GameState.Current.Actions.ExplosionHitDamage = delegate(int targetCmid, ushort damage, Vector3 force, byte slot, byte distance)
        {
            base.Operations.SendExplosionDamage(targetCmid, slot, distance, force);
            if (PlayerDataManager.Cmid == targetCmid)
            {
                GameStateHelper.PlayerHit(targetCmid, damage, BodyPart.Body, force);
            }
        };
        GameState.Current.Actions.PlayerHitFeeback  = new Action <int, Vector3>(base.Operations.SendHitFeedback);
        GameState.Current.Actions.ActivateQuickItem = new Action <QuickItemLogic, int, int, bool>(base.Operations.SendActivateQuickItem);
        GameState.Current.Actions.JoinTeam          = delegate(TeamID team)
        {
            base.Operations.SendJoinGame(team);
            GameState.Current.MatchState.PopAllStates();
        };
        GameState.Current.Actions.JoinAsSpectator = delegate()
        {
            base.Operations.SendJoinAsSpectator();
            GameState.Current.MatchState.PopAllStates();
        };
        GameState.Current.Actions.KickPlayer  = new Action <int>(base.Operations.SendKickPlayer);
        GameState.Current.Actions.ChatMessage = new Action <string, byte>(base.Operations.SendChatMessage);
        GameState.Current.PlayerData.Actions.Clear();
        PlayerActions actions = GameState.Current.PlayerData.Actions;

        actions.UpdateKeyState = (Action <byte>)Delegate.Combine(actions.UpdateKeyState, new Action <byte>(peer.Operations.SendUpdateKeyState));
        PlayerActions actions2 = GameState.Current.PlayerData.Actions;

        actions2.SwitchWeapon = (Action <byte>)Delegate.Combine(actions2.SwitchWeapon, new Action <byte>(base.Operations.SendSwitchWeapon));
        PlayerActions actions3 = GameState.Current.PlayerData.Actions;

        actions3.UpdatePing = (Action <ushort>)Delegate.Combine(actions3.UpdatePing, new Action <ushort>(peer.Operations.SendUpdatePing));
        PlayerActions actions4 = GameState.Current.PlayerData.Actions;

        actions4.PausePlayer = (Action <bool>)Delegate.Combine(actions4.PausePlayer, new Action <bool>(base.Operations.SendIsPaused));
        PlayerActions actions5 = GameState.Current.PlayerData.Actions;

        actions5.SniperMode = (Action <bool>)Delegate.Combine(actions5.SniperMode, new Action <bool>(base.Operations.SendIsInSniperMode));
        PlayerActions actions6 = GameState.Current.PlayerData.Actions;

        actions6.AutomaticFire = (Action <bool>)Delegate.Combine(actions6.AutomaticFire, new Action <bool>(base.Operations.SendIsFiring));
        PlayerActions actions7 = GameState.Current.PlayerData.Actions;

        actions7.SetReadyForNextGame        = (Action <bool>)Delegate.Combine(actions7.SetReadyForNextGame, new Action <bool>(base.Operations.SendIsReadyForNextMatch));
        TabScreenPanelGUI.SortPlayersByRank = new Action <IEnumerable <GameActorInfo> >(GameStateHelper.SortTeamMatchPlayers);
        Singleton <QuickItemController> .Instance.IsConsumptionEnabled  = true;
        Singleton <QuickItemController> .Instance.Restriction.IsEnabled = true;
        Singleton <QuickItemController> .Instance.Restriction.RenewGameUses();

        AutoMonoBehaviour <UnityRuntime> .Instance.OnUpdate += this.OnUpdate;
        global::EventHandler.Global.AddListener <GlobalEvents.InputChanged>(new Action <GlobalEvents.InputChanged>(this.OnInputChangeEvent));
    }
Exemple #15
0
 // Token: 0x06001D7D RID: 7549 RVA: 0x00092B6C File Offset: 0x00090D6C
 private int VeteranLevelsUp(GameRoomData x, GameRoomData y)
 {
     return((int)(((x.LevelMin >= 5) ? x.LevelMin : (x.LevelMin + 100)) - ((y.LevelMin >= 5) ? y.LevelMin : (y.LevelMin + 100))));
 }
 // Token: 0x060012FC RID: 4860 RVA: 0x0000CF8C File Offset: 0x0000B18C
 public void AddGame(GameRoomData game)
 {
     this._gameList[game.Number] = game;
     this.UpdatePlayerCount();
 }
Exemple #17
0
 // Token: 0x060012E6 RID: 4838
 protected abstract void OnRoomEntered(GameRoomData game);
Exemple #18
0
 // Token: 0x06001D7C RID: 7548 RVA: 0x00092B08 File Offset: 0x00090D08
 private int NoobLevelsUp(GameRoomData x, GameRoomData y)
 {
     return((int)(((x.LevelMin >= 5 || x.LevelMin == 0) ? x.LevelMin : (x.LevelMin - 100)) - ((y.LevelMin >= 5 || y.LevelMin == 0) ? y.LevelMin : (y.LevelMin - 100))));
 }
Exemple #19
0
    // Token: 0x06001D79 RID: 7545 RVA: 0x00092A74 File Offset: 0x00090C74
    protected override int OnCompare(GameRoomData a, GameRoomData b)
    {
        int num = a.ConnectedPlayers - b.ConnectedPlayers;

        return((num != 0) ? ((!GameDataComparer.SortAscending) ? (-num) : num) : GameDataNameComparer.StaticCompare(a, b));
    }
 // Token: 0x06001C92 RID: 7314 RVA: 0x0001301E File Offset: 0x0001121E
 public static bool HasLevelRestriction(GameRoomData room)
 {
     return(room.LevelMin != 0 || room.LevelMax != 0);
 }
    // Token: 0x060019A5 RID: 6565 RVA: 0x0008836C File Offset: 0x0008656C
    protected override void OnRoomEntered(GameRoomData data)
    {
        Debug.Log("OnRoomJoined " + this.lastRoomJoined);
        GameState.Current.Reset();
        PopupSystem.ClearAll();
        this.lastRoomJoined = data.Number;
        GameState.Current.ResetRoundStartTime();
        base.Peer.FetchServerTimestamp();
        switch (data.GameMode)
        {
        case GameModeType.DeathMatch:
        {
            DeathMatchRoom gameMode = new DeathMatchRoom(data, this);
            Singleton <GameStateController> .Instance.SetGameMode(gameMode);

            this.currentRoom = gameMode;
            break;
        }

        case GameModeType.TeamDeathMatch:
        {
            TeamDeathMatchRoom gameMode2 = new TeamDeathMatchRoom(data, this);
            Singleton <GameStateController> .Instance.SetGameMode(gameMode2);

            this.currentRoom = gameMode2;
            break;
        }

        case GameModeType.EliminationMode:
        {
            TeamEliminationRoom gameMode3 = new TeamEliminationRoom(data, this);
            Singleton <GameStateController> .Instance.SetGameMode(gameMode3);

            this.currentRoom = gameMode3;
            break;
        }

        default:
            throw new NotImplementedException("GameMode not supported: " + data.GameMode);
        }
        base.AddRoomLogic(this.currentRoom, this.currentRoom.Operations);
        UberstrikeMap mapWithId = Singleton <MapManager> .Instance.GetMapWithId(data.MapID);

        if (mapWithId != null)
        {
            Singleton <MapManager> .Instance.LoadMap(mapWithId, delegate
            {
                GameStateHelper.EnterGameMode();
                GameState.Current.MatchState.SetState(GameStateId.PregameLoadout);
                foreach (GameActorInfo gameActorInfo in GameState.Current.Players.Values)
                {
                    if (!gameActorInfo.IsSpectator)
                    {
                        GameState.Current.InstantiateAvatar(gameActorInfo);
                    }
                }
                this.currentRoom.Operations.SendPowerUpRespawnTimes(PickupItem.GetRespawnDurations());
                List <Vector3> positions;
                List <byte> rotations;
                Singleton <SpawnPointManager> .Instance.GetAllSpawnPoints(data.GameMode, TeamID.NONE, out positions, out rotations);
                this.currentRoom.Operations.SendSpawnPositions(TeamID.NONE, positions, rotations);
                Singleton <SpawnPointManager> .Instance.GetAllSpawnPoints(data.GameMode, TeamID.RED, out positions, out rotations);
                this.currentRoom.Operations.SendSpawnPositions(TeamID.RED, positions, rotations);
                Singleton <SpawnPointManager> .Instance.GetAllSpawnPoints(data.GameMode, TeamID.BLUE, out positions, out rotations);
                this.currentRoom.Operations.SendSpawnPositions(TeamID.BLUE, positions, rotations);
                global::AvatarBuilder.UpdateLocalAvatar(Singleton <LoadoutManager> .Instance.Loadout.GetAvatarGear());
                GameState.Current.RoomData = data;
                AutoMonoBehaviour <CommConnectionManager> .Instance.Client.Lobby.Operations.SendUpdatePlayerRoom(new GameRoom
                {
                    Server = new ConnectionAddress(data.Server.ConnectionString),
                    Number = data.Number,
                    MapId  = data.MapID
                });
            });
        }
        else
        {
            Debug.LogError("Map not found");
        }
    }
Exemple #22
0
 // Token: 0x060012ED RID: 4845
 protected abstract void OnGetGameInformation(GameRoomData room, List <GameActorInfo> players, int endTime);
Exemple #23
0
 // Token: 0x06001B02 RID: 6914 RVA: 0x00003C87 File Offset: 0x00001E87
 protected override void OnRoomEntered(GameRoomData game)
 {
 }
Exemple #24
0
    // Token: 0x06001D70 RID: 7536 RVA: 0x00092968 File Offset: 0x00090B68
    protected override int OnCompare(GameRoomData a, GameRoomData b)
    {
        int num = a.TimeLimit - b.TimeLimit;

        return((!GameDataComparer.SortAscending) ? (-num) : num);
    }
 // Token: 0x06001D77 RID: 7543 RVA: 0x000138F0 File Offset: 0x00011AF0
 public static int StaticCompare(GameRoomData a, GameRoomData b)
 {
     return((!GameDataComparer.SortAscending) ? string.Compare(a.Name, b.Name) : string.Compare(b.Name, a.Name));
 }
Exemple #26
0
 // Token: 0x06001B01 RID: 6913 RVA: 0x00003C87 File Offset: 0x00001E87
 protected override void OnGetGameInformation(GameRoomData room, List <GameActorInfo> players, int endTime)
 {
 }
 // Token: 0x06001D76 RID: 7542 RVA: 0x000138E7 File Offset: 0x00011AE7
 protected override int OnCompare(GameRoomData a, GameRoomData b)
 {
     return(GameDataNameComparer.StaticCompare(a, b));
 }
 // Token: 0x06001C94 RID: 7316 RVA: 0x00013056 File Offset: 0x00011256
 public static bool IsLevelAllowed(GameRoomData room, int level)
 {
     return(GameRoomHelper.IsLevelAllowed((int)room.LevelMin, (int)room.LevelMax, level));
 }
    // Token: 0x06001D72 RID: 7538 RVA: 0x00092998 File Offset: 0x00090B98
    protected override int OnCompare(GameRoomData a, GameRoomData b)
    {
        int num = (int)((short)a.GameMode - (short)b.GameMode);

        return((num != 0) ? ((!GameDataComparer.SortAscending) ? (-num) : num) : GameDataNameComparer.StaticCompare(a, b));
    }