Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
fa0c02991d
@ -828,7 +828,7 @@
|
||||
"datatype": 2,
|
||||
"type": 70,
|
||||
"inited": [],
|
||||
"data1": 101,
|
||||
"data1": 102,
|
||||
"data2": 0,
|
||||
"data3": 0,
|
||||
"data4": 0,
|
||||
|
@ -4,5 +4,5 @@ Website = "http://legu.cc"
|
||||
Icon = "app.png"
|
||||
Name = "RobotGUI"
|
||||
ID = "cc.legu.app"
|
||||
Version = "1.0.7"
|
||||
Build = 8
|
||||
Version = "1.0.8"
|
||||
Build = 9
|
||||
|
@ -3,7 +3,7 @@ package common
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@ -72,20 +72,27 @@ func IsUpgrade(newVersion, oldVersion string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func Copy(srcFile, destFile string) (int, error) {
|
||||
input, err := ioutil.ReadFile(srcFile)
|
||||
func Copy(src, dst string) (len int64, err error) {
|
||||
|
||||
dstWriter, err := os.Create(dst)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
return 0, err
|
||||
return
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(destFile, input, 0644)
|
||||
srcReader, err := os.Open(src)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
return 0, err
|
||||
return
|
||||
}
|
||||
|
||||
return len(input), nil
|
||||
// Copy()函数其实是调用了
|
||||
// io包中私有函数copyBuffer() 默认缓冲区是32K
|
||||
// 与Copy()函数功能一致的是CopyBuffer()可以设置缓冲区
|
||||
len, err = io.Copy(dstWriter, srcReader)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func DeleteFile(filePath string) error {
|
||||
|
@ -13,7 +13,12 @@ type about struct {
|
||||
|
||||
func newAbout() *about {
|
||||
var a about
|
||||
content := widget.NewCard("", "", widget.NewRichTextFromMarkdown(common.APP_ABOUT_INFO))
|
||||
ver := toolWin.app.Metadata().Version
|
||||
content := widget.NewCard("", "", widget.NewRichTextFromMarkdown(
|
||||
`
|
||||
梦工厂项目辅助工具GUI
|
||||
@v`+ver,
|
||||
))
|
||||
a.aboutDialog = dialog.NewCustom(common.APP_ABOUT_TITLE, common.APP_ABOUT_CONFIRM, content, toolWin.w)
|
||||
|
||||
return &a
|
||||
|
@ -182,6 +182,7 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
||||
go_overrideBtn.Disable()
|
||||
defer func() {
|
||||
go_overrideBtn.Enable()
|
||||
this.goList.itemList.Refresh()
|
||||
}()
|
||||
for _, v := range this.goList.selItemIds {
|
||||
// logrus.WithField("path1", filepath.Join(tmpDir.Text, "go", v)).Debug("copy go")
|
||||
@ -192,14 +193,9 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := common.DeleteFile(filepath.Join(tmpDir.Text, "go", v)); err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.goList.deleteItem(v)
|
||||
}
|
||||
this.goList.changeFileCount()
|
||||
}
|
||||
|
||||
//取消checked
|
||||
@ -258,14 +254,9 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := common.DeleteFile(filepath.Join(tmpDir.Text, "json", v)); err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.jsonList.deleteItem(v)
|
||||
}
|
||||
this.jsonList.changeFileCount()
|
||||
}
|
||||
|
||||
//取消checked
|
||||
@ -296,7 +287,7 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
||||
list.selItemIds = append(list.selItemIds, v.Text)
|
||||
list.itemList.UpdateItem(i, widget.NewCheck(v.Text, nil))
|
||||
}
|
||||
list.titleLabel.SetText(fmt.Sprintf("(%d/%d)", len(list.selItemIds), list.fileTotal))
|
||||
list.changeFileCount()
|
||||
list.itemList.Refresh()
|
||||
}
|
||||
|
||||
@ -339,22 +330,49 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
||||
return
|
||||
}
|
||||
|
||||
// 更新列表
|
||||
if genTypeText == "go" {
|
||||
changeGo := func() {
|
||||
this.goList.changeItem(filepath.Join(tmpDir.Text, "go"), filepath.Join(projectDir.Text, outputCodeDir.Text))
|
||||
this.goList.titleLabel.SetText(fmt.Sprintf("(%d/%d个)", len(this.goList.selItemIds), this.goList.fileTotal))
|
||||
go_overrideBtn.Show()
|
||||
this.goList.titleLabel.Show()
|
||||
} else if genTypeText == "json" {
|
||||
}
|
||||
|
||||
changeJson := func() {
|
||||
this.jsonList.changeItem(filepath.Join(tmpDir.Text, "json"), filepath.Join(projectDir.Text, outputJsonDir.Text))
|
||||
this.jsonList.titleLabel.SetText(fmt.Sprintf("(%d/%d)", len(this.jsonList.selItemIds), this.jsonList.fileTotal))
|
||||
json_overrideBtn.Show()
|
||||
this.jsonList.titleLabel.Show()
|
||||
}
|
||||
|
||||
// 更新列表
|
||||
if genTypeText == "go" {
|
||||
changeGo()
|
||||
} else if genTypeText == "json" {
|
||||
changeJson()
|
||||
} else if genTypeText == "all" {
|
||||
changeGo()
|
||||
changeJson()
|
||||
}
|
||||
}
|
||||
|
||||
//使用说明
|
||||
desBtn := widget.NewButtonWithIcon("", theme.QuestionIcon(), func() {
|
||||
quesWin := fyne.CurrentApp().NewWindow("使用说明")
|
||||
quesWin.SetContent(widget.NewRichTextFromMarkdown(
|
||||
`
|
||||
1. 先更新excel文件
|
||||
2. 配置Luban(已做可忽略)
|
||||
3. 选择**生成类型**,单击生成
|
||||
4. 选择要覆盖的文件
|
||||
`))
|
||||
quesWin.Resize(fyne.NewSize(350, 200))
|
||||
quesWin.SetFixedSize(true)
|
||||
quesWin.CenterOnScreen()
|
||||
quesWin.Show()
|
||||
})
|
||||
|
||||
// layout
|
||||
left := container.NewVBox(form, container.NewHBox(&layout.Spacer{}, saveBtn, genBtn))
|
||||
left := container.NewVBox(form, container.NewHBox(&layout.Spacer{}, desBtn, saveBtn, genBtn))
|
||||
right := container.NewGridWithColumns(2,
|
||||
container.NewBorder(
|
||||
container.NewHBox(go_allSelBtn, go_allCancelBtn, go_overrideBtn, widget.NewLabel("Go文件"), this.goList.titleLabel),
|
||||
@ -434,12 +452,16 @@ func (f *fileList) addItem(val string) {
|
||||
func (f *fileList) deleteItem(name string) {
|
||||
for i, v := range f.cachedList.Items {
|
||||
if v.Text == name {
|
||||
f.selItemIds = utils.DeleteString(f.selItemIds, v.Text)
|
||||
f.cachedList.Items = append(f.cachedList.Items[:i], f.cachedList.Items[i+1:]...)
|
||||
if f.fileTotal > 0 {
|
||||
f.fileTotal--
|
||||
}
|
||||
}
|
||||
}
|
||||
f.itemList.Refresh()
|
||||
}
|
||||
|
||||
// 改变列表项目
|
||||
func (f *fileList) changeItem(tmpDir, projectDir string) {
|
||||
f.fileTotal = 0
|
||||
f.selItemIds = []string{}
|
||||
@ -478,6 +500,11 @@ func (f *fileList) changeItem(tmpDir, projectDir string) {
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新文件数
|
||||
func (f *fileList) changeFileCount() {
|
||||
f.titleLabel.SetText(fmt.Sprintf("(%d/%d)", len(f.selItemIds), f.fileTotal))
|
||||
}
|
||||
|
||||
func (a *appGen) GetAppName() string {
|
||||
return common.TOOLBAR_GEN
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ func (this *toyUserInfo) dataListener() {
|
||||
// listener gold
|
||||
if data.Msg.MainType == string(comm.ModuleUser) &&
|
||||
data.Msg.SubType == "reschange" {
|
||||
rsp := &pb.UserResChangePush{}
|
||||
rsp := &pb.UserResChangedPush{}
|
||||
if !comm.ProtoUnmarshal(data.Msg, rsp) {
|
||||
logrus.Error("unmarshal err")
|
||||
return
|
||||
|
@ -122,7 +122,7 @@ type (
|
||||
// 随机任务
|
||||
IRtask interface {
|
||||
// 条件校验
|
||||
CheckCondi(session IUserSession, condiId int32) (code pb.ErrorCode)
|
||||
CheckCondi(uid string, condiId int32) (code pb.ErrorCode)
|
||||
//任务触发
|
||||
SendToRtask(session IUserSession, rtaskType TaskType, params ...int32) (code pb.ErrorCode)
|
||||
// 初始化条件数据
|
||||
|
@ -59,16 +59,11 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), HuntingChallengeResp, &pb.VikingChallengeResp{Info: &pb.BattleInfo{
|
||||
Id: record.Id,
|
||||
Title: record.Title,
|
||||
Btype: record.Btype,
|
||||
Ptype: record.Ptype,
|
||||
RedCompId: record.RedCompId,
|
||||
Redflist: record.Redflist,
|
||||
BlueCompId: record.BlueCompId,
|
||||
Buleflist: record.Buleflist,
|
||||
}})
|
||||
session.SendMsg(string(this.module.GetType()), HuntingChallengeResp, &pb.HuntingChallengeResp{
|
||||
Info: &pb.BattleInfo{Id: record.Id, Title: record.Title, Btype: record.Btype, Ptype: record.Ptype, RedCompId: record.RedCompId, Redflist: record.Redflist, BlueCompId: record.BlueCompId, Buleflist: record.Buleflist},
|
||||
BossType: req.BossType,
|
||||
Difficulty: req.Difficulty,
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -8,24 +8,21 @@ import (
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.DBHero) (code pb.ErrorCode) {
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.LibraryGetListReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.DBHero) (code pb.ErrorCode, data proto.Message) {
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.LibraryGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
code = this.GetListCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
rsp := &pb.LibraryGetListResp{}
|
||||
|
||||
// list, err := this.module.modelLibrary.getLibraryList(session.GetUserId())
|
||||
// if err != nil {
|
||||
// code = pb.ErrorCode_DBError
|
||||
// return
|
||||
// }
|
||||
rsp.Data = this.module.GetLibraryList(session.GetUserId())
|
||||
session.SendMsg(string(this.module.GetType()), LibraryGetListResp, rsp)
|
||||
|
||||
//session.SendMsg(string(this.module.GetType()), LibraryGetListResp, &pb.LibraryGetListResp{Data: list})
|
||||
return
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
package library
|
||||
|
||||
/*
|
||||
* 单个英雄剧情id 奖励
|
||||
*/
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
@ -9,7 +9,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
game_libraryhero = "game_libraryhero.json"
|
||||
game_libraryhero = "game_libraryhero.json"
|
||||
game_libraryfetter = "game_libraryfetter.json"
|
||||
)
|
||||
|
||||
///配置管理基础组件
|
||||
@ -21,8 +22,11 @@ type configureComp struct {
|
||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||
|
||||
err = this.LoadConfigure(game_libraryhero, cfg.NewGameLibraryHero)
|
||||
|
||||
//err = this.LoadConfigure(game_libraryhero, cfg.NewGameLibraryHero)
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
game_libraryhero: cfg.NewGameLibraryHero,
|
||||
game_libraryfetter: cfg.NewGameLibraryFetter,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@ -52,6 +56,17 @@ func (this *configureComp) GetLibraryHero(hid string) (data *cfg.GameLibraryHero
|
||||
} else {
|
||||
log.Errorf("get game_challenge conf err:%v", err)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) GetLibraryFetter(fid int32) (data *cfg.GameLibraryFetterData) {
|
||||
if v, err := this.GetConfigure(game_libraryfetter); err == nil {
|
||||
if configure, ok := v.(*cfg.GameLibraryFetter); ok {
|
||||
data = configure.Get(fid)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
log.Errorf("get game_challenge conf err:%v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
type Library struct {
|
||||
@ -44,3 +46,39 @@ func (this *Library) ModifyLibraryData(uid string, data map[string]interface{})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//英雄列表
|
||||
func (this *Library) GetLibraryList(uid string) []*pb.DBLibrary {
|
||||
return this.modelLibrary.getLibraryList(uid)
|
||||
}
|
||||
|
||||
//通过羁绊id 创建多个羁绊信息
|
||||
func (this *Library) CreateLibrary(uid string, fids []int32, heroConfId string) (code pb.ErrorCode, objLibrary []*pb.DBLibrary) {
|
||||
for _, fid := range fids {
|
||||
obj := &pb.DBLibrary{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: uid,
|
||||
Fid: fid,
|
||||
Hero: map[string]int32{},
|
||||
Prize: false,
|
||||
Fetterlv: 0,
|
||||
}
|
||||
|
||||
conf := this.configure.GetLibraryFetter(fid)
|
||||
if conf == nil {
|
||||
for _, v := range conf.Hid {
|
||||
obj.Hero[v] = 0
|
||||
if v == heroConfId {
|
||||
obj.Hero[heroConfId] = 1
|
||||
}
|
||||
}
|
||||
if err := this.modelLibrary.createLibrary(uid, obj); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
break
|
||||
}
|
||||
objLibrary = append(objLibrary, obj)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ func (this *apiComp) Dotask(session comm.IUserSession, req *pb.LinestoryDotaskRe
|
||||
//校验子任务完成条件
|
||||
if m, ok := module.(comm.IRtask); ok {
|
||||
for _, condiId := range stageConf.Cond {
|
||||
if code = m.CheckCondi(session, condiId); code != pb.ErrorCode_Success {
|
||||
if code = m.CheckCondi(session.GetUserId(), condiId); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ func (this *apiComp) Dostart(session comm.IUserSession, req *pb.LinestoryStartRe
|
||||
if m, ok := module.(comm.IRtask); ok {
|
||||
// 校验限定条件
|
||||
for _, condiId := range conf.Cond {
|
||||
if code = m.CheckCondi(session, condiId); code != pb.ErrorCode_Success {
|
||||
if code = m.CheckCondi(session.GetUserId(), condiId); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
|
||||
|
||||
code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
|
||||
Ptype: pb.PlayType_moonfantasy,
|
||||
Title: node.Title,
|
||||
Title: "",
|
||||
Leadpos: req.Leadpos,
|
||||
Teamids: req.Teamids,
|
||||
Mformat: node.FormatList,
|
||||
@ -59,15 +59,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeResp, &pb.MainlineChallengeResp{Info: &pb.BattleInfo{
|
||||
Id: record.Id,
|
||||
Title: record.Title,
|
||||
Btype: record.Btype,
|
||||
Ptype: record.Ptype,
|
||||
RedCompId: record.RedCompId,
|
||||
Redflist: record.Redflist,
|
||||
BlueCompId: record.BlueCompId,
|
||||
Buleflist: record.Buleflist,
|
||||
}})
|
||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeResp, &pb.MainlineChallengeResp{
|
||||
Info: &pb.BattleInfo{Id: record.Id, Title: record.Title, Btype: record.Btype, Ptype: record.Ptype, RedCompId: record.RedCompId, Redflist: record.Redflist, BlueCompId: record.BlueCompId, Buleflist: record.Buleflist},
|
||||
ChapterObj: req.ChapterObj,
|
||||
MainlineId: req.GetMainlineId(),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -66,15 +66,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), PagodaChallengeResp, &pb.PagodaChallengeResp{Info: &pb.BattleInfo{
|
||||
Id: record.Id,
|
||||
Title: record.Title,
|
||||
Btype: record.Btype,
|
||||
Ptype: record.Ptype,
|
||||
RedCompId: record.RedCompId,
|
||||
Redflist: record.Redflist,
|
||||
BlueCompId: record.BlueCompId,
|
||||
Buleflist: record.Buleflist,
|
||||
}})
|
||||
session.SendMsg(string(this.module.GetType()), PagodaChallengeResp, &pb.PagodaChallengeResp{
|
||||
Info: &pb.BattleInfo{Id: record.Id, Title: record.Title, Btype: record.Btype, Ptype: record.Ptype, RedCompId: record.RedCompId, Redflist: record.Redflist, BlueCompId: record.BlueCompId, Buleflist: record.Buleflist},
|
||||
LevelID: req.LevelID,
|
||||
PagodaType: req.PagodaType,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -72,28 +72,6 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
|
||||
return configure.GetConfigure(name)
|
||||
}
|
||||
|
||||
// 获取爬塔配置表数据
|
||||
func (this *configureComp) GetPagodaconfig(id int32) (data *cfg.GamePagodaData) {
|
||||
if v, err := this.GetConfigure(game_pagoda); err != nil {
|
||||
log.Errorf("get global conf err:%v", err)
|
||||
return
|
||||
} else {
|
||||
var (
|
||||
configure *cfg.GamePagoda
|
||||
ok bool
|
||||
)
|
||||
if configure, ok = v.(*cfg.GamePagoda); !ok {
|
||||
log.Errorf("%T no is *cfg.Game_pagodaData", v)
|
||||
return
|
||||
}
|
||||
|
||||
if data, ok = configure.GetDataMap()[id]; ok {
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 爬塔奖励
|
||||
func (this *configureComp) GetPagodaRewardconfig(id int32) (data *cfg.GamePagodaTaskRewardData) {
|
||||
if v, err := this.GetConfigure(game_pagodataskreward); err == nil {
|
||||
|
@ -20,63 +20,48 @@ func (this *apiComp) BattleFinish(session comm.IUserSession, req *pb.RtaskBattle
|
||||
return
|
||||
}
|
||||
|
||||
//校验战斗结果
|
||||
iBattle, err := this.moduleRtask.modelRtask.service.GetModule(comm.ModuleBattle)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
|
||||
var isWin bool
|
||||
if b, y := iBattle.(comm.IBattle); y {
|
||||
if code, isWin = b.CheckBattleReport(session, req.Report); code != pb.ErrorCode_Success {
|
||||
if req.IsWin {
|
||||
// 获取玩家的任务
|
||||
rtask := &pb.DBRtask{}
|
||||
if err := this.moduleRtask.modelRtask.Get(session.GetUserId(), rtask); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if isWin {
|
||||
// 获取玩家的任务
|
||||
rtask := &pb.DBRtask{}
|
||||
if err := this.moduleRtask.modelRtask.Get(session.GetUserId(), rtask); err != nil {
|
||||
return
|
||||
}
|
||||
// 获取当前任务配置
|
||||
conf := this.moduleRtask.configure.getRtaskById(req.RtaskId)
|
||||
if conf == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
log.Errorf("rdtask %v no found", req.RtaskId)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取当前任务配置
|
||||
conf := this.moduleRtask.configure.getRtaskById(req.RtaskId)
|
||||
if conf == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
log.Errorf("rdtask %v no found", req.RtaskId)
|
||||
return
|
||||
}
|
||||
var (
|
||||
frtaskArr *pb.FrtaskIds //完成的任务
|
||||
ok bool
|
||||
)
|
||||
|
||||
var (
|
||||
frtaskArr *pb.FrtaskIds //完成的任务
|
||||
ok bool
|
||||
)
|
||||
if frtaskArr, ok = rtask.FrtaskIds[conf.Group]; !ok {
|
||||
frtaskArr = &pb.FrtaskIds{}
|
||||
}
|
||||
|
||||
if frtaskArr, ok = rtask.FrtaskIds[conf.Group]; !ok {
|
||||
frtaskArr = &pb.FrtaskIds{}
|
||||
}
|
||||
|
||||
// 更新完成的任务
|
||||
frtaskArr.RtaskIds = append(frtaskArr.RtaskIds, req.RtaskId)
|
||||
if rtask.FrtaskIds == nil {
|
||||
rtask.FrtaskIds = make(map[int32]*pb.FrtaskIds)
|
||||
}
|
||||
rtask.FrtaskIds[conf.Group] = frtaskArr
|
||||
update := map[string]interface{}{
|
||||
"frtaskIds": rtask.FrtaskIds,
|
||||
}
|
||||
if err := this.moduleRtask.modelRtask.Change(session.GetUserId(), update); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
// 更新完成的任务
|
||||
frtaskArr.RtaskIds = append(frtaskArr.RtaskIds, req.RtaskId)
|
||||
if rtask.FrtaskIds == nil {
|
||||
rtask.FrtaskIds = make(map[int32]*pb.FrtaskIds)
|
||||
}
|
||||
rtask.FrtaskIds[conf.Group] = frtaskArr
|
||||
update := map[string]interface{}{
|
||||
"frtaskIds": rtask.FrtaskIds,
|
||||
}
|
||||
if err := this.moduleRtask.modelRtask.Change(session.GetUserId(), update); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if err := session.SendMsg(string(this.moduleRtask.GetType()), RtaskSubTypeBattleFinish,
|
||||
&pb.RtaskBattleFinishResp{
|
||||
RtaskId: req.RtaskId,
|
||||
IsWin: isWin,
|
||||
}); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
|
@ -241,8 +241,8 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
|
||||
}
|
||||
|
||||
// 任务条件校验
|
||||
func (this *ModuleRtask) CheckCondi(session comm.IUserSession, condiId int32) (code pb.ErrorCode) {
|
||||
if _, ok := this.modelRtask.checkCondi(session.GetUserId(), condiId); !ok {
|
||||
func (this *ModuleRtask) CheckCondi(uid string, condiId int32) (code pb.ErrorCode) {
|
||||
if _, ok := this.modelRtask.checkCondi(uid, condiId); !ok {
|
||||
code = pb.ErrorCode_RtaskCondiNoReach
|
||||
}
|
||||
return
|
||||
|
@ -18,7 +18,7 @@ const (
|
||||
UserSubTypeVeriCode = "vericode" //验证码
|
||||
UserSubTypeInitData = "initdata" //初始化用户
|
||||
UserGetTujianResp = "gettujian" //获取图鉴信息
|
||||
UserSubTypeLvChangedPush = "lvChangedPush" //等级变化推送
|
||||
UserSubTypeLvChangedPush = "lvchanged" //等级变化推送
|
||||
UserSubTypeModifyName = "modifyname" //修改名称
|
||||
UserSubTypeFigure = "figure" //形象
|
||||
UserSubTypeModifySign = "modifysign" // 修改签名
|
||||
|
@ -183,7 +183,7 @@ func (this *ModelUser) ChangeLevel(event interface{}, next func(event interface{
|
||||
}
|
||||
this.module.modelUser.Change(ul.session.GetUserId(), update)
|
||||
ul.session.SendMsg(string(this.module.GetType()), UserSubTypeLvChangedPush,
|
||||
&pb.UserChangedPush{Uid: ul.session.GetUserId(), Exp: ul.exp, Lv: ul.lv})
|
||||
&pb.UserLvChangedPush{Uid: ul.session.GetUserId(), Exp: ul.exp, Lv: ul.lv})
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int32) {
|
||||
return
|
||||
}
|
||||
|
||||
func (this *User) change(session comm.IUserSession, attr string, add int32) (change *pb.UserResChangePush, code pb.ErrorCode) {
|
||||
func (this *User) change(session comm.IUserSession, attr string, add int32) (change *pb.UserResChangedPush, code pb.ErrorCode) {
|
||||
if add == 0 {
|
||||
log.Errorf("attr no changed,uid: %s attr: %s add: %d", session.GetUserId(), attr, add)
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
@ -126,11 +126,9 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
return
|
||||
}
|
||||
|
||||
change = &pb.UserResChangePush{
|
||||
change = &pb.UserResChangedPush{
|
||||
Gold: user.Gold,
|
||||
Exp: user.Exp,
|
||||
Lv: user.Lv,
|
||||
Vip: user.Vip,
|
||||
Diamond: user.Diamond,
|
||||
Friend: userEx.FriendPoint,
|
||||
}
|
||||
@ -202,7 +200,7 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
|
||||
//用户资源
|
||||
func (this *User) AddAttributeValue(session comm.IUserSession, attr string, add int32, bPush bool) (code pb.ErrorCode) {
|
||||
var _change *pb.UserResChangePush
|
||||
var _change *pb.UserResChangedPush
|
||||
|
||||
_change, code = this.change(session, attr, add)
|
||||
if code != pb.ErrorCode_Success {
|
||||
@ -222,7 +220,7 @@ func (this *User) AddAttributeValue(session comm.IUserSession, attr string, add
|
||||
//用户资源
|
||||
func (this *User) AddAttributeValues(session comm.IUserSession, attrs map[string]int32, bPush bool) (code pb.ErrorCode) {
|
||||
for key, add := range attrs {
|
||||
var _change *pb.UserResChangePush
|
||||
var _change *pb.UserResChangedPush
|
||||
_change, code = this.change(session, key, add)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
|
@ -59,15 +59,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), VikingChallengeResp, &pb.VikingChallengeResp{Info: &pb.BattleInfo{
|
||||
Id: record.Id,
|
||||
Title: record.Title,
|
||||
Btype: record.Btype,
|
||||
Ptype: record.Ptype,
|
||||
RedCompId: record.RedCompId,
|
||||
Redflist: record.Redflist,
|
||||
BlueCompId: record.BlueCompId,
|
||||
Buleflist: record.Buleflist,
|
||||
}})
|
||||
session.SendMsg(string(this.module.GetType()), VikingChallengeResp, &pb.VikingChallengeResp{
|
||||
Info: &pb.BattleInfo{Id: record.Id, Title: record.Title, Btype: record.Btype, Ptype: record.Ptype, RedCompId: record.RedCompId, Redflist: record.Redflist, BlueCompId: record.BlueCompId, Buleflist: record.Buleflist},
|
||||
BossType: req.BossType,
|
||||
Difficulty: req.Difficulty,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -84,6 +84,7 @@ const (
|
||||
ChatType_Share ChatType = 2 //分享类型
|
||||
ChatType_HeroShare ChatType = 3 //英雄分享
|
||||
ChatType_EquipmentShare ChatType = 4 //装备分享
|
||||
ChatType_ItemShare ChatType = 5 //道具分享
|
||||
)
|
||||
|
||||
// Enum value maps for ChatType.
|
||||
@ -94,6 +95,7 @@ var (
|
||||
2: "Share",
|
||||
3: "HeroShare",
|
||||
4: "EquipmentShare",
|
||||
5: "ItemShare",
|
||||
}
|
||||
ChatType_value = map[string]int32{
|
||||
"Text": 0,
|
||||
@ -101,6 +103,7 @@ var (
|
||||
"Share": 2,
|
||||
"HeroShare": 3,
|
||||
"EquipmentShare": 4,
|
||||
"ItemShare": 5,
|
||||
}
|
||||
)
|
||||
|
||||
@ -343,13 +346,14 @@ var file_chat_chat_db_proto_rawDesc = []byte{
|
||||
0x6c, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b,
|
||||
0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x03, 0x12, 0x0a, 0x0a,
|
||||
0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x04, 0x2a, 0x53, 0x0a, 0x08, 0x43, 0x68, 0x61,
|
||||
0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x04, 0x2a, 0x62, 0x0a, 0x08, 0x43, 0x68, 0x61,
|
||||
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12,
|
||||
0x0f, 0x0a, 0x0b, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x10, 0x01,
|
||||
0x12, 0x09, 0x0a, 0x05, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x48,
|
||||
0x65, 0x72, 0x6f, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x71,
|
||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x04, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x04, 0x12, 0x0d,
|
||||
0x0a, 0x09, 0x49, 0x74, 0x65, 0x6d, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x05, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -182,7 +182,9 @@ type HuntingChallengeResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
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 类型
|
||||
Difficulty int32 `protobuf:"varint,3,opt,name=difficulty,proto3" json:"difficulty"` // 难度
|
||||
}
|
||||
|
||||
func (x *HuntingChallengeResp) Reset() {
|
||||
@ -224,6 +226,20 @@ func (x *HuntingChallengeResp) GetInfo() *BattleInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *HuntingChallengeResp) GetBossType() int32 {
|
||||
if x != nil {
|
||||
return x.BossType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *HuntingChallengeResp) GetDifficulty() int32 {
|
||||
if x != nil {
|
||||
return x.Difficulty
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type HuntingChallengeOverReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -554,37 +570,40 @@ var file_hunting_hunting_msg_proto_rawDesc = []byte{
|
||||
0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69,
|
||||
0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64,
|
||||
0x73, 0x22, 0x37, 0x0a, 0x14, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c,
|
||||
0x73, 0x22, 0x73, 0x0a, 0x14, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c,
|
||||
0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66,
|
||||
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x7c, 0x0a, 0x17, 0x48, 0x75,
|
||||
0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76,
|
||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70,
|
||||
0x65, 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, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 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, 0x22, 0x3a, 0x0a, 0x18, 0x48, 0x75, 0x6e, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x22, 0x25, 0x0a, 0x0d, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42,
|
||||
0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x30, 0x0a, 0x0e, 0x48,
|
||||
0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a,
|
||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42,
|
||||
0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x48, 0x0a,
|
||||
0x12, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x3b, 0x0a, 0x13, 0x48, 0x75, 0x6e, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24,
|
||||
0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
|
||||
0x44, 0x42, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72,
|
||||
0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f,
|
||||
0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f,
|
||||
0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 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, 0x22, 0x7c, 0x0a, 0x17, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65,
|
||||
0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 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, 0x25, 0x0a,
|
||||
0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 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, 0x22, 0x3a, 0x0a, 0x18, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43,
|
||||
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a,
|
||||
0x2e, 0x44, 0x42, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x22, 0x25, 0x0a, 0x0d, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65,
|
||||
0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x30, 0x0a, 0x0e, 0x48, 0x75, 0x6e, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74,
|
||||
0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x48, 0x75, 0x6e, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x48, 0x0a, 0x12, 0x48, 0x75, 0x6e,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66,
|
||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x22, 0x3b, 0x0a, 0x13, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61,
|
||||
0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x05, 0x72, 0x61,
|
||||
0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x48, 0x75,
|
||||
0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -80,12 +80,12 @@ type DBLibrary struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||
Fid int32 `protobuf:"varint,3,opt,name=fid,proto3" json:"fid"` // 配置表id 羁绊id
|
||||
Hero map[int32]int32 `protobuf:"bytes,4,rep,name=hero,proto3" json:"hero" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key: hid value: favorlv
|
||||
Prize bool `protobuf:"varint,5,opt,name=prize,proto3" json:"prize"` //是否领奖
|
||||
Fetterlv int32 `protobuf:"varint,6,opt,name=fetterlv,proto3" json:"fetterlv"` // 当前羁绊等级
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||
Fid int32 `protobuf:"varint,3,opt,name=fid,proto3" json:"fid"` // 配置表id 羁绊id
|
||||
Hero map[string]int32 `protobuf:"bytes,4,rep,name=hero,proto3" json:"hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key: hid value: favorlv
|
||||
Prize bool `protobuf:"varint,5,opt,name=prize,proto3" json:"prize"` //是否领奖
|
||||
Fetterlv int32 `protobuf:"varint,6,opt,name=fetterlv,proto3" json:"fetterlv"` // 当前羁绊等级
|
||||
}
|
||||
|
||||
func (x *DBLibrary) Reset() {
|
||||
@ -141,7 +141,7 @@ func (x *DBLibrary) GetFid() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBLibrary) GetHero() map[int32]int32 {
|
||||
func (x *DBLibrary) GetHero() map[string]int32 {
|
||||
if x != nil {
|
||||
return x.Hero
|
||||
}
|
||||
@ -180,7 +180,7 @@ var file_library_library_db_proto_rawDesc = []byte{
|
||||
0x08, 0x52, 0x05, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x65, 0x74, 0x74,
|
||||
0x65, 0x72, 0x6c, 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x65, 0x74, 0x74,
|
||||
0x65, 0x72, 0x6c, 0x76, 0x1a, 0x37, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
||||
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, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
|
@ -279,7 +279,9 @@ type MainlineChallengeResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
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"`
|
||||
ChapterObj string `protobuf:"bytes,2,opt,name=chapterObj,proto3" json:"chapterObj"` // 章节唯一对象id
|
||||
MainlineId uint32 `protobuf:"varint,3,opt,name=mainlineId,proto3" json:"mainlineId"` // 小关ID
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeResp) Reset() {
|
||||
@ -321,6 +323,20 @@ func (x *MainlineChallengeResp) GetInfo() *BattleInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeResp) GetChapterObj() string {
|
||||
if x != nil {
|
||||
return x.ChapterObj
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeResp) GetMainlineId() uint32 {
|
||||
if x != nil {
|
||||
return x.MainlineId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 客户端通知服务器打赢了
|
||||
type MainlineChallengeOverReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -509,10 +525,14 @@ var file_mainline_mainline_msg_proto_rawDesc = []byte{
|
||||
0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65,
|
||||
0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x22,
|
||||
0x38, 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c,
|
||||
0x78, 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c,
|
||||
0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x4d, 0x61,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61,
|
||||
0x70, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63,
|
||||
0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x4d, 0x61,
|
||||
0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f,
|
||||
0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65,
|
||||
0x72, 0x4f, 0x62, 0x6a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x70,
|
||||
|
@ -278,7 +278,9 @@ type PagodaChallengeResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
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"`
|
||||
LevelID int32 `protobuf:"varint,2,opt,name=levelID,proto3" json:"levelID"` // 挑战层数
|
||||
PagodaType int32 `protobuf:"varint,3,opt,name=PagodaType,proto3" json:"PagodaType"` // 塔类型
|
||||
}
|
||||
|
||||
func (x *PagodaChallengeResp) Reset() {
|
||||
@ -320,6 +322,20 @@ func (x *PagodaChallengeResp) GetInfo() *BattleInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PagodaChallengeResp) GetLevelID() int32 {
|
||||
if x != nil {
|
||||
return x.LevelID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PagodaChallengeResp) GetPagodaType() int32 {
|
||||
if x != nil {
|
||||
return x.PagodaType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 客户端通知服务器打赢了
|
||||
type PagodaChallengeOverReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -560,31 +576,34 @@ var file_pagoda_pagoda_msg_proto_rawDesc = []byte{
|
||||
0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61,
|
||||
0x6d, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d,
|
||||
0x69, 0x64, 0x73, 0x22, 0x36, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x68, 0x61,
|
||||
0x69, 0x64, 0x73, 0x22, 0x70, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x68, 0x61,
|
||||
0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
|
||||
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x79, 0x0a, 0x16, 0x50,
|
||||
0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76,
|
||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 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, 0x22, 0x38, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61,
|
||||
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, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x22, 0x45, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x3b, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64,
|
||||
0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a,
|
||||
0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44,
|
||||
0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x05, 0x72,
|
||||
0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x6c,
|
||||
0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65,
|
||||
0x76, 0x65, 0x6c, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54,
|
||||
0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64,
|
||||
0x61, 0x54, 0x79, 0x70, 0x65, 0x22, 0x79, 0x0a, 0x16, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43,
|
||||
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x67,
|
||||
0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x50,
|
||||
0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70,
|
||||
0x6f, 0x72, 0x74, 0x18, 0x03, 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,
|
||||
0x22, 0x38, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 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, 0x44, 0x42, 0x50, 0x61,
|
||||
0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x45, 0x0a, 0x11, 0x50, 0x61,
|
||||
0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x22, 0x3b, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73,
|
||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64,
|
||||
0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -622,6 +622,7 @@ type RtaskBattleFinishReq struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"` //任务ID
|
||||
IsWin bool `protobuf:"varint,2,opt,name=isWin,proto3" json:"isWin"` //战斗结果
|
||||
Report *BattleReport `protobuf:"bytes,4,opt,name=report,proto3" json:"report"` //战报
|
||||
}
|
||||
|
||||
@ -664,6 +665,13 @@ func (x *RtaskBattleFinishReq) GetRtaskId() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RtaskBattleFinishReq) GetIsWin() bool {
|
||||
if x != nil {
|
||||
return x.IsWin
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *RtaskBattleFinishReq) GetReport() *BattleReport {
|
||||
if x != nil {
|
||||
return x.Report
|
||||
@ -677,7 +685,6 @@ type RtaskBattleFinishResp struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"` //任务ID
|
||||
IsWin bool `protobuf:"varint,2,opt,name=isWin,proto3" json:"isWin"` //战斗结果
|
||||
}
|
||||
|
||||
func (x *RtaskBattleFinishResp) Reset() {
|
||||
@ -719,13 +726,6 @@ func (x *RtaskBattleFinishResp) GetRtaskId() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RtaskBattleFinishResp) GetIsWin() bool {
|
||||
if x != nil {
|
||||
return x.IsWin
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
//获取玩家任务记录
|
||||
type RtaskGetrecordReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -979,17 +979,17 @@ var file_rtask_rtask_msg_proto_rawDesc = []byte{
|
||||
0x22, 0x37, 0x0a, 0x14, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53,
|
||||
0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x57, 0x0a, 0x14, 0x52, 0x74, 0x61,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x6d, 0x0a, 0x14, 0x52, 0x74, 0x61,
|
||||
0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65,
|
||||
0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 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, 0x22, 0x47, 0x0a, 0x15, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c,
|
||||
0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72,
|
||||
0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74,
|
||||
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x57, 0x69, 0x6e, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x57, 0x69, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x52,
|
||||
0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69,
|
||||
0x73, 0x57, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x57, 0x69,
|
||||
0x6e, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 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, 0x22, 0x31, 0x0a, 0x15, 0x52, 0x74, 0x61, 0x73,
|
||||
0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x52,
|
||||
0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71,
|
||||
0x22, 0x3c, 0x0a, 0x12, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x72, 0x65, 0x63, 0x6f,
|
||||
0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
|
@ -564,21 +564,19 @@ func (x *UserCreateResp) GetIsSucc() bool {
|
||||
}
|
||||
|
||||
// 玩家资源变更推送
|
||||
type UserResChangePush struct {
|
||||
type UserResChangedPush struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Gold int32 `protobuf:"varint,1,opt,name=gold,proto3" json:"gold" bson:"gold"` //金币
|
||||
Exp int32 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp" bson:"exp"` //经验
|
||||
Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级
|
||||
Vip int32 `protobuf:"varint,4,opt,name=vip,proto3" json:"vip" bson:"vip"` // vip
|
||||
Diamond int32 `protobuf:"varint,5,opt,name=diamond,proto3" json:"diamond" bson:"diamond"` // 钻石
|
||||
Friend int32 `protobuf:"varint,6,opt,name=friend,proto3" json:"friend" bson:"frined"` //友情点
|
||||
}
|
||||
|
||||
func (x *UserResChangePush) Reset() {
|
||||
*x = UserResChangePush{}
|
||||
func (x *UserResChangedPush) Reset() {
|
||||
*x = UserResChangedPush{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_user_user_msg_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -586,13 +584,13 @@ func (x *UserResChangePush) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserResChangePush) String() string {
|
||||
func (x *UserResChangedPush) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserResChangePush) ProtoMessage() {}
|
||||
func (*UserResChangedPush) ProtoMessage() {}
|
||||
|
||||
func (x *UserResChangePush) ProtoReflect() protoreflect.Message {
|
||||
func (x *UserResChangedPush) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_msg_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -604,47 +602,33 @@ func (x *UserResChangePush) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserResChangePush.ProtoReflect.Descriptor instead.
|
||||
func (*UserResChangePush) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use UserResChangedPush.ProtoReflect.Descriptor instead.
|
||||
func (*UserResChangedPush) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_msg_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *UserResChangePush) GetGold() int32 {
|
||||
func (x *UserResChangedPush) GetGold() int32 {
|
||||
if x != nil {
|
||||
return x.Gold
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserResChangePush) GetExp() int32 {
|
||||
func (x *UserResChangedPush) GetExp() int32 {
|
||||
if x != nil {
|
||||
return x.Exp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserResChangePush) GetLv() int32 {
|
||||
if x != nil {
|
||||
return x.Lv
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserResChangePush) GetVip() int32 {
|
||||
if x != nil {
|
||||
return x.Vip
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserResChangePush) GetDiamond() int32 {
|
||||
func (x *UserResChangedPush) GetDiamond() int32 {
|
||||
if x != nil {
|
||||
return x.Diamond
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserResChangePush) GetFriend() int32 {
|
||||
func (x *UserResChangedPush) GetFriend() int32 {
|
||||
if x != nil {
|
||||
return x.Friend
|
||||
}
|
||||
@ -1211,7 +1195,7 @@ func (x *UserGetTujianResp) GetHeroids() []string {
|
||||
}
|
||||
|
||||
//玩家等级经验变化推送
|
||||
type UserChangedPush struct {
|
||||
type UserLvChangedPush struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@ -1221,8 +1205,8 @@ type UserChangedPush struct {
|
||||
Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv"`
|
||||
}
|
||||
|
||||
func (x *UserChangedPush) Reset() {
|
||||
*x = UserChangedPush{}
|
||||
func (x *UserLvChangedPush) Reset() {
|
||||
*x = UserLvChangedPush{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_user_user_msg_proto_msgTypes[24]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -1230,13 +1214,13 @@ func (x *UserChangedPush) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserChangedPush) String() string {
|
||||
func (x *UserLvChangedPush) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserChangedPush) ProtoMessage() {}
|
||||
func (*UserLvChangedPush) ProtoMessage() {}
|
||||
|
||||
func (x *UserChangedPush) ProtoReflect() protoreflect.Message {
|
||||
func (x *UserLvChangedPush) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_user_msg_proto_msgTypes[24]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -1248,26 +1232,26 @@ func (x *UserChangedPush) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserChangedPush.ProtoReflect.Descriptor instead.
|
||||
func (*UserChangedPush) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use UserLvChangedPush.ProtoReflect.Descriptor instead.
|
||||
func (*UserLvChangedPush) Descriptor() ([]byte, []int) {
|
||||
return file_user_user_msg_proto_rawDescGZIP(), []int{24}
|
||||
}
|
||||
|
||||
func (x *UserChangedPush) GetUid() string {
|
||||
func (x *UserLvChangedPush) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserChangedPush) GetExp() int32 {
|
||||
func (x *UserLvChangedPush) GetExp() int32 {
|
||||
if x != nil {
|
||||
return x.Exp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserChangedPush) GetLv() int32 {
|
||||
func (x *UserLvChangedPush) GetLv() int32 {
|
||||
if x != nil {
|
||||
return x.Lv
|
||||
}
|
||||
@ -1571,49 +1555,47 @@ var file_user_user_msg_proto_rawDesc = []byte{
|
||||
0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53,
|
||||
0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63,
|
||||
0x63, 0x22, 0x8d, 0x01, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x43, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18,
|
||||
0x63, 0x22, 0x6c, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65,
|
||||
0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x76, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x22, 0x13, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x22, 0x3e, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65,
|
||||
0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07,
|
||||
0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e,
|
||||
0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22,
|
||||
0x13, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x65, 0x71, 0x22, 0x3e, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42,
|
||||
0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x22, 0x40, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x07,
|
||||
0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
|
||||
0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x40, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28,
|
||||
0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52,
|
||||
0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x75, 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65,
|
||||
0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x25,
|
||||
0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65,
|
||||
0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x24, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69,
|
||||
0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x55,
|
||||
0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69,
|
||||
0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65,
|
||||
0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x11, 0x55, 0x73,
|
||||
0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x22, 0x45, 0x0a, 0x0f, 0x55, 0x73, 0x65,
|
||||
0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
|
||||
0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x65, 0x71, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x25, 0x0a, 0x0f,
|
||||
0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x22, 0x24, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64,
|
||||
0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65,
|
||||
0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x22, 0x50, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54,
|
||||
0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72,
|
||||
0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
|
||||
0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x22, 0x47, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4c,
|
||||
0x76, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76,
|
||||
@ -1671,7 +1653,7 @@ var file_user_user_msg_proto_goTypes = []interface{}{
|
||||
(*UserLoadResp)(nil), // 8: UserLoadResp
|
||||
(*UserCreateReq)(nil), // 9: UserCreateReq
|
||||
(*UserCreateResp)(nil), // 10: UserCreateResp
|
||||
(*UserResChangePush)(nil), // 11: UserResChangePush
|
||||
(*UserResChangedPush)(nil), // 11: UserResChangedPush
|
||||
(*UserGetSettingReq)(nil), // 12: UserGetSettingReq
|
||||
(*UserGetSettingResp)(nil), // 13: UserGetSettingResp
|
||||
(*UserUpdateSettingReq)(nil), // 14: UserUpdateSettingReq
|
||||
@ -1684,7 +1666,7 @@ var file_user_user_msg_proto_goTypes = []interface{}{
|
||||
(*UserModifynameResp)(nil), // 21: UserModifynameResp
|
||||
(*UserGetTujianReq)(nil), // 22: UserGetTujianReq
|
||||
(*UserGetTujianResp)(nil), // 23: UserGetTujianResp
|
||||
(*UserChangedPush)(nil), // 24: UserChangedPush
|
||||
(*UserLvChangedPush)(nil), // 24: UserLvChangedPush
|
||||
(*UserFigureReq)(nil), // 25: UserFigureReq
|
||||
(*UserFigureResp)(nil), // 26: UserFigureResp
|
||||
(*UserModifysignReq)(nil), // 27: UserModifysignReq
|
||||
@ -1865,7 +1847,7 @@ func file_user_user_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_user_user_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserResChangePush); i {
|
||||
switch v := v.(*UserResChangedPush); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -2021,7 +2003,7 @@ func file_user_user_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_user_user_msg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserChangedPush); i {
|
||||
switch v := v.(*UserLvChangedPush); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -182,7 +182,9 @@ type VikingChallengeResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
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 类型
|
||||
Difficulty int32 `protobuf:"varint,3,opt,name=difficulty,proto3" json:"difficulty"` // 难度
|
||||
}
|
||||
|
||||
func (x *VikingChallengeResp) Reset() {
|
||||
@ -224,6 +226,20 @@ func (x *VikingChallengeResp) GetInfo() *BattleInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *VikingChallengeResp) GetBossType() int32 {
|
||||
if x != nil {
|
||||
return x.BossType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *VikingChallengeResp) GetDifficulty() int32 {
|
||||
if x != nil {
|
||||
return x.Difficulty
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type VikingChallengeOverReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -553,37 +569,40 @@ var file_viking_viking_msg_proto_rawDesc = []byte{
|
||||
0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x22, 0x36, 0x0a, 0x13, 0x56, 0x69, 0x6b,
|
||||
0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x22, 0x72, 0x0a, 0x13, 0x56, 0x69, 0x6b,
|
||||
0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
|
||||
0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66,
|
||||
0x6f, 0x22, 0x7b, 0x0a, 0x16, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c,
|
||||
0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62,
|
||||
0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62,
|
||||
0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 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, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72,
|
||||
0x74, 0x18, 0x03, 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, 0x22, 0x38,
|
||||
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, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69,
|
||||
0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x24, 0x0a, 0x0c, 0x56, 0x69, 0x6b, 0x69,
|
||||
0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e,
|
||||
0x0a, 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e,
|
||||
0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47,
|
||||
0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a,
|
||||
0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44,
|
||||
0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e,
|
||||
0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 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, 0x22, 0x7b, 0x0a,
|
||||
0x16, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65,
|
||||
0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54,
|
||||
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54,
|
||||
0x79, 0x70, 0x65, 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, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 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, 0x22, 0x38, 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, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x22, 0x24, 0x0a, 0x0c, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75,
|
||||
0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0d, 0x56, 0x69,
|
||||
0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64,
|
||||
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69,
|
||||
0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a, 0x11, 0x56, 0x69,
|
||||
0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66,
|
||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x72, 0x69,
|
||||
0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e,
|
||||
0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x61, 0x6e,
|
||||
0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b,
|
||||
0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -9,34 +9,26 @@
|
||||
package cfg
|
||||
|
||||
type GamePagoda struct {
|
||||
_dataMap map[int32]*GamePagodaData
|
||||
_dataList []*GamePagodaData
|
||||
}
|
||||
|
||||
func NewGamePagoda(_buf []map[string]interface{}) (*GamePagoda, error) {
|
||||
_dataList := make([]*GamePagodaData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GamePagodaData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGamePagodaData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Key] = _v
|
||||
}
|
||||
}
|
||||
return &GamePagoda{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GamePagoda) GetDataMap() map[int32]*GamePagodaData {
|
||||
return table._dataMap
|
||||
return &GamePagoda{_dataList:_dataList}, nil
|
||||
}
|
||||
|
||||
func (table *GamePagoda) GetDataList() []*GamePagodaData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GamePagoda) Get(key int32) *GamePagodaData {
|
||||
return table._dataMap[key]
|
||||
func (table *GamePagoda) Get(index int) *GamePagodaData {
|
||||
return table._dataList[index]
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user