This commit is contained in:
meixiongfeng 2023-11-20 19:03:09 +08:00
commit 2822484aee
18 changed files with 443 additions and 127 deletions

View File

@ -643,7 +643,7 @@
"x": 0,
"y": 0
},
"txt": "",
"txt": "1000109",
"speakerface": 0,
"sound": "",
"mask": 0,
@ -681,7 +681,7 @@
"x": 0,
"y": 0
},
"txt": "",
"txt": "1000110",
"speakerface": 0,
"sound": "",
"mask": 1,
@ -718,7 +718,7 @@
"x": 0,
"y": 0
},
"txt": "",
"txt": "1000111",
"speakerface": 0,
"sound": "",
"mask": 0,

View File

@ -0,0 +1,32 @@
[
{
"star": 3,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 300
}
]
},
{
"star": 4,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 300
}
]
},
{
"star": 5,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 300
}
]
}
]

View File

@ -59,7 +59,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
})
if red.Attack != nil {
for i, v := range req.Battle.Format {
if red.Attack.Formt[i].Id != v {
if (red.Attack.Formt[i] != nil && red.Attack.Formt[i].Id != v) || (red.Attack.Formt[i] == nil && v == "") {
change = true
}
}
@ -78,7 +78,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
}
ok = false
for _, v := range heros {
if v.Id != "" {
if v != nil && v.Id != "" {
ok = true
}
}

View File

@ -98,7 +98,7 @@ func (this *modelArena) queryUserHeros(uid string, heroids []string) (results []
return
}
for _, v := range heroids {
if v == "" {
if v != "" {
ids = append(ids, v)
}
}

View File

@ -16,6 +16,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.IsLandInfoReq) (err
var (
info *pb.DBIsland
heros []*pb.DBHero
cards []string
err error
)
if errdata = this.InfoCheck(session, req); errdata != nil {
@ -29,6 +30,22 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.IsLandInfoReq) (err
}
return
}
if len(info.Heroshop) == 0 {
if cards, err = this.module.hero.GetRandomCardByCardPool(session.GetUserId(), 5); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Message: err.Error(),
}
return
}
for _, v := range cards {
info.Heroshop[v] = 0
}
this.module.model.Change(session.GetUserId(), map[string]interface{}{
"heroshop": info.Heroshop,
})
}
if heros, err = this.module.modelhero.getHeroList(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,

View File

@ -3,6 +3,9 @@ package island
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"go.mongodb.org/mongo-driver/bson/primitive"
)
// 参数校验
@ -14,14 +17,35 @@ func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.IsLandBuyReq) (
// /获取自己的排行榜信息
func (this *apiComp) Buy(session comm.IUserSession, req *pb.IsLandBuyReq) (errdata *pb.ErrorData) {
var (
info *pb.DBIsland
heros []*pb.DBHero
err error
conf *cfg.GameHeroData
coinconf *cfg.GamePuggsyRecruitData
info *pb.DBIsland
heros []*pb.DBHero
hero *pb.DBHero
buynum int32
ok bool
err error
)
if errdata = this.BuyCheck(session, req); errdata != nil {
return
}
if conf, err = this.module.ModuleTools.GetHeroConfig(req.Cids); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Message: err.Error(),
}
return
}
if coinconf, err = this.module.configure.getGamePuggsyRecruit(conf.Star); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Message: err.Error(),
}
return
}
if info, err = this.module.model.getmodel(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
@ -29,6 +53,19 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.IsLandBuyReq) (errda
}
return
}
if errdata = this.module.ConsumeRes(session, coinconf.Need, true); errdata != nil {
return
}
if buynum, ok = info.Heroshop[req.Cids]; ok && buynum > 0 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Message: "Purchased !",
}
return
}
info.Heroshop[req.Cids] = 1
if heros, err = this.module.modelhero.getHeroList(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
@ -36,6 +73,46 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.IsLandBuyReq) (errda
}
return
}
session.SendMsg(string(this.module.GetType()), "info", &pb.IsLandInfoResp{Info: info, Heros: heros})
for _, v := range heros {
if v.HeroID == req.Cids {
hero = v
if hero.Star <= 6 {
hero.Star++
hero.Lv = hero.Star * 10
} else {
hero.JuexingLv++
}
if hero.JuexingLv > 6 { //已满级不能购买
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Message: "max lv!",
}
return
}
}
}
if hero == nil {
hero = &pb.DBHero{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
HeroID: conf.Hid,
Star: conf.Star,
Lv: conf.Star * 10,
Property: make(map[string]int32),
AddProperty: make(map[string]int32),
JuexProperty: make(map[string]int32),
}
this.module.hero.GetVirtualHero(hero, hero.Lv)
this.module.modelhero.addheros(session.GetUserId(), hero)
} else {
this.module.hero.GetVirtualHero(hero, hero.Lv)
this.module.modelhero.updateHeroProperty(session.GetUserId(), hero)
}
this.module.model.Change(session.GetUserId(), map[string]interface{}{
"heroshop": info.Heroshop,
})
session.SendMsg(string(this.module.GetType()), "buy", &pb.IsLandBuyResp{Hero: hero})
return
}

View File

@ -6,19 +6,19 @@ import (
)
// 参数校验
func (this *apiComp) RefreshHeroShopCheck(session comm.IUserSession, req *pb.IsLandRefresHeroShopReq) (errdata *pb.ErrorData) {
func (this *apiComp) RefresHeroShopCheck(session comm.IUserSession, req *pb.IsLandRefresHeroShopReq) (errdata *pb.ErrorData) {
return
}
//刷新商店
func (this *apiComp) RefreshHeroShop(session comm.IUserSession, req *pb.IsLandRefresHeroShopReq) (errdata *pb.ErrorData) {
func (this *apiComp) RefresHeroShop(session comm.IUserSession, req *pb.IsLandRefresHeroShopReq) (errdata *pb.ErrorData) {
var (
info *pb.DBIsland
heros []*pb.DBHero
cards []string
err error
)
if errdata = this.RefreshHeroShopCheck(session, req); errdata != nil {
if errdata = this.RefresHeroShopCheck(session, req); errdata != nil {
return
}
@ -29,13 +29,22 @@ func (this *apiComp) RefreshHeroShop(session comm.IUserSession, req *pb.IsLandRe
}
return
}
if heros, err = this.module.modelhero.getHeroList(session.GetUserId()); err != nil {
info.Refreshed++
if cards, err = this.module.hero.GetRandomCardByCardPool(session.GetUserId(), 5); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "info", &pb.IsLandInfoResp{Info: info, Heros: heros})
info.Heroshop = make(map[string]int32)
for _, v := range cards {
info.Heroshop[v] = 0
}
this.module.model.Change(session.GetUserId(), map[string]interface{}{
"heroshop": info.Heroshop,
"refreshed": info.Refreshed,
})
session.SendMsg(string(this.module.GetType()), "refresheroshop", &pb.IsLandRefresHeroShopResp{Refreshed: info.Refreshed, Heroshop: info.Heroshop})
return
}

View File

@ -16,6 +16,7 @@ const (
game_puggsyscore = "game_puggsyscore.json"
game_puggsypasscheck = "game_puggsypasscheck.json"
game_puggsystar = "game_puggsystar.json"
game_puggsyrecruit = "game_puggsyrecruit.json"
)
// /背包配置管理组件
@ -34,6 +35,7 @@ func (this *ConfigureComp) Init(service core.IService, module core.IModule, comp
err = this.LoadConfigure(game_puggsyscore, cfg.NewGamePuggsyScore)
err = this.LoadConfigure(game_puggsypasscheck, cfg.NewGamePuggsyPasscheck)
err = this.LoadConfigure(game_puggsystar, cfg.NewGamePuggsyStar)
err = this.LoadConfigure(game_puggsyrecruit, cfg.NewGamePuggsyRecruit)
return
}
@ -185,3 +187,22 @@ func (this *ConfigureComp) getGamePuggsyStarData(id int32) (conf *cfg.GamePuggsy
}
return
}
// 获取伤害对应的评分组
func (this *ConfigureComp) getGamePuggsyRecruit(id int32) (conf *cfg.GamePuggsyRecruitData, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(game_puggsyrecruit); err != nil {
return
} else {
if conf, ok = v.(*cfg.GamePuggsyRecruit).GetDataMap()[id]; !ok {
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_puggsyrecruit, id)
this.module.Errorf("err:%v", err)
return
}
}
return
}

View File

@ -41,6 +41,7 @@ func (this *modelComp) getmodel(uid string) (result *pb.DBIsland, err error) {
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Opentime: utils.GetMonthStart(),
Heroshop: make(map[string]int32),
Islands: make(map[int32]*pb.DBIslandItem),
Nodes: make(map[int32]int32),
}

View File

@ -36,10 +36,31 @@ func (this *modelHeroComp) getHeroList(uid string) (heros []*pb.DBHero, err erro
// 获取玩家的英雄
func (this *modelHeroComp) getHeros(uid string, ids []string) (heros []*pb.DBHero, err error) {
heros = make([]*pb.DBHero, 0)
err = this.GetListObjs(uid, ids, &heros)
if err = this.GetListObjs(uid, ids, &heros); err != nil {
this.module.Errorln(err)
}
return
}
func (this *modelHeroComp) addheros(heros *pb.DBHero) (err error) {
//添加英雄
func (this *modelHeroComp) addheros(uid string, heros *pb.DBHero) (err error) {
if err = this.AddLists(uid, heros); err != nil {
this.module.Errorln(err)
}
return
}
// 重新计算英雄属性
func (this *modelHeroComp) updateHeroProperty(uid string, hero *pb.DBHero) (err error) {
update := map[string]interface{}{
"star": hero.Star,
"juexingLv": hero.JuexingLv,
"property": hero.Property,
"juexProperty": hero.JuexProperty,
}
if err = this.ChangeList(uid, hero.Id, update); err != nil {
this.module.Errorln(err)
return
}
return
}

View File

@ -20,6 +20,7 @@ func NewModule() core.IModule {
type IsLand struct {
modules.ModuleBase
service base.IRPCXService
hero comm.IHero
battle comm.IBattle
api *apiComp
model *modelComp
@ -52,6 +53,10 @@ func (this *IsLand) Start() (err error) {
return
}
var module core.IModule
if module, err = this.service.GetModule(comm.ModuleHero); err != nil {
return
}
this.hero = module.(comm.IHero)
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
return
}

View File

@ -84,7 +84,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
tdata = configure.Now().Sub((time.Unix(sdata.LastRefreshTime, 0)))
switch shopconf.Rtype {
case -1: //一百年不刷新
ltime = 365 * 100 * 24 * time.Hour
ltime = 365 * 20 * 24 * time.Hour
case 1:
ltime = time.Hour * time.Duration(shopconf.Rtime)
break

View File

@ -27,13 +27,14 @@ type DBIsland struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
Opentime int64 `protobuf:"varint,3,opt,name=opentime,proto3" json:"opentime"` //开启时间
Heroshop []int32 `protobuf:"varint,4,rep,packed,name=heroshop,proto3" json:"heroshop"` //英雄商店
Islands map[int32]*DBIslandItem `protobuf:"bytes,5,rep,name=islands,proto3" json:"islands" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //岛屿
Nodes map[int32]int32 `protobuf:"bytes,6,rep,name=nodes,proto3" json:"nodes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //养成节点
Freeprogress int32 `protobuf:"varint,7,opt,name=freeprogress,proto3" json:"freeprogress"` //已领取天数
Opentime int64 `protobuf:"varint,3,opt,name=opentime,proto3" json:"opentime"` //开启时间
Heroshop map[string]int32 `protobuf:"bytes,4,rep,name=heroshop,proto3" json:"heroshop" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //英雄商店
Islands map[int32]*DBIslandItem `protobuf:"bytes,5,rep,name=islands,proto3" json:"islands" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //岛屿
Nodes map[int32]int32 `protobuf:"bytes,6,rep,name=nodes,proto3" json:"nodes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //养成节点
Freeprogress int32 `protobuf:"varint,7,opt,name=freeprogress,proto3" json:"freeprogress"` //已领取天数
Payprogress int32 `protobuf:"varint,8,opt,name=payprogress,proto3" json:"payprogress"`
Vip bool `protobuf:"varint,9,opt,name=vip,proto3" json:"vip"`
Refreshed int32 `protobuf:"varint,10,opt,name=refreshed,proto3" json:"refreshed"` //已刷新
}
func (x *DBIsland) Reset() {
@ -89,7 +90,7 @@ func (x *DBIsland) GetOpentime() int64 {
return 0
}
func (x *DBIsland) GetHeroshop() []int32 {
func (x *DBIsland) GetHeroshop() map[string]int32 {
if x != nil {
return x.Heroshop
}
@ -131,6 +132,13 @@ func (x *DBIsland) GetVip() bool {
return false
}
func (x *DBIsland) GetRefreshed() int32 {
if x != nil {
return x.Refreshed
}
return 0
}
//海岛地图
type DBIslandItem struct {
state protoimpl.MessageState
@ -199,44 +207,51 @@ var File_island_island_db_proto protoreflect.FileDescriptor
var file_island_island_db_proto_rawDesc = []byte{
0x0a, 0x16, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x2f, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x5f,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x03, 0x0a, 0x08, 0x44, 0x42, 0x49,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x49,
0x73, 0x6c, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74,
0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x18,
0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x12,
0x30, 0x0a, 0x07, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x2e, 0x49, 0x73, 0x6c, 0x61,
0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64,
0x73, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x0a,
0x0c, 0x66, 0x72, 0x65, 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73,
0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73,
0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, 0x72,
0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08,
0x52, 0x03, 0x76, 0x69, 0x70, 0x1a, 0x49, 0x0a, 0x0c, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e,
0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x1a, 0x38, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x44,
0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x6c,
0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x49,
0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x70,
0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x1a, 0x38, 0x0a,
0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x69, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x18,
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64,
0x2e, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08,
0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x69, 0x73, 0x6c, 0x61,
0x6e, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, 0x42, 0x49, 0x73,
0x6c, 0x61, 0x6e, 0x64, 0x2e, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x07, 0x69, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f,
0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x49, 0x73,
0x6c, 0x61, 0x6e, 0x64, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x70, 0x72,
0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x66, 0x72,
0x65, 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61,
0x79, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03,
0x76, 0x69, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x1c,
0x0a, 0x09, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x05, 0x52, 0x09, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x65, 0x64, 0x1a, 0x3b, 0x0a, 0x0d,
0x48, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x49, 0x0a, 0x0c, 0x49, 0x73, 0x6c,
0x61, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x49,
0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9a,
0x01, 0x0a, 0x0c, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12,
0x2e, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18,
0x2e, 0x44, 0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4c, 0x65,
0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12,
0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x6f,
0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -251,24 +266,26 @@ func file_island_island_db_proto_rawDescGZIP() []byte {
return file_island_island_db_proto_rawDescData
}
var file_island_island_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_island_island_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_island_island_db_proto_goTypes = []interface{}{
(*DBIsland)(nil), // 0: DBIsland
(*DBIslandItem)(nil), // 1: DBIslandItem
nil, // 2: DBIsland.IslandsEntry
nil, // 3: DBIsland.NodesEntry
nil, // 4: DBIslandItem.LevelEntry
nil, // 2: DBIsland.HeroshopEntry
nil, // 3: DBIsland.IslandsEntry
nil, // 4: DBIsland.NodesEntry
nil, // 5: DBIslandItem.LevelEntry
}
var file_island_island_db_proto_depIdxs = []int32{
2, // 0: DBIsland.islands:type_name -> DBIsland.IslandsEntry
3, // 1: DBIsland.nodes:type_name -> DBIsland.NodesEntry
4, // 2: DBIslandItem.level:type_name -> DBIslandItem.LevelEntry
1, // 3: DBIsland.IslandsEntry.value:type_name -> DBIslandItem
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
2, // 0: DBIsland.heroshop:type_name -> DBIsland.HeroshopEntry
3, // 1: DBIsland.islands:type_name -> DBIsland.IslandsEntry
4, // 2: DBIsland.nodes:type_name -> DBIsland.NodesEntry
5, // 3: DBIslandItem.level:type_name -> DBIslandItem.LevelEntry
1, // 4: DBIsland.IslandsEntry.value:type_name -> DBIslandItem
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_island_island_db_proto_init() }
@ -308,7 +325,7 @@ func file_island_island_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_island_island_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -406,7 +406,8 @@ type IsLandRefresHeroShopResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Heroshop []int32 `protobuf:"varint,1,rep,packed,name=heroshop,proto3" json:"heroshop"` //英雄商店
Refreshed int32 `protobuf:"varint,1,opt,name=refreshed,proto3" json:"refreshed"` //已刷新
Heroshop map[string]int32 `protobuf:"bytes,2,rep,name=heroshop,proto3" json:"heroshop" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //英雄商店
}
func (x *IsLandRefresHeroShopResp) Reset() {
@ -441,7 +442,14 @@ func (*IsLandRefresHeroShopResp) Descriptor() ([]byte, []int) {
return file_island_island_msg_proto_rawDescGZIP(), []int{7}
}
func (x *IsLandRefresHeroShopResp) GetHeroshop() []int32 {
func (x *IsLandRefresHeroShopResp) GetRefreshed() int32 {
if x != nil {
return x.Refreshed
}
return 0
}
func (x *IsLandRefresHeroShopResp) GetHeroshop() map[string]int32 {
if x != nil {
return x.Heroshop
}
@ -454,7 +462,7 @@ type IsLandBuyReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Cids []int32 `protobuf:"varint,1,rep,packed,name=cids,proto3" json:"cids"`
Cids string `protobuf:"bytes,1,opt,name=cids,proto3" json:"cids"`
}
func (x *IsLandBuyReq) Reset() {
@ -489,11 +497,11 @@ func (*IsLandBuyReq) Descriptor() ([]byte, []int) {
return file_island_island_msg_proto_rawDescGZIP(), []int{8}
}
func (x *IsLandBuyReq) GetCids() []int32 {
func (x *IsLandBuyReq) GetCids() string {
if x != nil {
return x.Cids
}
return nil
return ""
}
//购买英雄卡回应
@ -502,7 +510,7 @@ type IsLandBuyResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Award []*UserAtno `protobuf:"bytes,1,rep,name=award,proto3" json:"award"` //奖励
Hero *DBHero `protobuf:"bytes,1,opt,name=hero,proto3" json:"hero"` //奖励
}
func (x *IsLandBuyResp) Reset() {
@ -537,9 +545,9 @@ func (*IsLandBuyResp) Descriptor() ([]byte, []int) {
return file_island_island_msg_proto_rawDescGZIP(), []int{9}
}
func (x *IsLandBuyResp) GetAward() []*UserAtno {
func (x *IsLandBuyResp) GetHero() *DBHero {
if x != nil {
return x.Award
return x.Hero
}
return nil
}
@ -783,29 +791,37 @@ var file_island_island_msg_proto_rawDesc = []byte{
0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x19,
0x0a, 0x17, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x48, 0x65,
0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x22, 0x36, 0x0a, 0x18, 0x49, 0x73, 0x4c,
0x61, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f,
0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f,
0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f,
0x70, 0x22, 0x22, 0x0a, 0x0c, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x42, 0x75, 0x79, 0x52, 0x65,
0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52,
0x04, 0x63, 0x69, 0x64, 0x73, 0x22, 0x30, 0x0a, 0x0d, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x42,
0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f,
0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x24, 0x0a, 0x10, 0x49, 0x73, 0x4c, 0x61, 0x6e,
0x64, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6e,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x69, 0x64, 0x22, 0x35, 0x0a,
0x11, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65,
0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x03, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x6c, 0x76, 0x22, 0x12, 0x0a, 0x10, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x22, 0x53, 0x0a, 0x11, 0x49, 0x73, 0x4c, 0x61,
0x6e, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a,
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42,
0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x05,
0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73,
0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x22, 0xba, 0x01, 0x0a, 0x18, 0x49, 0x73,
0x4c, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x68,
0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73,
0x68, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x66, 0x72, 0x65,
0x73, 0x68, 0x65, 0x64, 0x12, 0x43, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52,
0x65, 0x66, 0x72, 0x65, 0x73, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x73,
0x70, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x08, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x68, 0x6f, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x48, 0x65, 0x72,
0x6f, 0x73, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x22, 0x0a, 0x0c, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64,
0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x64, 0x73, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x64, 0x73, 0x22, 0x2c, 0x0a, 0x0d, 0x49, 0x73,
0x4c, 0x61, 0x6e, 0x64, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68,
0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65,
0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x24, 0x0a, 0x10, 0x49, 0x73, 0x4c, 0x61,
0x6e, 0x64, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03,
0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6e, 0x69, 0x64, 0x22, 0x35,
0x0a, 0x11, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52,
0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x6e, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x12, 0x0a, 0x10, 0x49, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x52,
0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x22, 0x53, 0x0a, 0x11, 0x49, 0x73, 0x4c,
0x61, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d,
0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44,
0x42, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x0a,
0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -820,7 +836,7 @@ func file_island_island_msg_proto_rawDescGZIP() []byte {
return file_island_island_msg_proto_rawDescData
}
var file_island_island_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_island_island_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_island_island_msg_proto_goTypes = []interface{}{
(*IsLandInfoReq)(nil), // 0: IsLandInfoReq
(*IsLandInfoResp)(nil), // 1: IsLandInfoResp
@ -836,28 +852,30 @@ var file_island_island_msg_proto_goTypes = []interface{}{
(*IsLandUpgradeResp)(nil), // 11: IsLandUpgradeResp
(*IsLandReceiveReq)(nil), // 12: IsLandReceiveReq
(*IsLandReceiveResp)(nil), // 13: IsLandReceiveResp
(*DBIsland)(nil), // 14: DBIsland
(*DBHero)(nil), // 15: DBHero
(*BattleFormation)(nil), // 16: BattleFormation
(*BattleInfo)(nil), // 17: BattleInfo
(*BattleReport)(nil), // 18: BattleReport
(*UserAtno)(nil), // 19: UserAtno
nil, // 14: IsLandRefresHeroShopResp.HeroshopEntry
(*DBIsland)(nil), // 15: DBIsland
(*DBHero)(nil), // 16: DBHero
(*BattleFormation)(nil), // 17: BattleFormation
(*BattleInfo)(nil), // 18: BattleInfo
(*BattleReport)(nil), // 19: BattleReport
(*UserAtno)(nil), // 20: UserAtno
}
var file_island_island_msg_proto_depIdxs = []int32{
14, // 0: IsLandInfoResp.info:type_name -> DBIsland
15, // 1: IsLandInfoResp.heros:type_name -> DBHero
16, // 2: IsLandBattleReq.battle:type_name -> BattleFormation
17, // 3: IsLandBattleResp.info:type_name -> BattleInfo
18, // 4: IsLandCompleteReq.report:type_name -> BattleReport
19, // 5: IsLandCompleteResp.award:type_name -> UserAtno
19, // 6: IsLandBuyResp.award:type_name -> UserAtno
14, // 7: IsLandReceiveResp.info:type_name -> DBIsland
19, // 8: IsLandReceiveResp.award:type_name -> UserAtno
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
15, // 0: IsLandInfoResp.info:type_name -> DBIsland
16, // 1: IsLandInfoResp.heros:type_name -> DBHero
17, // 2: IsLandBattleReq.battle:type_name -> BattleFormation
18, // 3: IsLandBattleResp.info:type_name -> BattleInfo
19, // 4: IsLandCompleteReq.report:type_name -> BattleReport
20, // 5: IsLandCompleteResp.award:type_name -> UserAtno
14, // 6: IsLandRefresHeroShopResp.heroshop:type_name -> IsLandRefresHeroShopResp.HeroshopEntry
16, // 7: IsLandBuyResp.hero:type_name -> DBHero
15, // 8: IsLandReceiveResp.info:type_name -> DBIsland
20, // 9: IsLandReceiveResp.award:type_name -> UserAtno
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
}
func init() { file_island_island_msg_proto_init() }
@ -1045,7 +1063,7 @@ func file_island_island_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_island_island_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 14,
NumMessages: 15,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -14,5 +14,4 @@ const (
GameOpencondType_Maxmapid = 2
GameOpencondType_Worldtaskid = 3
GameOpencondType_Friend = 4
GameOpencondType_MoonLevel = 5
)

View 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 GamePuggsyRecruit struct {
_dataMap map[int32]*GamePuggsyRecruitData
_dataList []*GamePuggsyRecruitData
}
func NewGamePuggsyRecruit(_buf []map[string]interface{}) (*GamePuggsyRecruit, error) {
_dataList := make([]*GamePuggsyRecruitData, 0, len(_buf))
dataMap := make(map[int32]*GamePuggsyRecruitData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGamePuggsyRecruitData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Star] = _v
}
}
return &GamePuggsyRecruit{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GamePuggsyRecruit) GetDataMap() map[int32]*GamePuggsyRecruitData {
return table._dataMap
}
func (table *GamePuggsyRecruit) GetDataList() []*GamePuggsyRecruitData {
return table._dataList
}
func (table *GamePuggsyRecruit) Get(key int32) *GamePuggsyRecruitData {
return table._dataMap[key]
}

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <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 GamePuggsyRecruitData struct {
Star int32
Need []*Gameatn
}
const TypeId_GamePuggsyRecruitData = -648363711
func (*GamePuggsyRecruitData) GetTypeId() int32 {
return -648363711
}
func (_v *GamePuggsyRecruitData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["need"].([]interface{}); !_ok_ { err = errors.New("need error"); return }
_v.Need = 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.Need = append(_v.Need, _list_v_)
}
}
return
}
func DeserializeGamePuggsyRecruitData(_buf map[string]interface{}) (*GamePuggsyRecruitData, error) {
v := &GamePuggsyRecruitData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -309,6 +309,7 @@ type Tables struct {
TrackType *GameTrackType
PuggsyStar *GamePuggsyStar
PuggsyMake *GamePuggsyMake
PuggsyRecruit *GamePuggsyRecruit
}
func NewTables(loader JsonLoader) (*Tables, error) {
@ -2104,5 +2105,11 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.PuggsyMake, err = NewGamePuggsyMake(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_puggsyrecruit") ; err != nil {
return nil, err
}
if tables.PuggsyRecruit, err = NewGamePuggsyRecruit(buf) ; err != nil {
return nil, err
}
return tables, nil
}