diff --git a/comm/const.go b/comm/const.go index 8f00ce588..5ef705984 100644 --- a/comm/const.go +++ b/comm/const.go @@ -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) diff --git a/modules/modulebase.go b/modules/modulebase.go index 97136de46..e3b4bb115 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -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) diff --git a/modules/rtask/condiFindHandle.go b/modules/rtask/condiFindHandle.go index 839b41426..3930ee896 100644 --- a/modules/rtask/condiFindHandle.go +++ b/modules/rtask/condiFindHandle.go @@ -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) diff --git a/modules/rtask/module.go b/modules/rtask/module.go index 4b757921b..d57c569af 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -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,