This commit is contained in:
liwei1dao 2022-09-09 16:09:53 +08:00
commit 1b188b8db6
14 changed files with 742 additions and 273 deletions

View File

@ -28,9 +28,11 @@
],
"drop": 1001,
"bossmodel": 25001,
"boss1": 401001,
"boss2": 401002,
"boss3": 401003
"boss": [
401001,
401002,
401003
]
},
{
"id": 1002,
@ -66,9 +68,11 @@
],
"drop": 1002,
"bossmodel": 25001,
"boss1": 401004,
"boss2": 401005,
"boss3": 401006
"boss": [
401004,
401005,
401006
]
},
{
"id": 1003,
@ -109,9 +113,11 @@
],
"drop": 1003,
"bossmodel": 25001,
"boss1": 401007,
"boss2": 401008,
"boss3": 401009
"boss": [
401007,
401008,
401009
]
},
{
"id": 1004,
@ -152,9 +158,11 @@
],
"drop": 1004,
"bossmodel": 25001,
"boss1": 401010,
"boss2": 401011,
"boss3": 401012
"boss": [
401010,
401011,
401012
]
},
{
"id": 1005,
@ -195,9 +203,11 @@
],
"drop": 1005,
"bossmodel": 25001,
"boss1": 401013,
"boss2": 401014,
"boss3": 401015
"boss": [
401013,
401014,
401015
]
},
{
"id": 1006,
@ -238,9 +248,11 @@
],
"drop": 1006,
"bossmodel": 25001,
"boss1": 401016,
"boss2": 401017,
"boss3": 401018
"boss": [
401016,
401017,
401018
]
},
{
"id": 1007,
@ -281,9 +293,11 @@
],
"drop": 1007,
"bossmodel": 25001,
"boss1": 401019,
"boss2": 401020,
"boss3": 401021
"boss": [
401019,
401020,
401021
]
},
{
"id": 1008,
@ -324,9 +338,11 @@
],
"drop": 1008,
"bossmodel": 25001,
"boss1": 401022,
"boss2": 401023,
"boss3": 401024
"boss": [
401022,
401023,
401024
]
},
{
"id": 1009,
@ -367,9 +383,11 @@
],
"drop": 1009,
"bossmodel": 25001,
"boss1": 401025,
"boss2": 401026,
"boss3": 401027
"boss": [
401025,
401026,
401027
]
},
{
"id": 1010,
@ -410,9 +428,11 @@
],
"drop": 1010,
"bossmodel": 25001,
"boss1": 401028,
"boss2": 401029,
"boss3": 401030
"boss": [
401028,
401029,
401030
]
},
{
"id": 2001,
@ -443,9 +463,11 @@
],
"drop": 1011,
"bossmodel": 25004,
"boss1": 402001,
"boss2": 402002,
"boss3": 402003
"boss": [
402001,
402002,
402003
]
},
{
"id": 2002,
@ -481,9 +503,11 @@
],
"drop": 1012,
"bossmodel": 25004,
"boss1": 402004,
"boss2": 402005,
"boss3": 402006
"boss": [
402004,
402005,
402006
]
},
{
"id": 2003,
@ -524,9 +548,11 @@
],
"drop": 1013,
"bossmodel": 25004,
"boss1": 402007,
"boss2": 402008,
"boss3": 402009
"boss": [
402007,
402008,
402009
]
},
{
"id": 2004,
@ -567,9 +593,11 @@
],
"drop": 1014,
"bossmodel": 25004,
"boss1": 402010,
"boss2": 402011,
"boss3": 402012
"boss": [
402010,
402011,
402012
]
},
{
"id": 2005,
@ -610,9 +638,11 @@
],
"drop": 1015,
"bossmodel": 25004,
"boss1": 402013,
"boss2": 402014,
"boss3": 402015
"boss": [
402013,
402014,
402015
]
},
{
"id": 2006,
@ -653,9 +683,11 @@
],
"drop": 1016,
"bossmodel": 25004,
"boss1": 402016,
"boss2": 402017,
"boss3": 402018
"boss": [
402016,
402017,
402018
]
},
{
"id": 2007,
@ -696,9 +728,11 @@
],
"drop": 1017,
"bossmodel": 25004,
"boss1": 402019,
"boss2": 402020,
"boss3": 402021
"boss": [
402019,
402020,
402021
]
},
{
"id": 2008,
@ -739,9 +773,11 @@
],
"drop": 1018,
"bossmodel": 25004,
"boss1": 402022,
"boss2": 402023,
"boss3": 402024
"boss": [
402022,
402023,
402024
]
},
{
"id": 2009,
@ -782,9 +818,11 @@
],
"drop": 1019,
"bossmodel": 25004,
"boss1": 402025,
"boss2": 402026,
"boss3": 402027
"boss": [
402025,
402026,
402027
]
},
{
"id": 2010,
@ -825,9 +863,11 @@
],
"drop": 1020,
"bossmodel": 25004,
"boss1": 402028,
"boss2": 402029,
"boss3": 402030
"boss": [
402028,
402029,
402030
]
},
{
"id": 3001,
@ -858,9 +898,11 @@
],
"drop": 1021,
"bossmodel": 34006,
"boss1": 403001,
"boss2": 403002,
"boss3": 403003
"boss": [
403001,
403002,
403003
]
},
{
"id": 3002,
@ -896,9 +938,11 @@
],
"drop": 1022,
"bossmodel": 34006,
"boss1": 403004,
"boss2": 403005,
"boss3": 403006
"boss": [
403004,
403005,
403006
]
},
{
"id": 3003,
@ -939,9 +983,11 @@
],
"drop": 1023,
"bossmodel": 34006,
"boss1": 403007,
"boss2": 403008,
"boss3": 403009
"boss": [
403007,
403008,
403009
]
},
{
"id": 3004,
@ -982,9 +1028,11 @@
],
"drop": 1024,
"bossmodel": 34006,
"boss1": 403010,
"boss2": 403011,
"boss3": 403012
"boss": [
403010,
403011,
403012
]
},
{
"id": 3005,
@ -1025,9 +1073,11 @@
],
"drop": 1025,
"bossmodel": 34006,
"boss1": 403013,
"boss2": 403014,
"boss3": 403015
"boss": [
403013,
403014,
403015
]
},
{
"id": 3006,
@ -1068,9 +1118,11 @@
],
"drop": 1026,
"bossmodel": 34006,
"boss1": 403016,
"boss2": 403017,
"boss3": 403018
"boss": [
403016,
403017,
403018
]
},
{
"id": 3007,
@ -1111,9 +1163,11 @@
],
"drop": 1027,
"bossmodel": 34006,
"boss1": 403019,
"boss2": 403020,
"boss3": 403021
"boss": [
403019,
403020,
403021
]
},
{
"id": 3008,
@ -1154,9 +1208,11 @@
],
"drop": 1028,
"bossmodel": 34006,
"boss1": 403022,
"boss2": 403023,
"boss3": 403024
"boss": [
403022,
403023,
403024
]
},
{
"id": 3009,
@ -1197,9 +1253,11 @@
],
"drop": 1029,
"bossmodel": 34006,
"boss1": 403025,
"boss2": 403026,
"boss3": 403027
"boss": [
403025,
403026,
403027
]
},
{
"id": 3010,
@ -1240,9 +1298,11 @@
],
"drop": 1030,
"bossmodel": 34006,
"boss1": 403028,
"boss2": 403029,
"boss3": 403030
"boss": [
403028,
403029,
403030
]
},
{
"id": 4001,
@ -1273,9 +1333,11 @@
],
"drop": 1021,
"bossmodel": 35001,
"boss1": 404001,
"boss2": 404002,
"boss3": 404003
"boss": [
404001,
404002,
404003
]
},
{
"id": 4002,
@ -1311,9 +1373,11 @@
],
"drop": 1022,
"bossmodel": 35001,
"boss1": 404004,
"boss2": 404005,
"boss3": 404006
"boss": [
404004,
404005,
404006
]
},
{
"id": 4003,
@ -1354,9 +1418,11 @@
],
"drop": 1023,
"bossmodel": 35001,
"boss1": 404007,
"boss2": 404008,
"boss3": 404009
"boss": [
404007,
404008,
404009
]
},
{
"id": 4004,
@ -1397,9 +1463,11 @@
],
"drop": 1024,
"bossmodel": 35001,
"boss1": 404010,
"boss2": 404011,
"boss3": 404012
"boss": [
404010,
404011,
404012
]
},
{
"id": 4005,
@ -1440,9 +1508,11 @@
],
"drop": 1025,
"bossmodel": 35001,
"boss1": 404013,
"boss2": 404014,
"boss3": 404015
"boss": [
404013,
404014,
404015
]
},
{
"id": 4006,
@ -1483,9 +1553,11 @@
],
"drop": 1026,
"bossmodel": 35001,
"boss1": 404016,
"boss2": 404017,
"boss3": 404018
"boss": [
404016,
404017,
404018
]
},
{
"id": 4007,
@ -1526,9 +1598,11 @@
],
"drop": 1027,
"bossmodel": 35001,
"boss1": 404019,
"boss2": 404020,
"boss3": 404021
"boss": [
404019,
404020,
404021
]
},
{
"id": 4008,
@ -1569,9 +1643,11 @@
],
"drop": 1028,
"bossmodel": 35001,
"boss1": 404022,
"boss2": 404023,
"boss3": 404024
"boss": [
404022,
404023,
404024
]
},
{
"id": 4009,
@ -1612,9 +1688,11 @@
],
"drop": 1029,
"bossmodel": 35001,
"boss1": 404025,
"boss2": 404026,
"boss3": 404027
"boss": [
404025,
404026,
404027
]
},
{
"id": 4010,
@ -1655,8 +1733,10 @@
],
"drop": 1030,
"bossmodel": 35001,
"boss1": 404028,
"boss2": 404029,
"boss3": 404030
"boss": [
404028,
404029,
404030
]
}
]

View File

@ -5,6 +5,11 @@
"location": "middle",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "model_01",
"storyBegin": 1,
"chooseId": [
@ -23,6 +28,11 @@
"location": "middle",
"modelaction": "Enter",
"modelstate": 1,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "model_02",
"storyBegin": 4,
"chooseId": [
@ -51,6 +61,11 @@
"location": "middle",
"modelaction": "Run",
"modelstate": 2,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "model_03",
"storyBegin": 3,
"chooseId": [],
@ -66,6 +81,11 @@
"location": "middle",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "model_07",
"storyBegin": 16,
"chooseId": [],
@ -81,6 +101,11 @@
"location": "left",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "icon_01",
"storyBegin": 7,
"chooseId": [
@ -99,6 +124,11 @@
"location": "top",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "icon_02",
"storyBegin": 9,
"chooseId": [
@ -129,6 +159,11 @@
"location": "middle",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "model_01",
"storyBegin": 15,
"chooseId": [
@ -158,6 +193,11 @@
"location": "middle",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "model_02",
"storyBegin": 11,
"chooseId": [],
@ -173,6 +213,11 @@
"location": "middle",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "model_04",
"storyBegin": 12,
"chooseId": [],
@ -188,6 +233,11 @@
"location": "middle",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "model_05",
"storyBegin": 13,
"chooseId": [],
@ -203,6 +253,11 @@
"location": "middle",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "model_06",
"storyBegin": 14,
"chooseId": [],
@ -218,6 +273,11 @@
"location": "right",
"modelaction": "",
"modelstate": 0,
"rotation": {
"x": 0,
"y": -180,
"z": 0
},
"point": "icon_03",
"storyBegin": 17,
"chooseId": [

View File

@ -23,7 +23,7 @@
"sound": "",
"position": {
"x": 0,
"y": 0,
"y": 0.5,
"z": 0
},
"revolve": {

View File

@ -35,7 +35,7 @@
"type_id": 103,
"condition_second": 3,
"restrictive_condition": 0,
"active": 10,
"active": 15,
"id_after": 0,
"jump_interface": "mainworld",
"icon": "wp_icon_0001",
@ -49,7 +49,7 @@
"type_id": 103,
"condition_second": 4,
"restrictive_condition": 0,
"active": 10,
"active": 15,
"id_after": 0,
"jump_interface": "mainworld",
"icon": "wp_icon_0001",
@ -63,7 +63,7 @@
"type_id": 103,
"condition_second": 5,
"restrictive_condition": 0,
"active": 10,
"active": 15,
"id_after": 0,
"jump_interface": "mainworld",
"icon": "wp_icon_0001",
@ -77,7 +77,7 @@
"type_id": 103,
"condition_second": 6,
"restrictive_condition": 0,
"active": 10,
"active": 15,
"id_after": 0,
"jump_interface": "mainworld",
"icon": "wp_icon_0001",
@ -91,7 +91,7 @@
"type_id": 103,
"condition_second": 7,
"restrictive_condition": 0,
"active": 10,
"active": 15,
"id_after": 0,
"jump_interface": "mainworld",
"icon": "wp_icon_0001",
@ -105,7 +105,7 @@
"type_id": 103,
"condition_second": 8,
"restrictive_condition": 0,
"active": 10,
"active": 15,
"id_after": 0,
"jump_interface": "mainworld",
"icon": "wp_icon_0001",
@ -119,7 +119,7 @@
"type_id": 103,
"condition_second": 9,
"restrictive_condition": 0,
"active": 10,
"active": 15,
"id_after": 0,
"jump_interface": "mainworld",
"icon": "wp_icon_0001",
@ -133,7 +133,7 @@
"type_id": 103,
"condition_second": 10,
"restrictive_condition": 0,
"active": 10,
"active": 15,
"id_after": 0,
"jump_interface": "mainworld",
"icon": "wp_icon_0001",

View File

@ -11,7 +11,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -52,7 +53,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -98,7 +100,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -149,7 +152,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -200,7 +204,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -251,7 +256,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -302,7 +308,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -353,7 +360,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -404,7 +412,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -455,7 +464,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -506,7 +516,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -547,7 +558,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -593,7 +605,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -644,7 +657,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -695,7 +709,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -746,7 +761,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -797,7 +813,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -848,7 +865,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -899,7 +917,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -950,7 +969,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1001,7 +1021,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1042,7 +1063,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1088,7 +1110,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1139,7 +1162,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1190,7 +1214,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1241,7 +1266,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1292,7 +1318,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1343,7 +1370,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1394,7 +1422,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{
@ -1445,7 +1474,8 @@
25001,
25004,
34006,
11017
35001,
35002
],
"firstprize": [
{

View File

@ -28,10 +28,28 @@ func (this *apiComp) Del(session comm.IUserSession, req *pb.FriendDelReq) (code
return
}
friendIds := utils.DeleteString(self.FriendIds, req.FriendId)
// 从好友列表中删除
selfFriendIds := utils.DeleteString(self.FriendIds, req.FriendId)
if err := this.moduleFriend.modelFriend.Change(self.Uid, map[string]interface{}{
"friendIds": friendIds,
"friendIds": selfFriendIds,
}); err != nil {
log.Errorf("Del friend err:%v", err)
code = pb.ErrorCode_FriendApplyError
return
}
target := this.moduleFriend.modelFriend.GetFriend(req.FriendId)
if target == nil {
code = pb.ErrorCode_FriendNotSelf
return
}
// 将自己从对方好友列表中移除
targetFriendIds := utils.DeleteString(target.FriendIds, session.GetUserId())
if err := this.moduleFriend.modelFriend.Change(req.FriendId, map[string]interface{}{
"friendIds": targetFriendIds,
}); err != nil {
log.Errorf("Del friend err:%v", err)
code = pb.ErrorCode_FriendApplyError

View File

@ -7,12 +7,13 @@ import (
)
const (
HuntingGetListResp = "getlist"
HuntingChallengeResp = "challenge"
HuntingSkillLvResp = "skilllv"
HuntingGetRewardResp = "getreward"
HuntingBuyResp = "buy"
HuntingRankListResp = "ranklist"
HuntingGetListResp = "getlist"
HuntingChallengeResp = "challenge"
HuntingChallengeOverResp = "challengeover"
HuntingSkillLvResp = "skilllv"
HuntingGetRewardResp = "getreward"
HuntingBuyResp = "buy"
HuntingRankListResp = "ranklist"
)
type apiComp struct {

View File

@ -3,7 +3,6 @@ package hunting
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"google.golang.org/protobuf/proto"
)
@ -19,13 +18,7 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.HuntingCh
///挑战主线关卡
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallengeReq) (code pb.ErrorCode, data proto.Message) {
var (
mapData map[string]interface{}
newChallenge bool // 新的关卡
reward []*cfg.Gameatn
)
mapData = make(map[string]interface{}, 0)
reward = make([]*cfg.Gameatn, 0)
code = this.ChallengeCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
@ -40,8 +33,8 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen
code = pb.ErrorCode_HuntingMaxChallengeCount
return
}
cfg := this.module.configure.GetHuntingBossConfigData(req.BossType, req.Difficulty)
if cfg == nil {
cfgData := this.module.configure.GetHuntingBossConfigData(req.BossType, req.Difficulty)
if cfgData == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
@ -54,32 +47,26 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen
code = pb.ErrorCode_HuntingLvErr
return
}
newChallenge = true
}
if newChallenge { // 新关卡挑战通过 发放首通奖励
if code = this.module.DispenseRes(session, cfg.Firstprize, true); code != pb.ErrorCode_Success {
return
}
hunting.Boss[req.BossType] += 1
mapData["boss"] = hunting.Boss
//hunting.BossTime[] = 0 // todo 耗时
mapData["challengeTime"] = hunting.BossTime
this.module.modulerank.updatehuntingRankList(session, req.Difficulty, req.BossType)
}
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
hunting.ChallengeCount++
mapData["challengeCount"] = hunting.ChallengeCount
code = this.module.ModifyHuntingData(session.GetUserId(), mapData)
// 发放通关随机奖励
this.module.configure.GetDropReward(cfg.Drop, reward) // 获取掉落奖励
if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success {
code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
Ptype: pb.PlayType_moonfantasy,
Leadpos: req.Leadpos,
Teamids: req.Teamids,
Mformat: cfgData.Boss,
})
if code != pb.ErrorCode_Success {
return
}
session.SendMsg(string(this.module.GetType()), HuntingChallengeResp, &pb.VikingChallengeResp{Info: &pb.BattleInfo{
Id: record.Id,
Btype: record.Btype,
Ptype: record.Ptype,
RedCompId: record.RedCompId,
Redflist: record.Redflist,
BlueCompId: record.BlueCompId,
Buleflist: record.Buleflist,
}})
for k := range hunting.Boss {
hunting.Boss[k] += 1
}
session.SendMsg(string(this.module.GetType()), HuntingChallengeResp, &pb.HuntingChallengeResp{Data: hunting})
return
}

View File

@ -0,0 +1,85 @@
package hunting
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"google.golang.org/protobuf/proto"
)
//参数校验
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.HuntingChallengeOverReq) (code pb.ErrorCode) {
if req.BossType <= 0 && req.Difficulty > 0 {
code = pb.ErrorCode_ReqParameterError
return
}
return
}
///挑战主线关卡
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingChallengeOverReq) (code pb.ErrorCode, data proto.Message) {
var (
mapData map[string]interface{}
newChallenge bool // 新的关卡
reward []*cfg.Gameatn
)
mapData = make(map[string]interface{}, 0)
reward = make([]*cfg.Gameatn, 0)
code = this.ChallengeOverCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
hunting, err := this.module.modelHunting.getHuntingList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_PagodaNotFound
return
}
if hunting.ChallengeCount > this.module.configure.GetGlobalConf().HuntingNum+hunting.BuyCount {
code = pb.ErrorCode_HuntingMaxChallengeCount
return
}
cfg := this.module.configure.GetHuntingBossConfigData(req.BossType, req.Difficulty)
if cfg == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
value, ok := hunting.Boss[req.BossType]
if !ok { // 类型校验
hunting.Boss[req.BossType] = 0
}
if value < req.Difficulty {
if value+1 != req.Difficulty {
code = pb.ErrorCode_HuntingLvErr
return
}
newChallenge = true
}
if newChallenge { // 新关卡挑战通过 发放首通奖励
if code = this.module.DispenseRes(session, cfg.Firstprize, true); code != pb.ErrorCode_Success {
return
}
hunting.Boss[req.BossType] += 1
mapData["boss"] = hunting.Boss
//hunting.BossTime[] = 0 // todo 耗时
mapData["challengeTime"] = hunting.BossTime
this.module.modulerank.updatehuntingRankList(session, req.Difficulty, req.BossType)
}
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
hunting.ChallengeCount++
mapData["challengeCount"] = hunting.ChallengeCount
code = this.module.ModifyHuntingData(session.GetUserId(), mapData)
// 发放通关随机奖励
this.module.configure.GetDropReward(cfg.Drop, reward) // 获取掉落奖励
if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success {
return
}
for k := range hunting.Boss {
hunting.Boss[k] += 1
}
session.SendMsg(string(this.module.GetType()), HuntingChallengeOverResp, &pb.HuntingChallengeOverResp{Data: hunting})
return
}

View File

@ -2,6 +2,7 @@ package hunting
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
@ -13,6 +14,8 @@ type Hunting struct {
api *apiComp
configure *configureComp
modulerank *ModelRank
battle comm.IBattle
service base.IRPCXService
}
func NewModule() core.IModule {
@ -25,7 +28,18 @@ func (this *Hunting) GetType() core.M_Modules {
func (this *Hunting) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
this.service = service.(base.IRPCXService)
return
}
func (this *Hunting) Start() (err error) {
err = this.ModuleBase.Start()
var module core.IModule
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
return
}
this.battle = module.(comm.IBattle)
return
}

View File

@ -63,7 +63,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
return
}
viking.Boss[req.BossType] += 1
mapData["Boss"] = viking.Boss
mapData["boss"] = viking.Boss
if req.Report != nil && len(req.Report.Info.Redflist) > 0 {
sz := make([]*pb.LineUp, 5)

View File

@ -111,8 +111,10 @@ type HuntingChallengeReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BossType int32 `protobuf:"varint,1,opt,name=bossType,proto3" json:"bossType"` // boss 类型
Difficulty int32 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty"` // 难度
BossType int32 `protobuf:"varint,1,opt,name=bossType,proto3" json:"bossType"` // boos 类型
Difficulty int32 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty"` // 难度
Leadpos int32 `protobuf:"varint,3,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
Teamids []string `protobuf:"bytes,4,rep,name=teamids,proto3" json:"teamids"` //阵容信息
}
func (x *HuntingChallengeReq) Reset() {
@ -161,12 +163,26 @@ func (x *HuntingChallengeReq) GetDifficulty() int32 {
return 0
}
func (x *HuntingChallengeReq) GetLeadpos() int32 {
if x != nil {
return x.Leadpos
}
return 0
}
func (x *HuntingChallengeReq) GetTeamids() []string {
if x != nil {
return x.Teamids
}
return nil
}
type HuntingChallengeResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBHunting `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
Info *BattleInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
}
func (x *HuntingChallengeResp) Reset() {
@ -201,7 +217,118 @@ func (*HuntingChallengeResp) Descriptor() ([]byte, []int) {
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{3}
}
func (x *HuntingChallengeResp) GetData() *DBHunting {
func (x *HuntingChallengeResp) GetInfo() *BattleInfo {
if x != nil {
return x.Info
}
return nil
}
type HuntingChallengeOverReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BossType int32 `protobuf:"varint,1,opt,name=bossType,proto3" json:"bossType"` // boos 类型
Difficulty int32 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty"` // 难度
Report *BattleReport `protobuf:"bytes,3,opt,name=report,proto3" json:"report"` //战报
}
func (x *HuntingChallengeOverReq) Reset() {
*x = HuntingChallengeOverReq{}
if protoimpl.UnsafeEnabled {
mi := &file_hunting_hunting_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HuntingChallengeOverReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HuntingChallengeOverReq) ProtoMessage() {}
func (x *HuntingChallengeOverReq) ProtoReflect() protoreflect.Message {
mi := &file_hunting_hunting_msg_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HuntingChallengeOverReq.ProtoReflect.Descriptor instead.
func (*HuntingChallengeOverReq) Descriptor() ([]byte, []int) {
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{4}
}
func (x *HuntingChallengeOverReq) GetBossType() int32 {
if x != nil {
return x.BossType
}
return 0
}
func (x *HuntingChallengeOverReq) GetDifficulty() int32 {
if x != nil {
return x.Difficulty
}
return 0
}
func (x *HuntingChallengeOverReq) GetReport() *BattleReport {
if x != nil {
return x.Report
}
return nil
}
// 客户端通知服务器打赢了
type HuntingChallengeOverResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBHunting `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
}
func (x *HuntingChallengeOverResp) Reset() {
*x = HuntingChallengeOverResp{}
if protoimpl.UnsafeEnabled {
mi := &file_hunting_hunting_msg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HuntingChallengeOverResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HuntingChallengeOverResp) ProtoMessage() {}
func (x *HuntingChallengeOverResp) ProtoReflect() protoreflect.Message {
mi := &file_hunting_hunting_msg_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HuntingChallengeOverResp.ProtoReflect.Descriptor instead.
func (*HuntingChallengeOverResp) Descriptor() ([]byte, []int) {
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{5}
}
func (x *HuntingChallengeOverResp) GetData() *DBHunting {
if x != nil {
return x.Data
}
@ -220,7 +347,7 @@ type HuntingBuyReq struct {
func (x *HuntingBuyReq) Reset() {
*x = HuntingBuyReq{}
if protoimpl.UnsafeEnabled {
mi := &file_hunting_hunting_msg_proto_msgTypes[4]
mi := &file_hunting_hunting_msg_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -233,7 +360,7 @@ func (x *HuntingBuyReq) String() string {
func (*HuntingBuyReq) ProtoMessage() {}
func (x *HuntingBuyReq) ProtoReflect() protoreflect.Message {
mi := &file_hunting_hunting_msg_proto_msgTypes[4]
mi := &file_hunting_hunting_msg_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -246,7 +373,7 @@ func (x *HuntingBuyReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use HuntingBuyReq.ProtoReflect.Descriptor instead.
func (*HuntingBuyReq) Descriptor() ([]byte, []int) {
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{4}
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{6}
}
func (x *HuntingBuyReq) GetCount() int32 {
@ -267,7 +394,7 @@ type HuntingBuyResp struct {
func (x *HuntingBuyResp) Reset() {
*x = HuntingBuyResp{}
if protoimpl.UnsafeEnabled {
mi := &file_hunting_hunting_msg_proto_msgTypes[5]
mi := &file_hunting_hunting_msg_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -280,7 +407,7 @@ func (x *HuntingBuyResp) String() string {
func (*HuntingBuyResp) ProtoMessage() {}
func (x *HuntingBuyResp) ProtoReflect() protoreflect.Message {
mi := &file_hunting_hunting_msg_proto_msgTypes[5]
mi := &file_hunting_hunting_msg_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -293,7 +420,7 @@ func (x *HuntingBuyResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use HuntingBuyResp.ProtoReflect.Descriptor instead.
func (*HuntingBuyResp) Descriptor() ([]byte, []int) {
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{5}
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{7}
}
func (x *HuntingBuyResp) GetData() *DBHunting {
@ -316,7 +443,7 @@ type HuntingRankListReq struct {
func (x *HuntingRankListReq) Reset() {
*x = HuntingRankListReq{}
if protoimpl.UnsafeEnabled {
mi := &file_hunting_hunting_msg_proto_msgTypes[6]
mi := &file_hunting_hunting_msg_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -329,7 +456,7 @@ func (x *HuntingRankListReq) String() string {
func (*HuntingRankListReq) ProtoMessage() {}
func (x *HuntingRankListReq) ProtoReflect() protoreflect.Message {
mi := &file_hunting_hunting_msg_proto_msgTypes[6]
mi := &file_hunting_hunting_msg_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -342,7 +469,7 @@ func (x *HuntingRankListReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use HuntingRankListReq.ProtoReflect.Descriptor instead.
func (*HuntingRankListReq) Descriptor() ([]byte, []int) {
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{6}
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{8}
}
func (x *HuntingRankListReq) GetBoosType() int32 {
@ -370,7 +497,7 @@ type HuntingRankListResp struct {
func (x *HuntingRankListResp) Reset() {
*x = HuntingRankListResp{}
if protoimpl.UnsafeEnabled {
mi := &file_hunting_hunting_msg_proto_msgTypes[7]
mi := &file_hunting_hunting_msg_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -383,7 +510,7 @@ func (x *HuntingRankListResp) String() string {
func (*HuntingRankListResp) ProtoMessage() {}
func (x *HuntingRankListResp) ProtoReflect() protoreflect.Message {
mi := &file_hunting_hunting_msg_proto_msgTypes[7]
mi := &file_hunting_hunting_msg_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -396,7 +523,7 @@ func (x *HuntingRankListResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use HuntingRankListResp.ProtoReflect.Descriptor instead.
func (*HuntingRankListResp) Descriptor() ([]byte, []int) {
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{7}
return file_hunting_hunting_msg_proto_rawDescGZIP(), []int{9}
}
func (x *HuntingRankListResp) GetRanks() []*DBHuntingRank {
@ -412,35 +539,52 @@ var file_hunting_hunting_msg_proto_rawDesc = []byte{
0x0a, 0x19, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e,
0x67, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x68, 0x75, 0x6e,
0x74, 0x69, 0x6e, 0x67, 0x2f, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x62, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67,
0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x12, 0x48, 0x75,
0x6e, 0x74, 0x69, 0x6e, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a,
0x2e, 0x44, 0x42, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
0x22, 0x51, 0x0a, 0x13, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c,
0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54,
0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74,
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75,
0x6c, 0x74, 0x79, 0x22, 0x36, 0x0a, 0x14, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x68,
0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64,
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x48, 0x75,
0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x25, 0x0a, 0x0d, 0x48,
0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x22, 0x30, 0x0a, 0x0e, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13,
0x0a, 0x11, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x12, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x47, 0x65,
0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74,
0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x48, 0x75, 0x6e, 0x74,
0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x85, 0x01, 0x0a, 0x13, 0x48, 0x75,
0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65,
0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a,
0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x18, 0x0a,
0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69,
0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64,
0x73, 0x22, 0x37, 0x0a, 0x14, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c,
0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x7c, 0x0a, 0x17, 0x48, 0x75,
0x6e, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76,
0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70,
0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74,
0x79, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3a, 0x0a, 0x18, 0x48, 0x75, 0x6e, 0x74,
0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72,
0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x04,
0x64, 0x61, 0x74, 0x61, 0x22, 0x48, 0x0a, 0x12, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52,
0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f,
0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f,
0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x3b,
0x0a, 0x13, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67,
0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x64, 0x61, 0x74, 0x61, 0x22, 0x25, 0x0a, 0x0d, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42,
0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x30, 0x0a, 0x0e, 0x48,
0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a,
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42,
0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x48, 0x0a,
0x12, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x3b, 0x0a, 0x13, 0x48, 0x75, 0x6e, 0x74, 0x69,
0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24,
0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
0x44, 0x42, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72,
0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -455,29 +599,35 @@ func file_hunting_hunting_msg_proto_rawDescGZIP() []byte {
return file_hunting_hunting_msg_proto_rawDescData
}
var file_hunting_hunting_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_hunting_hunting_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_hunting_hunting_msg_proto_goTypes = []interface{}{
(*HuntingGetListReq)(nil), // 0: HuntingGetListReq
(*HuntingGetListResp)(nil), // 1: HuntingGetListResp
(*HuntingChallengeReq)(nil), // 2: HuntingChallengeReq
(*HuntingChallengeResp)(nil), // 3: HuntingChallengeResp
(*HuntingBuyReq)(nil), // 4: HuntingBuyReq
(*HuntingBuyResp)(nil), // 5: HuntingBuyResp
(*HuntingRankListReq)(nil), // 6: HuntingRankListReq
(*HuntingRankListResp)(nil), // 7: HuntingRankListResp
(*DBHunting)(nil), // 8: DBHunting
(*DBHuntingRank)(nil), // 9: DBHuntingRank
(*HuntingGetListReq)(nil), // 0: HuntingGetListReq
(*HuntingGetListResp)(nil), // 1: HuntingGetListResp
(*HuntingChallengeReq)(nil), // 2: HuntingChallengeReq
(*HuntingChallengeResp)(nil), // 3: HuntingChallengeResp
(*HuntingChallengeOverReq)(nil), // 4: HuntingChallengeOverReq
(*HuntingChallengeOverResp)(nil), // 5: HuntingChallengeOverResp
(*HuntingBuyReq)(nil), // 6: HuntingBuyReq
(*HuntingBuyResp)(nil), // 7: HuntingBuyResp
(*HuntingRankListReq)(nil), // 8: HuntingRankListReq
(*HuntingRankListResp)(nil), // 9: HuntingRankListResp
(*DBHunting)(nil), // 10: DBHunting
(*BattleInfo)(nil), // 11: BattleInfo
(*BattleReport)(nil), // 12: BattleReport
(*DBHuntingRank)(nil), // 13: DBHuntingRank
}
var file_hunting_hunting_msg_proto_depIdxs = []int32{
8, // 0: HuntingGetListResp.data:type_name -> DBHunting
8, // 1: HuntingChallengeResp.data:type_name -> DBHunting
8, // 2: HuntingBuyResp.data:type_name -> DBHunting
9, // 3: HuntingRankListResp.ranks:type_name -> DBHuntingRank
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
10, // 0: HuntingGetListResp.data:type_name -> DBHunting
11, // 1: HuntingChallengeResp.info:type_name -> BattleInfo
12, // 2: HuntingChallengeOverReq.report:type_name -> BattleReport
10, // 3: HuntingChallengeOverResp.data:type_name -> DBHunting
10, // 4: HuntingBuyResp.data:type_name -> DBHunting
13, // 5: HuntingRankListResp.ranks:type_name -> DBHuntingRank
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_hunting_hunting_msg_proto_init() }
@ -486,6 +636,7 @@ func file_hunting_hunting_msg_proto_init() {
return
}
file_hunting_hunting_db_proto_init()
file_battle_battle_msg_proto_init()
if !protoimpl.UnsafeEnabled {
file_hunting_hunting_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HuntingGetListReq); i {
@ -536,7 +687,7 @@ func file_hunting_hunting_msg_proto_init() {
}
}
file_hunting_hunting_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HuntingBuyReq); i {
switch v := v.(*HuntingChallengeOverReq); i {
case 0:
return &v.state
case 1:
@ -548,7 +699,7 @@ func file_hunting_hunting_msg_proto_init() {
}
}
file_hunting_hunting_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HuntingBuyResp); i {
switch v := v.(*HuntingChallengeOverResp); i {
case 0:
return &v.state
case 1:
@ -560,7 +711,7 @@ func file_hunting_hunting_msg_proto_init() {
}
}
file_hunting_hunting_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HuntingRankListReq); i {
switch v := v.(*HuntingBuyReq); i {
case 0:
return &v.state
case 1:
@ -572,6 +723,30 @@ func file_hunting_hunting_msg_proto_init() {
}
}
file_hunting_hunting_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HuntingBuyResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_hunting_hunting_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HuntingRankListReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_hunting_hunting_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HuntingRankListResp); i {
case 0:
return &v.state
@ -590,7 +765,7 @@ func file_hunting_hunting_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_hunting_hunting_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumMessages: 10,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -19,9 +19,7 @@ type GameHuntingBossData struct {
Dropshow []*Gameatn
Drop int32
Bossmodel int32
Boss1 int32
Boss2 int32
Boss3 int32
Boss []int32
}
const TypeId_GameHuntingBossData = -450881718
@ -65,9 +63,20 @@ func (_v *GameHuntingBossData)Deserialize(_buf map[string]interface{}) (err erro
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["drop"].(float64); !_ok_ { err = errors.New("drop error"); return }; _v.Drop = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["bossmodel"].(float64); !_ok_ { err = errors.New("bossmodel error"); return }; _v.Bossmodel = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["boss1"].(float64); !_ok_ { err = errors.New("boss1 error"); return }; _v.Boss1 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["boss2"].(float64); !_ok_ { err = errors.New("boss2 error"); return }; _v.Boss2 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["boss3"].(float64); !_ok_ { err = errors.New("boss3 error"); return }; _v.Boss3 = int32(_tempNum_) }
{
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
}

View File

@ -9,6 +9,7 @@
package cfg
import "errors"
import "bright/serialization"
type GameRdtaskSideData struct {
Id int32
@ -16,6 +17,7 @@ type GameRdtaskSideData struct {
Location string
Modelaction string
Modelstate int32
Rotation serialization.Vector3
Point string
StoryBegin int32
ChooseId []int32
@ -38,6 +40,14 @@ func (_v *GameRdtaskSideData)Deserialize(_buf map[string]interface{}) (err error
{ var _ok_ bool; if _v.Location, _ok_ = _buf["location"].(string); !_ok_ { err = errors.New("location error"); return } }
{ var _ok_ bool; if _v.Modelaction, _ok_ = _buf["modelaction"].(string); !_ok_ { err = errors.New("modelaction error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["modelstate"].(float64); !_ok_ { err = errors.New("modelstate error"); return }; _v.Modelstate = int32(_tempNum_) }
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["rotation"].(map[string]interface{}); !_ok_ { err = errors.New("rotation error"); return }
var _x_, _y_, _z_ float32;
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
_v.Rotation = serialization.NewVector3(_x_, _y_, _z_)
}
{ var _ok_ bool; if _v.Point, _ok_ = _buf["point"].(string); !_ok_ { err = errors.New("point error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["storyBegin"].(float64); !_ok_ { err = errors.New("storyBegin error"); return }; _v.StoryBegin = int32(_tempNum_) }
{