Пример #1
0
        public void SetSeat(Seat seat)
        {
            //if (true)
            //{
            //player = seat.player;

            //}
            IsHomeowners = seat.IsHomeowners;

            PlayerId = seat.PlayerId;

            Nickname = seat.Nickname;

            Avatar  = seat.Avatar;
            IsReady = seat.IsReady;
            Gender  = seat.Gender;

            Gold     = seat.Gold;
            Earnings = seat.Earnings;


            Winner = seat.Winner;


            PokerList = new List <NiuNiu.Poker>();
            if (seat.PokerList.Count > 0)
            {
                for (int i = 0; i < PokerCount; i++)
                {
                    NiuNiu.Poker poker = new Poker();
                    if (seat.PokerList[i] != null)
                    {
                        poker.SetPoker(seat.PokerList[i]);
                    }

                    PokerList.Add(poker);
                }
            }

            if (seat.PokerList.Count == 0)
            {
                for (int i = 0; i < PokerList.Count; i++)
                {
                    NiuNiu.Poker poker = new Poker();
                    PokerList[i].SetPoker(poker);
                }
            }


            PockeType = seat.PockeType;

            Pos = seat.Pos;

            //Countdown = pbSeat.Countdown;


            Dissolve = seat.Dissolve;

            IsBanker = seat.IsBanker;
        }
        public void build(byte[] data)
        {
            ByteBuffer buf = ByteBuffer.wrap(data);

            for (int i = 0; i < this.__flag.Length; i++)
            {
                this.__flag[i] = buf.get();
            }

            if (this.hasDissolve())
            {
                this.dissolve = (NN_ENUM_SEAT_DISSOLVE)buf.get();
            }
        }
Пример #3
0
        public void SetSeat(NN_SEAT prSeat)
        {
            //����
            if (prSeat.hasIsHomeowners())
            {
                IsHomeowners = prSeat.IsHomeowners;
            }
            //�Ƿ�ͬ����ɢ
            if (prSeat.hasDissolve())
            {
                Dissolve = prSeat.dissolve;
            }
            //ׯ
            if (prSeat.hasIsBanker())
            {
                IsBanker = prSeat.isBanker;
            }

            //����ID
            if (prSeat.hasPlayerId())
            {
                PlayerId = prSeat.playerId;
            }

            //�dz�
            if (prSeat.hasNickname())
            {
                Nickname = prSeat.nickname;
            }
            //ͷ��
            if (prSeat.hasAvatar())
            {
                Avatar = prSeat.avatar;
            }

            //�Ա�
            if (prSeat.hasGender())
            {
                Gender = prSeat.gender;
            }

            if (prSeat.hasPos())
            {
                Pos = prSeat.pos;
            }

            if (prSeat.hasReady())
            {
                IsReady = prSeat.ready;
            }


            //�����
            if (prSeat.hasGold())
            {
                //if (pBRoom.SeatList[i].Gold != 0)
                //{

                Gold = prSeat.gold;
                //}
            }
            //��������
            if (prSeat.hasNnEarnings())
            {
                Earnings = prSeat.nn_earnings;
            }
            //�Ƿ���ʤ����
            if (prSeat.hasIsWiner())
            {
                Winner = prSeat.isWiner;
            }
            //��ע
            if (prSeat.hasPour())
            {
                Pour = prSeat.pour;
            }

            //��������
            if (prSeat.hasNnPokerType())
            {
                if (prSeat.nn_pokerType != 0)
                {
                    PockeType = prSeat.nn_pokerType;
                    //PockeType = (int)prSeat.nn_pokerType;
                }
            }

            //��������

            List <NN_POKER> prPokerList = prSeat.getNnPokerList();

            if (prPokerList != null && prPokerList.Count > 0)
            {
                for (int j = 0; j < prPokerList.Count; j++)
                {
                    if (prPokerList[j] != null && prPokerList[j].hasIndex() && prPokerList[j].index != 0)
                    {
                        PokerList[j].SetPoker(prPokerList[j]);
                    }
                }
            }

            //纬度
            if (prSeat.hasLatitude())
            {
                Latitude = prSeat.latitude;
            }
            //经度
            if (prSeat.hasLongitude())
            {
                Longitude = prSeat.longitude;
            }
        }