任务类型钻石消耗

This commit is contained in:
wh_zcy 2022-11-23 16:19:39 +08:00
parent bfce45a6a0
commit db0a261331
4 changed files with 7 additions and 2 deletions

View File

@ -461,7 +461,8 @@ const (
Rtype101 TaskType = 101 //获得X星职业武器N件历史(从创号开始记录每获得1件X星职业武器则进度+1)
Rtype102 TaskType = 102 //阵营饰品强化成功N次历史(从创号开始记录,强化成功进度+1)
Rtype103 TaskType = 103 //获得X星阵营饰品N件历史(从创号开始记录每获得1件X星阵营饰品则进度+1)
Rtype104 TaskType = 104 //消费N个钻石历史(从创号开始记录,每次消耗钻石增加消耗额的进度)
//消费N个钻石历史(从创号开始记录,每次消耗钻石增加消耗额的进度)
Rtype104 TaskType = 104
Rtype105 TaskType = 105 //商店刷新N次(从接到任务开始,每次刷新商店进度+1)
Rtype106 TaskType = 106 //跨服聊天发言N次(从接到任务开始,每次跨服发言成功进度+1)
Rtype107 TaskType = 107 //赠送N个人好感度(从接到任务开始每赠送1个好友好感度则进度+1)

View File

@ -302,6 +302,9 @@ func (this *ModuleBase) ConsumeRes(session comm.IUserSession, res []*cfg.Gameatn
return
}
this.Debugf("消耗玩家资源: %v", attrs)
if count,ok:= attrs[comm.ResDiamond];ok{
this.ModuleRtask.SendToRtask(session, comm.Rtype104, count)
}
}
if len(items) > 0 {
code = this.ModuleItems.AddItems(session, items, bPush)

View File

@ -26,6 +26,7 @@ func (this *ModelRtaskRecord) greatEqualFirstParam(cfg *cfg.GameRdtaskCondiData,
}
// 传递参数小于等于配置参数
// 适合只比较首个参数(一个参数)
func (this *ModelRtaskRecord) lessEqualFirstParam(cfg *cfg.GameRdtaskCondiData, vals ...int32) (condiId int32, err error) {
if ok, err1 := soLessEqual(vals[0], cfg.Data1); !ok {
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)

View File

@ -174,7 +174,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38,
comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53,
comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60,
comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72:
comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72,comm.Rtype104:
this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg,
find: this.modelRtaskRecord.lessEqualFirstParam,