上傳活動禮包代碼

This commit is contained in:
liwei 2023-07-13 15:36:18 +08:00
parent f2dafd9e35
commit 4185079536
21 changed files with 12298 additions and 453 deletions

View File

@ -569,6 +569,69 @@
"LockSlots": [],
"AssistTeam": 0,
"CanFriendHelp": 0,
"Numrounds": 0
"Numrounds": 100
},
{
"id": 130,
"PlayType": 2,
"HeroCount": 5,
"readyScene": "scenesfight_role_interface_06",
"battleScenes": [
"scenesfight_06"
],
"disableAiCamera": 0,
"ChoseCamp": [
1
],
"DisableCamp": [],
"DefaultHero": 0,
"ChoseHero": [],
"DisableHero": [],
"LockSlots": [],
"AssistTeam": 0,
"CanFriendHelp": 0,
"Numrounds": 100
},
{
"id": 131,
"PlayType": 2,
"HeroCount": 5,
"readyScene": "scenesfight_role_interface_06",
"battleScenes": [
"scenesfight_06"
],
"disableAiCamera": 0,
"ChoseCamp": [
2
],
"DisableCamp": [],
"DefaultHero": 0,
"ChoseHero": [],
"DisableHero": [],
"LockSlots": [],
"AssistTeam": 0,
"CanFriendHelp": 0,
"Numrounds": 100
},
{
"id": 132,
"PlayType": 2,
"HeroCount": 5,
"readyScene": "scenesfight_role_interface_06",
"battleScenes": [
"scenesfight_06"
],
"disableAiCamera": 0,
"ChoseCamp": [
3
],
"DisableCamp": [],
"DefaultHero": 0,
"ChoseHero": [],
"DisableHero": [],
"LockSlots": [],
"AssistTeam": 0,
"CanFriendHelp": 0,
"Numrounds": 100
}
]

File diff suppressed because it is too large Load Diff

View File

@ -389,7 +389,7 @@
],
"VIP_DaysSent": 7,
"MonthlyCard_DaysSent": 30,
"opennewguide": 0,
"opennewguide": 1,
"library_StoryUnlocking": 3,
"ps_recovery": 360,
"ps_ul": 2000,
@ -676,6 +676,11 @@
"business_rewardday": 1,
"business_renovatething": 180,
"business_change": 0.5,
"business_week": [
1,
3,
5
],
"favorability_likes": 1500,
"favorability_dislikes": 500,
"buzkashi_time": 180,

File diff suppressed because it is too large Load Diff

View File

@ -168,7 +168,7 @@
"special_type": 200,
"time": 0,
"reddottype": 0,
"effects": "",
"effects": "effect_ui_bagwindow_3",
"modelName": "",
"box_id": 0,
"synthetize_num": 0,
@ -207,7 +207,7 @@
"special_type": 150,
"time": 0,
"reddottype": 0,
"effects": "",
"effects": "effect_ui_bagwindow_2",
"modelName": "",
"box_id": 0,
"synthetize_num": 0,
@ -580,7 +580,7 @@
],
"use_skip": 107,
"upper_limit": 999,
"img": "item_10000001",
"img": "wp_icon_10020",
"intr": {
"key": "item_item_intr_14",
"text": "可以用于真诚阵营招募。"
@ -619,7 +619,7 @@
],
"use_skip": 107,
"upper_limit": 999,
"img": "item_10000001",
"img": "wp_icon_10021",
"intr": {
"key": "item_item_intr_15",
"text": "可以用于直觉阵营招募。"
@ -658,7 +658,7 @@
],
"use_skip": 107,
"upper_limit": 999,
"img": "item_10000001",
"img": "wp_icon_10022",
"intr": {
"key": "item_item_intr_16",
"text": "可以用于共情阵营招募。"
@ -697,7 +697,7 @@
],
"use_skip": 107,
"upper_limit": 999,
"img": "item_10000001",
"img": "wp_icon_10023",
"intr": {
"key": "item_item_intr_17",
"text": "可以用于责任阵营招募。"
@ -736,7 +736,7 @@
],
"use_skip": 107,
"upper_limit": 999,
"img": "item_10000001",
"img": "wp_icon_10020",
"intr": {
"key": "item_item_intr_18",
"text": "消耗10个可以用于真诚阵营招募。"
@ -775,7 +775,7 @@
],
"use_skip": 107,
"upper_limit": 999,
"img": "item_10000001",
"img": "wp_icon_10021",
"intr": {
"key": "item_item_intr_19",
"text": "消耗10个可以用于直觉阵营招募。"
@ -814,7 +814,7 @@
],
"use_skip": 107,
"upper_limit": 999,
"img": "item_10000001",
"img": "wp_icon_10022",
"intr": {
"key": "item_item_intr_20",
"text": "消耗10个可以用于共情阵营招募。"
@ -853,7 +853,7 @@
],
"use_skip": 107,
"upper_limit": 999,
"img": "item_10000001",
"img": "wp_icon_10023",
"intr": {
"key": "item_item_intr_21",
"text": "消耗10个可以用于责任阵营招募。"
@ -892,7 +892,7 @@
],
"use_skip": 107,
"upper_limit": 999,
"img": "item_10000001",
"img": "wp_icon_10019",
"intr": {
"key": "item_item_intr_22",
"text": "消耗100个可以在许愿招募兑换英雄"
@ -6607,7 +6607,7 @@
"id": "13001003",
"name": {
"key": "item_item_name_164",
"text": "泰坦熔岩"
"text": "地底炉石"
},
"usetype": 2,
"color": 4,
@ -6646,7 +6646,7 @@
"id": "13001004",
"name": {
"key": "item_item_name_165",
"text": "熔岩之心"
"text": "泰坦熔岩"
},
"usetype": 2,
"color": 5,
@ -6655,7 +6655,7 @@
"special_type": 0,
"time": 0,
"reddottype": 0,
"effects": "",
"effects": "effect_ui_bagwindow_2",
"modelName": "",
"box_id": 0,
"synthetize_num": 0,
@ -6683,7 +6683,7 @@
"id": "13002001",
"name": {
"key": "item_item_name_166",
"text": "荒漠枯枝"
"text": "古树之苔"
},
"usetype": 2,
"color": 2,
@ -6722,7 +6722,7 @@
"id": "13002002",
"name": {
"key": "item_item_name_167",
"text": "维京圆木"
"text": "荒漠枯枝"
},
"usetype": 2,
"color": 3,
@ -6761,7 +6761,7 @@
"id": "13002003",
"name": {
"key": "item_item_name_168",
"text": "恶魔藤蔓"
"text": "维京圆木"
},
"usetype": 2,
"color": 4,
@ -6800,7 +6800,7 @@
"id": "13002004",
"name": {
"key": "item_item_name_169",
"text": "铁树枝干"
"text": "泰坦藤蔓"
},
"usetype": 2,
"color": 5,
@ -6809,7 +6809,7 @@
"special_type": 0,
"time": 0,
"reddottype": 0,
"effects": "",
"effects": "effect_ui_bagwindow_2",
"modelName": "",
"box_id": 0,
"synthetize_num": 0,
@ -6837,7 +6837,7 @@
"id": "13003001",
"name": {
"key": "item_item_name_170",
"text": "北极冰砖"
"text": "霜冻雪花"
},
"usetype": 2,
"color": 2,
@ -6876,7 +6876,7 @@
"id": "13003002",
"name": {
"key": "item_item_name_171",
"text": "凛冬冰晶"
"text": "北极冰砖"
},
"usetype": 2,
"color": 3,
@ -6915,7 +6915,7 @@
"id": "13003003",
"name": {
"key": "item_item_name_172",
"text": "泰坦晶核"
"text": "凛冬冰晶"
},
"usetype": 2,
"color": 4,
@ -6954,7 +6954,7 @@
"id": "13003004",
"name": {
"key": "item_item_name_173",
"text": "龙之冰晶"
"text": "泰坦晶核"
},
"usetype": 2,
"color": 5,
@ -6963,7 +6963,7 @@
"special_type": 0,
"time": 0,
"reddottype": 0,
"effects": "",
"effects": "effect_ui_bagwindow_2",
"modelName": "",
"box_id": 0,
"synthetize_num": 0,
@ -7992,7 +7992,7 @@
"special_type": 600,
"time": 0,
"reddottype": 0,
"effects": "effect_ui_bagwindow_3",
"effects": "",
"modelName": "",
"box_id": 0,
"synthetize_num": 0,
@ -8031,7 +8031,7 @@
"special_type": 550,
"time": 0,
"reddottype": 0,
"effects": "effect_ui_bagwindow_3",
"effects": "",
"modelName": "",
"box_id": 0,
"synthetize_num": 0,
@ -13927,7 +13927,7 @@
"access": [],
"use_skip": 11001,
"upper_limit": 999,
"img": "item_10000005",
"img": "item_10000014",
"intr": {
"key": "item_item_intr_357",
"text": "用于巨怪商队内移动列车的消耗品"

File diff suppressed because it is too large Load Diff

View File

@ -135,7 +135,7 @@
"sceneicon": "ty_qp_zhb",
"functionname": {
"key": "navigation_Sheet1_functionname_8",
"text": "主线关卡"
"text": "冒险关卡"
},
"npcName": [
"功能入口_主线"

View File

@ -1868,5 +1868,41 @@
"uiid": 0,
"activateType": 2,
"notify": []
},
{
"id": "RacePagoda",
"name": {
"key": "opencond_opencond_name_81",
"text": "阵营塔"
},
"main": [],
"wkqbx": 0,
"kqbx": 0,
"img": "",
"prompt": {
"key": "",
"text": ""
},
"uiid": 0,
"activateType": 0,
"notify": []
},
{
"id": "circularcamptower",
"name": {
"key": "opencond_opencond_name_82",
"text": "循环塔"
},
"main": [],
"wkqbx": 0,
"kqbx": 0,
"img": "",
"prompt": {
"key": "",
"text": ""
},
"uiid": 0,
"activateType": 0,
"notify": []
}
]

View File

@ -0,0 +1,74 @@
[
{
"id": 20001,
"type": 1,
"repeat_num": 5,
"refreshtime": 1,
"packagetype": "",
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_20001",
"text": "每日好礼"
},
"costitem": [
{
"a": "attr",
"t": "diamond",
"n": 88
}
],
"item": [
{
"a": "item",
"t": "10000001",
"n": 1
}
]
},
{
"id": 20002,
"type": 1,
"repeat_num": 2,
"refreshtime": 30,
"packagetype": "",
"buy_num": 2,
"packagename": {
"key": "paypackage_paypackage_packagename_20002",
"text": "兑换礼包"
},
"costitem": [
{
"a": "attr",
"t": "diamond",
"n": 1888
}
],
"item": [
{
"a": "item",
"t": "10000001",
"n": 10
}
]
},
{
"id": 20003,
"type": 1,
"repeat_num": 3,
"refreshtime": 30,
"packagetype": "drawcard_pack1",
"buy_num": 3,
"packagename": {
"key": "paypackage_paypackage_packagename_20003",
"text": "招募礼包1"
},
"costitem": [],
"item": [
{
"a": "item",
"t": "10000001",
"n": 10
}
]
}
]

View File

@ -508,89 +508,5 @@
"n": 20
}
]
},
{
"id": 20001,
"type": 2,
"repeat_num": 5,
"refreshtime": 1,
"pagename": {
"key": "",
"text": ""
},
"packagetype": "",
"buy_num": 1,
"packagename": {
"key": "paypackage_paypackage_packagename_20001",
"text": "每日好礼"
},
"costitem": [
{
"a": "attr",
"t": "diamond",
"n": 88
}
],
"item": [
{
"a": "item",
"t": "10000001",
"n": 1
}
]
},
{
"id": 20002,
"type": 2,
"repeat_num": 2,
"refreshtime": 30,
"pagename": {
"key": "",
"text": ""
},
"packagetype": "",
"buy_num": 2,
"packagename": {
"key": "paypackage_paypackage_packagename_20002",
"text": "兑换礼包"
},
"costitem": [
{
"a": "attr",
"t": "diamond",
"n": 1888
}
],
"item": [
{
"a": "item",
"t": "10000001",
"n": 10
}
]
},
{
"id": 20003,
"type": 2,
"repeat_num": 3,
"refreshtime": 30,
"pagename": {
"key": "",
"text": ""
},
"packagetype": "drawcard_pack1",
"buy_num": 3,
"packagename": {
"key": "paypackage_paypackage_packagename_20003",
"text": "招募礼包1"
},
"costitem": [],
"item": [
{
"a": "item",
"t": "10000001",
"n": 10
}
]
}
]

View File

@ -172,7 +172,7 @@
},
"content": {
"key": "ruledesc_ruledesc_content_16",
"text": "这里可以查看你拥有的所有装备,并且可以给守护者们装备上,一件穿戴会默认选择你最好的装备穿戴给当前守护者(已穿戴装备除外)。<br>点击装备可以打开装备强化界面,"
"text": "这里可以查看你拥有的所有装备,并且可以给守护者们装备上,一件穿戴会默认选择你最好的装备穿戴给当前守护者(已穿戴装备除外)。<br>点击装备可以打开装备强化界面,强化装备需要金币。每次强化到一定等级可以解锁装备副词条。<br>不同稀有度的装备等级上限不同,可解锁的副词条数量也不同。<br>强化装备有概率失败,装备强化等级越高,失败的概率也越高,失败到一定次数下次一定强化成功。"
}
},
{
@ -315,7 +315,7 @@
},
"content": {
"key": "ruledesc_ruledesc_content_29",
"text": "这里可以查看炉温,炉温是打造时的消耗品,随时间自动回复,也可以使用道具回复。 提升炉温等级可以提升炉温上限与炉温恢复速度。"
"text": "这里可以查看炉温,炉温是打造时的消耗品,随时间自动回复,也可以使用道具回复。<br>提升炉温等级可以提升炉温上限与炉温恢复速度。"
}
},
{
@ -482,5 +482,16 @@
"key": "ruledesc_ruledesc_content_44",
"text": "这里可以查看玩家游戏进度。<br>可以修改名称与个性签名名称最多12字符汉字算2字符。<br>更改角色装扮,还能修改并查看自己的阵容展示。"
}
},
{
"id": 10045,
"title": {
"key": "ruledesc_ruledesc_title_45",
"text": "烹饪说明"
},
"content": {
"key": "ruledesc_ruledesc_content_45",
"text": "这里可以使用食材烹饪出各种各样的食物。<br>食材组合的不同,烹饪出来的食物也完全不同。<br>添加的食物越多,能煮出好食物的概率越高,但要小心错误的食材组合会完全烹饪不出好的食物。只有正确的食材组合才能烹饪出美味佳肴。"
}
}
]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,8 +8,9 @@ import (
)
const (
game_recharge = "game_recharge.json"
game_paypackage = "game_paypackage.json"
game_recharge = "game_recharge.json"
game_paypackage = "game_paypackage.json"
game_paygiftpack = "game_paygiftpack.json"
)
// /背包配置管理组件
@ -24,6 +25,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
this.module = module.(*Pay)
this.LoadConfigure(game_recharge, cfg.NewGameRecharge)
this.LoadConfigure(game_paypackage, cfg.NewGamePayPackage)
this.LoadConfigure(game_paygiftpack, cfg.NewGamePayGiftpack)
return
}
@ -103,3 +105,23 @@ func (this *configureComp) getPayPackageDataByPid(pid string) (result *cfg.GameP
err = fmt.Errorf("getPayPackageDataByPid no found %s", pid)
return
}
// 獲取
func (this *configureComp) getPayGiftpackDataByPid(pid string) (result *cfg.GamePayGiftpackData, err error) {
var (
v interface{}
)
if v, err = this.GetConfigure(game_paygiftpack); err != nil {
this.module.Errorf("err:%v", err)
return
} else {
for _, v := range v.(*cfg.GamePayGiftpack).GetDataMap() {
if v.Packagetype == pid {
result = v
return
}
}
}
err = fmt.Errorf("getPayPackageDataByPid no found %s", pid)
return
}

View File

@ -7,6 +7,7 @@ import (
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"sync"
"go.mongodb.org/mongo-driver/bson/primitive"
@ -81,6 +82,63 @@ func (this *modelActivityComp) updateActivitys(uid string, data *pb.DBActivityGi
// 每日礼包发货
func (this *modelActivityComp) delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
var (
info *pb.DBActivityGiftbag
item *pb.ActivityGiftbagItem
conf *cfg.GamePayGiftpackData
ok bool
err error
)
if conf, err = this.module.configure.getPayGiftpackDataByPid(pid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
if info, err = this.getUserActivitys(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
if item, ok = info.Activitys[conf.Type]; !ok {
item = &pb.ActivityGiftbagItem{
Opentime: 0,
Items: make(map[int32]*pb.PayDailyItem),
}
info.Activitys[conf.Type] = item
}
if _, ok = item.Items[conf.Id]; ok {
item.Items[conf.Id] = &pb.PayDailyItem{
Id: conf.Id,
}
return
}
item.Items[conf.Id].Buyunm++
if err = this.updateActivitys(session.GetUserId(), info); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
items = make([]*pb.UserAssets, len(conf.Item))
for i, v := range conf.Item {
items[i] = &pb.UserAssets{
A: v.A,
T: v.T,
N: v.N,
}
}
if errdata = this.module.DispenseRes(session, conf.Item, true); errdata != nil {
return
}
return
}

View File

@ -13,13 +13,13 @@ import (
"go.mongodb.org/mongo-driver/x/bsonx"
)
///每日礼包
// /每日礼包
type modelDailyComp struct {
modules.MCompModel
module *Pay
}
//组件初始化接口
// 组件初始化接口
func (this *modelDailyComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
this.MCompModel.Init(service, module, comp, opt)
this.module = module.(*Pay)
@ -31,7 +31,7 @@ func (this *modelDailyComp) Init(service core.IService, module core.IModule, com
return
}
//查询用户重置数据
// 查询用户重置数据
func (this *modelDailyComp) queryUserDaily(uId string) (result *pb.DBPayDaily, err error) {
result = &pb.DBPayDaily{
Uid: uId,
@ -46,7 +46,7 @@ func (this *modelDailyComp) queryUserDaily(uId string) (result *pb.DBPayDaily, e
return
}
//添加用户订单数据
// 添加用户订单数据
func (this *modelDailyComp) updateUserDaily(info *pb.DBPayDaily) (err error) {
if err = this.Change(info.Uid, map[string]interface{}{
"items": info.Items,
@ -57,7 +57,7 @@ func (this *modelDailyComp) updateUserDaily(info *pb.DBPayDaily) (err error) {
return
}
//每日礼包发货
// 每日礼包发货
func (this *modelDailyComp) delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
var (
info *pb.DBPayDaily
@ -83,11 +83,11 @@ func (this *modelDailyComp) delivery(session comm.IUserSession, pid string) (err
if info.Items[conf.Id] == nil {
info.Items[conf.Id] = &pb.PayDailyItem{
Id: conf.Id,
Buyunm: conf.BuyNum,
Buyunm: 0,
Lastrefresh: configure.Now().Unix(),
}
}
info.Items[conf.Id].Buyunm--
info.Items[conf.Id].Buyunm++
if err = this.updateUserDaily(info); err != nil {
return
}

View File

@ -18,7 +18,7 @@ type GameCirculateData struct {
OpenDesc string
Openingtime []int32
Time int32
Unlock int32
Unlock string
Floors int32
Fightevents []int32
TabIcon string
@ -58,7 +58,7 @@ func (_v *GameCirculateData)Deserialize(_buf map[string]interface{}) (err error)
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["unlock"].(float64); !_ok_ { err = errors.New("unlock error"); return }; _v.Unlock = int32(_tempNum_) }
{ var _ok_ bool; if _v.Unlock, _ok_ = _buf["unlock"].(string); !_ok_ { err = errors.New("unlock error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["floors"].(float64); !_ok_ { err = errors.New("floors error"); return }; _v.Floors = int32(_tempNum_) }
{
var _arr_ []interface{}

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

View 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 GamePayGiftpackData struct {
Id int32
Type int32
RepeatNum int32
Refreshtime int32
Packagetype string
BuyNum int32
Packagename string
Costitem []*Gameatn
Item []*Gameatn
}
const TypeId_GamePayGiftpackData = -2091023009
func (*GamePayGiftpackData) GetTypeId() int32 {
return -2091023009
}
func (_v *GamePayGiftpackData)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 _tempNum_ float64; if _tempNum_, _ok_ = _buf["repeat_num"].(float64); !_ok_ { err = errors.New("repeat_num error"); return }; _v.RepeatNum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["refreshtime"].(float64); !_ok_ { err = errors.New("refreshtime error"); return }; _v.Refreshtime = int32(_tempNum_) }
{ var _ok_ bool; if _v.Packagetype, _ok_ = _buf["packagetype"].(string); !_ok_ { err = errors.New("packagetype error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buy_num"].(float64); !_ok_ { err = errors.New("buy_num error"); return }; _v.BuyNum = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["packagename"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Packagename error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Packagename, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["costitem"].([]interface{}); !_ok_ { err = errors.New("costitem error"); return }
_v.Costitem = 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.Costitem = append(_v.Costitem, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["item"].([]interface{}); !_ok_ { err = errors.New("item error"); return }
_v.Item = 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.Item = append(_v.Item, _list_v_)
}
}
return
}
func DeserializeGamePayGiftpackData(_buf map[string]interface{}) (*GamePayGiftpackData, error) {
v := &GamePayGiftpackData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -103,6 +103,7 @@ type Tables struct {
HeroStrategy *GameHeroStrategy
FightGlobalEvent *GameFightGlobalEvent
PayPackage *GamePayPackage
PayGiftpack *GamePayGiftpack
WorldBattle *GameWorldBattle
PassCheck *GamePassCheck
Mail *GameMail
@ -747,6 +748,12 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.PayPackage, err = NewGamePayPackage(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_paygiftpack") ; err != nil {
return nil, err
}
if tables.PayGiftpack, err = NewGamePayGiftpack(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_worldbattle") ; err != nil {
return nil, err
}

View File

@ -217,6 +217,7 @@ type GameGlobalData struct {
BusinessRewardday int32
BusinessRenovatething int32
BusinessChange float32
BusinessWeek []int32
FavorabilityLikes int32
FavorabilityDislikes int32
BuzkashiTime int32
@ -876,6 +877,20 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["business_rewardday"].(float64); !_ok_ { err = errors.New("business_rewardday error"); return }; _v.BusinessRewardday = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["business_renovatething"].(float64); !_ok_ { err = errors.New("business_renovatething error"); return }; _v.BusinessRenovatething = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["business_change"].(float64); !_ok_ { err = errors.New("business_change error"); return }; _v.BusinessChange = float32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["business_week"].([]interface{}); !_ok_ { err = errors.New("business_week error"); return }
_v.BusinessWeek = 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.BusinessWeek = append(_v.BusinessWeek, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["favorability_likes"].(float64); !_ok_ { err = errors.New("favorability_likes error"); return }; _v.FavorabilityLikes = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["favorability_dislikes"].(float64); !_ok_ { err = errors.New("favorability_dislikes error"); return }; _v.FavorabilityDislikes = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buzkashi_time"].(float64); !_ok_ { err = errors.New("buzkashi_time error"); return }; _v.BuzkashiTime = int32(_tempNum_) }