Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2022-09-07 11:36:52 +08:00
commit 4bf64cc9df
5 changed files with 64 additions and 40 deletions

View File

@ -36,6 +36,10 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen
code = pb.ErrorCode_PagodaNotFound
return
}
if hunting.ChallengeCount > this.module.configure.GetGlobalConf().HuntingNum {
code = pb.ErrorCode_HuntingMaxChallengeCount
return
}
cfg := this.module.configure.GetHuntingBossConfigData(req.BossType, req.Difficulty)
if cfg == nil {
code = pb.ErrorCode_ConfigNoFound
@ -47,7 +51,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen
}
if value < req.Difficulty {
if value+1 != req.Difficulty {
code = pb.ErrorCode_VikingLvErr
code = pb.ErrorCode_HuntingLvErr
return
}
newChallenge = true
@ -64,7 +68,8 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen
}
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
//hunting.BossTime[] = 0
hunting.ChallengeCount++
mapData["challengeCount"] = hunting.ChallengeCount
code = this.module.ModifyHuntingData(session.GetUserId(), mapData)
// 发放通关随机奖励
this.module.configure.GetDropReward(cfg.Drop, reward) // 获取掉落奖励

View File

@ -48,10 +48,5 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.HuntingGetListRe
code = this.module.ModifyHuntingData(session.GetUserId(), mapData) //修改内存信息
}
session.SendMsg(string(this.module.GetType()), HuntingGetListResp, &pb.HuntingGetListResp{Data: list})
r := &pb.HuntingChallengeReq{
BossType: 1,
Difficulty: 0,
}
this.Challenge(session, r)
return
}

View File

@ -33,7 +33,12 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng
viking, err := this.module.modelViking.getVikingList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_PagodaNotFound
code = pb.ErrorCode_VikingBoosType
return
}
if viking.ChallengeCount > this.module.configure.GetGlobalConf().VikingNum {
code = pb.ErrorCode_VikingMaxChallengeCount
return
}
cfg := this.module.configure.GetVikingBossConfigData(req.BossType, req.Difficulty)
@ -64,7 +69,9 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng
}
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
//viking.ChallengeTime[req.BossType<<16+req.Difficulty] = 0
viking.ChallengeCount++
mapData["challengeCount"] = viking.ChallengeCount
code = this.module.ModifyVikingData(session.GetUserId(), mapData)
// 发放通关随机奖励
this.module.configure.GetDropReward(cfg.Drop, reward) // 获取掉落奖励
@ -72,7 +79,6 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng
return
}
//
mapRankData := make(map[string]interface{}, 0)
mapRankData["difficulty"] = req.Difficulty
mapRankData["bosstype"] = req.BossType

View File

@ -48,11 +48,5 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.VikingGetListReq
code = this.module.ModifyVikingData(session.GetUserId(), mapData) //修改内存信息
}
session.SendMsg(string(this.module.GetType()), VikingGetListResp, &pb.VikingGetListResp{Data: list})
r := &pb.VikingChallengeReq{
BossType: 1,
Difficulty: 1,
}
this.Challenge(session, r)
return
}

View File

@ -161,9 +161,10 @@ const (
ErrorCode_RtaskCondiNoReach ErrorCode = 2206 //未达到限定条件
ErrorCode_RtaskNoLastOne ErrorCode = 2207 //不是最后一个任务
// viking
ErrorCode_VikingLvErr ErrorCode = 2301 // 关卡难度不匹配
ErrorCode_VikingBoosType ErrorCode = 2302 // BOSS 类型不对
ErrorCode_VikingBuyMaxCount ErrorCode = 2303 // 购买达到最大次数
ErrorCode_VikingLvErr ErrorCode = 2301 // 关卡难度不匹配
ErrorCode_VikingBoosType ErrorCode = 2302 // BOSS 类型不对
ErrorCode_VikingBuyMaxCount ErrorCode = 2303 // 购买达到最大次数
ErrorCode_VikingMaxChallengeCount ErrorCode = 2304 // 挑战达到最大次数
// moonfantasy 月之秘境
ErrorCode_MoonfantasyHasExpired ErrorCode = 2401 // boos 连接已失效
ErrorCode_MoonfantasyJoinUp ErrorCode = 2402 // boos 参与人数已达上限
@ -175,6 +176,11 @@ const (
ErrorCode_LinestorySubTaskFinished ErrorCode = 2602 //子任务已完成
ErrorCode_LinestoryTaskDisabledEnter ErrorCode = 2603 //禁止进入
ErrorCode_LinestoryPreTaskNoFinished ErrorCode = 2604 //前置任务未完成
// hunting
ErrorCode_HuntingLvErr ErrorCode = 2701 // 关卡难度不匹配
ErrorCode_HuntingBoosType ErrorCode = 2702 // BOSS 类型不对
ErrorCode_HuntingBuyMaxCount ErrorCode = 2703 // 购买达到最大次数
ErrorCode_HuntingMaxChallengeCount ErrorCode = 2704 // 挑战达到最大次数
)
// Enum value maps for ErrorCode.
@ -307,6 +313,7 @@ var (
2301: "VikingLvErr",
2302: "VikingBoosType",
2303: "VikingBuyMaxCount",
2304: "VikingMaxChallengeCount",
2401: "MoonfantasyHasExpired",
2402: "MoonfantasyJoinUp",
2403: "MoonfantasyDareUp",
@ -317,6 +324,10 @@ var (
2602: "LinestorySubTaskFinished",
2603: "LinestoryTaskDisabledEnter",
2604: "LinestoryPreTaskNoFinished",
2701: "HuntingLvErr",
2702: "HuntingBoosType",
2703: "HuntingBuyMaxCount",
2704: "HuntingMaxChallengeCount",
}
ErrorCode_value = map[string]int32{
"Success": 0,
@ -446,6 +457,7 @@ var (
"VikingLvErr": 2301,
"VikingBoosType": 2302,
"VikingBuyMaxCount": 2303,
"VikingMaxChallengeCount": 2304,
"MoonfantasyHasExpired": 2401,
"MoonfantasyJoinUp": 2402,
"MoonfantasyDareUp": 2403,
@ -456,6 +468,10 @@ var (
"LinestorySubTaskFinished": 2602,
"LinestoryTaskDisabledEnter": 2603,
"LinestoryPreTaskNoFinished": 2604,
"HuntingLvErr": 2701,
"HuntingBoosType": 2702,
"HuntingBuyMaxCount": 2703,
"HuntingMaxChallengeCount": 2704,
}
)
@ -490,7 +506,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0xd0, 0x17, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xcf, 0x18, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -661,26 +677,34 @@ var file_errorcode_proto_rawDesc = []byte{
0x6e, 0x67, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xfd, 0x11, 0x12, 0x13, 0x0a, 0x0e, 0x56, 0x69,
0x6b, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfe, 0x11, 0x12,
0x16, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x10, 0xff, 0x11, 0x12, 0x1a, 0x0a, 0x15, 0x4d, 0x6f, 0x6f, 0x6e, 0x66,
0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x48, 0x61, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64,
0x10, 0xe1, 0x12, 0x12, 0x16, 0x0a, 0x11, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61,
0x73, 0x79, 0x4a, 0x6f, 0x69, 0x6e, 0x55, 0x70, 0x10, 0xe2, 0x12, 0x12, 0x16, 0x0a, 0x11, 0x4d,
0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x44, 0x61, 0x72, 0x65, 0x55, 0x70,
0x10, 0xe3, 0x12, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61,
0x73, 0x79, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x45, 0x6e, 0x64, 0x10, 0xe4, 0x12,
0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x57, 0x69, 0x6e, 0x10, 0xe5, 0x12, 0x12, 0x18, 0x0a,
0x13, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x10, 0xc5, 0x13, 0x12, 0x1a, 0x0a, 0x15, 0x4c, 0x69, 0x6e, 0x65, 0x73,
0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64,
0x10, 0xa9, 0x14, 0x12, 0x1d, 0x0a, 0x18, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79,
0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10,
0xaa, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54,
0x61, 0x73, 0x6b, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x65, 0x72,
0x10, 0xab, 0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79,
0x50, 0x72, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65,
0x64, 0x10, 0xac, 0x14, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x75, 0x6e, 0x74, 0x10, 0xff, 0x11, 0x12, 0x1c, 0x0a, 0x17, 0x56, 0x69, 0x6b, 0x69, 0x6e,
0x67, 0x4d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x10, 0x80, 0x12, 0x12, 0x1a, 0x0a, 0x15, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e,
0x74, 0x61, 0x73, 0x79, 0x48, 0x61, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x10, 0xe1,
0x12, 0x12, 0x16, 0x0a, 0x11, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79,
0x4a, 0x6f, 0x69, 0x6e, 0x55, 0x70, 0x10, 0xe2, 0x12, 0x12, 0x16, 0x0a, 0x11, 0x4d, 0x6f, 0x6f,
0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x44, 0x61, 0x72, 0x65, 0x55, 0x70, 0x10, 0xe3,
0x12, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79,
0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x45, 0x6e, 0x64, 0x10, 0xe4, 0x12, 0x12, 0x1b,
0x0a, 0x16, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x42, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x57, 0x69, 0x6e, 0x10, 0xe5, 0x12, 0x12, 0x18, 0x0a, 0x13, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x6f,
0x72, 0x64, 0x10, 0xc5, 0x13, 0x12, 0x1a, 0x0a, 0x15, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f,
0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xa9,
0x14, 0x12, 0x1d, 0x0a, 0x18, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75,
0x62, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xaa, 0x14,
0x12, 0x1f, 0x0a, 0x1a, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x73,
0x6b, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xab,
0x14, 0x12, 0x1f, 0x0a, 0x1a, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72,
0x65, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10,
0xac, 0x14, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x76, 0x45,
0x72, 0x72, 0x10, 0x8d, 0x15, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67,
0x42, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8e, 0x15, 0x12, 0x17, 0x0a, 0x12, 0x48,
0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x10, 0x8f, 0x15, 0x12, 0x1d, 0x0a, 0x18, 0x48, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4d,
0x61, 0x78, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x10, 0x90, 0x15, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (