上次代码

This commit is contained in:
meixiongfeng 2023-05-25 17:39:13 +08:00
parent d3f537f229
commit a6462bd0a1
2 changed files with 12 additions and 12 deletions

View File

@ -445,43 +445,43 @@ func (this *ModuleBase) DispenseRes(session comm.IUserSession, res []*cfg.Gameat
if len(attrs) > 0 { //用户属性资源
code = this.ModuleUser.AddAttributeValues(session, attrs, bPush)
this.Debugf("发放用户资源: %v [%v]", attrs, code)
this.Debugf("发放用户资源: %v code : [%v]", attrs, code)
}
if len(items) > 0 { //道具资源
_, code = this.ModuleItems.AddItems(session, items, bPush)
this.Debugf("发放道具资源: %v [%v]", items, code)
this.Debugf("发放道具资源: %v code : [%v]", items, code)
}
if len(heros) > 0 { //卡片资源
_, _, code = this.ModuleHero.CreateRepeatHeros(session, heros, bPush)
this.Debugf("发放英雄资源: %v [%v]", heros, code)
this.Debugf("发放英雄资源: %v code : [%v]", heros, code)
}
if len(equips) > 0 {
_, code = this.ModuleEquipment.AddNewEquipments(session, equips, bPush)
this.Debugf("发放装备资源: %v [%v]", equips, code)
this.Debugf("发放装备资源: %v code : [%v]", equips, code)
}
if len(vip) > 0 { //卡片资源
for k := range vip {
code, _ = this.ModulePrivilege.Delivery(session, k)
this.Debugf("发放月卡资源: %v [%v]", k, code)
this.Debugf("发放月卡资源: %v code : [%v]", k, code)
}
}
if len(atlas) > 0 {
for k := range atlas {
this.ModuleSmithy.CheckActivateAtlasCollect(session.GetUserId(), k)
this.Debugf("发放图鉴资源: %v [%v]", k, code)
this.Debugf("发放图鉴资源: %v code : [%v]", k, code)
}
}
if len(panda) > 0 {
code = this.ModulePractice.AddItems(session, panda, bPush)
this.Debugf("发放武馆资源: %v [%v]", panda, code)
this.Debugf("发放武馆资源: %v code : [%v]", panda, code)
}
if len(mts) > 0 {
code = this.ModuleParkour.AddMounts(session, mts, bPush)
this.Debugf("发放捕羊大赛资源: %v [%v]", mts, code)
this.Debugf("发放捕羊大赛资源: %v code : [%v]", mts, code)
}
if len(per) > 0 {
code = this.ModuleUser.AddPer(session, per, bPush)
this.Debugf("发放用户皮肤资源资源: %v [%v]", mts, code)
this.Debugf("发放用户皮肤资源资源: %v code : [%v]", mts, code)
}
return
}

View File

@ -405,15 +405,15 @@ func (this *ModuleRtask) CheckCondi(uid string, condiId int32, params ...int32)
return
}
func (this *ModuleRtask) CheckCondis(uid string, condiIds ...int32) (condIds []int32) {
func (this *ModuleRtask) CheckCondis(uid string, condiIds ...int32) (cids []int32) {
record := this.modelRtaskRecord.getRecord(uid)
if record == nil {
return
}
for _, condId := range condIds {
for _, condId := range condiIds {
if _, ok := this.modelRtask.checkCondi(uid, condId, record); ok {
condIds = append(condIds, condId)
cids = append(cids, condId)
}
}