Example #1
0
        public int GetHolderId(RoomActor roomData)
        {
            var user = roomData.GetUser(roomData.CreateUserId);

            if (user == null)
            {
                throw new Exception("GameStaticHolder-GetHolderId用户信息为空");
            }

            var holderSeat = roomData.GetSeatData(user.UserId);

            if (holderSeat == null)
            {
                throw new Exception("GameStaticHolder-GetHolderId房主没有玩游戏");
            }

            return(roomData.CreateUserId);
        }