签到额外奖励,存储提示次数
This commit is contained in:
parent
fe3cc724ab
commit
233c0f5f70
@ -1047,7 +1047,7 @@
|
|||||||
{
|
{
|
||||||
"id": 56,
|
"id": 56,
|
||||||
"day": 25,
|
"day": 25,
|
||||||
"group": 1,
|
"group": 2,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1066,7 +1066,7 @@
|
|||||||
{
|
{
|
||||||
"id": 57,
|
"id": 57,
|
||||||
"day": 26,
|
"day": 26,
|
||||||
"group": 1,
|
"group": 2,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1085,7 +1085,7 @@
|
|||||||
{
|
{
|
||||||
"id": 58,
|
"id": 58,
|
||||||
"day": 27,
|
"day": 27,
|
||||||
"group": 1,
|
"group": 2,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1104,7 +1104,7 @@
|
|||||||
{
|
{
|
||||||
"id": 59,
|
"id": 59,
|
||||||
"day": 28,
|
"day": 28,
|
||||||
"group": 1,
|
"group": 2,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1123,7 +1123,7 @@
|
|||||||
{
|
{
|
||||||
"id": 60,
|
"id": 60,
|
||||||
"day": 29,
|
"day": 29,
|
||||||
"group": 1,
|
"group": 2,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1142,7 +1142,7 @@
|
|||||||
{
|
{
|
||||||
"id": 61,
|
"id": 61,
|
||||||
"day": 30,
|
"day": 30,
|
||||||
"group": 1,
|
"group": 2,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1161,7 +1161,7 @@
|
|||||||
{
|
{
|
||||||
"id": 62,
|
"id": 62,
|
||||||
"day": 31,
|
"day": 31,
|
||||||
"group": 1,
|
"group": 2,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1655,7 +1655,7 @@
|
|||||||
{
|
{
|
||||||
"id": 88,
|
"id": 88,
|
||||||
"day": 26,
|
"day": 26,
|
||||||
"group": 1,
|
"group": 3,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1674,7 +1674,7 @@
|
|||||||
{
|
{
|
||||||
"id": 89,
|
"id": 89,
|
||||||
"day": 27,
|
"day": 27,
|
||||||
"group": 1,
|
"group": 3,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1693,7 +1693,7 @@
|
|||||||
{
|
{
|
||||||
"id": 90,
|
"id": 90,
|
||||||
"day": 28,
|
"day": 28,
|
||||||
"group": 1,
|
"group": 3,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1712,7 +1712,7 @@
|
|||||||
{
|
{
|
||||||
"id": 91,
|
"id": 91,
|
||||||
"day": 29,
|
"day": 29,
|
||||||
"group": 1,
|
"group": 3,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1731,7 +1731,7 @@
|
|||||||
{
|
{
|
||||||
"id": 92,
|
"id": 92,
|
||||||
"day": 30,
|
"day": 30,
|
||||||
"group": 1,
|
"group": 3,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
@ -1750,7 +1750,7 @@
|
|||||||
{
|
{
|
||||||
"id": 93,
|
"id": 93,
|
||||||
"day": 31,
|
"day": 31,
|
||||||
"group": 1,
|
"group": 3,
|
||||||
"loopgift": [
|
"loopgift": [
|
||||||
{
|
{
|
||||||
"a": "hero",
|
"a": "hero",
|
||||||
|
110
bin/json/game_signextra.json
Normal file
110
bin/json/game_signextra.json
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"day": 7,
|
||||||
|
"groups": 1,
|
||||||
|
"extra": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "90001",
|
||||||
|
"n": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"day": 14,
|
||||||
|
"groups": 1,
|
||||||
|
"extra": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "90002",
|
||||||
|
"n": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"day": 21,
|
||||||
|
"groups": 1,
|
||||||
|
"extra": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "90003",
|
||||||
|
"n": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"day": 7,
|
||||||
|
"groups": 2,
|
||||||
|
"extra": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "90001",
|
||||||
|
"n": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"day": 14,
|
||||||
|
"groups": 2,
|
||||||
|
"extra": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "90002",
|
||||||
|
"n": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"day": 21,
|
||||||
|
"groups": 2,
|
||||||
|
"extra": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "90003",
|
||||||
|
"n": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"day": 7,
|
||||||
|
"groups": 3,
|
||||||
|
"extra": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "90001",
|
||||||
|
"n": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"day": 14,
|
||||||
|
"groups": 3,
|
||||||
|
"extra": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "90002",
|
||||||
|
"n": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"day": 21,
|
||||||
|
"groups": 3,
|
||||||
|
"extra": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "90003",
|
||||||
|
"n": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
33
modules/user/api_changetips.go
Normal file
33
modules/user/api_changetips.go
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) ChangeTipsCheck(session comm.IUserSession, req *pb.UserChangeTipsReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改提示次数
|
||||||
|
func (this *apiComp) ChangeTips(session comm.IUserSession, req *pb.UserChangeTipsReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
|
||||||
|
update := make(map[string]interface{}, 0)
|
||||||
|
if sign, err := this.module.modelSign.GetUserSign(session.GetUserId()); err == nil {
|
||||||
|
|
||||||
|
sign.Tips = req.Tips
|
||||||
|
update["tips"] = sign.Tips
|
||||||
|
|
||||||
|
this.module.modelSign.Change(session.GetUserId(), update)
|
||||||
|
|
||||||
|
session.SendMsg(string(this.module.GetType()), "changetips", &pb.UserChangeTipsReq{
|
||||||
|
Tips: req.Tips,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
@ -24,14 +24,14 @@ func (this *apiComp) PuzzleAward(session comm.IUserSession, req *pb.UserPuzzleAw
|
|||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if sign.Puzzle[req.Index] != 0 {
|
if sign.Puzzle[req.Index] != 1 {
|
||||||
code = pb.ErrorCode_ReqParameterError
|
code = pb.ErrorCode_ReqParameterError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if code = this.module.DispenseRes(session, this.module.globalConf.UnifiedReward, true); code != pb.ErrorCode_Success {
|
if code = this.module.DispenseRes(session, this.module.globalConf.UnifiedReward, true); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
sign.Puzzle[req.Index] = 1
|
sign.Puzzle[req.Index] = 2
|
||||||
if err = this.module.modelSign.Change(session.GetUserId(), map[string]interface{}{
|
if err = this.module.modelSign.Change(session.GetUserId(), map[string]interface{}{
|
||||||
"puzzle": sign.Puzzle,
|
"puzzle": sign.Puzzle,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
@ -11,9 +11,7 @@ import (
|
|||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
func (this *apiComp) SignCheck(session comm.IUserSession, req *pb.UserSignReq) (code pb.ErrorCode) {
|
func (this *apiComp) SignCheck(session comm.IUserSession, req *pb.UserSignReq) (code pb.ErrorCode) {
|
||||||
if req.SignType != 1 && req.SignType != 2 { // 签到参数校验
|
|
||||||
return pb.ErrorCode_ReqParameterError
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,63 +20,55 @@ func (this *apiComp) Sign(session comm.IUserSession, req *pb.UserSignReq) (code
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
update map[string]interface{}
|
update map[string]interface{}
|
||||||
|
lastSignTime int64 // 上次签到时间
|
||||||
)
|
)
|
||||||
if code = this.module.ModuleSys.IsAccess(comm.Sign, session.GetUserId()); code != pb.ErrorCode_Success {
|
if code = this.module.ModuleSys.IsAccess(comm.Sign, session.GetUserId()); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
update = make(map[string]interface{}, 0)
|
update = make(map[string]interface{}, 0)
|
||||||
if sign, err := this.module.modelSign.GetUserSign(session.GetUserId()); err == nil {
|
if sign, err := this.module.modelSign.GetUserSign(session.GetUserId()); err == nil {
|
||||||
|
// 获取当前是第几天
|
||||||
|
lastSignTime = sign.SignTime
|
||||||
|
sign.SignTime = configure.Now().Unix()
|
||||||
|
iDay := (configure.Now().Unix() - sign.SignTime) / (24 * 3600)
|
||||||
start, _ := utils.GetMonthStartEnd()
|
start, _ := utils.GetMonthStartEnd()
|
||||||
if sign.SignTime < start { // 重置
|
if sign.SignTime < start { // 重置
|
||||||
sign.SignTime = configure.Now().Unix()
|
|
||||||
sign.SignCount = 1
|
sign.SignCount = 1
|
||||||
if newGroup := this.module.configure.GetSignResetConf(sign.Group + 1); newGroup != -1 { // 获取当前的组id
|
if newGroup := this.module.configure.GetSignResetConf(sign.Group + 1); newGroup != -1 { // 获取当前的组id
|
||||||
sign.Day = 1
|
|
||||||
sign.Group = newGroup
|
sign.Group = newGroup
|
||||||
update["day"] = sign.Day
|
sign.SignCount = 1
|
||||||
update["group"] = newGroup
|
update["group"] = newGroup
|
||||||
}
|
}
|
||||||
update["signTime"] = sign.SignTime
|
|
||||||
update["signCount"] = sign.SignCount
|
|
||||||
sign.Puzzle = make([]int32, 31)
|
sign.Puzzle = make([]int32, 31)
|
||||||
sign.Puzzle[0] = 1
|
|
||||||
update["puzzle"] = sign.Puzzle
|
|
||||||
this.module.modelSign.Change(session.GetUserId(), update)
|
|
||||||
} else {
|
} else {
|
||||||
// 获取当前是第几天
|
|
||||||
iDay := (configure.Now().Unix() - sign.SignTime) / (24 * 3600)
|
if sign.Puzzle[iDay] != 0 {
|
||||||
if req.SignType == 1 && sign.Puzzle[iDay] != 0 {
|
|
||||||
code = pb.ErrorCode_UserSign
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if req.SignType == 2 && sign.Puzzle[iDay] != 1 {
|
|
||||||
code = pb.ErrorCode_UserSign
|
code = pb.ErrorCode_UserSign
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
sign.Day = int32(iDay)
|
if utils.IsYestoday(lastSignTime) {
|
||||||
if utils.IsYestoday(sign.SignTime) {
|
|
||||||
sign.SignCount += 1
|
sign.SignCount += 1
|
||||||
} else {
|
} else {
|
||||||
sign.SignCount = 1
|
sign.SignCount = 1
|
||||||
}
|
}
|
||||||
sign.SignTime = configure.Now().Unix()
|
}
|
||||||
|
sign.Day = int32(iDay)
|
||||||
|
sign.Puzzle[iDay] = 1
|
||||||
update["signTime"] = sign.SignTime
|
update["signTime"] = sign.SignTime
|
||||||
update["signCount"] = sign.SignCount
|
update["signCount"] = sign.SignCount
|
||||||
update["day"] = sign.Day
|
update["day"] = sign.Day
|
||||||
|
|
||||||
sign.Puzzle[iDay] = req.SignType
|
|
||||||
update["puzzle"] = sign.Puzzle
|
update["puzzle"] = sign.Puzzle
|
||||||
this.module.modelSign.Change(session.GetUserId(), update)
|
this.module.modelSign.Change(session.GetUserId(), update)
|
||||||
}
|
|
||||||
_data := this.module.configure.GetSignConf(sign.Day, sign.Group)
|
_data := this.module.configure.GetSignConf(sign.Day, sign.Group)
|
||||||
if _data != nil { // 发奖
|
if _data != nil { // 发奖
|
||||||
if req.SignType == 1 {
|
|
||||||
this.module.DispenseRes(session, _data.Loopgift, true) // 签到奖励
|
|
||||||
} else {
|
|
||||||
this.module.DispenseRes(session, _data.Gamegift, true) // 小游戏奖励
|
|
||||||
}
|
|
||||||
|
|
||||||
|
this.module.DispenseRes(session, _data.Loopgift, true) // 签到奖励
|
||||||
|
// 额外奖励
|
||||||
|
if conf := this.module.configure.GetSignExtarConf(sign.SignCount, sign.Group); conf != nil {
|
||||||
|
this.module.DispenseRes(session, conf.Extra, true) // 签到额外奖励
|
||||||
|
}
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), "sign", &pb.UserSignResp{
|
session.SendMsg(string(this.module.GetType()), "sign", &pb.UserSignResp{
|
||||||
Data: sign,
|
Data: sign,
|
||||||
|
@ -14,6 +14,7 @@ const (
|
|||||||
game_signreset = "game_signreset.json"
|
game_signreset = "game_signreset.json"
|
||||||
game_sign = "game_sign.json"
|
game_sign = "game_sign.json"
|
||||||
gameOpencond = "game_opencond.json"
|
gameOpencond = "game_opencond.json"
|
||||||
|
game_SignExtra = "game_signextra.json"
|
||||||
)
|
)
|
||||||
|
|
||||||
///配置管理基础组件
|
///配置管理基础组件
|
||||||
@ -21,6 +22,7 @@ type configureComp struct {
|
|||||||
hlock sync.RWMutex
|
hlock sync.RWMutex
|
||||||
modules.MCompConfigure
|
modules.MCompConfigure
|
||||||
_sign map[int32]*cfg.GameSignData
|
_sign map[int32]*cfg.GameSignData
|
||||||
|
_signExtra map[int32]*cfg.GameSignExtraData
|
||||||
}
|
}
|
||||||
|
|
||||||
//组件初始化接口
|
//组件初始化接口
|
||||||
@ -30,12 +32,13 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
|||||||
this._sign = make(map[int32]*cfg.GameSignData, 0)
|
this._sign = make(map[int32]*cfg.GameSignData, 0)
|
||||||
configure.RegisterConfigure(game_sign, cfg.NewGameSign, this.LoadSignData)
|
configure.RegisterConfigure(game_sign, cfg.NewGameSign, this.LoadSignData)
|
||||||
this.LoadConfigure(gameOpencond, cfg.NewGameOpencond)
|
this.LoadConfigure(gameOpencond, cfg.NewGameOpencond)
|
||||||
|
configure.RegisterConfigure(game_sign, cfg.NewGameSign, this.LoadSignExtraData)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取签到信息
|
// 获取签到信息
|
||||||
func (this *configureComp) GetSignConf(day, group int32) *cfg.GameSignData {
|
func (this *configureComp) GetSignConf(day, group int32) *cfg.GameSignData {
|
||||||
if v, ok := this._sign[day<<8+group]; ok {
|
if v, ok := this._sign[group<<8+day]; ok {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -46,6 +49,9 @@ func (this *configureComp) GetSignResetConf(id int32) int32 {
|
|||||||
if v, err := this.GetConfigure(game_signreset); err == nil {
|
if v, err := this.GetConfigure(game_signreset); err == nil {
|
||||||
if configure, ok := v.(*cfg.GameSignReset); ok {
|
if configure, ok := v.(*cfg.GameSignReset); ok {
|
||||||
if configure != nil {
|
if configure != nil {
|
||||||
|
if _, ok := configure.GetDataMap()[id]; !ok {
|
||||||
|
return configure.Get(1).Groups
|
||||||
|
}
|
||||||
return configure.Get(id).Groups
|
return configure.Get(id).Groups
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -58,7 +64,7 @@ func (this *configureComp) LoadSignData() {
|
|||||||
this.hlock.Lock()
|
this.hlock.Lock()
|
||||||
defer this.hlock.Unlock()
|
defer this.hlock.Unlock()
|
||||||
for _, value := range configure.GetDataList() {
|
for _, value := range configure.GetDataList() {
|
||||||
this._sign[value.Day<<8+value.Group] = value
|
this._sign[value.Group<<8+value.Day] = value
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -79,7 +85,6 @@ func (this *configureComp) GetOpenCondList() []*cfg.GameOpencondData {
|
|||||||
}
|
}
|
||||||
return data.GetDataList()
|
return data.GetDataList()
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *configureComp) FindFunc(lv int32) (funcIds []string) {
|
func (this *configureComp) FindFunc(lv int32) (funcIds []string) {
|
||||||
@ -102,3 +107,25 @@ func (this *configureComp) FindFunc(lv int32) (funcIds []string) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *configureComp) LoadSignExtraData() {
|
||||||
|
if v, err := this.GetConfigure(game_SignExtra); err == nil {
|
||||||
|
if configure, ok := v.(*cfg.GameSignExtra); ok {
|
||||||
|
this.hlock.Lock()
|
||||||
|
defer this.hlock.Unlock()
|
||||||
|
for _, value := range configure.GetDataList() {
|
||||||
|
this._signExtra[value.Groups<<8+value.Day] = value
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log.Errorf("get SignExtra conf err:%v", err)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func (this *configureComp) GetSignExtarConf(day, group int32) *cfg.GameSignExtraData {
|
||||||
|
if v, ok := this._signExtra[group<<8+day]; ok {
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
@ -510,6 +510,7 @@ type DBSign struct {
|
|||||||
Group int32 `protobuf:"varint,5,opt,name=group,proto3" json:"group"` //记录循环签到值
|
Group int32 `protobuf:"varint,5,opt,name=group,proto3" json:"group"` //记录循环签到值
|
||||||
Day int32 `protobuf:"varint,6,opt,name=day,proto3" json:"day"` // 今天是这个月第几天
|
Day int32 `protobuf:"varint,6,opt,name=day,proto3" json:"day"` // 今天是这个月第几天
|
||||||
Puzzle []int32 `protobuf:"varint,7,rep,packed,name=puzzle,proto3" json:"puzzle" bson:"puzzle"` //拼图游戏完成情况 // 0 未签到 1 已签到 2 玩了游戏
|
Puzzle []int32 `protobuf:"varint,7,rep,packed,name=puzzle,proto3" json:"puzzle" bson:"puzzle"` //拼图游戏完成情况 // 0 未签到 1 已签到 2 玩了游戏
|
||||||
|
Tips int32 `protobuf:"varint,8,opt,name=tips,proto3" json:"tips"` // 提示次数
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBSign) Reset() {
|
func (x *DBSign) Reset() {
|
||||||
@ -593,6 +594,13 @@ func (x *DBSign) GetPuzzle() []int32 {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *DBSign) GetTips() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Tips
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_user_user_db_proto protoreflect.FileDescriptor
|
var File_user_user_db_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_user_user_db_proto_rawDesc = []byte{
|
var file_user_user_db_proto_rawDesc = []byte{
|
||||||
@ -668,7 +676,7 @@ var file_user_user_db_proto_rawDesc = []byte{
|
|||||||
0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d,
|
0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d,
|
||||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12,
|
0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12,
|
||||||
0x14, 0x0a, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
|
0x14, 0x0a, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
|
||||||
0x73, 0x61, 0x69, 0x6a, 0x69, 0x22, 0xa4, 0x01, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e,
|
0x73, 0x61, 0x69, 0x6a, 0x69, 0x22, 0xb8, 0x01, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e,
|
||||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
|
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
|
||||||
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
||||||
0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03,
|
0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03,
|
||||||
@ -678,8 +686,9 @@ var file_user_user_db_proto_rawDesc = []byte{
|
|||||||
0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f,
|
0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f,
|
||||||
0x75, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x75, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
0x03, 0x64, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x18, 0x07,
|
0x03, 0x64, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x18, 0x07,
|
||||||
0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x70, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x42, 0x06, 0x5a, 0x04,
|
0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x70, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x74, 0x69, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x69, 0x70, 0x73,
|
||||||
|
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -2378,8 +2378,6 @@ type UserSignReq struct {
|
|||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
SignType int32 `protobuf:"varint,1,opt,name=signType,proto3" json:"signType"` // 1 签到 2 玩游戏
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserSignReq) Reset() {
|
func (x *UserSignReq) Reset() {
|
||||||
@ -2414,13 +2412,6 @@ func (*UserSignReq) Descriptor() ([]byte, []int) {
|
|||||||
return file_user_user_msg_proto_rawDescGZIP(), []int{46}
|
return file_user_user_msg_proto_rawDescGZIP(), []int{46}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserSignReq) GetSignType() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.SignType
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// 推送签到信息
|
// 推送签到信息
|
||||||
type UserSignResp struct {
|
type UserSignResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -2565,6 +2556,101 @@ func (x *UserPuzzleAwardResp) GetIndex() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改提示次数
|
||||||
|
type UserChangeTipsReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Tips int32 `protobuf:"varint,1,opt,name=tips,proto3" json:"tips"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UserChangeTipsReq) Reset() {
|
||||||
|
*x = UserChangeTipsReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_user_user_msg_proto_msgTypes[50]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UserChangeTipsReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UserChangeTipsReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UserChangeTipsReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_user_user_msg_proto_msgTypes[50]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use UserChangeTipsReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UserChangeTipsReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_user_user_msg_proto_rawDescGZIP(), []int{50}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UserChangeTipsReq) GetTips() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Tips
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type UserChangeTipsResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Data *DBSign `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UserChangeTipsResp) Reset() {
|
||||||
|
*x = UserChangeTipsResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_user_user_msg_proto_msgTypes[51]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UserChangeTipsResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UserChangeTipsResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UserChangeTipsResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_user_user_msg_proto_msgTypes[51]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use UserChangeTipsResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UserChangeTipsResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_user_user_msg_proto_rawDescGZIP(), []int{51}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UserChangeTipsResp) GetData() *DBSign {
|
||||||
|
if x != nil {
|
||||||
|
return x.Data
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var File_user_user_msg_proto protoreflect.FileDescriptor
|
var File_user_user_msg_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_user_user_msg_proto_rawDesc = []byte{
|
var file_user_user_msg_proto_rawDesc = []byte{
|
||||||
@ -2747,18 +2833,22 @@ var file_user_user_msg_proto_rawDesc = []byte{
|
|||||||
0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61,
|
0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
|
0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74,
|
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x74,
|
||||||
0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x29, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53,
|
0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x0d, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53,
|
||||||
0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x79,
|
0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2b, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x69,
|
||||||
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x79,
|
0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
|
||||||
0x70, 0x65, 0x22, 0x2b, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x04, 0x64,
|
||||||
0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
0x61, 0x74, 0x61, 0x22, 0x2a, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x7a, 0x7a, 0x6c,
|
||||||
0x32, 0x07, 0x2e, 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
|
0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64,
|
||||||
0x2a, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x41, 0x77, 0x61,
|
0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22,
|
||||||
0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01,
|
0x2b, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x41, 0x77, 0x61,
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x2b, 0x0a, 0x13, 0x55,
|
0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
|
||||||
0x73, 0x65, 0x72, 0x50, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65,
|
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x27, 0x0a, 0x11,
|
||||||
0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x70, 0x73, 0x52, 0x65,
|
||||||
0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
0x71, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
|
0x04, 0x74, 0x69, 0x70, 0x73, 0x22, 0x31, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x61,
|
||||||
|
0x6e, 0x67, 0x65, 0x54, 0x69, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64,
|
||||||
|
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x53, 0x69,
|
||||||
|
0x67, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
||||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2774,7 +2864,7 @@ func file_user_user_msg_proto_rawDescGZIP() []byte {
|
|||||||
return file_user_user_msg_proto_rawDescData
|
return file_user_user_msg_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 50)
|
var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 52)
|
||||||
var file_user_user_msg_proto_goTypes = []interface{}{
|
var file_user_user_msg_proto_goTypes = []interface{}{
|
||||||
(*UserLoginReq)(nil), // 0: UserLoginReq
|
(*UserLoginReq)(nil), // 0: UserLoginReq
|
||||||
(*UserLoginResp)(nil), // 1: UserLoginResp
|
(*UserLoginResp)(nil), // 1: UserLoginResp
|
||||||
@ -2826,40 +2916,43 @@ var file_user_user_msg_proto_goTypes = []interface{}{
|
|||||||
(*UserSignResp)(nil), // 47: UserSignResp
|
(*UserSignResp)(nil), // 47: UserSignResp
|
||||||
(*UserPuzzleAwardReq)(nil), // 48: UserPuzzleAwardReq
|
(*UserPuzzleAwardReq)(nil), // 48: UserPuzzleAwardReq
|
||||||
(*UserPuzzleAwardResp)(nil), // 49: UserPuzzleAwardResp
|
(*UserPuzzleAwardResp)(nil), // 49: UserPuzzleAwardResp
|
||||||
(*DBUser)(nil), // 50: DBUser
|
(*UserChangeTipsReq)(nil), // 50: UserChangeTipsReq
|
||||||
(*DBUserExpand)(nil), // 51: DBUserExpand
|
(*UserChangeTipsResp)(nil), // 51: UserChangeTipsResp
|
||||||
(ErrorCode)(0), // 52: ErrorCode
|
(*DBUser)(nil), // 52: DBUser
|
||||||
(*CacheUser)(nil), // 53: CacheUser
|
(*DBUserExpand)(nil), // 53: DBUserExpand
|
||||||
(*DBUserSetting)(nil), // 54: DBUserSetting
|
(ErrorCode)(0), // 54: ErrorCode
|
||||||
(*DBPagodaRecord)(nil), // 55: DBPagodaRecord
|
(*CacheUser)(nil), // 55: CacheUser
|
||||||
(*DBHuntingRank)(nil), // 56: DBHuntingRank
|
(*DBUserSetting)(nil), // 56: DBUserSetting
|
||||||
(*DBVikingRank)(nil), // 57: DBVikingRank
|
(*DBPagodaRecord)(nil), // 57: DBPagodaRecord
|
||||||
(*DBServerData)(nil), // 58: DBServerData
|
(*DBHuntingRank)(nil), // 58: DBHuntingRank
|
||||||
(*DBSign)(nil), // 59: DBSign
|
(*DBVikingRank)(nil), // 59: DBVikingRank
|
||||||
|
(*DBServerData)(nil), // 60: DBServerData
|
||||||
|
(*DBSign)(nil), // 61: DBSign
|
||||||
}
|
}
|
||||||
var file_user_user_msg_proto_depIdxs = []int32{
|
var file_user_user_msg_proto_depIdxs = []int32{
|
||||||
50, // 0: UserLoginResp.data:type_name -> DBUser
|
52, // 0: UserLoginResp.data:type_name -> DBUser
|
||||||
51, // 1: UserLoginResp.ex:type_name -> DBUserExpand
|
53, // 1: UserLoginResp.ex:type_name -> DBUserExpand
|
||||||
50, // 2: UserInfoResp.data:type_name -> DBUser
|
52, // 2: UserInfoResp.data:type_name -> DBUser
|
||||||
51, // 3: UserInfoResp.ex:type_name -> DBUserExpand
|
53, // 3: UserInfoResp.ex:type_name -> DBUserExpand
|
||||||
52, // 4: UserRegisterResp.Code:type_name -> ErrorCode
|
54, // 4: UserRegisterResp.Code:type_name -> ErrorCode
|
||||||
53, // 5: UserLoadResp.data:type_name -> CacheUser
|
55, // 5: UserLoadResp.data:type_name -> CacheUser
|
||||||
54, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting
|
56, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting
|
||||||
54, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting
|
56, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting
|
||||||
50, // 8: UserBattlerecordResp.data:type_name -> DBUser
|
52, // 8: UserBattlerecordResp.data:type_name -> DBUser
|
||||||
51, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand
|
53, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand
|
||||||
55, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord
|
57, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord
|
||||||
56, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank
|
58, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank
|
||||||
57, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank
|
59, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank
|
||||||
53, // 13: UserOnlineResp.users:type_name -> CacheUser
|
55, // 13: UserOnlineResp.users:type_name -> CacheUser
|
||||||
50, // 14: UserDataListResp.users:type_name -> DBUser
|
52, // 14: UserDataListResp.users:type_name -> DBUser
|
||||||
58, // 15: UserGetServerDataResp.data:type_name -> DBServerData
|
60, // 15: UserGetServerDataResp.data:type_name -> DBServerData
|
||||||
59, // 16: UserSignResp.data:type_name -> DBSign
|
61, // 16: UserSignResp.data:type_name -> DBSign
|
||||||
17, // [17:17] is the sub-list for method output_type
|
61, // 17: UserChangeTipsResp.data:type_name -> DBSign
|
||||||
17, // [17:17] is the sub-list for method input_type
|
18, // [18:18] is the sub-list for method output_type
|
||||||
17, // [17:17] is the sub-list for extension type_name
|
18, // [18:18] is the sub-list for method input_type
|
||||||
17, // [17:17] is the sub-list for extension extendee
|
18, // [18:18] is the sub-list for extension type_name
|
||||||
0, // [0:17] is the sub-list for field type_name
|
18, // [18:18] is the sub-list for extension extendee
|
||||||
|
0, // [0:18] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_user_user_msg_proto_init() }
|
func init() { file_user_user_msg_proto_init() }
|
||||||
@ -3475,6 +3568,30 @@ func file_user_user_msg_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_user_user_msg_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*UserChangeTipsReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_user_user_msg_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*UserChangeTipsResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@ -3482,7 +3599,7 @@ func file_user_user_msg_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_user_user_msg_proto_rawDesc,
|
RawDescriptor: file_user_user_msg_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 50,
|
NumMessages: 52,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -9,34 +9,26 @@
|
|||||||
package cfg
|
package cfg
|
||||||
|
|
||||||
type GameSign struct {
|
type GameSign struct {
|
||||||
_dataMap map[int32]*GameSignData
|
|
||||||
_dataList []*GameSignData
|
_dataList []*GameSignData
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGameSign(_buf []map[string]interface{}) (*GameSign, error) {
|
func NewGameSign(_buf []map[string]interface{}) (*GameSign, error) {
|
||||||
_dataList := make([]*GameSignData, 0, len(_buf))
|
_dataList := make([]*GameSignData, 0, len(_buf))
|
||||||
dataMap := make(map[int32]*GameSignData)
|
|
||||||
for _, _ele_ := range _buf {
|
for _, _ele_ := range _buf {
|
||||||
if _v, err2 := DeserializeGameSignData(_ele_); err2 != nil {
|
if _v, err2 := DeserializeGameSignData(_ele_); err2 != nil {
|
||||||
return nil, err2
|
return nil, err2
|
||||||
} else {
|
} else {
|
||||||
_dataList = append(_dataList, _v)
|
_dataList = append(_dataList, _v)
|
||||||
dataMap[_v.Id] = _v
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return &GameSign{_dataList:_dataList, _dataMap:dataMap}, nil
|
return &GameSign{_dataList:_dataList}, nil
|
||||||
}
|
|
||||||
|
|
||||||
func (table *GameSign) GetDataMap() map[int32]*GameSignData {
|
|
||||||
return table._dataMap
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *GameSign) GetDataList() []*GameSignData {
|
func (table *GameSign) GetDataList() []*GameSignData {
|
||||||
return table._dataList
|
return table._dataList
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *GameSign) Get(key int32) *GameSignData {
|
func (table *GameSign) Get(index int) *GameSignData {
|
||||||
return table._dataMap[key]
|
return table._dataList[index]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
34
sys/configure/structs/Game.SignExtra.go
Normal file
34
sys/configure/structs/Game.SignExtra.go
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
type GameSignExtra struct {
|
||||||
|
_dataList []*GameSignExtraData
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGameSignExtra(_buf []map[string]interface{}) (*GameSignExtra, error) {
|
||||||
|
_dataList := make([]*GameSignExtraData, 0, len(_buf))
|
||||||
|
for _, _ele_ := range _buf {
|
||||||
|
if _v, err2 := DeserializeGameSignExtraData(_ele_); err2 != nil {
|
||||||
|
return nil, err2
|
||||||
|
} else {
|
||||||
|
_dataList = append(_dataList, _v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return &GameSignExtra{_dataList:_dataList}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameSignExtra) GetDataList() []*GameSignExtraData {
|
||||||
|
return table._dataList
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameSignExtra) Get(index int) *GameSignExtraData {
|
||||||
|
return table._dataList[index]
|
||||||
|
}
|
||||||
|
|
54
sys/configure/structs/Game.SignExtraData.go
Normal file
54
sys/configure/structs/Game.SignExtraData.go
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
type GameSignExtraData struct {
|
||||||
|
Id int32
|
||||||
|
Day int32
|
||||||
|
Groups int32
|
||||||
|
Extra []*Gameatn
|
||||||
|
}
|
||||||
|
|
||||||
|
const TypeId_GameSignExtraData = -308971103
|
||||||
|
|
||||||
|
func (*GameSignExtraData) GetTypeId() int32 {
|
||||||
|
return -308971103
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_v *GameSignExtraData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["day"].(float64); !_ok_ { err = errors.New("day error"); return }; _v.Day = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["groups"].(float64); !_ok_ { err = errors.New("groups error"); return }; _v.Groups = int32(_tempNum_) }
|
||||||
|
{
|
||||||
|
var _arr_ []interface{}
|
||||||
|
var _ok_ bool
|
||||||
|
if _arr_, _ok_ = _buf["extra"].([]interface{}); !_ok_ { err = errors.New("extra error"); return }
|
||||||
|
|
||||||
|
_v.Extra = make([]*Gameatn, 0, len(_arr_))
|
||||||
|
|
||||||
|
for _, _e_ := range _arr_ {
|
||||||
|
var _list_v_ *Gameatn
|
||||||
|
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
|
||||||
|
_v.Extra = append(_v.Extra, _list_v_)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeserializeGameSignExtraData(_buf map[string]interface{}) (*GameSignExtraData, error) {
|
||||||
|
v := &GameSignExtraData{}
|
||||||
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
|
return v, nil
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
@ -117,6 +117,7 @@ type Tables struct {
|
|||||||
Horoscope *GameHoroscope
|
Horoscope *GameHoroscope
|
||||||
Sign *GameSign
|
Sign *GameSign
|
||||||
SignReset *GameSignReset
|
SignReset *GameSignReset
|
||||||
|
SignExtra *GameSignExtra
|
||||||
GrowTask *GameGrowTask
|
GrowTask *GameGrowTask
|
||||||
GrowReward *GameGrowReward
|
GrowReward *GameGrowReward
|
||||||
Recharge *GameRecharge
|
Recharge *GameRecharge
|
||||||
@ -819,6 +820,12 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
|||||||
if tables.SignReset, err = NewGameSignReset(buf); err != nil {
|
if tables.SignReset, err = NewGameSignReset(buf); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if buf, err = loader("game_signextra"); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if tables.SignExtra, err = NewGameSignExtra(buf); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
if buf, err = loader("game_growtask"); err != nil {
|
if buf, err = loader("game_growtask"); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -1173,5 +1180,6 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
|||||||
if tables.Breakingbad, err = NewGameBreakingbad(buf); err != nil {
|
if tables.Breakingbad, err = NewGameBreakingbad(buf); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return tables, nil
|
return tables, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user