Gogs 4 месяцев назад
Родитель
Сommit
63eb6facb7

+ 1 - 0
bin/client_msg/common.proto

@@ -139,6 +139,7 @@ message  ReqPlayer {
   optional bool IsSeen = 5;
   optional bool IsPacked = 6;
   optional bool IsShow = 7;
+  optional bool CanShow = 8;
 }
 
 message ReqPlayerList {

+ 4 - 0
src/server/game/room/room.go

@@ -65,6 +65,8 @@ type Player struct {
 	IsWin bool
 	// 上一次操作
 	LastOpt *msg.PlayerOpt
+	// 是否可以亮牌
+	CanShow bool
 }
 
 // 获取玩家ID
@@ -182,6 +184,8 @@ func (r *Room) AddPlayerOpt(round *msg.ReqRound) {
 func (r *Room) SetNextRound() {
 	curSitPos := int32(r.RoundSitPos)
 
+	player := r.GetPlayerBySitPos(curSitPos)
+	player.CanShow = true
 	// 按照座位号从小到大排序
 	sort.Slice(r.Players, func(i, j int) bool {
 		return r.Players[i].SitPos < r.Players[j].SitPos

+ 1 - 0
src/server/game/teen/buildRoom.go

@@ -28,6 +28,7 @@ func convertToMsgPlayerList(players []*room.Player) []*msg.ReqPlayer {
 			IsSeen:   &player.IsSeen,
 			IsPacked: &player.IsPacked,
 			IsShow:   &player.IsShow,
+			CanShow:  &player.CanShow,
 		}
 	}
 	return msgPlayers

+ 1 - 0
src/server/game/teen/event.go

@@ -39,6 +39,7 @@ func handleEvents() {
 				IsSeen:    false,
 				IsShow:    false,
 				IsDealer:  false,
+				CanShow:   false,
 				HandCards: &[]msg.ReqCard{},
 			})
 			userData.Teen_Patti_Room.GameRound = &room.GameRound{

+ 23 - 8
src/server/game/teen/opt.go

@@ -81,14 +81,29 @@ func ante(room *room.Room, sitPos int32, betAmount int32) {
 }
 
 // 亮牌
-func show(room *room.Room, sitPos int32) {
-	room.SetNextRound()
-	SendRoundMsgToAll(room, &msg.ReqRound{
-		Round:       int32(room.Round),
-		RoundSitPos: int32(sitPos),
-		PlayerOpt:   &msg.PlayerOpt{OptType: msg.PlayerOptType_OPT_SHOW},
-		UserId:      room.GetPlayerBySitPos(sitPos).GetUserId(),
-	})
+func show(r *room.Room) {
+	players := r.Players
+	temp := make([]*room.Player, 0)
+	for _, player := range players {
+		if !player.IsPacked {
+			temp = append(temp, player)
+			SendRoundMsgToAll(r, &msg.ReqRound{
+				Round:       int32(r.Round),
+				RoundSitPos: int32(player.SitPos),
+				PlayerOpt:   &msg.PlayerOpt{OptType: msg.PlayerOptType_OPT_SHOW, SeenCards: convertToMsgCardList(player.HandCards)},
+				UserId:      r.GetPlayerBySitPos(player.SitPos).GetUserId(),
+			})
+		}
+	}
+
+	winPlayer := compareCards(temp)
+	if winPlayer != nil {
+		r.PlayerWin(winPlayer.SitPos)
+		sendResult(r, winPlayer.SitPos)
+	} else {
+		log.Error("所有玩家都弃牌了")
+	}
+
 }
 
 // 取消操作超时

+ 1 - 1
src/server/game/teen/round.go

@@ -124,7 +124,7 @@ func recvPlayerOptAction(room *room.Room, sitPos int32, opt *msg.PlayerOpt) {
 		} else if optType == msg.PlayerOptType_OPT_CHAAL { // 跟注
 			chaal(room, sitPos, opt.BetAmount)
 		} else if optType == msg.PlayerOptType_OPT_SHOW { // 亮牌
-			show(room, sitPos)
+			show(room)
 		}
 	}
 	updateAllPlayerInfo(room)

+ 49 - 7
src/server/game/teen/teen.go

@@ -88,6 +88,7 @@ func createRoom(userId string, roomId string, agent gate.Agent) {
 			IsSeen:    false,
 			IsShow:    false,
 			IsDealer:  false,
+			CanShow:   false,
 		})
 	}
 
@@ -262,14 +263,55 @@ func calculateCardTotalValue(cards []msg.ReqCard) int {
 	return total
 }
 
-// 两个玩家对比手牌,如果手牌类型相同就比手牌总值,如果类型和值相同就比黑桃红桃方块梅花
-func compareCards(player1 *room.Player, player2 *room.Player) int {
-	cardType1 := calculateCardType(*player1.HandCards)
-	cardType2 := calculateCardType(*player2.HandCards)
-	if cardType1 == cardType2 {
-		return compareCardValue(*player1.HandCards, *player2.HandCards)
+// 返回玩家列表里最大的玩家
+func compareCards(players []*room.Player) *room.Player {
+	if len(players) == 0 {
+		return nil
 	}
-	return int(cardType1 - cardType2)
+
+	// 找到第一个没有弃牌的玩家作为基准
+	maxPlayer := players[0]
+	for _, p := range players {
+		if !p.IsPacked {
+			maxPlayer = p
+			break
+		}
+	}
+
+	// 如果所有玩家都弃牌了
+	if maxPlayer.IsPacked {
+		return nil
+	}
+
+	// 遍历所有玩家,找出最大的
+	for _, player := range players {
+		// 跳过已弃牌的玩家
+		if player.IsPacked || player == maxPlayer {
+			continue
+		}
+
+		cards1 := *maxPlayer.HandCards
+		cards2 := *player.HandCards
+
+		cardType1 := calculateCardType(cards1)
+		cardType2 := calculateCardType(cards2)
+
+		// 如果牌型不同
+		if cardType1 != cardType2 {
+			// CardType 数字越小牌型越大
+			if cardType2 < cardType1 {
+				maxPlayer = player
+			}
+			continue
+		}
+
+		// 如果牌型相同,比较牌值
+		if result := compareCardValue(cards1, cards2); result < 0 {
+			maxPlayer = player
+		}
+	}
+
+	return maxPlayer
 }
 
 // 两个玩家手牌类型相同,比手牌总值

+ 56 - 45
src/server/msg/common.pb.go

@@ -1234,6 +1234,7 @@ type ReqPlayer struct {
 	IsSeen    *bool      `protobuf:"varint,5,opt,name=IsSeen,proto3,oneof" json:"IsSeen,omitempty"`
 	IsPacked  *bool      `protobuf:"varint,6,opt,name=IsPacked,proto3,oneof" json:"IsPacked,omitempty"`
 	IsShow    *bool      `protobuf:"varint,7,opt,name=IsShow,proto3,oneof" json:"IsShow,omitempty"`
+	CanShow   *bool      `protobuf:"varint,8,opt,name=CanShow,proto3,oneof" json:"CanShow,omitempty"`
 }
 
 func (x *ReqPlayer) Reset() {
@@ -1317,6 +1318,13 @@ func (x *ReqPlayer) GetIsShow() bool {
 	return false
 }
 
+func (x *ReqPlayer) GetCanShow() bool {
+	if x != nil && x.CanShow != nil {
+		return *x.CanShow
+	}
+	return false
+}
+
 type ReqPlayerList struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1809,7 +1817,7 @@ var file_common_proto_rawDesc = []byte{
 	0x35, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x43, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f,
 	0x6c, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x43, 0x6f, 0x6c, 0x6f, 0x72,
 	0x12, 0x14, 0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
-	0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x97, 0x02, 0x0a, 0x09, 0x52, 0x65, 0x71, 0x50, 0x6c,
+	0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xc2, 0x02, 0x0a, 0x09, 0x52, 0x65, 0x71, 0x50, 0x6c,
 	0x61, 0x79, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
 	0x52, 0x02, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x09, 0x48, 0x61, 0x6e, 0x64, 0x43, 0x61, 0x72, 0x64,
 	0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x52, 0x65, 0x71, 0x43, 0x61, 0x72,
@@ -1823,50 +1831,53 @@ var file_common_proto_rawDesc = []byte{
 	0x6b, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x49, 0x73, 0x50,
 	0x61, 0x63, 0x6b, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x68,
 	0x6f, 0x77, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x06, 0x49, 0x73, 0x53, 0x68,
-	0x6f, 0x77, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73,
-	0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x49, 0x73, 0x44, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x42, 0x09, 0x0a,
-	0x07, 0x5f, 0x49, 0x73, 0x53, 0x65, 0x65, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x49, 0x73, 0x50,
-	0x61, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77,
-	0x22, 0x3b, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73,
-	0x74, 0x12, 0x2a, 0x0a, 0x0a, 0x52, 0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18,
-	0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x52, 0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65,
-	0x72, 0x52, 0x0a, 0x52, 0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x31, 0x0a,
-	0x0c, 0x52, 0x65, 0x71, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a,
-	0x06, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e,
-	0x52, 0x65, 0x71, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x06, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73,
-	0x22, 0x39, 0x0a, 0x06, 0x52, 0x65, 0x71, 0x42, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x62, 0x65,
-	0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52,
-	0x09, 0x62, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a,
-	0x0a, 0x5f, 0x62, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x09, 0x52,
-	0x65, 0x71, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e,
-	0x64, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72,
-	0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
-	0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75,
-	0x6c, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x71, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12,
-	0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
-	0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69,
-	0x74, 0x50, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e,
-	0x64, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x12, 0x28, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65,
-	0x72, 0x4f, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x50, 0x6c, 0x61,
-	0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70,
-	0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x08, 0x4d, 0x73, 0x67,
-	0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63,
-	0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72,
-	0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73,
-	0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73,
-	0x67, 0x22, 0x1b, 0x0a, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
-	0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x84,
-	0x01, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65,
-	0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0c,
-	0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x53, 0x45, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a,
-	0x4f, 0x50, 0x54, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09,
-	0x4f, 0x50, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x4f,
-	0x50, 0x54, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54,
-	0x5f, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54,
-	0x5f, 0x53, 0x48, 0x4f, 0x57, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x41,
-	0x4e, 0x54, 0x45, 0x10, 0x07, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2f, 0x6d, 0x73, 0x67, 0x62, 0x06,
-	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x6f, 0x77, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x43, 0x61, 0x6e, 0x53, 0x68, 0x6f, 0x77,
+	0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x07, 0x43, 0x61, 0x6e, 0x53, 0x68, 0x6f,
+	0x77, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x42,
+	0x0b, 0x0a, 0x09, 0x5f, 0x49, 0x73, 0x44, 0x65, 0x61, 0x6c, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07,
+	0x5f, 0x49, 0x73, 0x53, 0x65, 0x65, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x49, 0x73, 0x50, 0x61,
+	0x63, 0x6b, 0x65, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x42,
+	0x0a, 0x0a, 0x08, 0x5f, 0x43, 0x61, 0x6e, 0x53, 0x68, 0x6f, 0x77, 0x22, 0x3b, 0x0a, 0x0d, 0x52,
+	0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x0a,
+	0x52, 0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x0a, 0x2e, 0x52, 0x65, 0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x0a, 0x52, 0x65,
+	0x71, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x31, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x47,
+	0x61, 0x6d, 0x65, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x6e,
+	0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x65, 0x71, 0x52, 0x6f,
+	0x75, 0x6e, 0x64, 0x52, 0x06, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x22, 0x39, 0x0a, 0x06, 0x52,
+	0x65, 0x71, 0x42, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x62, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75,
+	0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x09, 0x62, 0x65, 0x74, 0x41,
+	0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x65, 0x74,
+	0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x09, 0x52, 0x65, 0x71, 0x52, 0x65, 0x73,
+	0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x74, 0x50,
+	0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53,
+	0x69, 0x74, 0x50, 0x6f, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x84, 0x01,
+	0x0a, 0x08, 0x52, 0x65, 0x71, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f,
+	0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64,
+	0x12, 0x20, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x74, 0x50, 0x6f, 0x73, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x74, 0x50,
+	0x6f, 0x73, 0x12, 0x28, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70,
+	0x74, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x12, 0x16, 0x0a, 0x06,
+	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72,
+	0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
+	0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x1b, 0x0a, 0x05,
+	0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x84, 0x01, 0x0a, 0x0d, 0x50, 0x6c,
+	0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4f,
+	0x50, 0x54, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54,
+	0x5f, 0x53, 0x45, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x5f, 0x50,
+	0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x54, 0x5f, 0x43,
+	0x48, 0x41, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x42, 0x49,
+	0x4e, 0x44, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x5f, 0x53, 0x45, 0x4c, 0x45,
+	0x43, 0x54, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x53, 0x48, 0x4f, 0x57,
+	0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x5f, 0x41, 0x4e, 0x54, 0x45, 0x10, 0x07,
+	0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2f, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x33,
 }
 
 var (