Beispiel #1
0
        public void SetFriendGameState(ulong ullUid, uint dwLogicWorldID, COM_ACNT_GAME_STATE State, uint startTime, string nickName = "", bool IgnoreWorld_id = false)
        {
            FriendInGame game = null;

            for (int i = 0; i < this.gameStateList.Count; i++)
            {
                game = this.gameStateList[i];
                bool flag = false;
                if (!IgnoreWorld_id)
                {
                    flag = (game.ullUid == ullUid) && (game.dwLogicWorldID == dwLogicWorldID);
                }
                else
                {
                    flag = game.ullUid == ullUid;
                }
                if (flag)
                {
                    game.State          = State;
                    game.dwLogicWorldID = dwLogicWorldID;
                    game.startTime      = startTime;
                    return;
                }
            }
            this.gameStateList.Add(new FriendInGame(ullUid, dwLogicWorldID, State, startTime, nickName));
        }
Beispiel #2
0
        public bool IsFriendInGamingState(ulong ullUid, uint dwLogicWorldID, COM_ACNT_GAME_STATE State)
        {
            FriendInGame game = null;

            for (int i = 0; i < this.gameStateList.Count; i++)
            {
                game = this.gameStateList[i];
                if ((game.ullUid == ullUid) && (game.dwLogicWorldID == dwLogicWorldID))
                {
                    return(game.State == State);
                }
            }
            return(false);
        }
Beispiel #3
0
        public COM_ACNT_GAME_STATE GetFriendInGamingState(ulong ullUid, uint dwLogicWorldID)
        {
            FriendInGame game = null;

            for (int i = 0; i < this.gameStateList.Count; i++)
            {
                game = this.gameStateList[i];
                if (((game != null) && (game.ullUid == ullUid)) && (game.dwLogicWorldID == dwLogicWorldID))
                {
                    return(game.State);
                }
            }
            return(COM_ACNT_GAME_STATE.COM_ACNT_GAME_STATE_IDLE);
        }
Beispiel #4
0
        public FriendInGame GetFriendInGaming(ulong ullUid, uint dwLogicWorldID)
        {
            FriendInGame game = null;

            for (int i = 0; i < this.gameStateList.Count; i++)
            {
                game = this.gameStateList[i];
                if (((game != null) && (game.ullUid == ullUid)) && (game.dwLogicWorldID == dwLogicWorldID))
                {
                    return(game);
                }
            }
            return(null);
        }