上传代码
This commit is contained in:
parent
67cce21c5e
commit
d966496fd2
120
bin/json/game_puggsyevent.json
Normal file
120
bin/json/game_puggsyevent.json
Normal file
@ -0,0 +1,120 @@
|
||||
[
|
||||
{
|
||||
"event": 1001,
|
||||
"node_id": 1,
|
||||
"type": 1,
|
||||
"value": 0,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"event": 1002,
|
||||
"node_id": 1,
|
||||
"type": 2,
|
||||
"value": 0,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"event": 1003,
|
||||
"node_id": 1,
|
||||
"type": 2,
|
||||
"value": 0,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"event": 1004,
|
||||
"node_id": 1,
|
||||
"type": 3,
|
||||
"value": 0,
|
||||
"reward": []
|
||||
},
|
||||
{
|
||||
"event": 1005,
|
||||
"node_id": 1,
|
||||
"type": 4,
|
||||
"value": 0,
|
||||
"reward": []
|
||||
},
|
||||
{
|
||||
"event": 1006,
|
||||
"node_id": 1,
|
||||
"type": 1,
|
||||
"value": 0,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"event": 1007,
|
||||
"node_id": 1,
|
||||
"type": 2,
|
||||
"value": 0,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"event": 1008,
|
||||
"node_id": 1,
|
||||
"type": 2,
|
||||
"value": 0,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"event": 1009,
|
||||
"node_id": 1,
|
||||
"type": 3,
|
||||
"value": 0,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"event": 1010,
|
||||
"node_id": 1,
|
||||
"type": 4,
|
||||
"value": 0,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
127
bin/json/game_puggsyfight.json
Normal file
127
bin/json/game_puggsyfight.json
Normal file
@ -0,0 +1,127 @@
|
||||
[
|
||||
{
|
||||
"boss_id": 810301,
|
||||
"boss_name": {
|
||||
"key": "guild_guild_boss_boss_name_1",
|
||||
"text": "胡德先生"
|
||||
},
|
||||
"boss_text": {
|
||||
"key": "guild_guild_boss_boss_name_1",
|
||||
"text": "他是一名懦弱的战士"
|
||||
},
|
||||
"BattleReadyID": 11706001,
|
||||
"heroId": "33003",
|
||||
"skill": [
|
||||
155005111,
|
||||
155005211,
|
||||
155005311
|
||||
],
|
||||
"boss": [
|
||||
810301
|
||||
]
|
||||
},
|
||||
{
|
||||
"boss_id": 810302,
|
||||
"boss_name": {
|
||||
"key": "guild_guild_boss_boss_name_2",
|
||||
"text": "胡德先生"
|
||||
},
|
||||
"boss_text": {
|
||||
"key": "guild_guild_boss_boss_name_2",
|
||||
"text": "他是一名懦弱的战士"
|
||||
},
|
||||
"BattleReadyID": 11706001,
|
||||
"heroId": "33003",
|
||||
"skill": [
|
||||
155007111,
|
||||
155007211,
|
||||
155007311
|
||||
],
|
||||
"boss": [
|
||||
810302
|
||||
]
|
||||
},
|
||||
{
|
||||
"boss_id": 810303,
|
||||
"boss_name": {
|
||||
"key": "guild_guild_boss_boss_name_3",
|
||||
"text": "胡德先生"
|
||||
},
|
||||
"boss_text": {
|
||||
"key": "guild_guild_boss_boss_name_3",
|
||||
"text": "他是一名懦弱的战士"
|
||||
},
|
||||
"BattleReadyID": 11706001,
|
||||
"heroId": "33003",
|
||||
"skill": [
|
||||
155006111,
|
||||
155006211,
|
||||
155006311
|
||||
],
|
||||
"boss": [
|
||||
810303
|
||||
]
|
||||
},
|
||||
{
|
||||
"boss_id": 810304,
|
||||
"boss_name": {
|
||||
"key": "guild_guild_boss_boss_name_4",
|
||||
"text": "胡德先生"
|
||||
},
|
||||
"boss_text": {
|
||||
"key": "guild_guild_boss_boss_name_4",
|
||||
"text": "他是一名懦弱的战士"
|
||||
},
|
||||
"BattleReadyID": 11706001,
|
||||
"heroId": "33003",
|
||||
"skill": [
|
||||
155005111,
|
||||
155005211,
|
||||
155005311
|
||||
],
|
||||
"boss": [
|
||||
810304
|
||||
]
|
||||
},
|
||||
{
|
||||
"boss_id": 810305,
|
||||
"boss_name": {
|
||||
"key": "guild_guild_boss_boss_name_5",
|
||||
"text": "胡德先生"
|
||||
},
|
||||
"boss_text": {
|
||||
"key": "guild_guild_boss_boss_name_5",
|
||||
"text": "他是一名懦弱的战士"
|
||||
},
|
||||
"BattleReadyID": 11706001,
|
||||
"heroId": "33003",
|
||||
"skill": [
|
||||
155005111,
|
||||
155005211,
|
||||
155005311
|
||||
],
|
||||
"boss": [
|
||||
810305
|
||||
]
|
||||
},
|
||||
{
|
||||
"boss_id": 810306,
|
||||
"boss_name": {
|
||||
"key": "guild_guild_boss_boss_name_6",
|
||||
"text": "胡德先生"
|
||||
},
|
||||
"boss_text": {
|
||||
"key": "guild_guild_boss_boss_name_6",
|
||||
"text": "他是一名懦弱的战士"
|
||||
},
|
||||
"BattleReadyID": 11706001,
|
||||
"heroId": "33003",
|
||||
"skill": [
|
||||
125001111,
|
||||
125001211
|
||||
],
|
||||
"boss": [
|
||||
810306
|
||||
]
|
||||
}
|
||||
]
|
200
bin/json/game_puggsyisland.json
Normal file
200
bin/json/game_puggsyisland.json
Normal file
@ -0,0 +1,200 @@
|
||||
[
|
||||
{
|
||||
"node_id": 1,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_1",
|
||||
"text": "伯克岛"
|
||||
},
|
||||
"time": [
|
||||
0
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_1",
|
||||
"text": "{0}可航行至伯克岛"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_1",
|
||||
"text": "航行抵达伯克岛"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 2,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_2",
|
||||
"text": "伯克岛"
|
||||
},
|
||||
"time": [
|
||||
0
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_2",
|
||||
"text": "{0}可航行至伯克岛"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_2",
|
||||
"text": "航行抵达伯克岛"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 3,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_3",
|
||||
"text": "伯克岛"
|
||||
},
|
||||
"time": [
|
||||
0
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_3",
|
||||
"text": "{0}可航行至伯克岛"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_3",
|
||||
"text": "航行抵达伯克岛"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 4,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_4",
|
||||
"text": "伯克岛"
|
||||
},
|
||||
"time": [
|
||||
0
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_4",
|
||||
"text": "{0}可航行至伯克岛"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_4",
|
||||
"text": "航行抵达伯克岛"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 5,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_5",
|
||||
"text": "伯克岛"
|
||||
},
|
||||
"time": [
|
||||
0
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_5",
|
||||
"text": "{0}可航行至伯克岛"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_5",
|
||||
"text": "航行抵达伯克岛"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 6,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_6",
|
||||
"text": "战栗海岸"
|
||||
},
|
||||
"time": [
|
||||
3
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_6",
|
||||
"text": "{0}可航行至战栗海岸"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_6",
|
||||
"text": "航行抵达战栗海岸"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 7,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_7",
|
||||
"text": "战栗海岸"
|
||||
},
|
||||
"time": [
|
||||
3
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_7",
|
||||
"text": "{0}可航行至战栗海岸"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_7",
|
||||
"text": "航行抵达战栗海岸"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 8,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_8",
|
||||
"text": "战栗海岸"
|
||||
},
|
||||
"time": [
|
||||
3
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_8",
|
||||
"text": "{0}可航行至战栗海岸"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_8",
|
||||
"text": "航行抵达战栗海岸"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 9,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_9",
|
||||
"text": "维京海峡"
|
||||
},
|
||||
"time": [
|
||||
6
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_9",
|
||||
"text": "{0}可航行至维京海峡"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_9",
|
||||
"text": "航行抵达维京海峡"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 10,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_10",
|
||||
"text": "维京海峡"
|
||||
},
|
||||
"time": [
|
||||
6
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_10",
|
||||
"text": "{0}可航行至维京海峡"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_10",
|
||||
"text": "航行抵达维京海峡"
|
||||
}
|
||||
},
|
||||
{
|
||||
"node_id": 11,
|
||||
"puggsy_name": {
|
||||
"key": "guild_guild_boss_boss_name_11",
|
||||
"text": "维京海峡"
|
||||
},
|
||||
"time": [
|
||||
6
|
||||
],
|
||||
"unlock": {
|
||||
"key": "guild_guild_boss_boss_name_11",
|
||||
"text": "{0}可航行至维京海峡"
|
||||
},
|
||||
"introduce": {
|
||||
"key": "guild_guild_boss_boss_name_11",
|
||||
"text": "航行抵达维京海峡"
|
||||
}
|
||||
}
|
||||
]
|
223
bin/json/game_puggsyscore.json
Normal file
223
bin/json/game_puggsyscore.json
Normal file
@ -0,0 +1,223 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 0,
|
||||
"rank_up": 19999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 20000,
|
||||
"rank_up": 49999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 50000,
|
||||
"rank_up": 79999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 80000,
|
||||
"rank_up": 99999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 100000,
|
||||
"rank_up": 149999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 150000,
|
||||
"rank_up": 199999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 200000,
|
||||
"rank_up": 249999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 250000,
|
||||
"rank_up": 319999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 320000,
|
||||
"rank_up": 399999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 400000,
|
||||
"rank_up": 499999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 500000,
|
||||
"rank_up": 599999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 600000,
|
||||
"rank_up": 699999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 700000,
|
||||
"rank_up": 999999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 1000000,
|
||||
"rank_up": 1199999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 1200000,
|
||||
"rank_up": 1599999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 1600000,
|
||||
"rank_up": 3799999,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"boss_id": 810301,
|
||||
"rank_low": 3800000,
|
||||
"rank_up": -1,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "starcoin",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
2700
bin/json/game_puggsyskill.json
Normal file
2700
bin/json/game_puggsyskill.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -26,15 +26,15 @@ func (this *apiComp) BattleCheck(session comm.IUserSession, req *pb.IsLandBattle
|
||||
// /获取系统公告
|
||||
func (this *apiComp) Battle(session comm.IUserSession, req *pb.IsLandBattleReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
conf *cfg.GameHeroupstoryChapterData
|
||||
bconf *cfg.GameHeroupstoryBattleData
|
||||
conf *cfg.GamePuggsyEventData
|
||||
bconf *cfg.GamePuggsyFightData
|
||||
record *pb.DBBattleRecord
|
||||
err error
|
||||
)
|
||||
if errdata = this.BattleCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
if conf, err = this.module.configure.getGameHeroupstoryChapter(req.Level); err != nil {
|
||||
if conf, err = this.module.configure.getGamePuggsyEventData(req.Level); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
@ -42,7 +42,7 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.IsLandBattleReq)
|
||||
}
|
||||
return
|
||||
}
|
||||
if bconf, err = this.module.configure.getGameHeroupstoryBattle(conf.Battle); err != nil {
|
||||
if bconf, err = this.module.configure.getGamePuggsyFightData(conf.Value); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
@ -54,7 +54,7 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.IsLandBattleReq)
|
||||
Rulesid: bconf.BattleReadyID,
|
||||
Ptype: pb.PlayType_rtask,
|
||||
Format: req.Battle,
|
||||
Mformat: bconf.FormatList,
|
||||
Mformat: bconf.Boss,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
// 参数校验
|
||||
@ -17,18 +17,18 @@ func (this *apiComp) CompleteCheck(session comm.IUserSession, req *pb.IsLandComp
|
||||
func (this *apiComp) Complete(session comm.IUserSession, req *pb.IsLandCompleteReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
info *pb.DBIsland
|
||||
conf *cfg.GamePuggsyEventData
|
||||
sconf *cfg.GamePuggsyScoreData
|
||||
item *pb.DBIslandItem
|
||||
award []*pb.UserAtno
|
||||
ok bool
|
||||
iswin bool
|
||||
isfish bool
|
||||
err error
|
||||
)
|
||||
if errdata = this.CompleteCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if conf, err = this.module.configure.getGameHeroupstoryChapter(req.Level); err != nil {
|
||||
if conf, err = this.module.configure.getGamePuggsyEventData(req.Level); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
@ -46,48 +46,29 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.IsLandCompleteR
|
||||
return
|
||||
}
|
||||
|
||||
if item, ok = info.Item[conf.Hero]; !ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: fmt.Sprintf("no activation hero:%d", conf.Hero),
|
||||
if item, ok = info.Islands[conf.NodeId]; !ok {
|
||||
item = &pb.DBIslandItem{
|
||||
Id: conf.NodeId,
|
||||
Level: make(map[int32]int32),
|
||||
}
|
||||
info.Islands[conf.NodeId] = item
|
||||
return
|
||||
}
|
||||
//前置判断
|
||||
if conf.Onlevel != 0 && item.Level[conf.Onlevel] == 0 {
|
||||
|
||||
if _, ok = item.Level[req.Level]; ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: fmt.Sprintf("%d onlevel no Complete", req.Level),
|
||||
Message: fmt.Sprintf("level:%d done!", req.Level),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//前置判断
|
||||
if len(conf.Onlevelstory) == 2 && item.Level[conf.Onlevelstory[0]] == conf.Onlevelstory[1] {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: fmt.Sprintf("%d onlevel no Complete", req.Level),
|
||||
}
|
||||
if conf.Type == 2 { //战斗管卡
|
||||
if errdata, _ = this.module.battle.CheckBattleReport(session, req.Report); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if conf.Leveltype != 1 && item.Level[req.Level] != 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: fmt.Sprintf("%d received", req.Level),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if item.Level[req.Level] != 0 {
|
||||
isfish = true
|
||||
}
|
||||
|
||||
if chapterconf, err = this.module.configure.getGameHeroupstoryChaptertxt(conf.Chapter); err != nil {
|
||||
if sconf, err = this.module.configure.getGamePuggsyScoreData(req.Report.Harm); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
@ -95,61 +76,20 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.IsLandCompleteR
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if conf.Leveltype == 1 { //剧情关卡
|
||||
item.Level[req.Level] = req.Story
|
||||
} else if conf.Leveltype == 2 { //战斗管卡
|
||||
if errdata, iswin = this.module.battle.CheckBattleReport(session, req.Report); errdata != nil {
|
||||
return
|
||||
}
|
||||
if !iswin {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: "battle no win!",
|
||||
}
|
||||
return
|
||||
}
|
||||
item.Level[req.Level] = 1
|
||||
} else if conf.Leveltype == 4 {
|
||||
item.Level[req.Level] = 1
|
||||
item.Chapter[conf.Chapter] = configure.Now().Unix()
|
||||
} else if conf.Leveltype == 5 {
|
||||
if req.Report != nil {
|
||||
if errdata, iswin = this.module.battle.CheckBattleReport(session, req.Report); errdata != nil {
|
||||
if errdata, award = this.module.DispenseAtno(session, sconf.Reward, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
if !iswin {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: "battle no win!",
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
item.Level[req.Level] = 1
|
||||
} else {
|
||||
item.Level[req.Level] = 1
|
||||
}
|
||||
|
||||
if !isfish {
|
||||
if errdata = this.module.DispenseRes(session, conf.Reward, true); errdata != nil {
|
||||
if errdata, award = this.module.DispenseAtno(session, conf.Reward, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
award = make([]*pb.UserAssets, 0)
|
||||
for _, v := range conf.Reward {
|
||||
award = append(award, &pb.UserAssets{
|
||||
A: v.A,
|
||||
T: v.T,
|
||||
N: v.N,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
this.module.model.Change(session.GetUserId(), map[string]interface{}{
|
||||
"islands": info.Islands,
|
||||
})
|
||||
session.SendMsg(string(this.module.GetType()), "complete", &pb.StorylineCompleteResp{Level: req.Level, Story: req.Story, Award: award})
|
||||
session.SendMsg(string(this.module.GetType()), "complete", &pb.IsLandCompleteResp{Level: req.Level, Award: award})
|
||||
return
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package island
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/modules"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
|
||||
@ -9,11 +10,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
game_item = "game_item.json"
|
||||
game_potions = "game_potions.json"
|
||||
|
||||
// game_propsgroup = "game_propsgroup.json"
|
||||
// game_propsgrouplist = "game_propsgrouplist.json"
|
||||
game_puggsyevent = "game_puggsyevent.json"
|
||||
game_puggsyskill = "game_puggsyskill.json"
|
||||
game_puggsyfight = "game_puggsyfight.json"
|
||||
game_puggsyscore = "game_puggsyscore.json"
|
||||
)
|
||||
|
||||
// /背包配置管理组件
|
||||
@ -26,22 +26,24 @@ type ConfigureComp struct {
|
||||
func (this *ConfigureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.MCompConfigure.Init(service, module, comp, options)
|
||||
this.module = module.(*IsLand)
|
||||
err = this.LoadConfigure(game_item, cfg.NewGameItem)
|
||||
err = this.LoadConfigure(game_potions, cfg.NewGamePotions)
|
||||
err = this.LoadConfigure(game_puggsyevent, cfg.NewGamePuggsyEvent)
|
||||
err = this.LoadConfigure(game_puggsyskill, cfg.NewGamePuggsySkill)
|
||||
err = this.LoadConfigure(game_puggsyfight, cfg.NewGamePuggsyFight)
|
||||
err = this.LoadConfigure(game_puggsyscore, cfg.NewGamePuggsyScore)
|
||||
return
|
||||
}
|
||||
|
||||
// 读取物品配置
|
||||
func (this *ConfigureComp) GetMaterialConfigure(id int32) (configure *cfg.GamePotionsData, err error) {
|
||||
//关卡
|
||||
func (this *ConfigureComp) getGamePuggsyEventData(id int32) (configure *cfg.GamePuggsyEventData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_potions); err != nil {
|
||||
if v, err = this.GetConfigure(game_puggsyevent); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
} else {
|
||||
if configure, ok = v.(*cfg.GamePotions).GetDataMap()[id]; !ok {
|
||||
if configure, ok = v.(*cfg.GamePuggsyEvent).GetDataMap()[id]; !ok {
|
||||
err = fmt.Errorf("no found Material:%d configure", id)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
@ -49,3 +51,62 @@ func (this *ConfigureComp) GetMaterialConfigure(id int32) (configure *cfg.GamePo
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//战斗表
|
||||
func (this *ConfigureComp) getGamePuggsyFightData(id int32) (configure *cfg.GamePuggsyFightData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_puggsyfight); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
} else {
|
||||
if configure, ok = v.(*cfg.GamePuggsyFight).GetDataMap()[id]; !ok {
|
||||
err = fmt.Errorf("no found Material:%d configure", id)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//技能节点
|
||||
func (this *ConfigureComp) getGamePuggsySkillData(id int32) (configure *cfg.GamePuggsySkillData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_puggsyskill); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
} else {
|
||||
if configure, ok = v.(*cfg.GamePuggsySkill).GetDataMap()[id]; !ok {
|
||||
err = fmt.Errorf("no found Material:%d configure", id)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 获取伤害对应的评分组
|
||||
func (this *ConfigureComp) getGamePuggsyScoreData(harm int32) (results *cfg.GamePuggsyScoreData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
)
|
||||
|
||||
if v, err = this.GetConfigure(game_puggsyscore); err != nil {
|
||||
return
|
||||
} else {
|
||||
for _, v := range v.(*cfg.GamePuggsyScore).GetDataList() {
|
||||
if harm >= v.RankLow && (harm <= v.RankUp || v.RankUp == -1) {
|
||||
results = v
|
||||
return
|
||||
}
|
||||
}
|
||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_puggsyscore, fmt.Sprintf(" harm%d", harm))
|
||||
this.module.Errorf("err:%v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
42
sys/configure/structs/Game.PuggsyEvent.go
Normal file
42
sys/configure/structs/Game.PuggsyEvent.go
Normal file
@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
type GamePuggsyEvent struct {
|
||||
_dataMap map[int32]*GamePuggsyEventData
|
||||
_dataList []*GamePuggsyEventData
|
||||
}
|
||||
|
||||
func NewGamePuggsyEvent(_buf []map[string]interface{}) (*GamePuggsyEvent, error) {
|
||||
_dataList := make([]*GamePuggsyEventData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GamePuggsyEventData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGamePuggsyEventData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Event] = _v
|
||||
}
|
||||
}
|
||||
return &GamePuggsyEvent{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GamePuggsyEvent) GetDataMap() map[int32]*GamePuggsyEventData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GamePuggsyEvent) GetDataList() []*GamePuggsyEventData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GamePuggsyEvent) Get(key int32) *GamePuggsyEventData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
56
sys/configure/structs/Game.PuggsyEventData.go
Normal file
56
sys/configure/structs/Game.PuggsyEventData.go
Normal file
@ -0,0 +1,56 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GamePuggsyEventData struct {
|
||||
Event int32
|
||||
NodeId int32
|
||||
Type int32
|
||||
Value int32
|
||||
Reward []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_GamePuggsyEventData = 1772460253
|
||||
|
||||
func (*GamePuggsyEventData) GetTypeId() int32 {
|
||||
return 1772460253
|
||||
}
|
||||
|
||||
func (_v *GamePuggsyEventData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["event"].(float64); !_ok_ { err = errors.New("event error"); return }; _v.Event = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["node_id"].(float64); !_ok_ { err = errors.New("node_id error"); return }; _v.NodeId = 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["value"].(float64); !_ok_ { err = errors.New("value error"); return }; _v.Value = 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 DeserializeGamePuggsyEventData(_buf map[string]interface{}) (*GamePuggsyEventData, error) {
|
||||
v := &GamePuggsyEventData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.PuggsyFight.go
Normal file
42
sys/configure/structs/Game.PuggsyFight.go
Normal file
@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
type GamePuggsyFight struct {
|
||||
_dataMap map[int32]*GamePuggsyFightData
|
||||
_dataList []*GamePuggsyFightData
|
||||
}
|
||||
|
||||
func NewGamePuggsyFight(_buf []map[string]interface{}) (*GamePuggsyFight, error) {
|
||||
_dataList := make([]*GamePuggsyFightData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GamePuggsyFightData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGamePuggsyFightData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.BossId] = _v
|
||||
}
|
||||
}
|
||||
return &GamePuggsyFight{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GamePuggsyFight) GetDataMap() map[int32]*GamePuggsyFightData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GamePuggsyFight) GetDataList() []*GamePuggsyFightData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GamePuggsyFight) Get(key int32) *GamePuggsyFightData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
73
sys/configure/structs/Game.PuggsyFightData.go
Normal file
73
sys/configure/structs/Game.PuggsyFightData.go
Normal file
@ -0,0 +1,73 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GamePuggsyFightData struct {
|
||||
BossId int32
|
||||
BossName string
|
||||
BossText string
|
||||
BattleReadyID int32
|
||||
HeroId string
|
||||
Skill []int32
|
||||
Boss []int32
|
||||
}
|
||||
|
||||
const TypeId_GamePuggsyFightData = 386540371
|
||||
|
||||
func (*GamePuggsyFightData) GetTypeId() int32 {
|
||||
return 386540371
|
||||
}
|
||||
|
||||
func (_v *GamePuggsyFightData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["boss_id"].(float64); !_ok_ { err = errors.New("boss_id error"); return }; _v.BossId = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["boss_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.BossName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.BossName, _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["boss_text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.BossText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.BossText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { err = errors.New("BattleReadyID error"); return }; _v.BattleReadyID = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.HeroId, _ok_ = _buf["heroId"].(string); !_ok_ { err = errors.New("heroId error"); return } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["skill"].([]interface{}); !_ok_ { err = errors.New("skill error"); return }
|
||||
|
||||
_v.Skill = 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.Skill = append(_v.Skill, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["boss"].([]interface{}); !_ok_ { err = errors.New("boss error"); return }
|
||||
|
||||
_v.Boss = 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.Boss = append(_v.Boss, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGamePuggsyFightData(_buf map[string]interface{}) (*GamePuggsyFightData, error) {
|
||||
v := &GamePuggsyFightData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.PuggsyIsLand.go
Normal file
42
sys/configure/structs/Game.PuggsyIsLand.go
Normal file
@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
type GamePuggsyIsLand struct {
|
||||
_dataMap map[int32]*GamePuggsyIsLandData
|
||||
_dataList []*GamePuggsyIsLandData
|
||||
}
|
||||
|
||||
func NewGamePuggsyIsLand(_buf []map[string]interface{}) (*GamePuggsyIsLand, error) {
|
||||
_dataList := make([]*GamePuggsyIsLandData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GamePuggsyIsLandData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGamePuggsyIsLandData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.NodeId] = _v
|
||||
}
|
||||
}
|
||||
return &GamePuggsyIsLand{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GamePuggsyIsLand) GetDataMap() map[int32]*GamePuggsyIsLandData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GamePuggsyIsLand) GetDataList() []*GamePuggsyIsLandData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GamePuggsyIsLand) Get(key int32) *GamePuggsyIsLandData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
56
sys/configure/structs/Game.PuggsyIsLandData.go
Normal file
56
sys/configure/structs/Game.PuggsyIsLandData.go
Normal file
@ -0,0 +1,56 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GamePuggsyIsLandData struct {
|
||||
NodeId int32
|
||||
PuggsyName string
|
||||
Time []int32
|
||||
Unlock string
|
||||
Introduce string
|
||||
}
|
||||
|
||||
const TypeId_GamePuggsyIsLandData = 36699942
|
||||
|
||||
func (*GamePuggsyIsLandData) GetTypeId() int32 {
|
||||
return 36699942
|
||||
}
|
||||
|
||||
func (_v *GamePuggsyIsLandData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["node_id"].(float64); !_ok_ { err = errors.New("node_id error"); return }; _v.NodeId = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["puggsy_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PuggsyName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PuggsyName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["time"].([]interface{}); !_ok_ { err = errors.New("time error"); return }
|
||||
|
||||
_v.Time = 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.Time = append(_v.Time, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["unlock"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Unlock error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Unlock, _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["introduce"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Introduce error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Introduce, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGamePuggsyIsLandData(_buf map[string]interface{}) (*GamePuggsyIsLandData, error) {
|
||||
v := &GamePuggsyIsLandData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.PuggsyScore.go
Normal file
42
sys/configure/structs/Game.PuggsyScore.go
Normal file
@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
type GamePuggsyScore struct {
|
||||
_dataMap map[int32]*GamePuggsyScoreData
|
||||
_dataList []*GamePuggsyScoreData
|
||||
}
|
||||
|
||||
func NewGamePuggsyScore(_buf []map[string]interface{}) (*GamePuggsyScore, error) {
|
||||
_dataList := make([]*GamePuggsyScoreData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GamePuggsyScoreData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGamePuggsyScoreData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GamePuggsyScore{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GamePuggsyScore) GetDataMap() map[int32]*GamePuggsyScoreData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GamePuggsyScore) GetDataList() []*GamePuggsyScoreData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GamePuggsyScore) Get(key int32) *GamePuggsyScoreData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
56
sys/configure/structs/Game.PuggsyScoreData.go
Normal file
56
sys/configure/structs/Game.PuggsyScoreData.go
Normal file
@ -0,0 +1,56 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GamePuggsyScoreData struct {
|
||||
Id int32
|
||||
BossId int32
|
||||
RankLow int32
|
||||
RankUp int32
|
||||
Reward []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_GamePuggsyScoreData = -424957739
|
||||
|
||||
func (*GamePuggsyScoreData) GetTypeId() int32 {
|
||||
return -424957739
|
||||
}
|
||||
|
||||
func (_v *GamePuggsyScoreData)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["boss_id"].(float64); !_ok_ { err = errors.New("boss_id error"); return }; _v.BossId = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rank_low"].(float64); !_ok_ { err = errors.New("rank_low error"); return }; _v.RankLow = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rank_up"].(float64); !_ok_ { err = errors.New("rank_up error"); return }; _v.RankUp = 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 DeserializeGamePuggsyScoreData(_buf map[string]interface{}) (*GamePuggsyScoreData, error) {
|
||||
v := &GamePuggsyScoreData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.PuggsySkill.go
Normal file
42
sys/configure/structs/Game.PuggsySkill.go
Normal file
@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
type GamePuggsySkill struct {
|
||||
_dataMap map[int32]*GamePuggsySkillData
|
||||
_dataList []*GamePuggsySkillData
|
||||
}
|
||||
|
||||
func NewGamePuggsySkill(_buf []map[string]interface{}) (*GamePuggsySkill, error) {
|
||||
_dataList := make([]*GamePuggsySkillData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GamePuggsySkillData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGamePuggsySkillData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GamePuggsySkill{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GamePuggsySkill) GetDataMap() map[int32]*GamePuggsySkillData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GamePuggsySkill) GetDataList() []*GamePuggsySkillData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GamePuggsySkill) Get(key int32) *GamePuggsySkillData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
100
sys/configure/structs/Game.PuggsySkillData.go
Normal file
100
sys/configure/structs/Game.PuggsySkillData.go
Normal file
@ -0,0 +1,100 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GamePuggsySkillData struct {
|
||||
Id int32
|
||||
NodeId int32
|
||||
Front []int32
|
||||
NodeType int32
|
||||
PreNode int32
|
||||
NodeDirection int32
|
||||
NodeLong int32
|
||||
Name string
|
||||
Comicon string
|
||||
Lv int32
|
||||
CostItem []*Gameatn
|
||||
AddGroup int32
|
||||
AddClassify int32
|
||||
Upgrade []*Gameatr
|
||||
}
|
||||
|
||||
const TypeId_GamePuggsySkillData = -562741996
|
||||
|
||||
func (*GamePuggsySkillData) GetTypeId() int32 {
|
||||
return -562741996
|
||||
}
|
||||
|
||||
func (_v *GamePuggsySkillData)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["node_id"].(float64); !_ok_ { err = errors.New("node_id error"); return }; _v.NodeId = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["front"].([]interface{}); !_ok_ { err = errors.New("front error"); return }
|
||||
|
||||
_v.Front = 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.Front = append(_v.Front, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["node_type"].(float64); !_ok_ { err = errors.New("node_type error"); return }; _v.NodeType = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pre_node"].(float64); !_ok_ { err = errors.New("pre_node error"); return }; _v.PreNode = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["node_direction"].(float64); !_ok_ { err = errors.New("node_direction error"); return }; _v.NodeDirection = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["node_long"].(float64); !_ok_ { err = errors.New("node_long error"); return }; _v.NodeLong = 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.Comicon, _ok_ = _buf["comicon"].(string); !_ok_ { err = errors.New("comicon error"); return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["lv"].(float64); !_ok_ { err = errors.New("lv error"); return }; _v.Lv = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["cost_item"].([]interface{}); !_ok_ { err = errors.New("cost_item 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 _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["AddGroup"].(float64); !_ok_ { err = errors.New("AddGroup error"); return }; _v.AddGroup = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["AddClassify"].(float64); !_ok_ { err = errors.New("AddClassify error"); return }; _v.AddClassify = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["upgrade"].([]interface{}); !_ok_ { err = errors.New("upgrade error"); return }
|
||||
|
||||
_v.Upgrade = make([]*Gameatr, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ *Gameatr
|
||||
{ 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 = DeserializeGameatr(_x_); err != nil { return } }
|
||||
_v.Upgrade = append(_v.Upgrade, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGamePuggsySkillData(_buf map[string]interface{}) (*GamePuggsySkillData, error) {
|
||||
v := &GamePuggsySkillData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
@ -283,6 +283,11 @@ type Tables struct {
|
||||
RepeatAll *GameRepeatAll
|
||||
TDMonster *GameTDMonster
|
||||
TDMonsterAppear *GameTDMonsterAppear
|
||||
PuggsyIsLand *GamePuggsyIsLand
|
||||
PuggsyEvent *GamePuggsyEvent
|
||||
PuggsyFight *GamePuggsyFight
|
||||
PuggsyScore *GamePuggsyScore
|
||||
PuggsySkill *GamePuggsySkill
|
||||
}
|
||||
|
||||
func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
@ -1922,5 +1927,35 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.TDMonsterAppear, err = NewGameTDMonsterAppear(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_puggsyisland") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.PuggsyIsLand, err = NewGamePuggsyIsLand(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_puggsyevent") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.PuggsyEvent, err = NewGamePuggsyEvent(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_puggsyfight") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.PuggsyFight, err = NewGamePuggsyFight(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_puggsyscore") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.PuggsyScore, err = NewGamePuggsyScore(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_puggsyskill") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.PuggsySkill, err = NewGamePuggsySkill(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return tables, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user