Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
a1d3c19257
@ -3354,5 +3354,77 @@
|
||||
{
|
||||
"key": "opencond_prompt_10003",
|
||||
"text_cn": "开服第2天开启且通关2-14后开启"
|
||||
},
|
||||
{
|
||||
"key": "num_1001",
|
||||
"text_cn": "主线入口"
|
||||
},
|
||||
{
|
||||
"key": "num_1002",
|
||||
"text_cn": "招募"
|
||||
},
|
||||
{
|
||||
"key": "num_1003",
|
||||
"text_cn": "剧情副本"
|
||||
},
|
||||
{
|
||||
"key": "num_1004",
|
||||
"text_cn": "武馆入口"
|
||||
},
|
||||
{
|
||||
"key": "num_1005",
|
||||
"text_cn": "主题活动入口"
|
||||
},
|
||||
{
|
||||
"key": "num_1006",
|
||||
"text_cn": "迷雾岛屿"
|
||||
},
|
||||
{
|
||||
"key": "num_1007",
|
||||
"text_cn": "维京远征"
|
||||
},
|
||||
{
|
||||
"key": "num_1008",
|
||||
"text_cn": "心魔塔"
|
||||
},
|
||||
{
|
||||
"key": "num_1009",
|
||||
"text_cn": "捕羊大赛"
|
||||
},
|
||||
{
|
||||
"key": "num_1010",
|
||||
"text_cn": "黑暗料理大赛"
|
||||
},
|
||||
{
|
||||
"key": "num_1011",
|
||||
"text_cn": "地下角斗场"
|
||||
},
|
||||
{
|
||||
"key": "num_1012",
|
||||
"text_cn": "疯狂竞技赛"
|
||||
},
|
||||
{
|
||||
"key": "num_1013",
|
||||
"text_cn": "五侠擂台"
|
||||
},
|
||||
{
|
||||
"key": "num_1014",
|
||||
"text_cn": "藏书馆"
|
||||
},
|
||||
{
|
||||
"key": "num_1015",
|
||||
"text_cn": "篝火舞会"
|
||||
},
|
||||
{
|
||||
"key": "num_1016",
|
||||
"text_cn": "商队"
|
||||
},
|
||||
{
|
||||
"key": "num_1017",
|
||||
"text_cn": "美食馆"
|
||||
},
|
||||
{
|
||||
"key": "num_1018",
|
||||
"text_cn": "戈伯铁匠铺"
|
||||
}
|
||||
]
|
@ -3354,5 +3354,77 @@
|
||||
{
|
||||
"key": "opencond_prompt_10003",
|
||||
"text_en": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1001",
|
||||
"text_en": "TRIALS"
|
||||
},
|
||||
{
|
||||
"key": "num_1002",
|
||||
"text_en": "MOON"
|
||||
},
|
||||
{
|
||||
"key": "num_1003",
|
||||
"text_en": "STORY"
|
||||
},
|
||||
{
|
||||
"key": "num_1004",
|
||||
"text_en": "KONG FU"
|
||||
},
|
||||
{
|
||||
"key": "num_1005",
|
||||
"text_en": "EVENT"
|
||||
},
|
||||
{
|
||||
"key": "num_1006",
|
||||
"text_en": "Misty Island"
|
||||
},
|
||||
{
|
||||
"key": "num_1007",
|
||||
"text_en": "Viking expedition"
|
||||
},
|
||||
{
|
||||
"key": "num_1008",
|
||||
"text_en": "Heart demon tower"
|
||||
},
|
||||
{
|
||||
"key": "num_1009",
|
||||
"text_en": "Catch sheep"
|
||||
},
|
||||
{
|
||||
"key": "num_1010",
|
||||
"text_en": "Dark cuisine"
|
||||
},
|
||||
{
|
||||
"key": "num_1011",
|
||||
"text_en": "Underground Arena"
|
||||
},
|
||||
{
|
||||
"key": "num_1012",
|
||||
"text_en": "Crazy competition"
|
||||
},
|
||||
{
|
||||
"key": "num_1013",
|
||||
"text_en": "Five heroes challenge"
|
||||
},
|
||||
{
|
||||
"key": "num_1014",
|
||||
"text_en": "Library"
|
||||
},
|
||||
{
|
||||
"key": "num_1015",
|
||||
"text_en": "Bonfire Dance"
|
||||
},
|
||||
{
|
||||
"key": "num_1016",
|
||||
"text_en": "Caravan"
|
||||
},
|
||||
{
|
||||
"key": "num_1017",
|
||||
"text_en": "Gourmet restaurant"
|
||||
},
|
||||
{
|
||||
"key": "num_1018",
|
||||
"text_en": "Gober blacksmith shop"
|
||||
}
|
||||
]
|
@ -3354,5 +3354,77 @@
|
||||
{
|
||||
"key": "opencond_prompt_10003",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1001",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1002",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1003",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1004",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1005",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1006",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1007",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1008",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1009",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1010",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1011",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1012",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1013",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1014",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1015",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1016",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1017",
|
||||
"text_tw": ""
|
||||
},
|
||||
{
|
||||
"key": "num_1018",
|
||||
"text_tw": ""
|
||||
}
|
||||
]
|
@ -22,5 +22,13 @@
|
||||
},
|
||||
"ips": "10.0.0.138:7891",
|
||||
"debug": true
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"key": "debug_server_02",
|
||||
"text": "mxf"
|
||||
},
|
||||
"ips": "10.0.0.85:7891",
|
||||
"debug": true
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
@ -322,5 +322,113 @@
|
||||
"key": "tips_1002",
|
||||
"text": "tips_1002"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1001",
|
||||
"text": "num_1001"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1002",
|
||||
"text": "num_1002"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1003",
|
||||
"text": "num_1003"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1004",
|
||||
"text": "num_1004"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1005",
|
||||
"text": "num_1005"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1006",
|
||||
"text": "num_1006"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1007",
|
||||
"text": "num_1007"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1008",
|
||||
"text": "num_1008"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1009",
|
||||
"text": "num_1009"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1010",
|
||||
"text": "num_1010"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1011",
|
||||
"text": "num_1011"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1012",
|
||||
"text": "num_1012"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1013",
|
||||
"text": "num_1013"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1014",
|
||||
"text": "num_1014"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1015",
|
||||
"text": "num_1015"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1016",
|
||||
"text": "num_1016"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1017",
|
||||
"text": "num_1017"
|
||||
}
|
||||
},
|
||||
{
|
||||
"keycode": {
|
||||
"key": "num_1018",
|
||||
"text": "num_1018"
|
||||
}
|
||||
}
|
||||
]
|
8586
bin/json/game_skill.json
Normal file
8586
bin/json/game_skill.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -682,5 +682,29 @@
|
||||
"packagename": "roledetails",
|
||||
"comname": "equistrengthen",
|
||||
"des": "装备强化"
|
||||
},
|
||||
{
|
||||
"id": "strengthenup",
|
||||
"file": "StrengthenUpWindow",
|
||||
"unloadpkg": 5,
|
||||
"loadtype": 1,
|
||||
"full": 0,
|
||||
"blur": 1,
|
||||
"package": "roledetails/roledetails",
|
||||
"packagename": "roledetails",
|
||||
"comname": "strengthen",
|
||||
"des": "英雄升级升星详情"
|
||||
},
|
||||
{
|
||||
"id": "croppingwindow",
|
||||
"file": "CroppingWindow",
|
||||
"unloadpkg": 0,
|
||||
"loadtype": 1,
|
||||
"full": 2,
|
||||
"blur": 0,
|
||||
"package": "zhandou/zhandou",
|
||||
"packagename": "zhandou",
|
||||
"comname": "cropping",
|
||||
"des": "遮幅"
|
||||
}
|
||||
]
|
@ -40,7 +40,7 @@ type (
|
||||
//创建指定数量
|
||||
CreateRepeatHero(uid string, heroCfgId string, num int32) (*pb.DBHero, error)
|
||||
// 批量创建英雄
|
||||
CreateRepeatHeros(session IUserSession, items map[string]int32, bPush bool) (code pb.ErrorCode)
|
||||
CreateRepeatHeros(session IUserSession, heros map[string]int32, bPush bool) (code pb.ErrorCode)
|
||||
// 获取英雄
|
||||
// heroId 英雄ID
|
||||
GetHeroByObjID(uid, heroId string) (*pb.DBHero, pb.ErrorCode)
|
||||
@ -64,6 +64,8 @@ type (
|
||||
QueryAttributeValue(uid string, attr string) (value int32)
|
||||
//添加/减少属性值 第四个参数控制是否推送给前端
|
||||
AddAttributeValue(session IUserSession, attr string, add int32, bPush bool) (code pb.ErrorCode)
|
||||
// 批量处理
|
||||
AddAttributeValues(session IUserSession, attrs map[string]int32, bPush bool) (code pb.ErrorCode)
|
||||
//用户改变事件
|
||||
EventUserChanged(session IUserSession)
|
||||
//获取用户expand
|
||||
|
@ -39,8 +39,6 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
||||
_hero *pb.DBHero // 目标英雄
|
||||
tagHero *pb.DBHero // 消耗指定英雄
|
||||
mapCostHero map[string]int32 // 所有消耗英雄分类
|
||||
bCheckNeedhero bool // 指定英雄校验
|
||||
bCheckRacehero bool // 种族英雄校验
|
||||
chanegCard []*pb.DBHero // 变化的英雄数据
|
||||
CostHeroObj map[string]*pb.DBHero // 所有消耗英雄分类
|
||||
)
|
||||
@ -95,6 +93,8 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
costNeedHeroCount = 0
|
||||
costRaceHeroCount = 0
|
||||
// 遍历所有消耗英雄
|
||||
for k, v := range mapCostHero {
|
||||
if tagHero, code = this.module.GetHeroByObjID(session.GetUserId(), k); code != pb.ErrorCode_Success { // 没有这个英雄
|
||||
@ -110,7 +110,7 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
||||
}
|
||||
|
||||
if tagHero.HeroID == target.Needhero && tagHero.Star == target.Needherostar && tagHero.SameCount >= target.Needheronum {
|
||||
bCheckNeedhero = true
|
||||
costNeedHeroCount += v
|
||||
}
|
||||
|
||||
for _, value := range target.Needrace { // 阵营校验
|
||||
@ -118,19 +118,22 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
||||
cfg := this.module.configure.GetHero(tagHero.HeroID)
|
||||
if cfg != nil {
|
||||
if cfg.Race == value {
|
||||
bCheckRacehero = true
|
||||
break
|
||||
costRaceHeroCount += v
|
||||
}
|
||||
}
|
||||
}
|
||||
this.module.Debugf("指定英雄校验结果:%b,种族英雄校验结果:%b", bCheckNeedhero, bCheckRacehero)
|
||||
}
|
||||
CostHeroObj[k] = tagHero
|
||||
}
|
||||
if !bCheckRacehero || !bCheckNeedhero {
|
||||
|
||||
if target.Needheronum <= costNeedHeroCount || target.Needracenum <= costRaceHeroCount {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return // 校验失败
|
||||
return
|
||||
}
|
||||
// if !bCheckRacehero || !bCheckNeedhero {
|
||||
// code = pb.ErrorCode_ReqParameterError
|
||||
// return // 校验失败
|
||||
// }
|
||||
|
||||
// 金币消耗判断
|
||||
curGold := this.module.ModuleUser.QueryAttributeValue(session.GetUserId(), "gold")
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
new_hero = "game_newhero.json" //英雄
|
||||
new_hero = "game_hero.json" //英雄
|
||||
hero_stargrow = "game_herostargrow.json" //英雄品质系数
|
||||
hero_levelgrow = "game_herolevelgrow.json" //英雄成长系数
|
||||
hero_starup = "game_herostarup.json" // 升星
|
||||
@ -35,7 +35,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
|
||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
new_hero: cfg.NewGame_newHero,
|
||||
new_hero: cfg.NewGame_hero,
|
||||
hero_stargrow: cfg.NewGame_heroStargrow,
|
||||
hero_levelgrow: cfg.NewGame_heroLevelgrow,
|
||||
hero_starup: cfg.NewGame_heroStarup,
|
||||
@ -55,7 +55,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
}
|
||||
|
||||
//获取英雄配置数据
|
||||
func (this *configureComp) getHeroConfigure() (configure *cfg.Game_newHero, err error) {
|
||||
func (this *configureComp) getHeroConfigure() (configure *cfg.Game_hero, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
@ -64,7 +64,7 @@ func (this *configureComp) getHeroConfigure() (configure *cfg.Game_newHero, err
|
||||
if v, err = this.GetConfigure(new_hero); err != nil {
|
||||
return
|
||||
} else {
|
||||
if configure, ok = v.(*cfg.Game_newHero); !ok {
|
||||
if configure, ok = v.(*cfg.Game_hero); !ok {
|
||||
err = fmt.Errorf("%T no is *cfg.Game_hero", v)
|
||||
}
|
||||
}
|
||||
@ -204,7 +204,7 @@ func (this *configureComp) GetHeroStargrow() (configure *cfg.Game_heroStargrow,
|
||||
}
|
||||
|
||||
//获取英雄配置
|
||||
func (this *configureComp) GetHero(heroCfgId string) *cfg.Game_newHeroData {
|
||||
func (this *configureComp) GetHero(heroCfgId string) *cfg.Game_heroData {
|
||||
cfg, err := this.getHeroConfigure()
|
||||
if err != nil {
|
||||
return nil
|
||||
|
@ -112,20 +112,23 @@ func (this *ModelHero) initHeroOverlying(uid string, heroCfgId string, count int
|
||||
hero = this.initHero(uid, heroCfgId)
|
||||
if hero != nil {
|
||||
// 添加图鉴
|
||||
if result, err1 := this.moduleHero.ModuleUser.GetUserExpand(uid); err1 == nil {
|
||||
sz := make(map[string]bool, 0)
|
||||
for k := range result.GetTujian() {
|
||||
sz[k] = true
|
||||
}
|
||||
if _, ok := result.GetTujian()[heroCfgId]; !ok {
|
||||
sz[heroCfgId] = true
|
||||
initUpdate := map[string]interface{}{
|
||||
"tujian": sz,
|
||||
go func(uid, heroCfgId string) { // 携程处理 图鉴数据
|
||||
if result, err1 := this.moduleHero.ModuleUser.GetUserExpand(uid); err1 == nil {
|
||||
sz := make(map[string]bool, 0)
|
||||
for k := range result.GetTujian() {
|
||||
sz[k] = true
|
||||
}
|
||||
if _, ok := result.GetTujian()[heroCfgId]; !ok {
|
||||
sz[heroCfgId] = true
|
||||
initUpdate := map[string]interface{}{
|
||||
"tujian": sz,
|
||||
}
|
||||
|
||||
this.moduleHero.ModuleUser.ChangeUserExpand(uid, initUpdate)
|
||||
this.moduleHero.ModuleUser.ChangeUserExpand(uid, initUpdate)
|
||||
}
|
||||
}
|
||||
}
|
||||
}(uid, heroCfgId)
|
||||
|
||||
hero.SameCount = count
|
||||
if err = this.moduleHero.modelHero.AddList(uid, hero.Id, hero); err != nil {
|
||||
this.moduleHero.Errorf("%v", err)
|
||||
|
@ -159,14 +159,22 @@ func (this *Hero) EventUserOffline(session comm.IUserSession) {
|
||||
}
|
||||
|
||||
// 批量创建多个英雄
|
||||
func (this *Hero) CreateRepeatHeros(session comm.IUserSession, items map[string]int32, bPush bool) (code pb.ErrorCode) {
|
||||
|
||||
for heroCfgId, num := range items {
|
||||
_, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
|
||||
func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string]int32, bPush bool) (code pb.ErrorCode) {
|
||||
changeHero := make([]*pb.DBHero, 0)
|
||||
for heroCfgId, num := range heros {
|
||||
if num == 0 { // 数量为0 不做处理
|
||||
continue
|
||||
}
|
||||
hero, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_HeroCreate
|
||||
break
|
||||
return
|
||||
}
|
||||
changeHero = append(changeHero, hero)
|
||||
}
|
||||
|
||||
if bPush && len(changeHero) > 0 { //推送
|
||||
session.SendMsg("hero", "change", &pb.HeroChangePush{List: changeHero})
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -56,7 +56,7 @@ func (this *ConfigureComp) GetItemConfigure(id string) (item *cfg.Game_itemData,
|
||||
return
|
||||
} else {
|
||||
if item, ok = v.(*cfg.Game_item).GetDataMap()[id]; !ok {
|
||||
err = fmt.Errorf("no found item:%d configure", id)
|
||||
err = fmt.Errorf("no found item:%s configure", id)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
|
@ -47,8 +47,6 @@ func (this *apiComp) GetUserMailAttachment(session comm.IUserSession, req *pb.Ma
|
||||
if code == pb.ErrorCode_Success {
|
||||
// 修改状态
|
||||
this.module.modelMail.MailUpdateMailAttachmentState(req.ObjID)
|
||||
mail.Reward = true
|
||||
//return
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -64,6 +62,9 @@ func (this *apiComp) GetAllMailAttachmentCheck(session comm.IUserSession, req *p
|
||||
|
||||
func (this *apiComp) GetAllMailAttachment(session comm.IUserSession, req *pb.MailGetAllMailAttachmentReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
var (
|
||||
mailIds []string
|
||||
)
|
||||
code = this.GetAllMailAttachmentCheck(session, req) // check
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
@ -93,9 +94,12 @@ func (this *apiComp) GetAllMailAttachment(session comm.IUserSession, req *pb.Mai
|
||||
if code == pb.ErrorCode_Success {
|
||||
this.module.modelMail.MailUpdateMailAttachmentState(v.ObjId)
|
||||
v.Reward = true
|
||||
v.Check = true
|
||||
mailIds = append(mailIds, v.ObjId)
|
||||
}
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "getusermailattachment", &pb.MailGetAllMailAttachmentResp{Res: fj})
|
||||
session.SendMsg(string(this.module.GetType()), "getallmailattachment", &pb.MailGetAllMailAttachmentResp{Res: fj,
|
||||
Ids: mailIds})
|
||||
return
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ func (this *apiComp) ReadMail(session comm.IUserSession, req *pb.MailReadMailReq
|
||||
return
|
||||
}
|
||||
this.module.Debugf("read mail %v", mail)
|
||||
mail.Check = true
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "readmail", &pb.MailReadMailResp{Mail: mail})
|
||||
return
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ func (this *modelMail) MailUpdateMailAttachmentState(objId string) bool {
|
||||
bson.M{"_id": objId},
|
||||
bson.M{"$set": bson.M{
|
||||
"reward": true,
|
||||
"check": true,
|
||||
}},
|
||||
options.FindOneAndUpdate().SetUpsert(false).SetReturnDocument(options.After),
|
||||
)
|
||||
|
@ -53,7 +53,8 @@ func (this *Mail) CreateNewMail(session comm.IUserSession, mail *pb.DBMailData)
|
||||
}
|
||||
err := this.modelMail.MailInsertUserMail(mail)
|
||||
if err != nil {
|
||||
this.ModuleBase.Errorf("create mail failed")
|
||||
this.Errorf("create mail failed :%v", err)
|
||||
return false
|
||||
}
|
||||
// 通知玩家
|
||||
this.AddNewMailPush(session, mail)
|
||||
@ -62,7 +63,7 @@ func (this *Mail) CreateNewMail(session comm.IUserSession, mail *pb.DBMailData)
|
||||
}
|
||||
|
||||
// 获得新邮件 推送给玩家
|
||||
func (this *Mail) AddNewMailPush(session comm.IUserSession, mail *pb.DBMailData) (err error) {
|
||||
func (this *Mail) AddNewMailPush(session comm.IUserSession, mail *pb.DBMailData) {
|
||||
session.SendMsg(string(this.GetType()), "getnewmail", &pb.MailGetNewMailPush{Mail: mail})
|
||||
return
|
||||
}
|
||||
|
@ -178,71 +178,56 @@ func (this *ModuleBase) CheckRes(session comm.IUserSession, res []*cfg.Game_atn)
|
||||
//消耗资源
|
||||
func (this *ModuleBase) ConsumeRes(session comm.IUserSession, res []*cfg.Game_atn, bPush bool) (code pb.ErrorCode) {
|
||||
var (
|
||||
amount int32
|
||||
items map[string]int32 // 道具背包 批量处理
|
||||
attrs map[string]int32 // 属性
|
||||
)
|
||||
items = make(map[string]int32, 0)
|
||||
attrs = make(map[string]int32, 0)
|
||||
|
||||
for _, v := range res {
|
||||
switch v.A {
|
||||
case comm.AttrType:
|
||||
attrs[v.T] -= v.N
|
||||
case comm.ItemType:
|
||||
items[v.T] -= v.N
|
||||
default:
|
||||
this.Errorf("not found res type") // 找不到资源类型
|
||||
}
|
||||
}
|
||||
source := &comm.ModuleCallSource{
|
||||
Module: string(this.module.GetType()),
|
||||
FuncName: "CheckConsumeRes",
|
||||
Describe: "消耗资源",
|
||||
}
|
||||
//校验消费资源是否充足
|
||||
for _, v := range res {
|
||||
if v.A == comm.AttrType { //用户属性资源
|
||||
if amount = this.ModuleUser.QueryAttributeValue(session.GetUserId(), v.T); amount < v.N {
|
||||
code = pb.ErrorCode_ResNoEnough
|
||||
this.Errorf("道具不足:A:%s,T:%s,N:%d", v.A, v.T, v.N)
|
||||
return
|
||||
}
|
||||
} else if v.A == comm.ItemType { //道具资源
|
||||
// if resID, err = strconv.Atoi(v.T); err != nil {
|
||||
// code = pb.ErrorCode_ConfigurationException
|
||||
// return
|
||||
// }
|
||||
if amount = int32(this.ModuleItems.QueryItemAmount(source, session.GetUserId(), v.T)); amount < v.N {
|
||||
code = pb.ErrorCode_ResNoEnough
|
||||
this.Errorf("道具不足:A:%s,T:%s,N:%d", v.A, v.T, v.N)
|
||||
return
|
||||
}
|
||||
// 校验数量
|
||||
for k, v := range attrs {
|
||||
if this.ModuleUser.QueryAttributeValue(session.GetUserId(), k) < -v { // -v 负负得正
|
||||
code = pb.ErrorCode_ResNoEnough
|
||||
this.Errorf("资源不足: A: attr, T: %s, N: %d", k, v)
|
||||
return
|
||||
}
|
||||
// else if v.A == comm.HeroType { //卡片资源
|
||||
// if resID, err = strconv.Atoi(v.T); err != nil {
|
||||
// code = pb.ErrorCode_ConfigurationException
|
||||
// return
|
||||
// }
|
||||
// if amount = int32(this.ModuleHero.QueryHeroAmount(uid, int32(resID))); amount < v.N {
|
||||
// code = pb.ErrorCode_ResNoEnough
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
//不存在消耗武器的情况
|
||||
// } else if v.A == comm.EquipmentType {
|
||||
// if resID, err = strconv.Atoi(v.T); err != nil {
|
||||
// code = pb.ErrorCode_ConfigurationException
|
||||
// return
|
||||
// }
|
||||
// if amount = int32(equipment.QueryEquipmentAmount(source, uid, int32(resID))); amount < v.N {
|
||||
// code = pb.ErrorCode_ResNoEnough
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
for _, v := range res {
|
||||
if v.A == comm.AttrType { //用户属性资源
|
||||
this.ModuleUser.AddAttributeValue(session, v.T, -1*v.N, bPush)
|
||||
} else if v.A == comm.ItemType { //道具资源
|
||||
//resID, _ = strconv.Atoi(v.T)
|
||||
this.ModuleItems.AddItem(source, session, v.T, -1*v.N, bPush)
|
||||
for k, v := range items {
|
||||
if int32(this.ModuleItems.QueryItemAmount(source, session.GetUserId(), k)) < -v {
|
||||
code = pb.ErrorCode_ResNoEnough
|
||||
this.Errorf("道具不足: A: item, T:%s, N:%d", k, v)
|
||||
return
|
||||
}
|
||||
// else if v.A == comm.HeroType { //卡片资源
|
||||
// resID, _ = strconv.Atoi(v.T)
|
||||
// this.ModuleHero.ConsumeCard(uid, int32(resID), -1*v.N)
|
||||
// }
|
||||
// } else if v.A == comm.EquipmentType {
|
||||
// resID, _ = strconv.Atoi(v.T)
|
||||
// equipment.AddNewEquipments(source, uid, resID, -1*v.N)
|
||||
// }
|
||||
}
|
||||
// 真正消耗
|
||||
if len(attrs) > 0 {
|
||||
code = this.ModuleUser.AddAttributeValues(session, attrs, bPush)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
this.Debugf("消耗玩家资源: %v", attrs)
|
||||
}
|
||||
if len(items) > 0 {
|
||||
code = this.ModuleItems.AddItems(source, session, items, bPush)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
this.Debugf("消耗道具资源: %v", items)
|
||||
}
|
||||
|
||||
return
|
||||
@ -251,37 +236,53 @@ func (this *ModuleBase) ConsumeRes(session comm.IUserSession, res []*cfg.Game_at
|
||||
//发放资源
|
||||
func (this *ModuleBase) DispenseRes(session comm.IUserSession, res []*cfg.Game_atn, bPush bool) (code pb.ErrorCode) {
|
||||
var (
|
||||
hero []*pb.DBHero
|
||||
items map[string]int32 // 道具背包 批量处理
|
||||
heros map[string]int32 // 英雄
|
||||
attrs map[string]int32 // 属性
|
||||
equips map[string]uint32 // 装备
|
||||
)
|
||||
items = make(map[string]int32, 0)
|
||||
heros = make(map[string]int32, 0)
|
||||
attrs = make(map[string]int32, 0)
|
||||
equips = make(map[string]uint32, 0)
|
||||
|
||||
source := &comm.ModuleCallSource{
|
||||
Module: string(this.module.GetType()),
|
||||
FuncName: "DispenseRes",
|
||||
Describe: "发放资源",
|
||||
}
|
||||
for _, v := range res {
|
||||
this.Debugf("发放资源 DispenseRes:A = %s, T:%s, N:%d", v.A, v.T, v.N)
|
||||
if v.A == comm.AttrType { //用户属性资源
|
||||
code = this.ModuleUser.AddAttributeValue(session, v.T, v.N, bPush)
|
||||
|
||||
} else if v.A == comm.ItemType { //道具资源
|
||||
// resID = cast.ToInt(v.T)
|
||||
// resID, _ = strconv.Atoi(v.T)
|
||||
code = this.ModuleItems.AddItem(source, session, v.T, v.N, bPush)
|
||||
} else if v.A == comm.HeroType { //卡片资源
|
||||
//resID, _ = strconv.Atoi(v.T)
|
||||
_hero, err := this.ModuleHero.CreateRepeatHero(session.GetUserId(), v.T, v.N)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_HeroMaxCount
|
||||
return
|
||||
switch v.A {
|
||||
case comm.AttrType:
|
||||
attrs[v.T] += v.N
|
||||
case comm.ItemType:
|
||||
items[v.T] += v.N
|
||||
case comm.HeroType:
|
||||
heros[v.T] += v.N
|
||||
case comm.EquipmentType:
|
||||
if v.N > 0 { // 不允许减少装备
|
||||
equips[v.T] += uint32(v.N)
|
||||
}
|
||||
hero = append(hero, _hero)
|
||||
} else if v.A == comm.EquipmentType {
|
||||
//resID, _ = strconv.Atoi(v.T)
|
||||
code = this.ModuleEquipment.AddNewEquipments(source, session, map[string]uint32{v.T: uint32(v.N)}, bPush)
|
||||
default:
|
||||
this.Errorf("not found res type") // 找不到资源类型
|
||||
}
|
||||
}
|
||||
if len(hero) > 0 {
|
||||
session.SendMsg("hero", "change", &pb.HeroChangePush{List: hero})
|
||||
|
||||
if len(attrs) > 0 { //用户属性资源
|
||||
code = this.ModuleUser.AddAttributeValues(session, attrs, bPush)
|
||||
this.Debugf("发放用户资源: %v", attrs)
|
||||
}
|
||||
if len(items) > 0 { //道具资源
|
||||
code = this.ModuleItems.AddItems(source, session, items, bPush)
|
||||
this.Debugf("发放道具资源: %v", items)
|
||||
}
|
||||
if len(heros) > 0 { //卡片资源
|
||||
code = this.ModuleHero.CreateRepeatHeros(session, heros, bPush)
|
||||
this.Debugf("发放英雄资源: %v", heros)
|
||||
}
|
||||
if len(equips) > 0 {
|
||||
code = this.ModuleEquipment.AddNewEquipments(source, session, equips, bPush)
|
||||
this.Debugf("发放装备资源: %v", equips)
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -36,6 +36,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
|
||||
defer func() {
|
||||
if user != nil {
|
||||
rsp.Data = user
|
||||
rsp.TimeNow = time.Now().Unix() // 设置服务器时间
|
||||
err = session.SendMsg(string(this.module.GetType()), UserSubTypeLogin, rsp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
|
@ -85,6 +85,7 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int32) {
|
||||
switch attr {
|
||||
case comm.ResGold:
|
||||
return user.Gold
|
||||
|
||||
case comm.ResExp:
|
||||
return user.Exp
|
||||
case comm.ResDiamond:
|
||||
@ -161,6 +162,74 @@ func (this *User) AddAttributeValue(session comm.IUserSession, attr string, add
|
||||
return
|
||||
}
|
||||
|
||||
//用户资源
|
||||
func (this *User) AddAttributeValues(session comm.IUserSession, attrs map[string]int32, bPush bool) (code pb.ErrorCode) {
|
||||
user := this.GetUser(session.GetUserId())
|
||||
if user == nil {
|
||||
code = pb.ErrorCode_UserSessionNobeing
|
||||
return
|
||||
}
|
||||
_change := &pb.UserResChangePush{
|
||||
Gold: user.Gold,
|
||||
Exp: user.Exp,
|
||||
Lv: user.Lv,
|
||||
Vip: user.Vip,
|
||||
Diamond: user.Diamond,
|
||||
}
|
||||
update := make(map[string]interface{})
|
||||
for key, add := range attrs {
|
||||
if add == 0 {
|
||||
log.Errorf("attr no changed,uid: %s attr: %s add: %d", session.GetUserId(), key, add)
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case comm.ResGold:
|
||||
if add < 0 {
|
||||
if user.Gold+add < 0 {
|
||||
code = pb.ErrorCode_GoldNoEnough
|
||||
return
|
||||
}
|
||||
}
|
||||
_change.Gold += add
|
||||
update[comm.ResGold] = user.Gold + add
|
||||
case comm.ResExp:
|
||||
if add < 0 {
|
||||
if user.Exp+add < 0 {
|
||||
code = pb.ErrorCode_ResNoEnough
|
||||
return
|
||||
}
|
||||
}
|
||||
_change.Exp += add
|
||||
update[comm.ResExp] = user.Exp + add
|
||||
case comm.ResDiamond:
|
||||
if add < 0 {
|
||||
if user.Diamond+add < 0 {
|
||||
code = pb.ErrorCode_ResNoEnough
|
||||
return
|
||||
}
|
||||
}
|
||||
_change.Diamond += add
|
||||
update[comm.ResDiamond] = user.Diamond + add
|
||||
default:
|
||||
code = pb.ErrorCode_Unknown
|
||||
}
|
||||
}
|
||||
|
||||
if len(update) == 0 {
|
||||
log.Warn("AddAttributeValue param is empty")
|
||||
return
|
||||
}
|
||||
if err := this.modelUser.updateUserAttr(session.GetUserId(), update); err != nil {
|
||||
log.Errorf("AddAttributeValue err:%v", err)
|
||||
code = pb.ErrorCode_DBError
|
||||
}
|
||||
|
||||
if bPush { //推送玩家账号信息变化消息
|
||||
session.SendMsg(string(this.GetType()), "reschange", _change)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 用户事件变化
|
||||
func (this *User) EventUserChanged(session comm.IUserSession) {
|
||||
ul := new(UserListen)
|
||||
|
@ -484,6 +484,7 @@ type MailGetAllMailAttachmentResp struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Res []*UserAssets `protobuf:"bytes,1,rep,name=res,proto3" json:"res"` //资源类型
|
||||
Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids"` // 已经领取的邮件唯一id
|
||||
}
|
||||
|
||||
func (x *MailGetAllMailAttachmentResp) Reset() {
|
||||
@ -525,6 +526,13 @@ func (x *MailGetAllMailAttachmentResp) GetRes() []*UserAssets {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MailGetAllMailAttachmentResp) GetIds() []string {
|
||||
if x != nil {
|
||||
return x.Ids
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_mail_mail_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_mail_mail_msg_proto_rawDesc = []byte{
|
||||
@ -559,12 +567,13 @@ var file_mail_mail_msg_proto_rawDesc = []byte{
|
||||
0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69,
|
||||
0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x4d, 0x61, 0x69, 0x6c, 0x22, 0x1d, 0x0a, 0x1b, 0x4d,
|
||||
0x61, 0x69, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x69, 0x6c, 0x41, 0x74, 0x74,
|
||||
0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x22, 0x3d, 0x0a, 0x1c, 0x4d, 0x61,
|
||||
0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x22, 0x4f, 0x0a, 0x1c, 0x4d, 0x61,
|
||||
0x69, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x69, 0x6c, 0x41, 0x74, 0x74, 0x61,
|
||||
0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x03, 0x72, 0x65,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73,
|
||||
0x73, 0x65, 0x74, 0x73, 0x52, 0x03, 0x72, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x73, 0x65, 0x74, 0x73, 0x52, 0x03, 0x72, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -81,8 +81,9 @@ type UserLoginResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBUser `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
Ex *DBUserExpand `protobuf:"bytes,2,opt,name=ex,proto3" json:"ex"` //用户扩展
|
||||
Data *DBUser `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
Ex *DBUserExpand `protobuf:"bytes,2,opt,name=ex,proto3" json:"ex"` //用户扩展
|
||||
TimeNow int64 `protobuf:"varint,3,opt,name=timeNow,proto3" json:"timeNow"` // 服务器时间
|
||||
}
|
||||
|
||||
func (x *UserLoginResp) Reset() {
|
||||
@ -131,6 +132,13 @@ func (x *UserLoginResp) GetEx() *DBUserExpand {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UserLoginResp) GetTimeNow() int64 {
|
||||
if x != nil {
|
||||
return x.TimeNow
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//登出
|
||||
type UserLogoutReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -1517,106 +1525,108 @@ var file_user_user_msg_proto_rawDesc = []byte{
|
||||
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x03, 0x73, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69,
|
||||
0x03, 0x73, 0x69, 0x64, 0x22, 0x65, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69,
|
||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x12, 0x1d, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
|
||||
0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x02, 0x65,
|
||||
0x78, 0x22, 0x0f, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52,
|
||||
0x65, 0x71, 0x22, 0x10, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x22, 0x3d, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69,
|
||||
0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
||||
0x73, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73,
|
||||
0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x22, 0x2e, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x0a, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74,
|
||||
0x61, 0x22, 0x2b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52,
|
||||
0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x28,
|
||||
0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x22, 0x2e, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72,
|
||||
0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x03, 0x72, 0x65, 0x73,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73,
|
||||
0x65, 0x74, 0x73, 0x52, 0x03, 0x72, 0x65, 0x73, 0x22, 0x2f, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72,
|
||||
0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x03, 0x72, 0x65,
|
||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73,
|
||||
0x73, 0x65, 0x74, 0x73, 0x52, 0x03, 0x72, 0x65, 0x73, 0x22, 0x75, 0x0a, 0x11, 0x55, 0x73, 0x65,
|
||||
0x72, 0x52, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f,
|
||||
0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e,
|
||||
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64,
|
||||
0x22, 0x13, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x52, 0x65, 0x71, 0x22, 0x3e, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74,
|
||||
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x73,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44,
|
||||
0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x40, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a,
|
||||
0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e,
|
||||
0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07,
|
||||
0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
||||
0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x65, 0x71, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72,
|
||||
0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x25, 0x0a,
|
||||
0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x22, 0x24, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74,
|
||||
0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73,
|
||||
0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x22, 0x3c, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66,
|
||||
0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69,
|
||||
0x61, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74,
|
||||
0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65,
|
||||
0x72, 0x6f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72,
|
||||
0x6f, 0x69, 0x64, 0x73, 0x22, 0x45, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c,
|
||||
0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0xe3, 0x01, 0x0a, 0x0d,
|
||||
0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x70, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x04, 0x68, 0x61, 0x69, 0x72, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x69, 0x72, 0x52, 0x04, 0x68, 0x61, 0x69, 0x72,
|
||||
0x12, 0x19, 0x0a, 0x04, 0x65, 0x79, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05,
|
||||
0x2e, 0x45, 0x79, 0x65, 0x73, 0x52, 0x04, 0x65, 0x79, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x05, 0x6d,
|
||||
0x6f, 0x75, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x4d, 0x6f, 0x75,
|
||||
0x74, 0x68, 0x52, 0x05, 0x6d, 0x6f, 0x75, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x04, 0x62, 0x6f, 0x64,
|
||||
0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04,
|
||||
0x62, 0x6f, 0x64, 0x79, 0x12, 0x2b, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69,
|
||||
0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c,
|
||||
0x65, 0x78, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x6f,
|
||||
0x6e, 0x22, 0x5b, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52,
|
||||
0x78, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x6f, 0x77, 0x22, 0x0f, 0x0a, 0x0d, 0x55,
|
||||
0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x22, 0x10, 0x0a, 0x0e,
|
||||
0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x3d,
|
||||
0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65,
|
||||
0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73,
|
||||
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x4c, 0x0a,
|
||||
0x10, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x1e, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0c, 0x55,
|
||||
0x73, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64,
|
||||
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x61, 0x63, 0x68,
|
||||
0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2b, 0x0a, 0x0d, 0x55,
|
||||
0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73,
|
||||
0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75,
|
||||
0x63, 0x63, 0x22, 0x2e, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73,
|
||||
0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x03, 0x72,
|
||||
0x65, 0x73, 0x22, 0x2f, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x03,
|
||||
0x72, 0x65, 0x73, 0x22, 0x75, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x76, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x55, 0x73,
|
||||
0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x22,
|
||||
0x3e, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22,
|
||||
0x40, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65,
|
||||
0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x22, 0x29, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f,
|
||||
0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x22,
|
||||
0x26, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49,
|
||||
0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x24,
|
||||
0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69,
|
||||
0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3c, 0x0a,
|
||||
0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a,
|
||||
0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e,
|
||||
0x46, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x22, 0x27,
|
||||
0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x26, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d,
|
||||
0x6f, 0x64, 0x69, 0x66, 0x79, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x55,
|
||||
0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x22,
|
||||
0x2d, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x22, 0x45,
|
||||
0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73,
|
||||
0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0xe3, 0x01, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69,
|
||||
0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x69, 0x6e,
|
||||
0x73, 0x74, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x72, 0x65,
|
||||
0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x19, 0x0a, 0x04, 0x68, 0x61, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e,
|
||||
0x48, 0x61, 0x69, 0x72, 0x52, 0x04, 0x68, 0x61, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x04, 0x65, 0x79,
|
||||
0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x45, 0x79, 0x65, 0x73, 0x52,
|
||||
0x04, 0x65, 0x79, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x05, 0x6d, 0x6f, 0x75, 0x74, 0x68, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x4d, 0x6f, 0x75, 0x74, 0x68, 0x52, 0x05, 0x6d, 0x6f,
|
||||
0x75, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x05, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2b,
|
||||
0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x0e, 0x55,
|
||||
0x73, 0x65, 0x72, 0x46, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x69, 0x67, 0x75, 0x72, 0x65,
|
||||
0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72,
|
||||
0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x22, 0x26, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -23,7 +23,7 @@ type Tables struct {
|
||||
skillAfteratk *Game_skillAfteratk
|
||||
skillBuff *Game_skillBuff
|
||||
skillPassive *Game_skillPassive
|
||||
newHero *Game_newHero
|
||||
hero *Game_hero
|
||||
heroStargrow *Game_heroStargrow
|
||||
heroLevelgrow *Game_heroLevelgrow
|
||||
heroStarup *Game_heroStarup
|
||||
@ -45,7 +45,7 @@ type Tables struct {
|
||||
activeReward *Game_activeReward
|
||||
serverList *Game_serverList
|
||||
com *Game_com
|
||||
newSkill *Game_newSkill
|
||||
skill *Game_skill
|
||||
model *Game_model
|
||||
mainlineChapter *Game_mainlineChapter
|
||||
mainlineEasy *Game_mainlineEasy
|
||||
@ -144,10 +144,10 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.skillPassive, err = NewGame_skillPassive(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_newhero") ; err != nil {
|
||||
if buf, err = loader("game_hero") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.newHero, err = NewGame_newHero(buf) ; err != nil {
|
||||
if tables.hero, err = NewGame_hero(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_herostargrow") ; err != nil {
|
||||
@ -276,10 +276,10 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.com, err = NewGame_com(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_newskill") ; err != nil {
|
||||
if buf, err = loader("game_skill") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.newSkill, err = NewGame_newSkill(buf) ; err != nil {
|
||||
if tables.skill, err = NewGame_skill(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_model") ; err != nil {
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@ -8,8 +9,8 @@
|
||||
package cfg
|
||||
|
||||
type Game_equipIntensify struct {
|
||||
_dataMap map[int32]*Game_equipIntensifyData
|
||||
_dataList []*Game_equipIntensifyData
|
||||
_dataMap map[int32]*Game_equipIntensifyData
|
||||
_dataList []*Game_equipIntensifyData
|
||||
}
|
||||
|
||||
func NewGame_equipIntensify(_buf []map[string]interface{}) (*Game_equipIntensify, error) {
|
||||
@ -23,17 +24,19 @@ func NewGame_equipIntensify(_buf []map[string]interface{}) (*Game_equipIntensify
|
||||
dataMap[_v.Key] = _v
|
||||
}
|
||||
}
|
||||
return &Game_equipIntensify{_dataList: _dataList, _dataMap: dataMap}, nil
|
||||
return &Game_equipIntensify{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Game_equipIntensify) GetDataMap() map[int32]*Game_equipIntensifyData {
|
||||
return table._dataMap
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Game_equipIntensify) GetDataList() []*Game_equipIntensifyData {
|
||||
return table._dataList
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Game_equipIntensify) Get(key int32) *Game_equipIntensifyData {
|
||||
return table._dataMap[key]
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
||||
|
42
sys/configure/structs/game.hero.go
Normal file
42
sys/configure/structs/game.hero.go
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Game_hero struct {
|
||||
_dataMap map[string]*Game_heroData
|
||||
_dataList []*Game_heroData
|
||||
}
|
||||
|
||||
func NewGame_hero(_buf []map[string]interface{}) (*Game_hero, error) {
|
||||
_dataList := make([]*Game_heroData, 0, len(_buf))
|
||||
dataMap := make(map[string]*Game_heroData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := NewGame_heroData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Hid] = _v
|
||||
}
|
||||
}
|
||||
return &Game_hero{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Game_hero) GetDataMap() map[string]*Game_heroData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Game_hero) GetDataList() []*Game_heroData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Game_hero) Get(key string) *Game_heroData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ package cfg
|
||||
import "errors"
|
||||
import "bright/math"
|
||||
|
||||
type Game_newHeroData struct {
|
||||
type Game_heroData struct {
|
||||
Hid string
|
||||
Name string
|
||||
Star int32
|
||||
@ -21,8 +21,9 @@ type Game_newHeroData struct {
|
||||
Type int32
|
||||
Handbook int32
|
||||
Prefab int32
|
||||
Rotation string
|
||||
Icon int32
|
||||
Sound string
|
||||
Vocal string
|
||||
Tujing []int32
|
||||
Intr string
|
||||
Events string
|
||||
@ -38,12 +39,12 @@ type Game_newHeroData struct {
|
||||
Camerainterval float32
|
||||
}
|
||||
|
||||
func (Game_newHeroData) GetTypeId() int {
|
||||
return -1696809848
|
||||
func (Game_heroData) GetTypeId() int {
|
||||
return 650222912
|
||||
}
|
||||
|
||||
func NewGame_newHeroData(_buf map[string]interface{}) (_v *Game_newHeroData, err error) {
|
||||
_v = &Game_newHeroData{}
|
||||
func NewGame_heroData(_buf map[string]interface{}) (_v *Game_heroData, err error) {
|
||||
_v = &Game_heroData{}
|
||||
{ var _ok_ bool; if _v.Hid, _ok_ = _buf["hid"].(string); !_ok_ { err = errors.New("hid error"); return } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
|
||||
@ -53,8 +54,9 @@ func NewGame_newHeroData(_buf map[string]interface{}) (_v *Game_newHeroData, err
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["handbook"].(float64); !_ok_ { err = errors.New("handbook error"); return }; _v.Handbook = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["prefab"].(float64); !_ok_ { err = errors.New("prefab error"); return }; _v.Prefab = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Rotation, _ok_ = _buf["rotation"].(string); !_ok_ { err = errors.New("rotation error"); return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["icon"].(float64); !_ok_ { err = errors.New("icon error"); return }; _v.Icon = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["sound"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Sound error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Sound, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; if _v.Vocal, _ok_ = _buf["vocal"].(string); !_ok_ { err = errors.New("vocal error"); return } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
@ -1,42 +0,0 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Game_newHero struct {
|
||||
_dataMap map[string]*Game_newHeroData
|
||||
_dataList []*Game_newHeroData
|
||||
}
|
||||
|
||||
func NewGame_newHero(_buf []map[string]interface{}) (*Game_newHero, error) {
|
||||
_dataList := make([]*Game_newHeroData, 0, len(_buf))
|
||||
dataMap := make(map[string]*Game_newHeroData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := NewGame_newHeroData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Hid] = _v
|
||||
}
|
||||
}
|
||||
return &Game_newHero{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Game_newHero) GetDataMap() map[string]*Game_newHeroData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Game_newHero) GetDataList() []*Game_newHeroData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Game_newHero) Get(key string) *Game_newHeroData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
42
sys/configure/structs/game.skill.go
Normal file
42
sys/configure/structs/game.skill.go
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Game_skill struct {
|
||||
_dataMap map[int32]*Game_skillData
|
||||
_dataList []*Game_skillData
|
||||
}
|
||||
|
||||
func NewGame_skill(_buf []map[string]interface{}) (*Game_skill, error) {
|
||||
_dataList := make([]*Game_skillData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*Game_skillData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := NewGame_skillData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &Game_skill{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Game_skill) GetDataMap() map[int32]*Game_skillData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *Game_skill) GetDataList() []*Game_skillData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *Game_skill) Get(key int32) *Game_skillData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
77
sys/configure/structs/game.skillData.go
Normal file
77
sys/configure/structs/game.skillData.go
Normal file
@ -0,0 +1,77 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 Game_skillData struct {
|
||||
Id int32
|
||||
Name string
|
||||
Ico string
|
||||
Act string
|
||||
Type int32
|
||||
MaxLV int32
|
||||
CD []int32
|
||||
Target int32
|
||||
ChildSkill []*Game_ChildSkills
|
||||
Desc1 string
|
||||
Desc2 string
|
||||
Desc3 string
|
||||
Desc4 string
|
||||
Desc5 string
|
||||
}
|
||||
|
||||
func (Game_skillData) GetTypeId() int {
|
||||
return -1600555361
|
||||
}
|
||||
|
||||
func NewGame_skillData(_buf map[string]interface{}) (_v *Game_skillData, err error) {
|
||||
_v = &Game_skillData{}
|
||||
{ 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 __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["Name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } }
|
||||
{ var _ok_ bool; if _v.Act, _ok_ = _buf["act"].(string); !_ok_ { err = errors.New("act error"); return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["MaxLV"].(float64); !_ok_ { err = errors.New("MaxLV error"); return }; _v.MaxLV = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["CD"].([]interface{}); !_ok_ { err = errors.New("CD error"); return }
|
||||
|
||||
_v.CD = make([]int32, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ int32
|
||||
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
||||
_v.CD = append(_v.CD, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Target"].(float64); !_ok_ { err = errors.New("Target error"); return }; _v.Target = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["ChildSkill"].([]interface{}); !_ok_ { err = errors.New("ChildSkill error"); return }
|
||||
|
||||
_v.ChildSkill = make([]*Game_ChildSkills, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ *Game_ChildSkills
|
||||
{ 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 = NewGame_ChildSkills(_x_); err != nil { return } }
|
||||
_v.ChildSkill = append(_v.ChildSkill, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["Desc1"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc1 error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc1, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["Desc2"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc2 error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc2, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["Desc3"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc3 error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc3, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["Desc4"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc4 error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc4, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["Desc5"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc5 error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc5, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
return
|
||||
}
|
@ -26,6 +26,7 @@ func TestMain(m *testing.M) {
|
||||
defer os.Exit(m.Run())
|
||||
}
|
||||
func TestMail(t *testing.T) {
|
||||
|
||||
mail := &pb.DBMailData{}
|
||||
err := db.mgo.FindOneAndUpdate(
|
||||
"mail",
|
||||
|
Loading…
Reference in New Issue
Block a user