From 708ed34d28218cb909f40dfe1008447be4cbe526 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 18 Dec 2023 16:19:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=B8=89=E6=B6=88=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E6=8A=80=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_playerskill.json | 8 +- modules/entertainment/api_match.go | 7 +- modules/entertainment/module.go | 4 +- modules/entertainment/room.go | 17 ++ modules/entertainment/xxlPlat.go | 51 +++++ pb/entertain_db.pb.go | 182 ++++++++++-------- sys/configure/structs/Game.PlayerSkillData.go | 4 + 7 files changed, 187 insertions(+), 86 deletions(-) diff --git a/bin/json/game_playerskill.json b/bin/json/game_playerskill.json index 65121aec1..814e4158c 100644 --- a/bin/json/game_playerskill.json +++ b/bin/json/game_playerskill.json @@ -1,20 +1,24 @@ [ { - "key": 1, + "key": 10001, + "skillvalue": 0, "icon": "", "txt": { "key": "", "text": "" }, + "skilltype": 1, "number": 1 }, { - "key": 2, + "key": 10002, + "skillvalue": 0, "icon": "", "txt": { "key": "", "text": "" }, + "skilltype": 2, "number": 1 } ] \ No newline at end of file diff --git a/modules/entertainment/api_match.go b/modules/entertainment/api_match.go index 776aac162..adf91b895 100644 --- a/modules/entertainment/api_match.go +++ b/modules/entertainment/api_match.go @@ -78,12 +78,15 @@ func (this *apiComp) Match(session comm.IUserSession, req *pb.EntertainMatchReq) } } - + mySkill := make(map[int32]int32, 0) + for _, v := range req.Skillcard { + mySkill[v] = 1 + } this.module.match.MatchReq(&pb.DBXXLMatch{ Userinfo: comm.GetUserBaseInfo(user), Cardid: req.Idcard, Consumeexp: user.Consumeexp, - Skill: req.Skillcard, + Skill: mySkill, }) session.SendMsg(string(this.module.GetType()), "match", &pb.EntertainMatchResp{ diff --git a/modules/entertainment/module.go b/modules/entertainment/module.go index a9dbc8833..8ff2c5842 100644 --- a/modules/entertainment/module.go +++ b/modules/entertainment/module.go @@ -177,8 +177,8 @@ func (this *Entertainment) CreateRoom(sessions []comm.IUserSession, rulesStr str RoomType: 0, Card1: "", Card2: "", - Skill1: []int32{}, - Skill2: []int32{}, + Skill1: make(map[int32]int32), + Skill2: make(map[int32]int32), } red *pb.DBUser blue *pb.DBUser diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index 741664508..c27a231f9 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -221,6 +221,23 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr return } return + } else if req.Itype > 0 { //玩家卡牌技能 + var ( + conf *cfg.GamePlayerSkillData + err error + list *pb.DBXXLData + ) + if conf, err = this.module.configure.GetGamePlaySkill(req.Itype); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, // 配置校验 + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + if list, err = this.module.model.getEntertainmList(session.GetUserId()); err == nil { + this.module.Debugf("%v,%v", conf, list) + } } if req.Itype == 0 && req.Curid == 0 && req.Targetid == 0 { if this.curPower == this.player1.Userinfo.Uid { diff --git a/modules/entertainment/xxlPlat.go b/modules/entertainment/xxlPlat.go index 5f37d3ad2..b12c0387e 100644 --- a/modules/entertainment/xxlPlat.go +++ b/modules/entertainment/xxlPlat.go @@ -284,6 +284,57 @@ func (this *MapData) Check5X() (bEliminate bool, xiaochu []int, s map[int]int) { } } + // 校验上下左右 + for j := 0; j < Width; j++ { + for k := 0; k < Height; k++ { + pos := j*Width + k + if pos+2 < Height { + k1 := this.Plat[pos].Color + k2 := this.Plat[pos+1].Color + k3 := this.Plat[pos+2].Color + var k4 int32 + var k5 int32 + if k1 == k2 && k3 == k1 { // 三个颜色相等 + tmp := pos + index := 0 + for { + index++ + if tmp/Width-2 >= 0 { // k1 的左右 + k4 = this.Plat[tmp/Width-1].Color + k5 = this.Plat[tmp/Width-2].Color + if k1 == k4 && k1 == k5 { + bEliminate = true + s[tmp] = FiveType + this.Plat[pos].Cid = 0 + this.Plat[pos+1].Cid = 0 + this.Plat[pos+2].Cid = 0 + this.Plat[tmp/Width-1].Cid = 0 + this.Plat[tmp/Width-2].Cid = 0 + } + } + if tmp/Width+2 < Width { + k4 = this.Plat[tmp/Width+1].Color + k5 = this.Plat[tmp/Width+2].Color + if k1 == k4 && k1 == k5 { + bEliminate = true + s[tmp] = FiveType + this.Plat[pos].Cid = 0 + this.Plat[pos+1].Cid = 0 + this.Plat[pos+2].Cid = 0 + this.Plat[tmp/Width+1].Cid = 0 + this.Plat[tmp/Width+2].Cid = 0 + } + } + tmp = pos + 2 + if index == 2 { + break + } + } + } + } + + } + } return } diff --git a/pb/entertain_db.pb.go b/pb/entertain_db.pb.go index eb5772bc1..beebfa7ff 100644 --- a/pb/entertain_db.pb.go +++ b/pb/entertain_db.pb.go @@ -273,10 +273,10 @@ type DBXXLMatch struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Userinfo *BaseUserInfo `protobuf:"bytes,1,opt,name=userinfo,proto3" json:"userinfo"` - Cardid string `protobuf:"bytes,2,opt,name=cardid,proto3" json:"cardid"` // 选择的卡片ID - Consumeexp int32 `protobuf:"varint,3,opt,name=consumeexp,proto3" json:"consumeexp"` // 消消乐积分 - Skill []int32 `protobuf:"varint,4,rep,packed,name=skill,proto3" json:"skill"` // + Userinfo *BaseUserInfo `protobuf:"bytes,1,opt,name=userinfo,proto3" json:"userinfo"` + Cardid string `protobuf:"bytes,2,opt,name=cardid,proto3" json:"cardid"` // 选择的卡片ID + Consumeexp int32 `protobuf:"varint,3,opt,name=consumeexp,proto3" json:"consumeexp"` // 消消乐积分 + Skill map[int32]int32 `protobuf:"bytes,4,rep,name=skill,proto3" json:"skill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // } func (x *DBXXLMatch) Reset() { @@ -332,7 +332,7 @@ func (x *DBXXLMatch) GetConsumeexp() int32 { return 0 } -func (x *DBXXLMatch) GetSkill() []int32 { +func (x *DBXXLMatch) GetSkill() map[int32]int32 { if x != nil { return x.Skill } @@ -544,11 +544,11 @@ type DBXxlRules struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RoomType int32 `protobuf:"varint,1,opt,name=RoomType,proto3" json:"RoomType"` // 房间类型 - Card1 string `protobuf:"bytes,2,opt,name=card1,proto3" json:"card1"` // player1 卡 - Card2 string `protobuf:"bytes,3,opt,name=card2,proto3" json:"card2"` // player2 卡 - Skill1 []int32 `protobuf:"varint,4,rep,packed,name=skill1,proto3" json:"skill1"` // 玩家1携带的技能 - Skill2 []int32 `protobuf:"varint,5,rep,packed,name=skill2,proto3" json:"skill2"` // 玩家2携带的技能 + RoomType int32 `protobuf:"varint,1,opt,name=RoomType,proto3" json:"RoomType"` // 房间类型 + Card1 string `protobuf:"bytes,2,opt,name=card1,proto3" json:"card1"` // player1 卡 + Card2 string `protobuf:"bytes,3,opt,name=card2,proto3" json:"card2"` // player2 卡 + Skill1 map[int32]int32 `protobuf:"bytes,4,rep,name=skill1,proto3" json:"skill1" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 玩家1携带的技能 + Skill2 map[int32]int32 `protobuf:"bytes,5,rep,name=skill2,proto3" json:"skill2" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 玩家2携带的技能 } func (x *DBXxlRules) Reset() { @@ -604,14 +604,14 @@ func (x *DBXxlRules) GetCard2() string { return "" } -func (x *DBXxlRules) GetSkill1() []int32 { +func (x *DBXxlRules) GetSkill1() map[int32]int32 { if x != nil { return x.Skill1 } return nil } -func (x *DBXxlRules) GetSkill2() []int32 { +func (x *DBXxlRules) GetSkill2() map[int32]int32 { if x != nil { return x.Skill2 } @@ -657,64 +657,80 @@ var file_entertain_entertain_db_proto_rawDesc = []byte{ 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x85, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x29, + 0xd7, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x29, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x72, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x72, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x65, 0x78, - 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, - 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x22, 0x3b, 0x0a, 0x07, 0x42, 0x6f, 0x78, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x62, 0x6f, 0x78, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x22, 0xba, 0x04, 0x0a, 0x09, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, - 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x63, 0x61, 0x72, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, - 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x1a, 0x0a, 0x03, 0x62, 0x6f, 0x78, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x42, 0x6f, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x03, 0x62, 0x6f, 0x78, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, - 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, - 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x74, 0x6f, 0x75, 0x78, 0x69, 0x61, 0x6e, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x74, 0x6f, 0x75, 0x78, 0x69, 0x61, 0x6e, 0x67, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, - 0x6c, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x44, - 0x61, 0x74, 0x61, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, - 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x69, 0x61, 0x6e, 0x73, 0x68, 0x65, - 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6c, 0x69, 0x61, 0x6e, 0x73, 0x68, - 0x65, 0x6e, 0x67, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x37, - 0x0a, 0x09, 0x43, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x70, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x53, 0x6b, + 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x1a, + 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3b, 0x0a, 0x07, 0x42, 0x6f, 0x78, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x6f, 0x78, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, + 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, + 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xba, 0x04, 0x0a, 0x09, 0x44, 0x42, 0x58, 0x58, 0x4c, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x58, 0x58, 0x4c, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x43, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x63, 0x61, 0x72, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x03, 0x62, 0x6f, 0x78, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x08, 0x2e, 0x42, 0x6f, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x03, 0x62, 0x6f, 0x78, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x74, 0x6f, 0x75, 0x78, 0x69, 0x61, 0x6e, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x74, 0x6f, 0x75, 0x78, 0x69, 0x61, 0x6e, 0x67, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x6b, + 0x69, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x58, 0x58, + 0x4c, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x69, 0x61, 0x6e, 0x73, + 0x68, 0x65, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6c, 0x69, 0x61, 0x6e, + 0x73, 0x68, 0x65, 0x6e, 0x67, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x37, 0x0a, 0x09, 0x43, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, + 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0xac, 0x02, 0x0a, 0x0a, 0x44, 0x42, 0x58, 0x78, 0x6c, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, + 0x61, 0x72, 0x64, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x32, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x72, 0x64, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x6b, + 0x69, 0x6c, 0x6c, 0x31, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x58, + 0x78, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x31, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x31, 0x12, 0x2f, 0x0a, 0x06, 0x73, + 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, + 0x58, 0x78, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x1a, 0x39, 0x0a, 0x0b, + 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x31, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 0x6c, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x84, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x58, 0x78, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x61, 0x72, 0x64, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x72, - 0x64, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x61, 0x72, 0x64, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6b, 0x69, 0x6c, - 0x6c, 0x31, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x31, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, - 0x52, 0x06, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x32, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, + 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -729,7 +745,7 @@ func file_entertain_entertain_db_proto_rawDescGZIP() []byte { return file_entertain_entertain_db_proto_rawDescData } -var file_entertain_entertain_db_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_entertain_entertain_db_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_entertain_entertain_db_proto_goTypes = []interface{}{ (*MapData)(nil), // 0: MapData (*GirdeData)(nil), // 1: GirdeData @@ -739,25 +755,31 @@ var file_entertain_entertain_db_proto_goTypes = []interface{}{ (*DBXXLData)(nil), // 5: DBXXLData (*DBXxlRules)(nil), // 6: DBXxlRules nil, // 7: PlayerData.SkillEntry - nil, // 8: DBXXLData.RewardEntry - nil, // 9: DBXXLData.CardEntry - nil, // 10: DBXXLData.SkillEntry - (*BaseUserInfo)(nil), // 11: BaseUserInfo + nil, // 8: DBXXLMatch.SkillEntry + nil, // 9: DBXXLData.RewardEntry + nil, // 10: DBXXLData.CardEntry + nil, // 11: DBXXLData.SkillEntry + nil, // 12: DBXxlRules.Skill1Entry + nil, // 13: DBXxlRules.Skill2Entry + (*BaseUserInfo)(nil), // 14: BaseUserInfo } var file_entertain_entertain_db_proto_depIdxs = []int32{ 1, // 0: MapData.data:type_name -> GirdeData - 11, // 1: PlayerData.userinfo:type_name -> BaseUserInfo + 14, // 1: PlayerData.userinfo:type_name -> BaseUserInfo 7, // 2: PlayerData.skill:type_name -> PlayerData.SkillEntry - 11, // 3: DBXXLMatch.userinfo:type_name -> BaseUserInfo - 8, // 4: DBXXLData.reward:type_name -> DBXXLData.RewardEntry - 9, // 5: DBXXLData.card:type_name -> DBXXLData.CardEntry - 4, // 6: DBXXLData.box:type_name -> BoxData - 10, // 7: DBXXLData.skill:type_name -> DBXXLData.SkillEntry - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 14, // 3: DBXXLMatch.userinfo:type_name -> BaseUserInfo + 8, // 4: DBXXLMatch.skill:type_name -> DBXXLMatch.SkillEntry + 9, // 5: DBXXLData.reward:type_name -> DBXXLData.RewardEntry + 10, // 6: DBXXLData.card:type_name -> DBXXLData.CardEntry + 4, // 7: DBXXLData.box:type_name -> BoxData + 11, // 8: DBXXLData.skill:type_name -> DBXXLData.SkillEntry + 12, // 9: DBXxlRules.skill1:type_name -> DBXxlRules.Skill1Entry + 13, // 10: DBXxlRules.skill2:type_name -> DBXxlRules.Skill2Entry + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_entertain_entertain_db_proto_init() } @@ -858,7 +880,7 @@ func file_entertain_entertain_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_entertain_entertain_db_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/Game.PlayerSkillData.go b/sys/configure/structs/Game.PlayerSkillData.go index 4fe10a0a8..428d288a1 100644 --- a/sys/configure/structs/Game.PlayerSkillData.go +++ b/sys/configure/structs/Game.PlayerSkillData.go @@ -12,8 +12,10 @@ import "errors" type GamePlayerSkillData struct { Key int32 + Skillvalue int32 Icon string Txt string + Skilltype int32 Number int32 } @@ -25,8 +27,10 @@ func (*GamePlayerSkillData) GetTypeId() int32 { func (_v *GamePlayerSkillData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["skillvalue"].(float64); !_ok_ { err = errors.New("skillvalue error"); return }; _v.Skillvalue = int32(_tempNum_) } { var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["txt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Txt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Txt, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["skilltype"].(float64); !_ok_ { err = errors.New("skilltype error"); return }; _v.Skilltype = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["number"].(float64); !_ok_ { err = errors.New("number error"); return }; _v.Number = int32(_tempNum_) } return }