上传代码

This commit is contained in:
meixiongfeng 2023-10-27 14:14:38 +08:00
parent 20521ee985
commit 9609b8e72a
8 changed files with 164 additions and 98 deletions

View File

@ -1,8 +1,14 @@
[
{
"key": "27000001",
"key": "51004",
"type": 1,
"herocolor": 1,
"hero": 51004,
"img": "tx_js_51004",
"intr": {
"key": "consume_consume_hero_intr_01",
"text": "豺狼小怪的三消英雄卡。"
},
"skillname": {
"key": "consume_consume_hero_skillname_01",
"text": "搜刮一空"
@ -11,7 +17,6 @@
"key": "consume_consume_hero_skilltxt_01",
"text": "随机消除7个方块"
},
"hero": 51004,
"consume": [],
"skilltype": 1,
"skillload": 6,
@ -19,9 +24,15 @@
"skillvalue": 7
},
{
"key": "27000002",
"key": "25001",
"type": 2,
"herocolor": 2,
"hero": 25001,
"img": "tx_js_51012",
"intr": {
"key": "consume_consume_hero_intr_02",
"text": "小猴子的三消英雄卡。"
},
"skillname": {
"key": "consume_consume_hero_skillname_02",
"text": "香蕉连成串"
@ -30,7 +41,6 @@
"key": "consume_consume_hero_skilltxt_02",
"text": "消除中间的一列宝石"
},
"hero": 25001,
"consume": [
{
"a": "attr",
@ -44,9 +54,15 @@
"skillvalue": 0
},
{
"key": "27000003",
"key": "13002",
"type": 2,
"herocolor": 3,
"hero": 13002,
"img": "tx_js_51012",
"intr": {
"key": "consume_consume_hero_intr_03",
"text": "食人鱼的三消英雄卡"
},
"skillname": {
"key": "consume_consume_hero_skillname_03",
"text": "臭屁四溢"
@ -55,7 +71,6 @@
"key": "consume_consume_hero_skilltxt_03",
"text": "玩家标记(选中)一个方块然后有100%的概率周围位置标记完毕后有60%概率继续标记周围位置然后30%概率标记周围位置最多蔓延4次,标记结束后,消除所有被标记的方块。"
},
"hero": 0,
"consume": [
{
"a": "attr",
@ -69,9 +84,15 @@
"skillvalue": 0
},
{
"key": "27000004",
"key": "33003",
"type": 2,
"herocolor": 4,
"hero": 33003,
"img": "tx_js_51012",
"intr": {
"key": "consume_consume_hero_intr_04",
"text": "胡德先生的三消英雄卡"
},
"skillname": {
"key": "consume_consume_hero_skillname_04",
"text": "拦路抢劫"
@ -80,7 +101,6 @@
"key": "consume_consume_hero_skilltxt_04",
"text": "选中一个方块,消除以该方块为中心,两条斜线上的所有方块(选中的方块也会被消除)。"
},
"hero": 0,
"consume": [
{
"a": "attr",
@ -94,9 +114,15 @@
"skillvalue": 0
},
{
"key": "27000005",
"key": "13005",
"type": 2,
"herocolor": 5,
"hero": 13005,
"img": "tx_js_51012",
"intr": {
"key": "consume_consume_hero_intr_05",
"text": "大大的三消英雄卡"
},
"skillname": {
"key": "consume_consume_hero_skillname_05",
"text": "劲爆小指头"
@ -105,7 +131,6 @@
"key": "consume_consume_hero_skilltxt_05",
"text": "随机用炸弹代替一个方块,并直接引爆炸弹(炸弹是特殊方块,这里就是用炸弹代替,然后直接消掉该炸弹)。"
},
"hero": 0,
"consume": [
{
"a": "attr",

View File

@ -17505,7 +17505,7 @@
"destroy": 1,
"progress": 0,
"stroyshow": 0,
"frontstoryid": 20200,
"frontstoryid": 202000,
"afterstoryid": 0,
"maingroupName": {
"key": "",
@ -17554,7 +17554,7 @@
"stage_param": 0,
"inherit": 0,
"battle_fail": 0,
"venturemodelspeed": 9,
"venturemodelspeed": 0,
"venturemodelscale": 1,
"move_type": 0,
"venturemodel": "Person/43002/43002_q.prefab",
@ -17580,8 +17580,8 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20201,
"afterstoryid": 20202,
"frontstoryid": 202010,
"afterstoryid": 202020,
"maingroupName": {
"key": "",
"text": ""
@ -17677,7 +17677,7 @@
"stage_param": 10001,
"inherit": 0,
"battle_fail": 0,
"venturemodelspeed": 0,
"venturemodelspeed": 9,
"venturemodelscale": 1,
"move_type": 0,
"venturemodel": "Person/yacht/yacht.prefab",
@ -17704,7 +17704,7 @@
"progress": 1,
"stroyshow": 0,
"frontstoryid": 0,
"afterstoryid": 0,
"afterstoryid": 202050,
"maingroupName": {
"key": "",
"text": ""
@ -17748,7 +17748,7 @@
"buried_type": 0,
"buried": 0,
"grouptype": [],
"Episodetype": 1,
"Episodetype": 3,
"stage_param": 0,
"inherit": 0,
"battle_fail": 0,
@ -17778,8 +17778,8 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20205,
"afterstoryid": 20207,
"frontstoryid": 0,
"afterstoryid": 0,
"maingroupName": {
"key": "",
"text": ""
@ -17837,10 +17837,8 @@
"n": 1
}
],
"BattleReadyID": 116,
"FormatList": [
103021
],
"BattleReadyID": 0,
"FormatList": [],
"helphero": [],
"banhero": [],
"star": [
@ -17901,8 +17899,8 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20208,
"afterstoryid": 20210,
"frontstoryid": 202070,
"afterstoryid": 0,
"maingroupName": {
"key": "",
"text": ""
@ -17962,7 +17960,7 @@
],
"BattleReadyID": 116,
"FormatList": [
103031
103021
],
"helphero": [],
"banhero": [],
@ -18024,8 +18022,8 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20211,
"afterstoryid": 20212,
"frontstoryid": 202080,
"afterstoryid": 202100,
"maingroupName": {
"key": "",
"text": ""
@ -18085,7 +18083,7 @@
],
"BattleReadyID": 116,
"FormatList": [
103041
103031
],
"helphero": [],
"banhero": [],
@ -18117,7 +18115,7 @@
"buried_type": 0,
"buried": 0,
"grouptype": [],
"Episodetype": 7,
"Episodetype": 1,
"stage_param": 0,
"inherit": 0,
"battle_fail": 0,
@ -18147,8 +18145,8 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20215,
"afterstoryid": 0,
"frontstoryid": 202110,
"afterstoryid": 202120,
"maingroupName": {
"key": "",
"text": ""
@ -18178,8 +18176,10 @@
],
"lotteryward": 0,
"commonaward": [],
"BattleReadyID": 0,
"FormatList": [],
"BattleReadyID": 116,
"FormatList": [
103041
],
"helphero": [],
"banhero": [],
"star": [],
@ -18198,7 +18198,7 @@
"buried_type": 0,
"buried": 0,
"grouptype": [],
"Episodetype": 7,
"Episodetype": 3,
"stage_param": 0,
"inherit": 0,
"battle_fail": 0,
@ -18228,7 +18228,7 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20217,
"frontstoryid": 202130,
"afterstoryid": 0,
"maingroupName": {
"key": "",
@ -18309,7 +18309,7 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20223,
"frontstoryid": 202150,
"afterstoryid": 0,
"maingroupName": {
"key": "",
@ -18368,10 +18368,8 @@
"n": 1
}
],
"BattleReadyID": 116,
"FormatList": [
103051
],
"BattleReadyID": 0,
"FormatList": [],
"helphero": [],
"banhero": [],
"star": [
@ -18402,8 +18400,8 @@
"buried_type": 0,
"buried": 0,
"grouptype": [],
"Episodetype": 1,
"stage_param": 0,
"Episodetype": 2,
"stage_param": 1,
"inherit": 0,
"battle_fail": 0,
"venturemodelspeed": 12,
@ -18491,10 +18489,8 @@
"n": 1
}
],
"BattleReadyID": 116,
"FormatList": [
103061
],
"BattleReadyID": 0,
"FormatList": [],
"helphero": [],
"banhero": [],
"star": [
@ -18525,7 +18521,7 @@
"buried_type": 0,
"buried": 0,
"grouptype": [],
"Episodetype": 7,
"Episodetype": 1,
"stage_param": 0,
"inherit": 0,
"battle_fail": 0,
@ -18555,7 +18551,7 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20229,
"frontstoryid": 202300,
"afterstoryid": 0,
"maingroupName": {
"key": "",
@ -18574,20 +18570,50 @@
"text": ""
},
"exp": 0,
"hero_exp": 0,
"ps_consume": [],
"ps_mg": [],
"hero_exp": 400,
"ps_consume": [
{
"a": "attr",
"t": "ps",
"n": 9
}
],
"ps_mg": [
{
"a": "attr",
"t": "ps",
"n": 1
}
],
"firstaward": [
{
"a": "attr",
"t": "gold",
"n": 8000
},
{
"a": "equi",
"t": "11613",
"n": 1
}
],
"lotteryward": 0,
"commonaward": [],
"BattleReadyID": 0,
"FormatList": [],
"lotteryward": 17111610,
"commonaward": [
{
"a": "attr",
"t": "gold",
"n": 8000
},
{
"a": "equi",
"t": "11623",
"n": 1
}
],
"BattleReadyID": 116,
"FormatList": [
103061
],
"helphero": [],
"banhero": [],
"star": [],
@ -18621,7 +18647,7 @@
"venturetype": 0,
"ventureavatar": [],
"scene_effect": [],
"scene_effectfilter": "",
"scene_effectfilter": "效果8",
"is_near": 0,
"openlevel": 1,
"EditorStage": 0,
@ -18636,8 +18662,8 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20230,
"afterstoryid": 20231,
"frontstoryid": 202310,
"afterstoryid": 202330,
"maingroupName": {
"key": "",
"text": ""
@ -18736,7 +18762,7 @@
"venturemodelspeed": 12,
"venturemodelscale": 1,
"move_type": 0,
"venturemodel": "Person/badcar/badcar.prefab",
"venturemodel": "Person/54016/54016_q.prefab",
"bubbletalk": {
"key": "",
"text": ""
@ -18759,8 +18785,8 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20232,
"afterstoryid": 20233,
"frontstoryid": 202320,
"afterstoryid": 202330,
"maingroupName": {
"key": "",
"text": ""
@ -18852,7 +18878,7 @@
"buried_type": 0,
"buried": 0,
"grouptype": [],
"Episodetype": 7,
"Episodetype": 3,
"stage_param": 0,
"inherit": 0,
"battle_fail": 0,
@ -18882,7 +18908,7 @@
"destroy": 1,
"progress": 1,
"stroyshow": 0,
"frontstoryid": 20236,
"frontstoryid": 202350,
"afterstoryid": 0,
"maingroupName": {
"key": "",

View File

@ -2,11 +2,11 @@
{
"id": 1,
"name": {
"key": "push_gift_name_1",
"key": "push_push_name_1",
"text": "英雄特惠礼包"
},
"title": {
"key": "push_push_1",
"key": "push_push_title_1",
"text": "月末狂欢,冰点特价"
},
"resource": "",
@ -30,11 +30,11 @@
{
"id": 2,
"name": {
"key": "push_gift_name_2",
"key": "push_push_name_2",
"text": "充值礼包"
},
"title": {
"key": "push_push_2",
"key": "push_push_title_2",
"text": "月末狂欢,冰点特价"
},
"resource": "",
@ -58,11 +58,11 @@
{
"id": 3,
"name": {
"key": "push_gift_name_3",
"key": "push_push_name_3",
"text": "月卡礼包"
},
"title": {
"key": "push_push_3",
"key": "push_push_title_3",
"text": "月末狂欢,冰点特价"
},
"resource": "",
@ -86,11 +86,11 @@
{
"id": 4,
"name": {
"key": "push_gift_name_4",
"key": "push_push_name_4",
"text": "累充礼包"
},
"title": {
"key": "push_push_4",
"key": "push_push_title_4",
"text": "月末狂欢,冰点特价"
},
"resource": "",
@ -114,11 +114,11 @@
{
"id": 5,
"name": {
"key": "push_gift_name_5",
"key": "push_push_name_5",
"text": "登陆礼包"
},
"title": {
"key": "push_push_5",
"key": "push_push_title_5",
"text": "月末狂欢,冰点特价"
},
"resource": "",
@ -142,11 +142,11 @@
{
"id": 6,
"name": {
"key": "push_gift_name_6",
"key": "push_push_name_6",
"text": "循环塔礼包"
},
"title": {
"key": "push_push_6",
"key": "push_push_title_6",
"text": "月末狂欢,冰点特价"
},
"resource": "",
@ -170,11 +170,11 @@
{
"id": 7,
"name": {
"key": "push_gift_name_7",
"key": "push_push_name_7",
"text": "种族塔礼包"
},
"title": {
"key": "push_push_7",
"key": "push_push_title_7",
"text": "月末狂欢,冰点特价"
},
"resource": "",

View File

@ -190,7 +190,7 @@
},
"type_id": 13000007,
"active": 10,
"jump_interface": 11012,
"jump_interface": 10013,
"icon": "wp_icon_0001",
"reword": [
{
@ -218,7 +218,7 @@
},
"type_id": 13000008,
"active": 10,
"jump_interface": 11012,
"jump_interface": 10013,
"icon": "wp_icon_0001",
"reword": [
{
@ -246,7 +246,7 @@
},
"type_id": 13000009,
"active": 10,
"jump_interface": 11012,
"jump_interface": 10013,
"icon": "wp_icon_0002",
"reword": [
{

View File

@ -21,15 +21,15 @@
],
"name": {
"key": "treasuremap_map_name_1",
"text": ""
"text": "原始人藏宝图"
},
"explain": {
"key": "treasuremap_map_explain_1",
"text": ""
"text": "原始人藏宝图"
},
"describe": {
"key": "treasuremap_map_desribe_1",
"text": ""
"text": "原始人藏宝图"
}
},
{

View File

@ -31,24 +31,25 @@ func (this *modelComp) Init(service core.IService, module core.IModule, comp cor
}
func (this *modelComp) getEntertainmList(uid string) (result *pb.DBXXLData, err error) {
var (
dbModel *db.DBModel
)
result = &pb.DBXXLData{}
if db.IsCross() {
if tag, _, b := utils.UIdSplit(uid); b {
if conn, err := db.ServerDBConn(tag); err == nil {
dbModel := db.NewDBModel(comm.TableEntertainm, conn)
if err = dbModel.Get(uid, result); err != nil {
if redis.RedisNil != err { // 没有数据直接创建新的数据
result.Id = primitive.NewObjectID().Hex()
result.Uid = uid
result.Reward = make(map[int32]int32)
result.Card = make(map[string]int32, 0)
}
}
dbModel = db.NewDBModel(comm.TableEntertainm, conn)
}
}
}
result = &pb.DBXXLData{}
if err = this.Get(uid, result); err != nil {
if dbModel == nil {
err = this.Get(uid, result)
} else {
err = dbModel.Get(uid, result)
}
if err != nil {
if redis.RedisNil != err { // 没有数据直接创建新的数据
result.Id = primitive.NewObjectID().Hex()
result.Uid = uid

View File

@ -63,6 +63,16 @@ func (this *Entertainment) AddXxlCard(session comm.IUserSession, cards map[strin
result *pb.DBXXLData
err error
)
for k := range cards {
if _, err := this.model.module.configure.GetGameConsumeHero(k); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
Message: err.Error(),
}
return
}
}
if result, err = this.model.getEntertainmList(session.GetUserId()); err != nil {
return
}

View File

@ -14,9 +14,11 @@ type GameConsumeHeroData struct {
Key string
Type int32
Herocolor int32
Hero int32
Img string
Intr string
Skillname string
Skilltxt string
Hero int32
Consume []*Gameatn
Skilltype int32
Skillload int32
@ -34,9 +36,11 @@ func (_v *GameConsumeHeroData)Deserialize(_buf map[string]interface{}) (err erro
{ var _ok_ bool; if _v.Key, _ok_ = _buf["key"].(string); !_ok_ { err = errors.New("key error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["herocolor"].(float64); !_ok_ { err = errors.New("herocolor error"); return }; _v.Herocolor = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hero"].(float64); !_ok_ { err = errors.New("hero error"); return }; _v.Hero = int32(_tempNum_) }
{ var _ok_ bool; if _v.Img, _ok_ = _buf["img"].(string); !_ok_ { err = errors.New("img error"); return } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["intr"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Intr error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Intr, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["skillname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Skillname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Skillname, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["skilltxt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Skilltxt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Skilltxt, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hero"].(float64); !_ok_ { err = errors.New("hero error"); return }; _v.Hero = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool