上传掠夺

This commit is contained in:
meixiongfeng 2024-01-17 18:22:09 +08:00
parent 2defa14422
commit c3f265dc9a
28 changed files with 2663 additions and 90 deletions

View File

@ -509,5 +509,32 @@
"key": "item_coin_intr2_19", "key": "item_coin_intr2_19",
"text": "“我们还行吧。\"\"那当然。\"" "text": "“我们还行吧。\"\"那当然。\""
} }
},
{
"key": "plunderexp",
"keyint": 20,
"name": {
"key": "item_coin_name_20",
"text": "勋章"
},
"hold": 1,
"color": 5,
"effects": "",
"access": [
158
],
"img": "attr_sxintegral",
"intr": {
"key": "item_coin_intr_20",
"text": "巨怪商队的纪念性道具,拥有的越多,声望也会水涨船高。"
},
"describe": {
"key": "",
"text": ""
},
"dialogue": {
"key": "item_coin_intr2_20",
"text": "不论曾经是谁的,现在都是我的了。"
}
} }
] ]

View File

@ -786,7 +786,6 @@
"td_dailystage_challenge_num": 2, "td_dailystage_challenge_num": 2,
"td_dailystage_challenge_num_max": 2, "td_dailystage_challenge_num_max": 2,
"guild_sign_in": 10, "guild_sign_in": 10,
"enhanceboss_ps": 10, "enhanceboss_ps": 10
"enhanceboss_heromax": 6
} }
] ]

View File

@ -178,5 +178,11 @@
"open": true, "open": true,
"routrules": "~/worker", "routrules": "~/worker",
"describe": "积分boss" "describe": "积分boss"
},
{
"msgid": "plunder",
"open": false,
"routrules": "~/worker",
"describe": "掠夺"
} }
] ]

1082
bin/json/game_plunder.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,556 @@
[
{
"id": 101,
"FormatList": [
700011
],
"BattleReadyID": 10300001,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": [
{
"a": "attr",
"t": "gold",
"n": 10000
},
{
"a": "attr",
"t": "diamond",
"n": 20
}
]
},
{
"id": 102,
"FormatList": [
700012
],
"BattleReadyID": 10300002,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": [
{
"a": "attr",
"t": "gold",
"n": 10000
},
{
"a": "attr",
"t": "diamond",
"n": 20
}
]
},
{
"id": 103,
"FormatList": [
700013
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 104,
"FormatList": [
700014
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 105,
"FormatList": [
700015
],
"BattleReadyID": 203,
"EventList": [
203
],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 106,
"FormatList": [
700016
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 107,
"FormatList": [
700015,
700016,
700017
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 108,
"FormatList": [
700018
],
"BattleReadyID": 117,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 109,
"FormatList": [
700019
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 110,
"FormatList": [
700020
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 111,
"FormatList": [
700021
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 112,
"FormatList": [
700022
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 113,
"FormatList": [
700023
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 114,
"FormatList": [
700024
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 115,
"FormatList": [
700025
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 116,
"FormatList": [
700026
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 117,
"FormatList": [
700027
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 118,
"FormatList": [
700028
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 119,
"FormatList": [
700029
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 120,
"FormatList": [
700030
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 121,
"FormatList": [
700031
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 122,
"FormatList": [
700032
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 123,
"FormatList": [
700032
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 124,
"FormatList": [
700032
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 125,
"FormatList": [
700032
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 126,
"FormatList": [
700032
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 180,
"FormatList": [
700034
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 501,
"FormatList": [
700011
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 502,
"FormatList": [
700011
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 503,
"FormatList": [
700011
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 504,
"FormatList": [
700011
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 505,
"FormatList": [
700011
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
},
{
"id": 506,
"FormatList": [
700011
],
"BattleReadyID": 126,
"EventList": [],
"playexp": {
"a": "attr",
"t": "exp",
"n": 5
},
"carexe": 500,
"reward": 0,
"exreward": []
}
]

View File

@ -0,0 +1,182 @@
[
{
"id": 1,
"name": {
"key": "plunder_island_name_01",
"text": "1号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 2,
"name": {
"key": "plunder_island_name_02",
"text": "2号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 3,
"name": {
"key": "plunder_island_name_03",
"text": "3号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 4,
"name": {
"key": "plunder_island_name_04",
"text": "4号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 5,
"name": {
"key": "plunder_island_name_05",
"text": "5号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 6,
"name": {
"key": "plunder_island_name_06",
"text": "6号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 7,
"name": {
"key": "plunder_island_name_07",
"text": "7号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 8,
"name": {
"key": "plunder_island_name_08",
"text": "8号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 9,
"name": {
"key": "plunder_island_name_09",
"text": "9号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 10,
"name": {
"key": "plunder_island_name_10",
"text": "10号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 11,
"name": {
"key": "plunder_island_name_11",
"text": "11号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 12,
"name": {
"key": "plunder_island_name_12",
"text": "12号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 13,
"name": {
"key": "plunder_island_name_13",
"text": "13号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 14,
"name": {
"key": "plunder_island_name_14",
"text": "14号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 15,
"name": {
"key": "plunder_island_name_15",
"text": "15号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 16,
"name": {
"key": "plunder_island_name_16",
"text": "16号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 17,
"name": {
"key": "plunder_island_name_17",
"text": "17号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 18,
"name": {
"key": "plunder_island_name_18",
"text": "18号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 19,
"name": {
"key": "plunder_island_name_19",
"text": "19号岛屿"
},
"icon": "",
"ship_icon": []
},
{
"id": 20,
"name": {
"key": "plunder_island_name_20",
"text": "20号岛屿"
},
"icon": "",
"ship_icon": []
}
]

View File

@ -0,0 +1,34 @@
[
{
"id": 101,
"type": 1,
"txt": {
"key": "plunder_plunder_log_txt_01",
"text": "{0}开始运输{1}。"
}
},
{
"id": 102,
"type": 2,
"txt": {
"key": "plunder_plunder_log_txt_02",
"text": "{0}成功将{1},运输到目的地,获得了{1}"
}
},
{
"id": 103,
"type": 3,
"txt": {
"key": "plunder_plunder_log_txt_03",
"text": "{0}掠夺了{2},成功获得了{1},以及大量其他物资。"
}
},
{
"id": 104,
"type": 4,
"txt": {
"key": "plunder_plunder_log_txt_04",
"text": "{0}掠夺了{2},但是失败了,对方成功摆脱了{0}。"
}
}
]

View File

@ -0,0 +1,122 @@
[
{
"key": 1,
"score_low": 1,
"score_up": 1,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 100
}
]
},
{
"key": 2,
"score_low": 2,
"score_up": 2,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 90
}
]
},
{
"key": 3,
"score_low": 3,
"score_up": 3,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 80
}
]
},
{
"key": 4,
"score_low": 4,
"score_up": 4,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 70
}
]
},
{
"key": 5,
"score_low": 5,
"score_up": 5,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 60
}
]
},
{
"key": 6,
"score_low": 6,
"score_up": 6,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 50
}
]
},
{
"key": 7,
"score_low": 7,
"score_up": 7,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 40
}
]
},
{
"key": 8,
"score_low": 8,
"score_up": 8,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 30
}
]
},
{
"key": 9,
"score_low": 9,
"score_up": 9,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 20
}
]
},
{
"key": 10,
"score_low": 10,
"score_up": 10,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 10
}
]
}
]

View File

@ -118,10 +118,13 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
drawCount = heroRecord.Count[req.DrawType] // 获取当前阵容抽卡次数 drawCount = heroRecord.Count[req.DrawType] // 获取当前阵容抽卡次数
if true { // 普通卡池抽卡 if true { // 普通卡池抽卡
////// 获取消耗 ////// 获取消耗
if req.DrawType == 1 && heroRecord.Selectcount > 0 { // 新手抽 非第一次不消耗
costRes = nil
} else {
if costRes, errdata = this.module.modelHero.CheckDrawCardRes(session, drawConf, req.Consume, req.DrawCount); errdata != nil { if costRes, errdata = this.module.modelHero.CheckDrawCardRes(session, drawConf, req.Consume, req.DrawCount); errdata != nil {
return return
} }
}
// 校验是否达到保底卡池 // 校验是否达到保底卡池
if drawConf.Protect >= drawCount && drawConf.Protect != 0 { if drawConf.Protect >= drawCount && drawConf.Protect != 0 {

View File

@ -36,6 +36,11 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PlunderGetListRe
} }
return return
} }
list.Landid = land.Id
this.module.modelPlunder.changePlunderData(session.GetUserId(), map[string]interface{}{
"landid": list.Landid,
})
} }
session.SendMsg(string(this.module.GetType()), "getlist", &pb.PlunderGetListResp{ session.SendMsg(string(this.module.GetType()), "getlist", &pb.PlunderGetListResp{
List: list, List: list,

View File

@ -1,41 +1,55 @@
package plunder package plunder
import ( import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/modules" "go_dreamfactory/modules"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
"sync"
) )
const ( const (
monkey_main = "game_monkeymain.json" game_plunder = "game_plunder.json"
) )
type configureComp struct { type configureComp struct {
modules.MCompConfigure modules.MCompConfigure
module *Plunder module *Plunder
hlock sync.RWMutex
} }
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options) err = this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Plunder) this.module = module.(*Plunder)
err = this.LoadConfigure(monkey_main, cfg.NewGameMonkeyMain) err = this.LoadConfigure(game_plunder, cfg.NewGamePlunder)
return return
} }
// 通过章节id 获取信息 func (this *configureComp) getGamePlunderData() (result []*cfg.GamePlunderData, err error) {
func (this *configureComp) getGameMonkeyData(id int32) (result *cfg.GameMonkeyMainData, err error) {
var ( var (
v interface{} v interface{}
ok bool
) )
if v, err = this.GetConfigure(monkey_main); err == nil { if v, err = this.GetConfigure(game_plunder); err == nil {
if result, ok = v.(*cfg.GameMonkeyMain).GetDataMap()[id]; ok { if configure, ok := v.(*cfg.GamePlunder); ok {
result = configure.GetDataList()
}
}
return
}
// 通过唯一ID 获取信息
func (this *configureComp) getGamePlunderDataById(id int32) (result *cfg.GamePlunderData, err error) {
var (
v interface{}
)
if v, err = this.GetConfigure(game_plunder); err == nil {
if configure, ok := v.(*cfg.GamePlunder); ok {
if result = configure.Get(id); result != nil {
return return
} }
} }
}
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_plunder, id)
return return
} }

View File

@ -23,7 +23,7 @@ type modelLand struct {
func (this *modelLand) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *modelLand) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompModel.Init(service, module, comp, options) err = this.MCompModel.Init(service, module, comp, options)
this.TableName = comm.TablePlunderLand this.TableName = comm.TablePlunderLand
this.module = module.(*Plunder)
return return
} }
@ -56,21 +56,20 @@ func (this *modelLand) createPlunderLandData(uid string) (land *pb.DBPlunderLand
) )
land = &pb.DBPlunderLand{ land = &pb.DBPlunderLand{
Id: primitive.NewObjectID().Hex(), Id: primitive.NewObjectID().Hex(),
Uinfo: map[string]*pb.BaseUserInfo{},
Ship: map[string]*pb.ShipData{}, Ship: map[string]*pb.ShipData{},
Etime: utils.GetTodayZeroTime(configure.Now().Unix()) + 48*3600, // 临时处理 后面走配置 Etime: utils.GetTodayZeroTime(configure.Now().Unix()) + 48*3600, // 临时处理 后面走配置
} }
if user, err = this.module.ModuleUser.GetUser(uid); err != nil { if user, err = this.module.ModuleUser.GetUser(uid); err != nil {
return return
} }
land.Uinfo[uid] = comm.GetUserBaseInfo(user) land.Uinfo = append(land.Uinfo, comm.GetUserBaseInfo(user))
limtSocre = user.Plunder - 100 limtSocre = user.Plunder - 100
if limtSocre < 0 { if limtSocre < 0 {
limtSocre = 0 limtSocre = 0
} }
cur, err := this.DB.Find(core.SqlTable(comm.TableUser), bson.M{"plunder": bson.M{"$gte": limtSocre}}, options.Find().SetSkip(int64(0)).SetLimit(int64(30))) cur, err := this.DB.Find(core.SqlTable(comm.TableUser), bson.M{"gold": bson.M{"$gte": limtSocre}}, options.Find().SetSkip(int64(0)).SetLimit(int64(30)))
for cur.Next(context.TODO()) { for cur.Next(context.TODO()) {
tmp := &pb.DBFriend{} tmp := &pb.DBUser{}
if err = cur.Decode(tmp); err == nil { if err = cur.Decode(tmp); err == nil {
if uid != tmp.Uid { if uid != tmp.Uid {
uids = append(uids, tmp.Uid) uids = append(uids, tmp.Uid)
@ -91,9 +90,9 @@ func (this *modelLand) createPlunderLandData(uid string) (land *pb.DBPlunderLand
curUids = append(curUids, v) curUids = append(curUids, v)
} }
} }
if users, err = this.module.ModuleUser.GetCrossUsers(curUids); err != nil { if users, err = this.module.ModuleUser.GetUsers(curUids); err == nil {
for _, v := range users { for _, v := range users {
land.Uinfo[v.Uid] = comm.GetUserBaseInfo(v) land.Uinfo = append(land.Uinfo, comm.GetUserBaseInfo(v))
if len(land.Uinfo) > 20 { if len(land.Uinfo) > 20 {
break break
} }

View File

@ -307,7 +307,7 @@ type DBPlunderLand struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uinfo map[string]*BaseUserInfo `protobuf:"bytes,2,rep,name=uinfo,proto3" json:"uinfo" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 成员信息 key uid Uinfo []*BaseUserInfo `protobuf:"bytes,2,rep,name=uinfo,proto3" json:"uinfo"` // 成员信息 key uid
Ship map[string]*ShipData `protobuf:"bytes,3,rep,name=ship,proto3" json:"ship" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 运输的船 key 唯一id Ship map[string]*ShipData `protobuf:"bytes,3,rep,name=ship,proto3" json:"ship" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 运输的船 key 唯一id
Etime int64 `protobuf:"varint,4,opt,name=etime,proto3" json:"etime"` // 结束时间 Etime int64 `protobuf:"varint,4,opt,name=etime,proto3" json:"etime"` // 结束时间
} }
@ -351,7 +351,7 @@ func (x *DBPlunderLand) GetId() string {
return "" return ""
} }
func (x *DBPlunderLand) GetUinfo() map[string]*BaseUserInfo { func (x *DBPlunderLand) GetUinfo() []*BaseUserInfo {
if x != nil { if x != nil {
return x.Uinfo return x.Uinfo
} }
@ -415,26 +415,21 @@ var file_plunder_plunder_db_proto_rawDesc = []byte{
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa1, 0x02, 0x0a, 0x0d, 0x44, 0x42, 0x50, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcc, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x50,
0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x05, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69,
0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65,
0x75, 0x6e, 0x64, 0x65, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x2e, 0x55, 0x69, 0x6e, 0x66, 0x6f, 0x45, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x0a, 0x04, 0x73, 0x2c, 0x0a, 0x04, 0x73, 0x68, 0x69, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x68, 0x69, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x44, 0x42, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x2e, 0x53, 0x68,
0x75, 0x6e, 0x64, 0x65, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x2e, 0x53, 0x68, 0x69, 0x70, 0x45, 0x6e, 0x69, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x73, 0x68, 0x69, 0x70, 0x12, 0x14, 0x0a,
0x74, 0x72, 0x79, 0x52, 0x04, 0x73, 0x68, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74,
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x69, 0x6d, 0x65, 0x1a, 0x42, 0x0a, 0x09, 0x53, 0x68, 0x69, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x47, 0x0a, 0x0a, 0x55, 0x69, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x0b, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61,
0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x09, 0x53, 0x68, 0x69, 0x70, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x69, 0x70, 0x44, 0x61, 0x74,
0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -449,32 +444,30 @@ func file_plunder_plunder_db_proto_rawDescGZIP() []byte {
return file_plunder_plunder_db_proto_rawDescData return file_plunder_plunder_db_proto_rawDescData
} }
var file_plunder_plunder_db_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_plunder_plunder_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_plunder_plunder_db_proto_goTypes = []interface{}{ var file_plunder_plunder_db_proto_goTypes = []interface{}{
(*DBPlunder)(nil), // 0: DBPlunder (*DBPlunder)(nil), // 0: DBPlunder
(*PlunderLine)(nil), // 1: PlunderLine (*PlunderLine)(nil), // 1: PlunderLine
(*ShipData)(nil), // 2: ShipData (*ShipData)(nil), // 2: ShipData
(*DBPlunderLand)(nil), // 3: DBPlunderLand (*DBPlunderLand)(nil), // 3: DBPlunderLand
nil, // 4: ShipData.HeroEntry nil, // 4: ShipData.HeroEntry
nil, // 5: DBPlunderLand.UinfoEntry nil, // 5: DBPlunderLand.ShipEntry
nil, // 6: DBPlunderLand.ShipEntry (*BaseUserInfo)(nil), // 6: BaseUserInfo
(*LineData)(nil), // 7: LineData (*LineData)(nil), // 7: LineData
(*BaseUserInfo)(nil), // 8: BaseUserInfo
} }
var file_plunder_plunder_db_proto_depIdxs = []int32{ var file_plunder_plunder_db_proto_depIdxs = []int32{
1, // 0: DBPlunder.line:type_name -> PlunderLine 1, // 0: DBPlunder.line:type_name -> PlunderLine
1, // 1: ShipData.line:type_name -> PlunderLine 1, // 1: ShipData.line:type_name -> PlunderLine
4, // 2: ShipData.hero:type_name -> ShipData.HeroEntry 4, // 2: ShipData.hero:type_name -> ShipData.HeroEntry
5, // 3: DBPlunderLand.uinfo:type_name -> DBPlunderLand.UinfoEntry 6, // 3: DBPlunderLand.uinfo:type_name -> BaseUserInfo
6, // 4: DBPlunderLand.ship:type_name -> DBPlunderLand.ShipEntry 5, // 4: DBPlunderLand.ship:type_name -> DBPlunderLand.ShipEntry
7, // 5: ShipData.HeroEntry.value:type_name -> LineData 7, // 5: ShipData.HeroEntry.value:type_name -> LineData
8, // 6: DBPlunderLand.UinfoEntry.value:type_name -> BaseUserInfo 2, // 6: DBPlunderLand.ShipEntry.value:type_name -> ShipData
2, // 7: DBPlunderLand.ShipEntry.value:type_name -> ShipData 7, // [7:7] is the sub-list for method output_type
8, // [8:8] is the sub-list for method output_type 7, // [7:7] is the sub-list for method input_type
8, // [8:8] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension type_name 7, // [7:7] is the sub-list for extension extendee
8, // [8:8] is the sub-list for extension extendee 0, // [0:7] is the sub-list for field type_name
0, // [0:8] is the sub-list for field type_name
} }
func init() { file_plunder_plunder_db_proto_init() } func init() { file_plunder_plunder_db_proto_init() }
@ -540,7 +533,7 @@ func file_plunder_plunder_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_plunder_plunder_db_proto_rawDesc, RawDescriptor: file_plunder_plunder_db_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 7, NumMessages: 6,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -57,6 +57,7 @@ import (
"go_dreamfactory/modules/parkour" "go_dreamfactory/modules/parkour"
"go_dreamfactory/modules/passon" "go_dreamfactory/modules/passon"
"go_dreamfactory/modules/pay" "go_dreamfactory/modules/pay"
"go_dreamfactory/modules/plunder"
"go_dreamfactory/modules/practice" "go_dreamfactory/modules/practice"
"go_dreamfactory/modules/privilege" "go_dreamfactory/modules/privilege"
"go_dreamfactory/modules/pushgiftbag" "go_dreamfactory/modules/pushgiftbag"
@ -195,6 +196,7 @@ func main() {
whackamole.NewModule(), whackamole.NewModule(),
monkey.NewModule(), monkey.NewModule(),
integral.NewModule(), integral.NewModule(),
plunder.NewModule(),
) )
} }

View File

@ -133,4 +133,8 @@ const (
GameBuffType_DRAGON_FORM = 140 GameBuffType_DRAGON_FORM = 140
GameBuffType_PROPERTY_EFFECT_AMPLIFY = 141 GameBuffType_PROPERTY_EFFECT_AMPLIFY = 141
GameBuffType_UNABLE_UNDERSTAND = 142 GameBuffType_UNABLE_UNDERSTAND = 142
GameBuffType_GLOBAL_DISABLE_TRE = 143
GameBuffType_GLOBAL_DISABLE_DAMRE = 144
GameBuffType_GLOBAL_DISABLE_ADD_SPEED = 145
GameBuffType_GLOBAL_DISABLE_ADD_DEF = 146
) )

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

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

View File

@ -0,0 +1,88 @@
//------------------------------------------------------------------------------
// <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 GamePlunderBattleData struct {
Id int32
FormatList []int32
BattleReadyID int32
EventList []int32
Playexp *Gameatn
Carexe int32
Reward int32
Exreward []*Gameatn
}
const TypeId_GamePlunderBattleData = 468075778
func (*GamePlunderBattleData) GetTypeId() int32 {
return 468075778
}
func (_v *GamePlunderBattleData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["FormatList"].([]interface{}); !_ok_ { err = errors.New("FormatList error"); return }
_v.FormatList = 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.FormatList = append(_v.FormatList, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { err = errors.New("BattleReadyID error"); return }; _v.BattleReadyID = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["EventList"].([]interface{}); !_ok_ { err = errors.New("EventList error"); return }
_v.EventList = 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.EventList = append(_v.EventList, _list_v_)
}
}
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["playexp"].(map[string]interface{}); !_ok_ { err = errors.New("playexp error"); return }; if _v.Playexp, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["carexe"].(float64); !_ok_ { err = errors.New("carexe error"); return }; _v.Carexe = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["reward"].(float64); !_ok_ { err = errors.New("reward error"); return }; _v.Reward = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["exreward"].([]interface{}); !_ok_ { err = errors.New("exreward error"); return }
_v.Exreward = 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.Exreward = append(_v.Exreward, _list_v_)
}
}
return
}
func DeserializeGamePlunderBattleData(_buf map[string]interface{}) (*GamePlunderBattleData, error) {
v := &GamePlunderBattleData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -8,35 +8,93 @@
package cfg package cfg
import "errors"
type GamePlunderData struct { type GamePlunderData struct {
_dataMap map[int32]*GamePlunderDataData Id int32
_dataList []*GamePlunderDataData Name string
Mosterhead string
Mostername string
Rarity int32
Weight int32
Battleid int32
Keepreward []*Gameatn
Lostreward []*Gameatn
Numitem *Gameatn
Hidenum int32
Time int32
Exreward []*Gameatn
Extime int32
} }
func NewGamePlunderData(_buf []map[string]interface{}) (*GamePlunderData, error) { const TypeId_GamePlunderData = -1680933846
_dataList := make([]*GamePlunderDataData, 0, len(_buf))
dataMap := make(map[int32]*GamePlunderDataData) func (*GamePlunderData) GetTypeId() int32 {
for _, _ele_ := range _buf { return -1680933846
if _v, err2 := DeserializeGamePlunderDataData(_ele_); err2 != nil { }
return nil, err2
func (_v *GamePlunderData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{var _ok_ bool; var __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.Mosterhead, _ok_ = _buf["mosterhead"].(string); !_ok_ { err = errors.New("mosterhead error"); return } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["mostername"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Mostername error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Mostername, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rarity"].(float64); !_ok_ { err = errors.New("rarity error"); return }; _v.Rarity = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weight"].(float64); !_ok_ { err = errors.New("weight error"); return }; _v.Weight = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["battleid"].(float64); !_ok_ { err = errors.New("battleid error"); return }; _v.Battleid = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["keepreward"].([]interface{}); !_ok_ { err = errors.New("keepreward error"); return }
_v.Keepreward = 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.Keepreward = append(_v.Keepreward, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["lostreward"].([]interface{}); !_ok_ { err = errors.New("lostreward error"); return }
_v.Lostreward = 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.Lostreward = append(_v.Lostreward, _list_v_)
}
}
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["numitem"].(map[string]interface{}); !_ok_ { err = errors.New("numitem error"); return }; if _v.Numitem, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hidenum"].(float64); !_ok_ { err = errors.New("hidenum error"); return }; _v.Hidenum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["exreward"].([]interface{}); !_ok_ { err = errors.New("exreward error"); return }
_v.Exreward = 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.Exreward = append(_v.Exreward, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["extime"].(float64); !_ok_ { err = errors.New("extime error"); return }; _v.Extime = int32(_tempNum_) }
return
}
func DeserializeGamePlunderData(_buf map[string]interface{}) (*GamePlunderData, error) {
v := &GamePlunderData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else { } else {
_dataList = append(_dataList, _v) return nil, err
dataMap[_v.Id] = _v
} }
}
return &GamePlunderData{_dataList:_dataList, _dataMap:dataMap}, nil
} }
func (table *GamePlunderData) GetDataMap() map[int32]*GamePlunderDataData {
return table._dataMap
}
func (table *GamePlunderData) GetDataList() []*GamePlunderDataData {
return table._dataList
}
func (table *GamePlunderData) Get(key int32) *GamePlunderDataData {
return table._dataMap[key]
}

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

View File

@ -0,0 +1,54 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GamePlunderIsLandData struct {
Id int32
Name string
Icon string
ShipIcon []string
}
const TypeId_GamePlunderIsLandData = 298736639
func (*GamePlunderIsLandData) GetTypeId() int32 {
return 298736639
}
func (_v *GamePlunderIsLandData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{var _ok_ bool; var __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.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["ship_icon"].([]interface{}); !_ok_ { err = errors.New("ship_icon error"); return }
_v.ShipIcon = make([]string, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ string
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
_v.ShipIcon = append(_v.ShipIcon, _list_v_)
}
}
return
}
func DeserializeGamePlunderIsLandData(_buf map[string]interface{}) (*GamePlunderIsLandData, error) {
v := &GamePlunderIsLandData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

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

View File

@ -0,0 +1,39 @@
//------------------------------------------------------------------------------
// <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 GamePlunderLogData struct {
Id int32
Type int32
Txt string
}
const TypeId_GamePlunderLogData = 1516595342
func (*GamePlunderLogData) GetTypeId() int32 {
return 1516595342
}
func (_v *GamePlunderLogData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["txt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Txt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Txt, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
return
}
func DeserializeGamePlunderLogData(_buf map[string]interface{}) (*GamePlunderLogData, error) {
v := &GamePlunderLogData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

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

View File

@ -0,0 +1,54 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GamePlunderRankData struct {
Key int32
ScoreLow int32
ScoreUp int32
Reward []*Gameatn
}
const TypeId_GamePlunderRankData = -1962834314
func (*GamePlunderRankData) GetTypeId() int32 {
return -1962834314
}
func (_v *GamePlunderRankData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score_low"].(float64); !_ok_ { err = errors.New("score_low error"); return }; _v.ScoreLow = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score_up"].(float64); !_ok_ { err = errors.New("score_up error"); return }; _v.ScoreUp = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
_v.Reward = 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.Reward = append(_v.Reward, _list_v_)
}
}
return
}
func DeserializeGamePlunderRankData(_buf map[string]interface{}) (*GamePlunderRankData, error) {
v := &GamePlunderRankData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -0,0 +1,16 @@
//------------------------------------------------------------------------------
// <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
const (
TEnumEPlunderLogType_Start = 1
TEnumEPlunderLogType_End = 2
TEnumEPlunderLogType_Victory = 3
TEnumEPlunderLogType_Fail = 4
)

View File

@ -334,7 +334,11 @@ type Tables struct {
CatchbugSetstage *GameCatchbugSetstage CatchbugSetstage *GameCatchbugSetstage
BuzkashiCombo *GameBuzkashiCombo BuzkashiCombo *GameBuzkashiCombo
Sweep *GameSweep Sweep *GameSweep
PlunderData *GamePlunderData Plunder *GamePlunder
PlunderRank *GamePlunderRank
PlunderBattle *GamePlunderBattle
PlunderLog *GamePlunderLog
PlunderIsLand *GamePlunderIsLand
} }
func NewTables(loader JsonLoader) (*Tables, error) { func NewTables(loader JsonLoader) (*Tables, error) {
@ -2280,10 +2284,34 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.Sweep, err = NewGameSweep(buf) ; err != nil { if tables.Sweep, err = NewGameSweep(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_plunderdata") ; err != nil { if buf, err = loader("game_plunder") ; err != nil {
return nil, err return nil, err
} }
if tables.PlunderData, err = NewGamePlunderData(buf) ; err != nil { if tables.Plunder, err = NewGamePlunder(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_plunderrank") ; err != nil {
return nil, err
}
if tables.PlunderRank, err = NewGamePlunderRank(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_plunderbattle") ; err != nil {
return nil, err
}
if tables.PlunderBattle, err = NewGamePlunderBattle(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_plunderlog") ; err != nil {
return nil, err
}
if tables.PlunderLog, err = NewGamePlunderLog(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_plunderisland") ; err != nil {
return nil, err
}
if tables.PlunderIsLand, err = NewGamePlunderIsLand(buf) ; err != nil {
return nil, err return nil, err
} }
return tables, nil return tables, nil

View File

@ -280,7 +280,6 @@ type GameGlobalData struct {
TdDailystageChallengeNumMax int32 TdDailystageChallengeNumMax int32
GuildSignIn int32 GuildSignIn int32
EnhancebossPs int32 EnhancebossPs int32
EnhancebossHeromax int32
} }
const TypeId_GameGlobalData = 477542761 const TypeId_GameGlobalData = 477542761
@ -1092,7 +1091,6 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["td_dailystage_challenge_num_max"].(float64); !_ok_ { err = errors.New("td_dailystage_challenge_num_max error"); return }; _v.TdDailystageChallengeNumMax = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["td_dailystage_challenge_num_max"].(float64); !_ok_ { err = errors.New("td_dailystage_challenge_num_max error"); return }; _v.TdDailystageChallengeNumMax = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_sign_in"].(float64); !_ok_ { err = errors.New("guild_sign_in error"); return }; _v.GuildSignIn = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_sign_in"].(float64); !_ok_ { err = errors.New("guild_sign_in error"); return }; _v.GuildSignIn = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enhanceboss_ps"].(float64); !_ok_ { err = errors.New("enhanceboss_ps error"); return }; _v.EnhancebossPs = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enhanceboss_ps"].(float64); !_ok_ { err = errors.New("enhanceboss_ps error"); return }; _v.EnhancebossPs = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enhanceboss_heromax"].(float64); !_ok_ { err = errors.New("enhanceboss_heromax error"); return }; _v.EnhancebossHeromax = int32(_tempNum_) }
return return
} }