上传积分boss

This commit is contained in:
meixiongfeng 2023-12-06 11:47:17 +08:00
parent 403d4bfa8d
commit eed828add9
9 changed files with 159 additions and 207 deletions

View File

@ -126,6 +126,7 @@ const (
ModuleMoonlv core.M_Modules = "moonlv" //护月等级 ModuleMoonlv core.M_Modules = "moonlv" //护月等级
ModuleWhackamole core.M_Modules = "whackamole" //大豚鼠 ModuleWhackamole core.M_Modules = "whackamole" //大豚鼠
ModuleMonkey core.M_Modules = "monkey" //猴拳 ModuleMonkey core.M_Modules = "monkey" //猴拳
ModuleIntegral core.M_Modules = "integral" // 积分boss
) )
// 数据表名定义处 // 数据表名定义处
@ -430,6 +431,9 @@ const (
TableWhackamole = "whackamole" TableWhackamole = "whackamole"
// 猴拳 // 猴拳
TableMonkey = "monkey" TableMonkey = "monkey"
// 积分boss
TableIntegral = "integral"
) )
// RPC服务接口定义处 // RPC服务接口定义处

View File

@ -6,21 +6,11 @@ import (
"go_dreamfactory/modules" "go_dreamfactory/modules"
) )
const (
EnchantGetListResp = "getlist"
EnchantChallengeResp = "challenge"
EnchantChallengeOverResp = "challengeover"
EnchantSkillLvResp = "skilllv"
EnchantGetRewardResp = "getreward"
EnchantBuyResp = "buy"
EnchantRankListResp = "ranklist"
)
type apiComp struct { type apiComp struct {
modules.MCompGate modules.MCompGate
service core.IService service core.IService
configure *configureComp configure *configureComp
module *Enchant module *Integral
friend comm.IFriend friend comm.IFriend
chat comm.IChat chat comm.IChat
} }
@ -28,7 +18,7 @@ type apiComp struct {
//组件初始化接口 //组件初始化接口
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompGate.Init(service, module, comp, options) err = this.MCompGate.Init(service, module, comp, options)
this.module = module.(*Enchant) this.module = module.(*Integral)
this.service = service this.service = service
return return

View File

@ -3,12 +3,11 @@ package integral
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
) )
// 参数校验 // 参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.EnchantChallengeReq) (errdata *pb.ErrorData) { func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.IntegralChallengeReq) (errdata *pb.ErrorData) {
if req.BossType <= 0 || req.Battle == nil { if req.Nandu <= 0 || req.Battle == nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError, Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(), Title: pb.ErrorCode_ReqParameterError.ToString(),
@ -19,13 +18,13 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.EnchantCh
} }
// /挑战主线关卡 // /挑战主线关卡
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallengeReq) (errdata *pb.ErrorData) { func (this *apiComp) Challenge(session comm.IUserSession, req *pb.IntegralChallengeReq) (errdata *pb.ErrorData) {
errdata = this.ChallengeCheck(session, req) errdata = this.ChallengeCheck(session, req)
if errdata != nil { if errdata != nil {
return // 参数校验失败直接返回 return // 参数校验失败直接返回
} }
enchant, err := this.module.modelEnchant.getEnchantList(session.GetUserId()) list, err := this.module.modelIntegral.getIntegralList(session.GetUserId())
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaNotFound, // 道具数量不足 Code: pb.ErrorCode_PagodaNotFound, // 道具数量不足
@ -34,7 +33,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
return return
} }
cfgData, err := this.module.configure.GetEnchantBossConfigData(req.BossType) cfgData, err := this.module.configure.GetStageBoss(list.Hid, req.Nandu)
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足 Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足
@ -43,57 +42,30 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
} }
return return
} }
if len(cfgData) <= 0 { /// 启动前校验
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足
Title: pb.ErrorCode_ConfigNoFound.ToString(),
}
return
}
if errdata = this.module.CheckRes(session, cfgData[0].PsConsume); errdata != nil {
return
}
_, ok := enchant.Boss[req.BossType]
if !ok { // 类型校验
enchant.Boss[req.BossType] = 0
}
// 获取分数
var score int32
var format []int32
var battleconf *cfg.GameEnchantBossData
score = int32(enchant.Boss[req.BossType])
for _, v := range cfgData {
if v.ScoreLow <= score && v.ScoreUp >= score {
format = v.Boss
battleconf = v
}
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{ errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
Rulesid: battleconf.BattleReadyID, Rulesid: cfgData.BattleReadyID,
Ptype: pb.PlayType_enchant, Ptype: pb.PlayType_enchant,
Title: "", Title: "",
Format: req.Battle, Format: req.Battle,
Mformat: format, Mformat: cfgData.Boss,
}) })
if errdata != nil { if errdata != nil {
return return
} }
session.SendMsg(string(this.module.GetType()), EnchantChallengeResp, &pb.EnchantChallengeResp{ session.SendMsg(string(this.module.GetType()), "challenge", &pb.IntegralChallengeResp{
Info: &pb.BattleInfo{ Info: &pb.BattleInfo{Id: record.Id,
Id: record.Id,
Title: record.Title, Title: record.Title,
Rulesid: battleconf.BattleReadyID, Rulesid: cfgData.BattleReadyID,
Btype: record.Btype, Btype: record.Btype,
Ptype: record.Ptype, Ptype: record.Ptype,
RedCompId: record.RedCompId, RedCompId: record.RedCompId,
Redflist: record.Redflist, Redflist: record.Redflist,
BlueCompId: record.BlueCompId, BlueCompId: record.BlueCompId,
Buleflist: record.Buleflist, Buleflist: record.Buleflist,
Tasks: record.Tasks, Tasks: record.Tasks},
}, Nandu: req.Nandu,
BossType: req.BossType,
}) })
return return

View File

@ -7,8 +7,8 @@ import (
) )
//参数校验 //参数校验
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.EnchantChallengeOverReq) (errdata *pb.ErrorData) { func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.IntegralChallengeOverReq) (errdata *pb.ErrorData) {
if req.BossType <= 0 { if req.Nandu <= 0 {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError, Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(), Title: pb.ErrorCode_ReqParameterError.ToString(),
@ -19,11 +19,9 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Encha
} }
///挑战主线关卡 ///挑战主线关卡
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantChallengeOverReq) (errdata *pb.ErrorData) { func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralChallengeOverReq) (errdata *pb.ErrorData) {
var ( var (
mapData map[string]interface{} mapData map[string]interface{}
bWin bool // 战斗是否胜利
score int32 // 通关获得分数
res []*cfg.Gameatn res []*cfg.Gameatn
) )
mapData = make(map[string]interface{}, 0) mapData = make(map[string]interface{}, 0)
@ -33,7 +31,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
return // 参数校验失败直接返回 return // 参数校验失败直接返回
} }
enchant, err := this.module.modelEnchant.getEnchantList(session.GetUserId()) list, err := this.module.modelIntegral.getIntegralList(session.GetUserId())
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaNotFound, Code: pb.ErrorCode_PagodaNotFound,
@ -42,7 +40,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
return return
} }
cfgEnchant, err := this.module.configure.GetEnchantBossConfigData(req.BossType) cfgData, err := this.module.configure.GetStageBoss(list.Hid, req.Nandu)
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足 Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足
@ -53,27 +51,11 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
} }
// check // check
errdata, bWin = this.module.battle.CheckBattleReport(session, req.Report) errdata, _ = this.module.battle.CheckBattleReport(session, req.Report)
if errdata != nil { if errdata != nil {
return return
} }
if !bWin { // 战斗失败了 直接返回
if errdata = this.module.ConsumeRes(session, cfgEnchant[0].PsMg, true); errdata != nil {
return
}
session.SendMsg(string(this.module.GetType()), EnchantChallengeOverResp, &pb.EnchantChallengeOverResp{Data: enchant})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant[0].PsMg)
})
return
}
if errdata = this.module.ConsumeRes(session, cfgEnchant[0].PsConsume, true); errdata != nil {
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant[0].PsConsume)
})
userinfo, err := this.module.ModuleUser.GetUser(session.GetUserId()) userinfo, err := this.module.ModuleUser.GetUser(session.GetUserId())
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
@ -83,42 +65,28 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
} }
return return
} }
key := req.BossType
if enchant.BossTime[key] > req.Report.Costtime || enchant.BossTime[key] == 0 {
enchant.BossTime[key] = req.Report.Costtime
mapData["bossTime"] = enchant.BossTime // 更新时间
this.module.CheckRank(session.GetUserId(), req.BossType, req.Report, userinfo, req.Score)
}
enchant.Boss[req.BossType] = req.Score // 获得的积分
// 发放通关随机奖励 // 发放通关随机奖励
for _, v := range cfgEnchant { for _, v := range cfgData.Firstprize {
if score >= v.ScoreLow && score <= v.ScoreUp { res = append(res, v)
for _, v1 := range v.RewardDrop { }
reward := this.module.ModuleTools.GetGroupDataByLottery(v1, userinfo.Vip, userinfo.Lv) reward := this.module.ModuleTools.GetGroupDataByLottery(cfgData.Drop, userinfo.Vip, userinfo.Lv)
res = append(res, reward...) res = append(res, reward...)
}
}
}
if len(res) > 0 { if len(res) > 0 {
if errdata = this.module.DispenseRes(session, res, true); errdata != nil { if errdata = this.module.DispenseRes(session, res, true); errdata != nil {
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "EnchantChallengeOverReq", res) this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "IntegralChallengeOverReq", res)
}) })
} }
mapData["bossTime"] = enchant.BossTime errdata = this.module.ModifyIntegralData(session.GetUserId(), mapData)
mapData["boss"] = enchant.Boss
errdata = this.module.ModifyEnchantData(session.GetUserId(), mapData) session.SendMsg(string(this.module.GetType()), "challengeover", &pb.IntegralChallengeOverResp{
if session.GetUserId() != "" { // 恢复时间 Data: list,
if userexpand, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil { })
enchant.RecoveryTime = userexpand.Recovertimeunifiedticket
}
}
session.SendMsg(string(this.module.GetType()), EnchantChallengeOverResp, &pb.EnchantChallengeOverResp{Data: enchant})
return return
} }

View File

@ -9,34 +9,27 @@ import (
) )
//参数校验 //参数校验
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.EnchantGetListReq) (errdata *pb.ErrorData) { func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.IntegralGetListReq) (errdata *pb.ErrorData) {
return return
} }
func (this *apiComp) GetList(session comm.IUserSession, req *pb.EnchantGetListReq) (errdata *pb.ErrorData) { func (this *apiComp) GetList(session comm.IUserSession, req *pb.IntegralGetListReq) (errdata *pb.ErrorData) {
// 刷新挑战卷 list, err := this.module.modelIntegral.getIntegralList(session.GetUserId())
if errdata = this.module.ModuleItems.RecoverTicket(session); errdata != nil {
return
}
list, err := this.module.modelEnchant.getEnchantList(session.GetUserId())
if mgo.MongodbNil == err { if mgo.MongodbNil == err {
list.Id = primitive.NewObjectID().Hex() list.Id = primitive.NewObjectID().Hex()
list.Uid = session.GetUserId() list.Uid = session.GetUserId()
list.Boss = make(map[int32]int64)
list.BossTime = make(map[int32]int32)
this.module.modelEnchant.Add(session.GetUserId(), list) this.module.modelIntegral.Add(session.GetUserId(), list)
}
if session.GetUserId() != "" { // 恢复时间
if userexpand, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil {
list.RecoveryTime = userexpand.Recovertimeunifiedticket
}
} }
// if session.GetUserId() != "" { // 恢复时间
// if userexpand, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil {
// list.RecoveryTime = userexpand.Recovertimeunifiedticket
// }
// }
session.SendMsg(string(this.module.GetType()), EnchantGetListResp, &pb.EnchantGetListResp{Data: list}) session.SendMsg(string(this.module.GetType()), "getlist", &pb.IntegralGetListResp{Data: list})
return return
} }

View File

@ -11,15 +11,15 @@ import (
"go.mongodb.org/mongo-driver/x/bsonx" "go.mongodb.org/mongo-driver/x/bsonx"
) )
type modelEnchant struct { type modelIntegral struct {
modules.MCompModel modules.MCompModel
module *Enchant module *Integral
} }
func (this *modelEnchant) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *modelIntegral) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
this.TableName = string(comm.TableEnchant) this.TableName = string(comm.TableIntegral)
err = this.MCompModel.Init(service, module, comp, options) err = this.MCompModel.Init(service, module, comp, options)
this.module = module.(*Enchant) this.module = module.(*Integral)
// uid 创建索引 // uid 创建索引
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
@ -27,17 +27,17 @@ func (this *modelEnchant) Init(service core.IService, module core.IModule, comp
return return
} }
func (this *modelEnchant) modifyEnchantDataByObjId(uid string, data map[string]interface{}) error { func (this *modelIntegral) modifyIntegralDataByObjId(uid string, data map[string]interface{}) error {
return this.Change(uid, data) return this.Change(uid, data)
} }
// 获取列表信息 // 获取列表信息
func (this *modelEnchant) getEnchantList(uid string) (result *pb.DBEnchant, err error) { func (this *modelIntegral) getIntegralList(uid string) (result *pb.DBIntegralBoss, err error) {
result = &pb.DBEnchant{ result = &pb.DBIntegralBoss{
Id: primitive.NewObjectID().Hex(), Id: primitive.NewObjectID().Hex(),
Uid: uid, Uid: uid,
Boss: make(map[int32]int64), Buff: map[int32]int32{},
BossTime: make(map[int32]int32), Score: map[int32]int32{},
} }
if err = this.Get(uid, result); err != nil { if err = this.Get(uid, result); err != nil {
return return

View File

@ -7,9 +7,9 @@ import (
"go_dreamfactory/pb" "go_dreamfactory/pb"
) )
type Enchant struct { type Integral struct {
modules.ModuleBase modules.ModuleBase
modelEnchant *modelEnchant modelIntegral *modelIntegral
api *apiComp api *apiComp
configure *configureComp configure *configureComp
@ -18,14 +18,14 @@ type Enchant struct {
} }
func NewModule() core.IModule { func NewModule() core.IModule {
return &Enchant{} return &Integral{}
} }
func (this *Enchant) GetType() core.M_Modules { func (this *Integral) GetType() core.M_Modules {
return comm.ModuleEnchant return comm.ModuleIntegral
} }
func (this *Enchant) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { func (this *Integral) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
if err = this.ModuleBase.Init(service, module, options); err != nil { if err = this.ModuleBase.Init(service, module, options); err != nil {
return return
} }
@ -33,7 +33,7 @@ func (this *Enchant) Init(service core.IService, module core.IModule, options co
return return
} }
func (this *Enchant) Start() (err error) { func (this *Integral) Start() (err error) {
if err = this.ModuleBase.Start(); err != nil { if err = this.ModuleBase.Start(); err != nil {
return return
} }
@ -46,16 +46,16 @@ func (this *Enchant) Start() (err error) {
return return
} }
func (this *Enchant) OnInstallComp() { func (this *Integral) OnInstallComp() {
this.ModuleBase.OnInstallComp() this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelEnchant = this.RegisterComp(new(modelEnchant)).(*modelEnchant) this.modelIntegral = this.RegisterComp(new(modelIntegral)).(*modelIntegral)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
} }
// 接口信息 // 接口信息
func (this *Enchant) ModifyEnchantData(uid string, data map[string]interface{}) (errdata *pb.ErrorData) { func (this *Integral) ModifyIntegralData(uid string, data map[string]interface{}) (errdata *pb.ErrorData) {
err := this.modelEnchant.modifyEnchantDataByObjId(uid, data) err := this.modelIntegral.modifyIntegralDataByObjId(uid, data)
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError, Code: pb.ErrorCode_DBError,
@ -66,6 +66,6 @@ func (this *Enchant) ModifyEnchantData(uid string, data map[string]interface{})
return return
} }
func (this *Enchant) CheckRank(uid string, boosID int32, report *pb.BattleReport, userinfo *pb.DBUser, score int64) { func (this *Integral) CheckRank(uid string, boosID int32, report *pb.BattleReport, userinfo *pb.DBUser, score int64) {
} }

View File

@ -36,7 +36,9 @@ type DBIntegralBoss struct {
Totalscore int64 `protobuf:"varint,9,opt,name=totalscore,proto3" json:"totalscore"` // 累计积分 Totalscore int64 `protobuf:"varint,9,opt,name=totalscore,proto3" json:"totalscore"` // 累计积分
Reward1 int32 `protobuf:"varint,10,opt,name=reward1,proto3" json:"reward1"` // 类型1 奖励( Integralreward cid ) Reward1 int32 `protobuf:"varint,10,opt,name=reward1,proto3" json:"reward1"` // 类型1 奖励( Integralreward cid )
Reward2 int32 `protobuf:"varint,11,opt,name=reward2,proto3" json:"reward2"` // 类型2 奖励( Integralreward cid ) Reward2 int32 `protobuf:"varint,11,opt,name=reward2,proto3" json:"reward2"` // 类型2 奖励( Integralreward cid )
Buff map[int32]int32 `protobuf:"bytes,12,rep,name=buff,proto3" json:"buff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 激活的buff (key Integralcondition value :0 未激活) Buff map[int32]int32 `protobuf:"bytes,12,rep,name=buff,proto3" json:"buff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 激活的buff (key Integralcondition value :0 未激活) 注:事件类型 才有值
Nandu int32 `protobuf:"varint,13,opt,name=nandu,proto3" json:"nandu"` // 已经解锁的难度
Score map[int32]int32 `protobuf:"bytes,14,rep,name=score,proto3" json:"score" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 难度 value 积分
} }
func (x *DBIntegralBoss) Reset() { func (x *DBIntegralBoss) Reset() {
@ -155,11 +157,25 @@ func (x *DBIntegralBoss) GetBuff() map[int32]int32 {
return nil return nil
} }
func (x *DBIntegralBoss) GetNandu() int32 {
if x != nil {
return x.Nandu
}
return 0
}
func (x *DBIntegralBoss) GetScore() map[int32]int32 {
if x != nil {
return x.Score
}
return nil
}
var File_integral_integral_db_proto protoreflect.FileDescriptor var File_integral_integral_db_proto protoreflect.FileDescriptor
var file_integral_integral_db_proto_rawDesc = []byte{ var file_integral_integral_db_proto_rawDesc = []byte{
0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67,
0x72, 0x61, 0x6c, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x02, 0x0a, 0x72, 0x61, 0x6c, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x03, 0x0a,
0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x12, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
@ -179,12 +195,20 @@ var file_integral_integral_db_proto_rawDesc = []byte{
0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x32, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x32, 0x12, 0x2d, 0x0a, 0x04, 0x62,
0x75, 0x66, 0x66, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x75, 0x66, 0x66, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x49, 0x6e,
0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x45, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x62, 0x75, 0x66, 0x66, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x62, 0x75, 0x66, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61,
0x66, 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x6e, 0x64, 0x75, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75,
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x1a, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73,
0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f,
0x74, 0x6f, 0x33, 0x72, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 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,
0x63, 0x6f, 0x72, 0x65, 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 ( var (
@ -199,18 +223,20 @@ func file_integral_integral_db_proto_rawDescGZIP() []byte {
return file_integral_integral_db_proto_rawDescData return file_integral_integral_db_proto_rawDescData
} }
var file_integral_integral_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_integral_integral_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_integral_integral_db_proto_goTypes = []interface{}{ var file_integral_integral_db_proto_goTypes = []interface{}{
(*DBIntegralBoss)(nil), // 0: DBIntegralBoss (*DBIntegralBoss)(nil), // 0: DBIntegralBoss
nil, // 1: DBIntegralBoss.BuffEntry nil, // 1: DBIntegralBoss.BuffEntry
nil, // 2: DBIntegralBoss.ScoreEntry
} }
var file_integral_integral_db_proto_depIdxs = []int32{ var file_integral_integral_db_proto_depIdxs = []int32{
1, // 0: DBIntegralBoss.buff:type_name -> DBIntegralBoss.BuffEntry 1, // 0: DBIntegralBoss.buff:type_name -> DBIntegralBoss.BuffEntry
1, // [1:1] is the sub-list for method output_type 2, // 1: DBIntegralBoss.score:type_name -> DBIntegralBoss.ScoreEntry
1, // [1:1] is the sub-list for method input_type 2, // [2:2] is the sub-list for method output_type
1, // [1:1] is the sub-list for extension type_name 2, // [2:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension extendee 2, // [2:2] is the sub-list for extension type_name
0, // [0:1] is the sub-list for field type_name 2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
} }
func init() { file_integral_integral_db_proto_init() } func init() { file_integral_integral_db_proto_init() }
@ -238,7 +264,7 @@ func file_integral_integral_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_integral_integral_db_proto_rawDesc, RawDescriptor: file_integral_integral_db_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 2, NumMessages: 3,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -111,7 +111,7 @@ type IntegralChallengeReq struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
BossType int32 `protobuf:"varint,1,opt,name=bossType,proto3" json:"bossType"` // boos 类型 Nandu int32 `protobuf:"varint,1,opt,name=nandu,proto3" json:"nandu"` // boos 难度
Battle *BattleFormation `protobuf:"bytes,2,opt,name=battle,proto3" json:"battle"` Battle *BattleFormation `protobuf:"bytes,2,opt,name=battle,proto3" json:"battle"`
} }
@ -147,9 +147,9 @@ func (*IntegralChallengeReq) Descriptor() ([]byte, []int) {
return file_integral_integral_msg_proto_rawDescGZIP(), []int{2} return file_integral_integral_msg_proto_rawDescGZIP(), []int{2}
} }
func (x *IntegralChallengeReq) GetBossType() int32 { func (x *IntegralChallengeReq) GetNandu() int32 {
if x != nil { if x != nil {
return x.BossType return x.Nandu
} }
return 0 return 0
} }
@ -167,7 +167,7 @@ type IntegralChallengeResp struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Info *BattleInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` Info *BattleInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
BossType int32 `protobuf:"varint,2,opt,name=bossType,proto3" json:"bossType"` // boos 类型 Nandu int32 `protobuf:"varint,2,opt,name=nandu,proto3" json:"nandu"` // boos 类型
} }
func (x *IntegralChallengeResp) Reset() { func (x *IntegralChallengeResp) Reset() {
@ -209,9 +209,9 @@ func (x *IntegralChallengeResp) GetInfo() *BattleInfo {
return nil return nil
} }
func (x *IntegralChallengeResp) GetBossType() int32 { func (x *IntegralChallengeResp) GetNandu() int32 {
if x != nil { if x != nil {
return x.BossType return x.Nandu
} }
return 0 return 0
} }
@ -221,7 +221,7 @@ type IntegralChallengeOverReq struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
BossType int32 `protobuf:"varint,1,opt,name=bossType,proto3" json:"bossType"` // boos 类型 Nandu int32 `protobuf:"varint,1,opt,name=nandu,proto3" json:"nandu"` // boos 难度
Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报 Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报
Score int64 `protobuf:"varint,3,opt,name=score,proto3" json:"score"` //获得积分 或伤害 Score int64 `protobuf:"varint,3,opt,name=score,proto3" json:"score"` //获得积分 或伤害
} }
@ -258,9 +258,9 @@ func (*IntegralChallengeOverReq) Descriptor() ([]byte, []int) {
return file_integral_integral_msg_proto_rawDescGZIP(), []int{4} return file_integral_integral_msg_proto_rawDescGZIP(), []int{4}
} }
func (x *IntegralChallengeOverReq) GetBossType() int32 { func (x *IntegralChallengeOverReq) GetNandu() int32 {
if x != nil { if x != nil {
return x.BossType return x.Nandu
} }
return 0 return 0
} }
@ -340,30 +340,29 @@ var file_integral_integral_msg_proto_rawDesc = []byte{
0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x04, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x04,
0x64, 0x61, 0x74, 0x61, 0x22, 0x5c, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c,
0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05,
0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e,
0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x64, 0x75, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61,
0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x4e, 0x0a, 0x15,
0x6c, 0x65, 0x22, 0x54, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67,
0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20,
0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x18,
0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x22, 0x6d, 0x0a, 0x18,
0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x73, 0x0a, 0x18, 0x49, 0x6e, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67,
0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x64,
0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x12, 0x25,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72,
0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03,
0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x40, 0x0a, 0x19, 0x49,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x40, 0x0a, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65,
0x19, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67,
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a,
0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (