Ejemplo n.º 1
0
 /// <summary>
 /// 发实牌
 /// </summary>
 internal void ValidDealProxy(GP_ROOM_VALIDDEAL proto)
 {
     if (CurrentRoom.roomPlay == EnumPlay.BigPaiJiu)
     {
         CurrentRoom.roomStatus = ROOM_STATUS.GROUPPOKER;
     }
     if (CurrentRoom.roomPlay == EnumPlay.SmallPaiJiu)
     {
         CurrentRoom.roomStatus = ROOM_STATUS.CUOPAI;
     }
     for (int i = 0; i < proto.seatListCount(); i++)
     {
         SeatEntity seat = GetSeatBySeatId(proto.getSeatList(i).pos);
         seat.seatStatus = SEAT_STATUS.GROUP;
         if (seat == PlayerSeat)
         {
             seat.groupTime = proto.unixtime;
             if (seat.pokerList.Count != 0)
             {
                 seat.pokerList.Clear();
             }
             for (int j = 0; j < proto.getSeatList(i).pokerListCount(); ++j)
             {
                 GP_POKER protoPoker = proto.getSeatList(i).getPokerList(j);
                 seat.pokerList.Add(new Poker()
                 {
                     Index = protoPoker.index, //索引
                     Type  = protoPoker.type,  //花色
                     Size  = protoPoker.size,  //大小
                 });
             }
             TransferData data = new TransferData();
             data.SetValue("Seat", seat);
             data.SetValue("Room", CurrentRoom);
             SendNotification(ConstantGuPaiJiu.GroupValidPoker, data);
         }
     }
 }
Ejemplo n.º 2
0
    /// <summary>
    /// 服务器广播组合牌
    /// </summary>
    /// <param name="obj"></param>
    private void OnServerBroadcastValidDeal(byte[] obj)
    {
        GP_ROOM_VALIDDEAL proto = GP_ROOM_VALIDDEAL.decode(obj);

        RoomGuPaiJiuProxy.Instance.ValidDealProxy(proto);
    }