记录自动连续战斗 所用回合数

This commit is contained in:
meixiongfeng 2023-07-07 14:38:08 +08:00
parent 1bdaa38367
commit 94cdd0a0de
4 changed files with 153 additions and 267 deletions

View File

@ -109,7 +109,33 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
mapData["bossTime"] = viking.BossTime // 更新时间
this.module.CheckRank(session.GetUserId(), req.BossId, req.Difficulty, req.Report)
}
//this.module.CheckSeasonRank(session.GetUserId(), req.BossId, req.Difficulty, 1, nil, 11, true)
if req.Auto == 1 {
viking.Round = make(map[int32]int32)
viking.Round[req.Auto] = req.Report.Round
} else if req.Auto > 1 {
viking.Round[req.Auto] = req.Report.Round
}
if len(viking.Round) == 10 {
var total int32
for _, v := range viking.Round {
total += v
}
szLine := make([]*pb.LineUp, 0)
var Leadpos int32
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
Leadpos = req.Report.Info.Redflist[0].Leadpos
for _, v := range req.Report.Info.Redflist[0].Team {
if v != nil {
szLine = append(szLine, &pb.LineUp{
Cid: v.HeroID,
Star: v.Star,
Lv: v.Lv,
})
}
}
}
this.module.CheckSeasonRank(session.GetUserId(), req.BossId, req.Difficulty, Leadpos, szLine, total)
}
user := this.module.ModuleUser.GetUser(session.GetUserId())
reward = this.module.ModuleTools.GetGroupDataByLottery(vikingCfg.Drop, user.Vip, user.Lv)
@ -182,7 +208,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
}
}
if req.Auto {
if req.Auto > 0 {
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype75, req.BossId, req.Difficulty))
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype172, 1))
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype181, 1, req.BossId, req.Difficulty))

View File

@ -425,10 +425,11 @@ func (this *Viking) CheckPreSeasonData() (bLocal bool) {
}
// 记录数据存在跨服
func (this *Viking) CheckSeasonRank(uid string, boosID int32, difficulty int32, leadpos int32, szLine []*pb.LineUp, huihe int32, bcross bool) {
func (this *Viking) CheckSeasonRank(uid string, boosID int32, difficulty int32, leadpos int32, szLine []*pb.LineUp, huihe int32) {
var (
conn_ *db.DBConn
err error
conn_ *db.DBConn
err error
bcross bool
)
bcross = this.CheckCurSeasonData()
if bcross {
@ -454,7 +455,7 @@ func (this *Viking) CheckSeasonRank(uid string, boosID int32, difficulty int32,
for _, v := range ranks {
if v.Bosstype == boosID && v.Difficulty <= difficulty {
if v.Difficulty == difficulty { // 难度相等 则回合数少则更新
if v.Huihe <= huihe {
if v.Huihe != 0 && v.Huihe <= huihe {
break
}
}
@ -496,7 +497,7 @@ func (this *Viking) CheckSeasonRank(uid string, boosID int32, difficulty int32,
)
score = difficulty<<16 + huihe
tableName = "vSeasonRank" + strconv.Itoa(int(boosID))
strKey := "vSeasonRank:" + uid + "-" + objID // 自定义key
strKey := "vikingsrank:" + uid + "-" + objID // 自定义key
menbers = &redis.Z{Score: float64(score), Member: strKey}
if cmd := pipe.ZAdd(tableName, menbers); cmd != nil {
@ -513,25 +514,24 @@ func (this *Viking) CheckSeasonRank(uid string, boosID int32, difficulty int32,
// 以下是测试
var (
szRank []*pb.DBVSeasonRank
rd *redis.StringSliceCmd
conn *db.DBConn
)
dbModel := db.NewDBModel(comm.TableVikingRank, 0, conn)
// var (
// szRank []*pb.DBVSeasonRank
// rd *redis.StringSliceCmd
// )
// //dbModel := db.NewDBModel(comm.TableVikingSRank, 0, conn_)
pipe = conn.Redis.RedisPipe(context.TODO())
rd = pipe.ZRevRange("vSeasonRank"+strconv.Itoa(int(1)), 0, comm.MaxRankList)
// pipe = conn_.Redis.RedisPipe(context.TODO())
// rd = pipe.ZRevRange("vSeasonRank"+strconv.Itoa(int(boosID)), 0, comm.MaxRankList)
if _, err := pipe.Exec(); err != nil {
this.Errorln(err)
return
}
_dataList := rd.Val()
for _, v := range _dataList {
result := &pb.DBVSeasonRank{}
if err := dbModel.Redis.HGetAll(v, result); err == nil {
szRank = append(szRank, result)
}
}
// if _, err := pipe.Exec(); err != nil {
// this.Errorln(err)
// return
// }
// _dataList := rd.Val()
// for _, v := range _dataList {
// result := &pb.DBVSeasonRank{}
// if err := model.Redis.HGetAll(v, result); err == nil {
// szRank = append(szRank, result)
// }
// }
}

View File

@ -31,6 +31,7 @@ type DBViking struct {
Boss map[int32]int32 `protobuf:"bytes,3,rep,name=boss,proto3" json:"boss" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key boos 类型 value 难度
BossTime map[string]int32 `protobuf:"bytes,4,rep,name=bossTime,proto3" json:"bossTime" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"bossTime"` //
Ps map[int32]int32 `protobuf:"bytes,5,rep,name=ps,proto3" json:"ps" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 预扣的体力
Round map[int32]int32 `protobuf:"bytes,6,rep,name=round,proto3" json:"round" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 总回合数
}
func (x *DBViking) Reset() {
@ -100,6 +101,13 @@ func (x *DBViking) GetPs() map[int32]int32 {
return nil
}
func (x *DBViking) GetRound() map[int32]int32 {
if x != nil {
return x.Round
}
return nil
}
// 维京远征排行榜
type DBVikingRank struct {
state protoimpl.MessageState
@ -346,7 +354,7 @@ var file_viking_viking_db_proto_rawDesc = []byte{
0x0a, 0x16, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x5f,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0xda, 0x02, 0x0a, 0x08, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x0e,
0x6f, 0x22, 0xc0, 0x03, 0x0a, 0x08, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 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, 0x27, 0x0a, 0x04, 0x62, 0x6f, 0x73, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13,
@ -357,50 +365,57 @@ var file_viking_viking_db_proto_rawDesc = []byte{
0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21,
0x0a, 0x02, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x56,
0x69, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x02, 0x70,
0x73, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x6f, 0x73, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x73, 0x12, 0x2a, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x6f, 0x75, 0x6e,
0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x37, 0x0a,
0x09, 0x42, 0x6f, 0x73, 0x73, 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, 0x3b, 0x0a, 0x0d, 0x42, 0x6f, 0x73, 0x73, 0x54, 0x69,
0x6d, 0x65, 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, 0x35, 0x0a, 0x07, 0x50, 0x73, 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, 0x3b, 0x0a, 0x0d, 0x42, 0x6f,
0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 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, 0x35, 0x0a, 0x07, 0x50, 0x73, 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, 0xff,
0x01, 0x0a, 0x0c, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 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, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74,
0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a,
0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f,
0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x0e, 0x0a,
0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a,
0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18,
0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x04,
0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65,
0x22, 0xfa, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x56, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61,
0x6e, 0x6b, 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, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c,
0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63,
0x75, 0x6c, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e,
0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76,
0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69,
0x6e, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55,
0x70, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x75, 0x69, 0x68, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x68, 0x75, 0x69, 0x68, 0x65, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x52, 0x6f,
0x75, 0x6e, 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, 0x22, 0xff, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e,
0x67, 0x52, 0x61, 0x6e, 0x6b, 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, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69,
0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66,
0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74,
0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74,
0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69,
0x63, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x08,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a,
0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69,
0x6e, 0x65, 0x55, 0x70, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f,
0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f,
0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xfa, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x56, 0x53, 0x65,
0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 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, 0x1e, 0x0a, 0x0a, 0x64, 0x69,
0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f,
0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f,
0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01,
0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f,
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73,
0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07,
0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x68, 0x75, 0x69, 0x68, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x68, 0x75,
0x69, 0x68, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@ -415,7 +430,7 @@ func file_viking_viking_db_proto_rawDescGZIP() []byte {
return file_viking_viking_db_proto_rawDescData
}
var file_viking_viking_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_viking_viking_db_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_viking_viking_db_proto_goTypes = []interface{}{
(*DBViking)(nil), // 0: DBViking
(*DBVikingRank)(nil), // 1: DBVikingRank
@ -423,19 +438,21 @@ var file_viking_viking_db_proto_goTypes = []interface{}{
nil, // 3: DBViking.BossEntry
nil, // 4: DBViking.BossTimeEntry
nil, // 5: DBViking.PsEntry
(*LineUp)(nil), // 6: LineUp
nil, // 6: DBViking.RoundEntry
(*LineUp)(nil), // 7: LineUp
}
var file_viking_viking_db_proto_depIdxs = []int32{
3, // 0: DBViking.boss:type_name -> DBViking.BossEntry
4, // 1: DBViking.bossTime:type_name -> DBViking.BossTimeEntry
5, // 2: DBViking.ps:type_name -> DBViking.PsEntry
6, // 3: DBVikingRank.line:type_name -> LineUp
6, // 4: DBVSeasonRank.line:type_name -> LineUp
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
6, // 3: DBViking.round:type_name -> DBViking.RoundEntry
7, // 4: DBVikingRank.line:type_name -> LineUp
7, // 5: DBVSeasonRank.line:type_name -> LineUp
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_viking_viking_db_proto_init() }
@ -488,7 +505,7 @@ func file_viking_viking_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_viking_viking_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -249,7 +249,7 @@ type VikingChallengeOverReq struct {
Difficulty int32 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty"` // 难度
Report *BattleReport `protobuf:"bytes,3,opt,name=report,proto3" json:"report"` //战报
Star []int32 `protobuf:"varint,4,rep,packed,name=star,proto3" json:"star"` // 自动出售装备的星级
Auto bool `protobuf:"varint,5,opt,name=auto,proto3" json:"auto"` // 是否是连续自动战斗
Auto int32 `protobuf:"varint,5,opt,name=auto,proto3" json:"auto"` // 是否是连续自动战斗
}
func (x *VikingChallengeOverReq) Reset() {
@ -312,11 +312,11 @@ func (x *VikingChallengeOverReq) GetStar() []int32 {
return nil
}
func (x *VikingChallengeOverReq) GetAuto() bool {
func (x *VikingChallengeOverReq) GetAuto() int32 {
if x != nil {
return x.Auto
}
return false
return 0
}
// 客户端通知服务器打赢了
@ -692,124 +692,6 @@ func (x *VikingSeasonRankResp) GetRanks() []*DBVSeasonRank {
return nil
}
// 连续自动战斗结束 通知服务端
type VikingAutoOverReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BossId int32 `protobuf:"varint,1,opt,name=bossId,proto3" json:"bossId"` // boos 类型
Difficulty int32 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty"` // 难度
Line *LineUp `protobuf:"bytes,3,opt,name=line,proto3" json:"line"` // 阵型数据
LeadPos int32 `protobuf:"varint,4,opt,name=leadPos,proto3" json:"leadPos"` // 队长位置
Huihe int32 `protobuf:"varint,5,opt,name=huihe,proto3" json:"huihe"` // 平均回合数
}
func (x *VikingAutoOverReq) Reset() {
*x = VikingAutoOverReq{}
if protoimpl.UnsafeEnabled {
mi := &file_viking_viking_msg_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VikingAutoOverReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VikingAutoOverReq) ProtoMessage() {}
func (x *VikingAutoOverReq) ProtoReflect() protoreflect.Message {
mi := &file_viking_viking_msg_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VikingAutoOverReq.ProtoReflect.Descriptor instead.
func (*VikingAutoOverReq) Descriptor() ([]byte, []int) {
return file_viking_viking_msg_proto_rawDescGZIP(), []int{12}
}
func (x *VikingAutoOverReq) GetBossId() int32 {
if x != nil {
return x.BossId
}
return 0
}
func (x *VikingAutoOverReq) GetDifficulty() int32 {
if x != nil {
return x.Difficulty
}
return 0
}
func (x *VikingAutoOverReq) GetLine() *LineUp {
if x != nil {
return x.Line
}
return nil
}
func (x *VikingAutoOverReq) GetLeadPos() int32 {
if x != nil {
return x.LeadPos
}
return 0
}
func (x *VikingAutoOverReq) GetHuihe() int32 {
if x != nil {
return x.Huihe
}
return 0
}
type VikingAutoOverResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *VikingAutoOverResp) Reset() {
*x = VikingAutoOverResp{}
if protoimpl.UnsafeEnabled {
mi := &file_viking_viking_msg_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VikingAutoOverResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VikingAutoOverResp) ProtoMessage() {}
func (x *VikingAutoOverResp) ProtoReflect() protoreflect.Message {
mi := &file_viking_viking_msg_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VikingAutoOverResp.ProtoReflect.Descriptor instead.
func (*VikingAutoOverResp) Descriptor() ([]byte, []int) {
return file_viking_viking_msg_proto_rawDescGZIP(), []int{13}
}
var File_viking_viking_msg_proto protoreflect.FileDescriptor
var file_viking_viking_msg_proto_rawDesc = []byte{
@ -848,7 +730,7 @@ var file_viking_viking_msg_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70,
0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73,
0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12,
0x12, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x61,
0x12, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x61,
0x75, 0x74, 0x6f, 0x22, 0x84, 0x02, 0x0a, 0x17, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68,
0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e,
@ -886,19 +768,8 @@ var file_viking_viking_msg_proto_rawDesc = []byte{
0x67, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12,
0x24, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e,
0x2e, 0x44, 0x42, 0x56, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05,
0x72, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67,
0x41, 0x75, 0x74, 0x6f, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62,
0x6f, 0x73, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x73,
0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74,
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75,
0x6c, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x50, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x50, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x75,
0x69, 0x68, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x68, 0x75, 0x69, 0x68, 0x65,
0x22, 0x14, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x75, 0x74, 0x6f, 0x4f, 0x76,
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -913,7 +784,7 @@ func file_viking_viking_msg_proto_rawDescGZIP() []byte {
return file_viking_viking_msg_proto_rawDescData
}
var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_viking_viking_msg_proto_goTypes = []interface{}{
(*VikingGetListReq)(nil), // 0: VikingGetListReq
(*VikingGetListResp)(nil), // 1: VikingGetListResp
@ -927,35 +798,31 @@ var file_viking_viking_msg_proto_goTypes = []interface{}{
(*VikingRankListResp)(nil), // 9: VikingRankListResp
(*VikingSeasonRankReq)(nil), // 10: VikingSeasonRankReq
(*VikingSeasonRankResp)(nil), // 11: VikingSeasonRankResp
(*VikingAutoOverReq)(nil), // 12: VikingAutoOverReq
(*VikingAutoOverResp)(nil), // 13: VikingAutoOverResp
nil, // 14: VikingChallengeOverResp.HeroexpEntry
(*DBViking)(nil), // 15: DBViking
(*BattleFormation)(nil), // 16: BattleFormation
(*BattleInfo)(nil), // 17: BattleInfo
(*BattleReport)(nil), // 18: BattleReport
(*UserAtno)(nil), // 19: UserAtno
(*DBVikingRank)(nil), // 20: DBVikingRank
(*DBVSeasonRank)(nil), // 21: DBVSeasonRank
(*LineUp)(nil), // 22: LineUp
nil, // 12: VikingChallengeOverResp.HeroexpEntry
(*DBViking)(nil), // 13: DBViking
(*BattleFormation)(nil), // 14: BattleFormation
(*BattleInfo)(nil), // 15: BattleInfo
(*BattleReport)(nil), // 16: BattleReport
(*UserAtno)(nil), // 17: UserAtno
(*DBVikingRank)(nil), // 18: DBVikingRank
(*DBVSeasonRank)(nil), // 19: DBVSeasonRank
}
var file_viking_viking_msg_proto_depIdxs = []int32{
15, // 0: VikingGetListResp.data:type_name -> DBViking
16, // 1: VikingChallengeReq.battle:type_name -> BattleFormation
17, // 2: VikingChallengeResp.info:type_name -> BattleInfo
18, // 3: VikingChallengeOverReq.report:type_name -> BattleReport
15, // 4: VikingChallengeOverResp.data:type_name -> DBViking
19, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno
14, // 6: VikingChallengeOverResp.heroexp:type_name -> VikingChallengeOverResp.HeroexpEntry
15, // 7: VikingBuyResp.data:type_name -> DBViking
20, // 8: VikingRankListResp.ranks:type_name -> DBVikingRank
21, // 9: VikingSeasonRankResp.ranks:type_name -> DBVSeasonRank
22, // 10: VikingAutoOverReq.line:type_name -> LineUp
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
13, // 0: VikingGetListResp.data:type_name -> DBViking
14, // 1: VikingChallengeReq.battle:type_name -> BattleFormation
15, // 2: VikingChallengeResp.info:type_name -> BattleInfo
16, // 3: VikingChallengeOverReq.report:type_name -> BattleReport
13, // 4: VikingChallengeOverResp.data:type_name -> DBViking
17, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno
12, // 6: VikingChallengeOverResp.heroexp:type_name -> VikingChallengeOverResp.HeroexpEntry
13, // 7: VikingBuyResp.data:type_name -> DBViking
18, // 8: VikingRankListResp.ranks:type_name -> DBVikingRank
19, // 9: VikingSeasonRankResp.ranks:type_name -> DBVSeasonRank
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
}
func init() { file_viking_viking_msg_proto_init() }
@ -1111,30 +978,6 @@ func file_viking_viking_msg_proto_init() {
return nil
}
}
file_viking_viking_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VikingAutoOverReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_viking_viking_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VikingAutoOverResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -1142,7 +985,7 @@ func file_viking_viking_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_viking_viking_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 15,
NumMessages: 13,
NumExtensions: 0,
NumServices: 0,
},