This commit is contained in:
meixiongfeng 2023-08-25 15:41:45 +08:00
commit 6f3af2146c
18 changed files with 224 additions and 267 deletions

View File

@ -96,9 +96,16 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.HeroTaskReceiveR
}) })
} }
dtask.Heros[req.Hero].Stage[req.Stage] = 1 dtask.Heros[req.Hero].Stage[req.Stage] = 1
this.module.modeltask.Change(session.GetUserId(), map[string]interface{}{ if err = this.module.modeltask.Change(session.GetUserId(), map[string]interface{}{
"heros": dtask.Heros, "heros": dtask.Heros,
}) }); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "receive", &pb.HeroTaskReceiveResp{Hero: req.Hero, Stage: req.Stage, Award: award}) session.SendMsg(string(this.module.GetType()), "receive", &pb.HeroTaskReceiveResp{Hero: req.Hero, Stage: req.Stage, Award: award})
return return
} }

View File

@ -46,7 +46,20 @@ func (this *apiComp) Reset(session comm.IUserSession, req *pb.HoroscopeResetReq)
if errdata = this.module.ConsumeRes(session, []*cfg.Gameatn{conf.HoroscopeResetCost}, true); errdata != nil { if errdata = this.module.ConsumeRes(session, []*cfg.Gameatn{conf.HoroscopeResetCost}, true); errdata != nil {
return return
} }
res := make([]*cfg.Gameatn, 0)
for _, v := range info.Consume {
res = append(res, &cfg.Gameatn{
A: v.A,
T: v.T,
N: v.N,
})
}
if errdata = this.module.DispenseRes(session, res, true); errdata != nil {
return
}
consume := info.Consume
info.Nodes = make(map[int32]int32) info.Nodes = make(map[int32]int32)
info.Consume = make([]*pb.UserAssets, 0)
info.Lastrest = configure.Now().Unix() info.Lastrest = configure.Now().Unix()
if err = this.module.modelHoroscope.updateInfo(session, info); err != nil { if err = this.module.modelHoroscope.updateInfo(session, info); err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
@ -56,6 +69,6 @@ func (this *apiComp) Reset(session comm.IUserSession, req *pb.HoroscopeResetReq)
} }
return return
} }
session.SendMsg(string(this.module.GetType()), "reset", &pb.HoroscopeResetResp{Issucc: true, Info: info}) session.SendMsg(string(this.module.GetType()), "reset", &pb.HoroscopeResetResp{Issucc: true, Info: info, Award: consume})
return return
} }

View File

@ -18,6 +18,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgrade
info *pb.DBHoroscope info *pb.DBHoroscope
conf *cfg.GameHoroscopeData conf *cfg.GameHoroscopeData
front *cfg.GameHoroscopeData front *cfg.GameHoroscopeData
ok bool
err error err error
) )
if errdata = this.UpgradeCheck(session, req); errdata != nil { if errdata = this.UpgradeCheck(session, req); errdata != nil {
@ -73,6 +74,24 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgrade
if info.Nodes[conf.NodeId] == 1 { //解锁 if info.Nodes[conf.NodeId] == 1 { //解锁
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype173, 1)) go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype173, 1))
} }
for _, v := range conf.CostItem {
ok = false
for _, v1 := range info.Consume {
if v.A == v1.A && v.T == v1.T {
v1.N += v.N
ok = true
}
}
if !ok {
info.Consume = append(info.Consume, &pb.UserAssets{
A: v.A,
T: v.T,
N: v.N,
})
}
}
if err = this.module.modelHoroscope.updateInfo(session, info); err != nil { if err = this.module.modelHoroscope.updateInfo(session, info); err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError, Code: pb.ErrorCode_DBError,
@ -81,6 +100,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgrade
} }
return return
} }
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.HoroscopeUpgradeResp{Nid: conf.NodeId, Lv: conf.Lv + 1}) session.SendMsg(string(this.module.GetType()), "upgrade", &pb.HoroscopeUpgradeResp{Nid: conf.NodeId, Lv: conf.Lv + 1})
return return
} }

View File

@ -61,6 +61,7 @@ func (this *modelHoroscope) updateInfo(session comm.IUserSession, info *pb.DBHor
) )
err = this.Change(info.Uid, map[string]interface{}{ err = this.Change(info.Uid, map[string]interface{}{
"nodes": info.Nodes, "nodes": info.Nodes,
"consume": info.Consume,
"lastrest": info.Lastrest, "lastrest": info.Lastrest,
}) })
if model, err = this.module.GetDBModelByUid(info.Uid, this.TableName); err != nil { if model, err = this.module.GetDBModelByUid(info.Uid, this.TableName); err != nil {

View File

@ -2,6 +2,7 @@ package robot
import ( import (
"errors" "errors"
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
@ -47,11 +48,11 @@ func (this *ModuleRobot_Arena) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskD
errdata *pb.ErrorData errdata *pb.ErrorData
) )
if _, errdata = robot.SendMessage("arena", "info", &pb.ArenaInfoReq{}); errdata != nil { if _, errdata = robot.SendMessage("arena", "info", &pb.ArenaInfoReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
if _, errdata = robot.SendMessage("arena", "matche", &pb.ArenaMatcheReq{}); errdata != nil { if _, errdata = robot.SendMessage("arena", "matche", &pb.ArenaMatcheReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
switch comm.TaskType(condconf.Type) { switch comm.TaskType(condconf.Type) {
@ -75,7 +76,7 @@ func (this *ModuleRobot_Arena) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskD
Battle: &pb.BattleFormation{ Battle: &pb.BattleFormation{
Format: heros, Format: heros,
}}); errdata != nil { }}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "arena", "challengeover", &pb.ArenaChallengeRewardReq{ if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "arena", "challengeover", &pb.ArenaChallengeRewardReq{
@ -87,7 +88,7 @@ func (this *ModuleRobot_Arena) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskD
Info: resp.(*pb.MainlineChallengeResp).Info, Info: resp.(*pb.MainlineChallengeResp).Info,
WinSide: 1, WinSide: 1,
}}); errdata != nil { }}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
break break

View File

@ -47,7 +47,7 @@ func (this *ModuleRobot_Equipment) DoPipeline(robot IRobot) (err error) {
errdata *pb.ErrorData errdata *pb.ErrorData
) )
if _, errdata = robot.SendMessage("equipment", "getlist", &pb.EquipmentGetListReq{}); errdata != nil { if _, errdata = robot.SendMessage("equipment", "getlist", &pb.EquipmentGetListReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
return return
@ -82,7 +82,7 @@ func (this *ModuleRobot_Equipment) DoTask(robot IRobot, taskconf *cfg.GameWorldT
HeroCardId: hero.Id, HeroCardId: hero.Id,
EquipmentId: equipments, EquipmentId: equipments,
}); errdata != nil { }); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
} else { } else {
@ -111,7 +111,7 @@ func (this *ModuleRobot_Equipment) DoTask(robot IRobot, taskconf *cfg.GameWorldT
HeroCardId: hero.Id, HeroCardId: hero.Id,
EquipmentId: equipments, EquipmentId: equipments,
}); errdata != nil { }); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
} else { } else {
@ -127,7 +127,12 @@ func (this *ModuleRobot_Equipment) DoTask(robot IRobot, taskconf *cfg.GameWorldT
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "equipment", "upgrade", &pb.EquipmentUpgradeReq{ if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "equipment", "upgrade", &pb.EquipmentUpgradeReq{
EquipmentId: equipment.Id, EquipmentId: equipment.Id,
}); errdata != nil { }); errdata != nil {
err = errors.New(errdata.Message) if errdata.Code == pb.ErrorCode_EquipmentLvlimitReached {
err = nil
return
} else {
err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
}
return return
} }
case comm.Rtype94: //附魔 case comm.Rtype94: //附魔
@ -161,7 +166,7 @@ func (this *ModuleRobot_Equipment) DoTask(robot IRobot, taskconf *cfg.GameWorldT
Itemid: item.GridId, Itemid: item.GridId,
Index: 0, Index: 0,
}); errdata != nil { }); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
} }
@ -177,7 +182,7 @@ func (this *ModuleRobot_Equipment) DoTask(robot IRobot, taskconf *cfg.GameWorldT
if resp, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "equipment", "wash", &pb.EquipmentWashReq{ if resp, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "equipment", "wash", &pb.EquipmentWashReq{
Eid: equipment.Id, Eid: equipment.Id,
}); errdata != nil { }); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
pids = make([]int32, 0) pids = make([]int32, 0)
@ -188,7 +193,7 @@ func (this *ModuleRobot_Equipment) DoTask(robot IRobot, taskconf *cfg.GameWorldT
Eid: equipment.Id, Eid: equipment.Id,
Pids: pids, Pids: pids,
}); errdata != nil { }); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
} }
@ -234,7 +239,7 @@ func (this *ModuleRobot_Equipment) findcanupgrade() (equipment *pb.DB_Equipment,
equipments = append(equipments, v) equipments = append(equipments, v)
} }
sort.Slice(equipments, func(i, j int) bool { sort.Slice(equipments, func(i, j int) bool {
return equipments[i].Lv < equipments[j].Lv return equipments[i].Lv > equipments[j].Lv
}) })
for _, equipment = range equipments { for _, equipment = range equipments {
if conf, err = this.getGameEquipData(equipment.CId); err != nil { if conf, err = this.getGameEquipData(equipment.CId); err != nil {

View File

@ -2,6 +2,7 @@ package robot
import ( import (
"errors" "errors"
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
@ -45,7 +46,7 @@ func (this *ModuleRobot_Hero) DoPipeline(robot IRobot) (err error) {
errdata *pb.ErrorData errdata *pb.ErrorData
) )
if _, errdata = robot.SendMessage("hero", "list", &pb.HeroListReq{}); errdata != nil { if _, errdata = robot.SendMessage("hero", "list", &pb.HeroListReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
return return
@ -59,7 +60,7 @@ func (this *ModuleRobot_Hero) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskDa
switch comm.TaskType(condconf.Type) { switch comm.TaskType(condconf.Type) {
case comm.Rtype14: case comm.Rtype14:
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "hero", "drawcard", &pb.HeroDrawCardReq{DrawType: 2, DrawCount: 1, Consume: 0}); errdata != nil { if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "hero", "drawcard", &pb.HeroDrawCardReq{DrawType: 2, DrawCount: 1, Consume: 0}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
} }

View File

@ -2,6 +2,7 @@ package robot
import ( import (
"errors" "errors"
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
@ -44,7 +45,7 @@ func (this *ModuleRobot_Item) DoPipeline(robot IRobot) (err error) {
errdata *pb.ErrorData errdata *pb.ErrorData
) )
if _, errdata = robot.SendMessage("items", "getlist", &pb.ItemsGetlistReq{}); errdata != nil { if _, errdata = robot.SendMessage("items", "getlist", &pb.ItemsGetlistReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
return return
@ -58,7 +59,7 @@ func (this *ModuleRobot_Item) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskDa
switch comm.TaskType(condconf.Type) { switch comm.TaskType(condconf.Type) {
case comm.Rtype14: case comm.Rtype14:
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "hero", "drawcard", &pb.HeroDrawCardReq{DrawType: 2, DrawCount: 1, Consume: 0}); errdata != nil { if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "hero", "drawcard", &pb.HeroDrawCardReq{DrawType: 2, DrawCount: 1, Consume: 0}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
} }

View File

@ -61,7 +61,7 @@ func (this *ModuleRobot_MainLine) DoTask(robot IRobot, taskconf *cfg.GameWorldTa
errdata *pb.ErrorData errdata *pb.ErrorData
) )
if _, errdata = robot.SendMessage("mainline", "info", &pb.MainlineInfoReq{}); errdata != nil { if _, errdata = robot.SendMessage("mainline", "info", &pb.MainlineInfoReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
switch comm.TaskType(condconf.Type) { switch comm.TaskType(condconf.Type) {
@ -93,20 +93,20 @@ func (this *ModuleRobot_MainLine) DoTask(robot IRobot, taskconf *cfg.GameWorldTa
&pb.MainlineChallengeReq{Level: conf.Id, Battle: &pb.BattleFormation{ &pb.MainlineChallengeReq{Level: conf.Id, Battle: &pb.BattleFormation{
Format: heros, Format: heros,
}}); errdata != nil { }}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "mainline", "challengeover", &pb.MainlineChallengeOverReq{Level: conf.Id, Report: &pb.BattleReport{ if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "mainline", "challengeover", &pb.MainlineChallengeOverReq{Level: conf.Id, Report: &pb.BattleReport{
Info: resp.(*pb.MainlineChallengeResp).Info, Info: resp.(*pb.MainlineChallengeResp).Info,
WinSide: 1, WinSide: 1,
}}); errdata != nil { }}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
break break
case 3, 7: case 3, 7:
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "mainline", "levelpass", &pb.MainlineLevelPassReq{Level: conf.Id}); errdata != nil { if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "mainline", "levelpass", &pb.MainlineLevelPassReq{Level: conf.Id}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
default: default:

View File

@ -52,7 +52,7 @@ func (this *ModuleRobot_Pagoda) DoTask(robot IRobot, taskconf *cfg.GameWorldTask
) )
// 获取爬塔信息 // 获取爬塔信息
if _, errdata = robot.SendMessage("pagoda", "getlist", &pb.PagodaGetListReq{}); errdata != nil { if _, errdata = robot.SendMessage("pagoda", "getlist", &pb.PagodaGetListReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
switch comm.TaskType(condconf.Type) { switch comm.TaskType(condconf.Type) {
@ -72,7 +72,7 @@ func (this *ModuleRobot_Pagoda) DoTask(robot IRobot, taskconf *cfg.GameWorldTask
Battle: &pb.BattleFormation{ Battle: &pb.BattleFormation{
Format: heros, Format: heros,
}}); errdata != nil { }}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "pagoda", "challengeover", &pb.PagodaChallengeOverReq{ if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "pagoda", "challengeover", &pb.PagodaChallengeOverReq{
@ -81,7 +81,7 @@ func (this *ModuleRobot_Pagoda) DoTask(robot IRobot, taskconf *cfg.GameWorldTask
Info: resp.(*pb.PagodaChallengeResp).Info, Info: resp.(*pb.PagodaChallengeResp).Info,
WinSide: 1, WinSide: 1,
}}); errdata != nil { }}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
break break

View File

@ -42,7 +42,7 @@ func (this *ModuleRobot_Practice) DoTask(robot IRobot, taskconf *cfg.GameWorldTa
errdata *pb.ErrorData errdata *pb.ErrorData
) )
if _, errdata = robot.SendMessage("practice", "info", &pb.PracticeInfoReq{}); errdata != nil { if _, errdata = robot.SendMessage("practice", "info", &pb.PracticeInfoReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
switch comm.TaskType(condconf.Type) { switch comm.TaskType(condconf.Type) {
@ -116,7 +116,7 @@ func (this *ModuleRobot_Practice) practice(tid, cid int32, robot IRobot, index i
return return
} }
if _, errdata = robot.SendTaskMessage(tid, cid, "practice", "practice", &pb.PracticePracticeReq{Index: index, Hero: hero}); errdata != nil { if _, errdata = robot.SendTaskMessage(tid, cid, "practice", "practice", &pb.PracticePracticeReq{Index: index, Hero: hero}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
return return

View File

@ -2,6 +2,7 @@ package robot
import ( import (
"errors" "errors"
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
@ -36,7 +37,7 @@ func (this *ModuleRobot_Sys) DoPipeline(robot IRobot) (err error) {
errdata *pb.ErrorData errdata *pb.ErrorData
) )
if _, errdata = robot.SendMessage("sys", "funcgetlist", &pb.SysFuncGetListReq{}); errdata != nil { if _, errdata = robot.SendMessage("sys", "funcgetlist", &pb.SysFuncGetListReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
return return
@ -50,7 +51,7 @@ func (this *ModuleRobot_Sys) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskDat
switch comm.TaskType(condconf.Type) { switch comm.TaskType(condconf.Type) {
case comm.Rtype14: case comm.Rtype14:
if _, errdata = robot.SendMessage("hero", "drawcard", &pb.HeroDrawCardReq{DrawType: 2, DrawCount: 1, Consume: 0}); errdata != nil { if _, errdata = robot.SendMessage("hero", "drawcard", &pb.HeroDrawCardReq{DrawType: 2, DrawCount: 1, Consume: 0}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
} }
@ -68,7 +69,7 @@ func (this *ModuleRobot_Sys) funcactivate(tid, sid int32, robot IRobot, cid stri
} }
if _, errdata = robot.SendTaskMessage(tid, sid, "sys", "funcactivate", &pb.SysFuncActivateReq{Cid: cid}); errdata != nil { if _, errdata = robot.SendTaskMessage(tid, sid, "sys", "funcactivate", &pb.SysFuncActivateReq{Cid: cid}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
return return

View File

@ -2,6 +2,7 @@ package robot
import ( import (
"errors" "errors"
"fmt"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
@ -43,7 +44,7 @@ func (this *ModuleRobot_User) DoPipeline(robot IRobot) (err error) {
Account: robot.Account(), Account: robot.Account(),
Sid: robot.ServerId(), Sid: robot.ServerId(),
}); errdata != nil { }); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
//创角 //创角
@ -55,7 +56,7 @@ func (this *ModuleRobot_User) DoPipeline(robot IRobot) (err error) {
if errdata.Code == pb.ErrorCode_RoleCreated { //已创角 if errdata.Code == pb.ErrorCode_RoleCreated { //已创角
err = nil err = nil
} else { } else {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
} }
return return

View File

@ -2,6 +2,7 @@ package robot
import ( import (
"errors" "errors"
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
@ -91,7 +92,7 @@ func (this *ModuleRobot_WTask) DoPipeline(robot IRobot) (err error) {
) )
//获取任务列表 //获取任务列表
if _, errdata = robot.SendMessage("wtask", "info", &pb.WTaskInfoReq{}); errdata != nil { if _, errdata = robot.SendMessage("wtask", "info", &pb.WTaskInfoReq{}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
var ( var (
@ -108,7 +109,7 @@ locp:
} }
if this.checkaccept(tconf) { //是否需要接收任务 if this.checkaccept(tconf) { //是否需要接收任务
if _, errdata = robot.SendMessage("wtask", "accept", &pb.WTaskAcceptReq{Tid: tconf.Key}); errdata != nil { if _, errdata = robot.SendMessage("wtask", "accept", &pb.WTaskAcceptReq{Tid: tconf.Key}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
continue continue
@ -148,7 +149,7 @@ locp:
continue continue
} else { //任务已完成直接完成 } else { //任务已完成直接完成
if _, errdata = robot.SendMessage("wtask", "finish", &pb.WTaskFinishReq{Tid: tconf.Key}); errdata != nil { if _, errdata = robot.SendMessage("wtask", "finish", &pb.WTaskFinishReq{Tid: tconf.Key}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
} }
@ -164,7 +165,7 @@ func (this *ModuleRobot_WTask) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskD
switch comm.TaskType(condconf.Type) { switch comm.TaskType(condconf.Type) {
case comm.Rtype20001: //完成对话 case comm.Rtype20001: //完成对话
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "completecondi", &pb.WTaskCompleteCondiReq{TaskId: taskconf.Key, CondiId: condconf.Id}); errdata != nil { if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "completecondi", &pb.WTaskCompleteCondiReq{TaskId: taskconf.Key, CondiId: condconf.Id}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
break break
@ -177,14 +178,14 @@ func (this *ModuleRobot_WTask) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskD
heromodule = robot.GetModule(comm.ModuleHero).(*ModuleRobot_Hero) heromodule = robot.GetModule(comm.ModuleHero).(*ModuleRobot_Hero)
heros = heromodule.getbattlehero() heros = heromodule.getbattlehero()
if resp, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "battlestart", &pb.WTaskBattleStartReq{BattleConfId: condconf.Filter[0], Battle: &pb.BattleFormation{Format: heros}}); errdata != nil { if resp, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "battlestart", &pb.WTaskBattleStartReq{BattleConfId: condconf.Filter[0], Battle: &pb.BattleFormation{Format: heros}}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "battlefinish", &pb.WTaskBattleFinishReq{BattleConfId: condconf.Filter[0], Report: &pb.BattleReport{ if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "battlefinish", &pb.WTaskBattleFinishReq{BattleConfId: condconf.Filter[0], Report: &pb.BattleReport{
Info: resp.(*pb.WTaskBattleStartResp).Info, Info: resp.(*pb.WTaskBattleStartResp).Info,
WinSide: 1, WinSide: 1,
}}); errdata != nil { }}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
break break
@ -197,14 +198,14 @@ func (this *ModuleRobot_WTask) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskD
heromodule = robot.GetModule(comm.ModuleHero).(*ModuleRobot_Hero) heromodule = robot.GetModule(comm.ModuleHero).(*ModuleRobot_Hero)
heros = heromodule.getbattlehero() heros = heromodule.getbattlehero()
if resp, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "battlestart", &pb.WTaskBattleStartReq{BattleConfId: condconf.Filter[0], Battle: &pb.BattleFormation{Format: heros}}); errdata != nil { if resp, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "battlestart", &pb.WTaskBattleStartReq{BattleConfId: condconf.Filter[0], Battle: &pb.BattleFormation{Format: heros}}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "battlefinish", &pb.WTaskBattleFinishReq{BattleConfId: condconf.Filter[0], Report: &pb.BattleReport{ if _, errdata = robot.SendTaskMessage(taskconf.Key, condconf.Id, "wtask", "battlefinish", &pb.WTaskBattleFinishReq{BattleConfId: condconf.Filter[0], Report: &pb.BattleReport{
Info: resp.(*pb.WTaskBattleStartResp).Info, Info: resp.(*pb.WTaskBattleStartResp).Info,
WinSide: 2, WinSide: 2,
}}); errdata != nil { }}); errdata != nil {
err = errors.New(errdata.Message) err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message))
return return
} }
break break

View File

@ -168,7 +168,7 @@ func (this *Robot) SendTaskMessage(task, comdi int32, mtype, stype string, msg p
messageresp = <-this.await //等待回应 messageresp = <-this.await //等待回应
resp = messageresp.resp resp = messageresp.resp
errdata = messageresp.errdata errdata = messageresp.errdata
log.Debug("[机器人 Message]", log.Field{Key: "t", Value: time.Since(stime).Milliseconds()}, log.Field{Key: "Account", Value: this.account}, log.Field{Key: "Task", Value: fmt.Sprintf("[%d-%d]", task, comdi)}, log.Field{Key: "message", Value: fmt.Sprintf("%s.%s", mtype, stype)}, log.Field{Key: "resp", Value: errdata == nil}) log.Debug("[机器人 Message]", log.Field{Key: "t", Value: time.Since(stime).Milliseconds()}, log.Field{Key: "Account", Value: this.account}, log.Field{Key: "Task", Value: fmt.Sprintf("[%d-%d]", task, comdi)}, log.Field{Key: "message", Value: fmt.Sprintf("%s.%s", mtype, stype)}, log.Field{Key: "errdata", Value: errdata == nil})
} }
return return
} }

View File

@ -225,26 +225,13 @@ type DBHuodong struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Hdid int32 `protobuf:"varint,2,opt,name=hdid,proto3" json:"hdid"` // 活动ID 此字段不用 Rtime int64 `protobuf:"varint,2,opt,name=rtime,proto3" json:"rtime"` // 活动修改时间
Rtime int64 `protobuf:"varint,3,opt,name=rtime,proto3" json:"rtime"` // 客户端显示的时间 Itype HdType `protobuf:"varint,3,opt,name=itype,proto3,enum=HdType" json:"itype"`
Itype HdType `protobuf:"varint,4,opt,name=itype,proto3,enum=HdType" json:"itype"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name"`
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name"` Etime int64 `protobuf:"varint,5,opt,name=etime,proto3" json:"etime"` // 1680105599,
Img string `protobuf:"bytes,6,opt,name=img,proto3" json:"img"` Stime int64 `protobuf:"varint,6,opt,name=stime,proto3" json:"stime"` // 1679414400,
Showtime string `protobuf:"bytes,7,opt,name=showtime,proto3" json:"showtime"` Data *ActivityInfo `protobuf:"bytes,7,opt,name=data,proto3" json:"data"` // 活动详细数据
PressImg string `protobuf:"bytes,8,opt,name=pressImg,proto3" json:"pressImg"`
Intr string `protobuf:"bytes,9,opt,name=intr,proto3" json:"intr"` // "累计充值,限时福利",
Etime int64 `protobuf:"varint,10,opt,name=etime,proto3" json:"etime"` // 1680105599,
NormalImg string `protobuf:"bytes,11,opt,name=normalImg,proto3" json:"normalImg"` // "huodong_btn4.png",
Stime int64 `protobuf:"varint,12,opt,name=stime,proto3" json:"stime"` // 1679414400,
Tab int32 `protobuf:"varint,13,opt,name=tab,proto3" json:"tab"`
Ttype int32 `protobuf:"varint,14,opt,name=ttype,proto3" json:"ttype"`
Icon string `protobuf:"bytes,15,opt,name=icon,proto3" json:"icon"` //"ico_event_yxjl",
Open int32 `protobuf:"varint,16,opt,name=open,proto3" json:"open"`
Order int32 `protobuf:"varint,17,opt,name=order,proto3" json:"order"`
Stype int32 `protobuf:"varint,18,opt,name=stype,proto3" json:"stype"`
Htype int32 `protobuf:"varint,19,opt,name=htype,proto3" json:"htype"`
Data *ActivityInfo `protobuf:"bytes,20,opt,name=data,proto3" json:"data"` // 活动详细数据
} }
func (x *DBHuodong) Reset() { func (x *DBHuodong) Reset() {
@ -286,13 +273,6 @@ func (x *DBHuodong) GetId() string {
return "" return ""
} }
func (x *DBHuodong) GetHdid() int32 {
if x != nil {
return x.Hdid
}
return 0
}
func (x *DBHuodong) GetRtime() int64 { func (x *DBHuodong) GetRtime() int64 {
if x != nil { if x != nil {
return x.Rtime return x.Rtime
@ -314,34 +294,6 @@ func (x *DBHuodong) GetName() string {
return "" return ""
} }
func (x *DBHuodong) GetImg() string {
if x != nil {
return x.Img
}
return ""
}
func (x *DBHuodong) GetShowtime() string {
if x != nil {
return x.Showtime
}
return ""
}
func (x *DBHuodong) GetPressImg() string {
if x != nil {
return x.PressImg
}
return ""
}
func (x *DBHuodong) GetIntr() string {
if x != nil {
return x.Intr
}
return ""
}
func (x *DBHuodong) GetEtime() int64 { func (x *DBHuodong) GetEtime() int64 {
if x != nil { if x != nil {
return x.Etime return x.Etime
@ -349,13 +301,6 @@ func (x *DBHuodong) GetEtime() int64 {
return 0 return 0
} }
func (x *DBHuodong) GetNormalImg() string {
if x != nil {
return x.NormalImg
}
return ""
}
func (x *DBHuodong) GetStime() int64 { func (x *DBHuodong) GetStime() int64 {
if x != nil { if x != nil {
return x.Stime return x.Stime
@ -363,55 +308,6 @@ func (x *DBHuodong) GetStime() int64 {
return 0 return 0
} }
func (x *DBHuodong) GetTab() int32 {
if x != nil {
return x.Tab
}
return 0
}
func (x *DBHuodong) GetTtype() int32 {
if x != nil {
return x.Ttype
}
return 0
}
func (x *DBHuodong) GetIcon() string {
if x != nil {
return x.Icon
}
return ""
}
func (x *DBHuodong) GetOpen() int32 {
if x != nil {
return x.Open
}
return 0
}
func (x *DBHuodong) GetOrder() int32 {
if x != nil {
return x.Order
}
return 0
}
func (x *DBHuodong) GetStype() int32 {
if x != nil {
return x.Stype
}
return 0
}
func (x *DBHuodong) GetHtype() int32 {
if x != nil {
return x.Htype
}
return 0
}
func (x *DBHuodong) GetData() *ActivityInfo { func (x *DBHuodong) GetData() *ActivityInfo {
if x != nil { if x != nil {
return x.Data return x.Data
@ -519,74 +415,55 @@ var file_activity_activity_db_proto_rawDesc = []byte{
0x03, 0x76, 0x61, 0x6c, 0x22, 0x2a, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x2a, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x41, 0x72, 0x72, 0x52, 0x05, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x03, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x41, 0x72, 0x72, 0x52, 0x05, 0x70, 0x72, 0x69, 0x7a, 0x65,
0x22, 0xd5, 0x03, 0x0a, 0x09, 0x44, 0x42, 0x48, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x12, 0x0e, 0x22, 0xb3, 0x01, 0x0a, 0x09, 0x44, 0x42, 0x48, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14,
0x0a, 0x04, 0x68, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x68, 0x64, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72,
0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x69, 0x74, 0x79, 0x70, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x69, 0x74,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x52, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a,
0x6d, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x6d, 0x67, 0x12, 0x1a, 0x0a, 0x05, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74,
0x08, 0x73, 0x68, 0x6f, 0x77, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28,
0x08, 0x73, 0x68, 0x6f, 0x77, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f,
0x73, 0x73, 0x49, 0x6d, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe6, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x41, 0x63, 0x74,
0x73, 0x73, 0x49, 0x6d, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x74, 0x72, 0x18, 0x09, 0x20, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x74, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x68,
0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x49, 0x6d, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x64, 0x6f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x68, 0x64, 0x6f, 0x69,
0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x49, 0x6d, 0x67, 0x12, 0x14, 0x0a, 0x64, 0x12, 0x33, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28,
0x05, 0x73, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61,
0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x62, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x74, 0x61, 0x2e, 0x47, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06,
0x52, 0x03, 0x74, 0x61, 0x62, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69,
0x63, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52,
0x12, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6f, 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x39, 0x0a, 0x0b, 0x47, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x45, 0x6e,
0x70, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x28, 0x05, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a,
0x14, 0x0a, 0x05, 0x68, 0x74, 0x79, 0x70, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0xdd, 0x02, 0x0a, 0x06, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x64,
0x68, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x14, 0x20, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x64,
0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x10, 0x01, 0x12, 0x0d,
0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe6, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x41, 0x0a, 0x09, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x50, 0x61, 0x79, 0x10, 0x02, 0x12, 0x0f, 0x0a,
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x0b, 0x4b, 0x46, 0x53, 0x65, 0x76, 0x65, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x12,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x0a, 0x0e, 0x58, 0x53, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x58, 0x53, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x72,
0x05, 0x68, 0x64, 0x6f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x68, 0x64, 0x75, 0x69, 0x74, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x58, 0x53, 0x46, 0x75, 0x6e, 0x64, 0x45,
0x6f, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x18, 0x04, 0x20, 0x78, 0x70, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x64, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10,
0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x10,
0x44, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x44, 0x72, 0x61, 0x77, 0x10,
0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x55, 0x70, 0x52, 0x65, 0x63, 0x68, 0x61, 0x72,
0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x67, 0x65, 0x10, 0x0a, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x68, 0x6f, 0x70, 0x43, 0x65, 0x6e, 0x74,
0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x65, 0x72, 0x50, 0x61, 0x79, 0x50, 0x61, 0x6b, 0x63, 0x67, 0x65, 0x10, 0x0b, 0x12, 0x12, 0x0a,
0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x1a, 0x39, 0x0a, 0x0b, 0x47, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x0e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x57, 0x61, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x10,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x0c, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x6f, 0x6f, 0x6e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x64, 0x54, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x70, 0x65, 0x54, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xe9, 0x07, 0x12, 0x12,
0x01, 0x2a, 0xdd, 0x02, 0x0a, 0x06, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x0a, 0x0d, 0x48, 0x64, 0x43, 0x65, 0x6c, 0x65, 0x62, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10,
0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0xea, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x48, 0x64, 0x50, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x10, 0xeb,
0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x10, 0x01, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x64, 0x4c, 0x61, 0x74, 0x74, 0x69, 0x63, 0x65, 0x10, 0xec,
0x12, 0x0d, 0x0a, 0x09, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x50, 0x61, 0x79, 0x10, 0x02, 0x12, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x48, 0x64, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x10, 0xed, 0x07, 0x42,
0x0f, 0x0a, 0x0b, 0x4b, 0x46, 0x53, 0x65, 0x76, 0x65, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x12, 0x12, 0x0a, 0x0e, 0x58, 0x53, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63,
0x61, 0x6c, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x58, 0x53, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65,
0x63, 0x72, 0x75, 0x69, 0x74, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x58, 0x53, 0x46, 0x75, 0x6e,
0x64, 0x45, 0x78, 0x70, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x64, 0x4c, 0x65, 0x76, 0x65,
0x6c, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x53, 0x69, 0x67,
0x6e, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x64, 0x54, 0x79, 0x70, 0x65, 0x44, 0x72, 0x61,
0x77, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x55, 0x70, 0x52, 0x65, 0x63, 0x68,
0x61, 0x72, 0x67, 0x65, 0x10, 0x0a, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x68, 0x6f, 0x70, 0x43, 0x65,
0x6e, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x50, 0x61, 0x6b, 0x63, 0x67, 0x65, 0x10, 0x0b, 0x12,
0x12, 0x0a, 0x0e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x57, 0x61, 0x72, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x10, 0x0c, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x6f, 0x6f, 0x6e, 0x64, 0x72, 0x65, 0x61, 0x6d,
0x57, 0x61, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x64,
0x54, 0x79, 0x70, 0x65, 0x54, 0x75, 0x72, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xe9, 0x07,
0x12, 0x12, 0x0a, 0x0d, 0x48, 0x64, 0x43, 0x65, 0x6c, 0x65, 0x62, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x10, 0xea, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x48, 0x64, 0x50, 0x75, 0x7a, 0x7a, 0x6c, 0x65,
0x10, 0xeb, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x64, 0x4c, 0x61, 0x74, 0x74, 0x69, 0x63, 0x65,
0x10, 0xec, 0x07, 0x12, 0x0c, 0x0a, 0x07, 0x48, 0x64, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x10, 0xed,
0x07, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
} }
var ( var (

View File

@ -29,7 +29,8 @@ type DBHoroscope struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID 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"` //uid Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //uid
Nodes map[int32]int32 `protobuf:"bytes,3,rep,name=nodes,proto3" json:"nodes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //节点信息 key:是节点id value:等级 Nodes map[int32]int32 `protobuf:"bytes,3,rep,name=nodes,proto3" json:"nodes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //节点信息 key:是节点id value:等级
Lastrest int64 `protobuf:"varint,4,opt,name=lastrest,proto3" json:"lastrest"` //上次重置时间 Consume []*UserAssets `protobuf:"bytes,4,rep,name=consume,proto3" json:"consume"` //消耗 用于返还
Lastrest int64 `protobuf:"varint,5,opt,name=lastrest,proto3" json:"lastrest"` //上次重置时间
} }
func (x *DBHoroscope) Reset() { func (x *DBHoroscope) Reset() {
@ -85,6 +86,13 @@ func (x *DBHoroscope) GetNodes() map[int32]int32 {
return nil return nil
} }
func (x *DBHoroscope) GetConsume() []*UserAssets {
if x != nil {
return x.Consume
}
return nil
}
func (x *DBHoroscope) GetLastrest() int64 { func (x *DBHoroscope) GetLastrest() int64 {
if x != nil { if x != nil {
return x.Lastrest return x.Lastrest
@ -96,20 +104,23 @@ var File_horoscope_horoscope_db_proto protoreflect.FileDescriptor
var file_horoscope_horoscope_db_proto_rawDesc = []byte{ var file_horoscope_horoscope_db_proto_rawDesc = []byte{
0x0a, 0x1c, 0x68, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x68, 0x6f, 0x72, 0x6f, 0x0a, 0x1c, 0x68, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x68, 0x6f, 0x72, 0x6f,
0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a,
0x01, 0x0a, 0x0b, 0x44, 0x42, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x0b, 0x44,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x42, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
0x12, 0x2d, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x05,
0x17, 0x2e, 0x44, 0x42, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2e, 0x4e, 0x6f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42,
0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45,
0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x07, 0x63,
0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x0a, 0x0a, 0x4e, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55,
0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x73, 0x75,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x73, 0x74, 0x18, 0x05,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x73, 0x74, 0x1a, 0x38,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x72, 0x6f, 0x74, 0x6f, 0x33, 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 (
@ -128,14 +139,16 @@ var file_horoscope_horoscope_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2
var file_horoscope_horoscope_db_proto_goTypes = []interface{}{ var file_horoscope_horoscope_db_proto_goTypes = []interface{}{
(*DBHoroscope)(nil), // 0: DBHoroscope (*DBHoroscope)(nil), // 0: DBHoroscope
nil, // 1: DBHoroscope.NodesEntry nil, // 1: DBHoroscope.NodesEntry
(*UserAssets)(nil), // 2: UserAssets
} }
var file_horoscope_horoscope_db_proto_depIdxs = []int32{ var file_horoscope_horoscope_db_proto_depIdxs = []int32{
1, // 0: DBHoroscope.nodes:type_name -> DBHoroscope.NodesEntry 1, // 0: DBHoroscope.nodes:type_name -> DBHoroscope.NodesEntry
1, // [1:1] is the sub-list for method output_type 2, // 1: DBHoroscope.consume:type_name -> UserAssets
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_horoscope_horoscope_db_proto_init() } func init() { file_horoscope_horoscope_db_proto_init() }
@ -143,6 +156,7 @@ func file_horoscope_horoscope_db_proto_init() {
if File_horoscope_horoscope_db_proto != nil { if File_horoscope_horoscope_db_proto != nil {
return return
} }
file_comm_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_horoscope_horoscope_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_horoscope_horoscope_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBHoroscope); i { switch v := v.(*DBHoroscope); i {

View File

@ -256,8 +256,9 @@ type HoroscopeResetResp struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"`
Info *DBHoroscope `protobuf:"bytes,2,opt,name=info,proto3" json:"info"` Info *DBHoroscope `protobuf:"bytes,2,opt,name=info,proto3" json:"info"`
Award []*UserAssets `protobuf:"bytes,3,rep,name=award,proto3" json:"award"`
} }
func (x *HoroscopeResetResp) Reset() { func (x *HoroscopeResetResp) Reset() {
@ -306,31 +307,41 @@ func (x *HoroscopeResetResp) GetInfo() *DBHoroscope {
return nil return nil
} }
func (x *HoroscopeResetResp) GetAward() []*UserAssets {
if x != nil {
return x.Award
}
return nil
}
var File_horoscope_horoscope_msg_proto protoreflect.FileDescriptor var File_horoscope_horoscope_msg_proto protoreflect.FileDescriptor
var file_horoscope_horoscope_msg_proto_rawDesc = []byte{ var file_horoscope_horoscope_msg_proto_rawDesc = []byte{
0x0a, 0x1d, 0x68, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x68, 0x6f, 0x72, 0x6f, 0x0a, 0x1d, 0x68, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x68, 0x6f, 0x72, 0x6f,
0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x1c, 0x68, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x68, 0x6f, 0x72, 0x6f, 0x73, 0x1c, 0x68, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x68, 0x6f, 0x72, 0x6f, 0x73,
0x63, 0x6f, 0x70, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63,
0x10, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x48, 0x6f, 0x72,
0x71, 0x22, 0x35, 0x0a, 0x11, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a,
0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x11, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x70, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x27, 0x0a, 0x13, 0x48, 0x6f, 0x72, 0x6f, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x04,
0x73, 0x63, 0x6f, 0x70, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x27, 0x0a, 0x13, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70,
0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x69, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6e,
0x64, 0x22, 0x38, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x55, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x69, 0x64, 0x22, 0x38, 0x0a,
0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x13, 0x0a, 0x11, 0x48, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20,
0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x13, 0x0a, 0x11, 0x48, 0x6f, 0x72, 0x6f, 0x73,
0x22, 0x4e, 0x0a, 0x12, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x22, 0x71, 0x0a, 0x12,
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x12, 0x20, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01,
0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x12, 0x20, 0x0a, 0x04, 0x69, 0x6e,
0x42, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x48, 0x6f, 0x72,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x05,
0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73,
0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -354,15 +365,17 @@ var file_horoscope_horoscope_msg_proto_goTypes = []interface{}{
(*HoroscopeResetReq)(nil), // 4: HoroscopeResetReq (*HoroscopeResetReq)(nil), // 4: HoroscopeResetReq
(*HoroscopeResetResp)(nil), // 5: HoroscopeResetResp (*HoroscopeResetResp)(nil), // 5: HoroscopeResetResp
(*DBHoroscope)(nil), // 6: DBHoroscope (*DBHoroscope)(nil), // 6: DBHoroscope
(*UserAssets)(nil), // 7: UserAssets
} }
var file_horoscope_horoscope_msg_proto_depIdxs = []int32{ var file_horoscope_horoscope_msg_proto_depIdxs = []int32{
6, // 0: HoroscopeInfoResp.info:type_name -> DBHoroscope 6, // 0: HoroscopeInfoResp.info:type_name -> DBHoroscope
6, // 1: HoroscopeResetResp.info:type_name -> DBHoroscope 6, // 1: HoroscopeResetResp.info:type_name -> DBHoroscope
2, // [2:2] is the sub-list for method output_type 7, // 2: HoroscopeResetResp.award:type_name -> UserAssets
2, // [2:2] is the sub-list for method input_type 3, // [3:3] is the sub-list for method output_type
2, // [2:2] is the sub-list for extension type_name 3, // [3:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension extendee 3, // [3:3] is the sub-list for extension type_name
0, // [0:2] is the sub-list for field type_name 3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
} }
func init() { file_horoscope_horoscope_msg_proto_init() } func init() { file_horoscope_horoscope_msg_proto_init() }
@ -371,6 +384,7 @@ func file_horoscope_horoscope_msg_proto_init() {
return return
} }
file_horoscope_horoscope_db_proto_init() file_horoscope_horoscope_db_proto_init()
file_comm_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_horoscope_horoscope_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_horoscope_horoscope_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HoroscopeInfoReq); i { switch v := v.(*HoroscopeInfoReq); i {