This commit is contained in:
wh_zcy 2023-04-28 21:20:04 +08:00
parent ec82443fec
commit d401f2135f
41 changed files with 51 additions and 47 deletions

View File

@ -50,7 +50,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
} }
this.module.DispenseRes(session, level.Award, true) this.module.DispenseRes(session, level.Award, true)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype151, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype151, 1))
} }
session.SendMsg(string(this.module.GetType()), "receive", &pb.AcademyReceiveResp{Issucc: true}) session.SendMsg(string(this.module.GetType()), "receive", &pb.AcademyReceiveResp{Issucc: true})
return return

View File

@ -40,7 +40,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
Tasks: record.Tasks, Tasks: record.Tasks,
}}) }})
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype130, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype130, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype130, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype130, 1))
} else { } else {
session.SendMsg(string(this.module.GetType()), "challenge", &pb.ArenaChallengeResp{Code: cd, Info: nil}) session.SendMsg(string(this.module.GetType()), "challenge", &pb.ArenaChallengeResp{Code: cd, Info: nil})
} }

View File

@ -62,7 +62,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
bulestate = pb.BattleRecordState_DefendLost bulestate = pb.BattleRecordState_DefendLost
} }
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype131, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype131, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype131, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype131, 1))
} else { } else {
if req.Revengeid != "" { if req.Revengeid != "" {
redstate = pb.BattleRecordState_RevengeFailed redstate = pb.BattleRecordState_RevengeFailed

View File

@ -139,7 +139,7 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
for _, v := range req.Format.Friendformat { for _, v := range req.Format.Friendformat {
if v != "" { if v != "" {
// this.ModuleRtask.SendToRtask(session, comm.Rtype108, 1) // this.ModuleRtask.SendToRtask(session, comm.Rtype108, 1)
go this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype108, 1)) this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype108, 1))
break break
} }
} }
@ -249,7 +249,7 @@ func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLP
for _, v := range req.Format.Friendformat { for _, v := range req.Format.Friendformat {
if v != "" { if v != "" {
// this.ModuleRtask.SendToRtask(session, comm.Rtype108, 1) // this.ModuleRtask.SendToRtask(session, comm.Rtype108, 1)
go this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype108, 1)) this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype108, 1))
break break
} }
} }
@ -378,7 +378,7 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt
this.moonfantasy.Trigger(session, report) this.moonfantasy.Trigger(session, report)
for _, v := range report.Completetask { for _, v := range report.Completetask {
// this.ModuleRtask.SendToRtask(session, comm.Rtype157, int32(report.Info.Ptype), v) // this.ModuleRtask.SendToRtask(session, comm.Rtype157, int32(report.Info.Ptype), v)
go this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype157, int32(report.Info.Ptype), v)) this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype157, int32(report.Info.Ptype), v))
} }
return pb.ErrorCode_Success, true return pb.ErrorCode_Success, true
} }

View File

@ -21,6 +21,6 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
} }
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype153, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype153, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype153, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype153, 1))
return return
} }

View File

@ -75,7 +75,7 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (code
} }
go this.module.modelChat.sendChatToWorld(msg, max_chat) go this.module.modelChat.sendChatToWorld(msg, max_chat)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype62, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype62, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype62, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype62, 1))
//随机任务 //随机任务
// if _, err = this.service.AcrossClusterRpcGo( // if _, err = this.service.AcrossClusterRpcGo(
// context.Background(), // context.Background(),
@ -117,7 +117,7 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (code
go this.module.modelChat.sendChatToCrossServer(msg, max_chat) go this.module.modelChat.sendChatToCrossServer(msg, max_chat)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype106, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype106, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype106, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype106, 1))
break break
default: default:
code = pb.ErrorCode_ReqParameterError code = pb.ErrorCode_ReqParameterError

View File

@ -91,7 +91,7 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC
lv.Pass = true lv.Pass = true
this.module.DispenseRes(session, level.Award, true) this.module.DispenseRes(session, level.Award, true)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype140, 1, level.Id) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype140, 1, level.Id)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype140, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype140, 1))
} }
lv.Progress = int32((float64(len(lv.Passmanster)+len(lv.Passdrop)) / float64(len(level.Passdroplist)+len(level.PassformatList))) * float64(100)) lv.Progress = int32((float64(len(lv.Passmanster)+len(lv.Passdrop)) / float64(len(level.Passdroplist)+len(level.PassformatList))) * float64(100))
if err = this.module.modelCombat.updateInfo(info); err != nil { if err = this.module.modelCombat.updateInfo(info); err != nil {

View File

@ -100,7 +100,7 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (cod
lv.Pass = true lv.Pass = true
this.module.DispenseRes(session, level.Award, true) this.module.DispenseRes(session, level.Award, true)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype140, 1, level.Id) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype140, 1, level.Id)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype140, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype140, 1))
} }
lv.Progress = int32((float64(len(lv.Passmanster)+len(lv.Passdrop)) / float64(len(level.Passdroplist)+len(level.PassformatList))) * float64(100)) lv.Progress = int32((float64(len(lv.Passmanster)+len(lv.Passdrop)) / float64(len(level.Passdroplist)+len(level.PassformatList))) * float64(100))
if err = this.module.modelCombat.updateInfo(info); err != nil { if err = this.module.modelCombat.updateInfo(info); err != nil {

View File

@ -90,7 +90,7 @@ func (this *apiComp) Ench(session comm.IUserSession, req *pb.EquipmentEnchReq) (
} }
} }
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype94, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype94, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype94, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype94, 1))
session.SendMsg(string(this.module.GetType()), "ench", &pb.EquipmentEnchResp{Issucc: true, Equipment: equip}) session.SendMsg(string(this.module.GetType()), "ench", &pb.EquipmentEnchResp{Issucc: true, Equipment: equip})
return return
} }

View File

@ -191,7 +191,7 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq)
} }
if len(tasks) > 0 { if len(tasks) > 0 {
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
} }
session.SendMsg(string(this.module.GetType()), "equip", &pb.EquipmentEquipResp{Equipments: updatequipment}) session.SendMsg(string(this.module.GetType()), "equip", &pb.EquipmentEquipResp{Equipments: updatequipment})

View File

@ -208,7 +208,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype96, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype96, 1)
} }
if len(tasks) > 0 { if len(tasks) > 0 {
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
} }
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.EquipmentUpgradeResp{IsSucc: issucc, Equipment: modifyequipments}) session.SendMsg(string(this.module.GetType()), "upgrade", &pb.EquipmentUpgradeResp{IsSucc: issucc, Equipment: modifyequipments})
return return

View File

@ -67,7 +67,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) (
} }
} }
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype95, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype95, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype95, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype95, 1))
session.SendMsg(string(this.module.GetType()), "wash", &pb.EquipmentWashResp{Eid: req.Eid, AdverbEntry: adverbEntry}) session.SendMsg(string(this.module.GetType()), "wash", &pb.EquipmentWashResp{Eid: req.Eid, AdverbEntry: adverbEntry})
return return
} }

View File

@ -135,7 +135,7 @@ func (this *modelEquipmentComp) AddEquipments(session comm.IUserSession, cIds ma
//异步出发任务启动 //异步出发任务启动
if len(tasks) > 0 { if len(tasks) > 0 {
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
} }
if len(add) > 0 { if len(add) > 0 {

View File

@ -79,6 +79,6 @@ func (this *apiComp) CreateFood(session comm.IUserSession, req *pb.GourmetCreate
Cid: curFood, Cid: curFood,
FirstGet: bFirst, FirstGet: bFirst,
}) })
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype150, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype150, 1))
return return
} }

View File

@ -117,6 +117,6 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
} }
} }
} }
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
return return
} }

View File

@ -121,7 +121,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HeroBuyReq) (code pb
tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, utils.ToInt32(v.T))) tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, utils.ToInt32(v.T)))
} }
} }
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
session.SendMsg(string(this.module.GetType()), "buy", &pb.HeroBuyResp{ session.SendMsg(string(this.module.GetType()), "buy", &pb.HeroBuyResp{
IsSucc: true, IsSucc: true,
Onebuy: record.Onebuy + req.BuyCount, Onebuy: record.Onebuy + req.BuyCount,

View File

@ -86,6 +86,6 @@ func (this *apiComp) Fusion(session comm.IUserSession, req *pb.HeroFusionReq) (c
session.SendMsg(string(this.module.GetType()), HeroFusionResp, &pb.HeroFusionResp{Heroid: conf.Hero}) session.SendMsg(string(this.module.GetType()), HeroFusionResp, &pb.HeroFusionResp{Heroid: conf.Hero})
// 通过融合获得指定英雄 // 通过融合获得指定英雄
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype139, utils.ToInt32(conf.Hero)) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype139, utils.ToInt32(conf.Hero))
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype139, utils.ToInt32(conf.Hero))) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype139, utils.ToInt32(conf.Hero)))
return return
} }

View File

@ -137,6 +137,6 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
szTask = append(szTask, comm.GettaskParam(comm.Rtype55, 1, cfg.Color)) szTask = append(szTask, comm.GettaskParam(comm.Rtype55, 1, cfg.Color))
szTask = append(szTask, comm.GettaskParam(comm.Rtype56, 1, 1, cfg.Job)) szTask = append(szTask, comm.GettaskParam(comm.Rtype56, 1, 1, cfg.Job))
} }
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
return return
} }

View File

@ -96,7 +96,7 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
szTask = append(szTask, comm.GettaskParam(comm.Rtype28, 1)) szTask = append(szTask, comm.GettaskParam(comm.Rtype28, 1))
} }
szTask = append(szTask, comm.GettaskParam(comm.Rtype115, utils.ToInt32(_hero.HeroID), _hero.Star)) szTask = append(szTask, comm.GettaskParam(comm.Rtype115, utils.ToInt32(_hero.HeroID), _hero.Star))
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype115, utils.ToInt32(_hero.HeroID), _hero.Star) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype115, utils.ToInt32(_hero.HeroID), _hero.Star)
return return
} }

View File

@ -100,7 +100,7 @@ func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string,
szTask = append(szTask, comm.GettaskParam(comm.Rtype1, 1, utils.ToInt32(heroCfgId))) szTask = append(szTask, comm.GettaskParam(comm.Rtype1, 1, utils.ToInt32(heroCfgId)))
szTask = append(szTask, comm.GettaskParam(comm.Rtype30, 1, cfg.Color)) szTask = append(szTask, comm.GettaskParam(comm.Rtype30, 1, cfg.Color))
szTask = append(szTask, comm.GettaskParam(comm.Rtype31, 1, cfg.Color)) szTask = append(szTask, comm.GettaskParam(comm.Rtype31, 1, cfg.Color))
go this.ModuleRtask.TriggerTask(session.GetUserId(), szTask...) this.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
} }
return return
@ -174,7 +174,7 @@ func (this *Hero) SendRdTask(session comm.IUserSession) {
//this.ModuleRtask.SendToRtask(session, comm.Rtype46, v1, k1, k) //this.ModuleRtask.SendToRtask(session, comm.Rtype46, v1, k1, k)
} }
} }
go this.ModuleRtask.TriggerTask(session.GetUserId(), szTask...) this.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
} }
//英雄列表 //英雄列表
@ -759,7 +759,7 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou
} }
szTask = append(szTask, comm.GettaskParam(comm.Rtype89, drawCount)) szTask = append(szTask, comm.GettaskParam(comm.Rtype89, drawCount))
go this.ModuleRtask.TriggerTask(session.GetUserId(), szTask...) this.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
} }
func (this *Hero) newCondition(heroRecord *pb.DBHeroRecord) (get bool, starIndex int32) { func (this *Hero) newCondition(heroRecord *pb.DBHeroRecord) (get bool, starIndex int32) {

View File

@ -140,6 +140,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
} }
} }
} }
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
return return
} }

View File

@ -148,7 +148,7 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
} }
} }
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv))
} }
return return

View File

@ -221,6 +221,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
} }
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype160, allStar) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype160, allStar)
tasks = append(tasks, comm.GettaskParam(comm.Rtype160, allStar)) tasks = append(tasks, comm.GettaskParam(comm.Rtype160, allStar))
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
return return
} }

View File

@ -379,7 +379,7 @@ func (this *ModuleBase) ConsumeRes(session comm.IUserSession, res []*cfg.Gameatn
this.Debug("消耗玩家资源", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "attrs", Value: attrs}) this.Debug("消耗玩家资源", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "attrs", Value: attrs})
if count, ok := attrs[comm.ResDiamond]; ok { if count, ok := attrs[comm.ResDiamond]; ok {
// this.ModuleRtask.SendToRtask(session, comm.Rtype104, -count) // this.ModuleRtask.SendToRtask(session, comm.Rtype104, -count)
go this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype104, -count)) this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype104, -count))
} }
} }
if len(items) > 0 { if len(items) > 0 {

View File

@ -47,7 +47,7 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattle
}, },
}) })
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype88, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype88, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype88, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype88, 1))
} else { } else {
session.SendMsg(string(this.module.GetType()), "battle", &pb.MoonfantasyBattleResp{Code: cd}) session.SendMsg(string(this.module.GetType()), "battle", &pb.MoonfantasyBattleResp{Code: cd})
} }

View File

@ -135,7 +135,7 @@ func (this *modelDreamComp) trigger(session comm.IUserSession) {
this.module.modelDream.noticeuserfriend(session, mdata.Id, chat) this.module.modelDream.noticeuserfriend(session, mdata.Id, chat)
session.SendMsg(string(this.module.GetType()), "trigger", &pb.MoonfantasyTriggerPush{Issucc: true, Mid: mdata.Id, Monster: mdata.Monster}) session.SendMsg(string(this.module.GetType()), "trigger", &pb.MoonfantasyTriggerPush{Issucc: true, Mid: mdata.Id, Monster: mdata.Monster})
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype87, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype87, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype87, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype87, 1))
return return
} }
@ -189,7 +189,7 @@ func (this *modelDreamComp) triggerbyid(session comm.IUserSession, boosid string
this.module.modelDream.noticeuserfriend(session, mdata.Id, chat) this.module.modelDream.noticeuserfriend(session, mdata.Id, chat)
session.SendMsg(string(this.module.GetType()), "trigger", &pb.MoonfantasyTriggerPush{Issucc: true, Mid: mdata.Id, Monster: mdata.Monster}) session.SendMsg(string(this.module.GetType()), "trigger", &pb.MoonfantasyTriggerPush{Issucc: true, Mid: mdata.Id, Monster: mdata.Monster})
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype87, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype87, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype87, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype87, 1))
return return
} }

View File

@ -155,6 +155,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype58, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype58, 1)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype59, pagoda.PagodaId) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype59, pagoda.PagodaId)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype58, 1), comm.GettaskParam(comm.Rtype59, pagoda.PagodaId)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype58, 1), comm.GettaskParam(comm.Rtype59, pagoda.PagodaId))
return return
} }

View File

@ -102,7 +102,7 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic
"knapsack": room.Knapsack, "knapsack": room.Knapsack,
filed: pillar, filed: pillar,
}) })
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype149, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype149, 1))
session.SendMsg(string(this.module.GetType()), "practice", &pb.PracticePracticeResp{Pillar: pillar}) session.SendMsg(string(this.module.GetType()), "practice", &pb.PracticePracticeResp{Pillar: pillar})
return return
} }

View File

@ -246,7 +246,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.PracticeReceiveR
this.module.PutUserSession(_session) this.module.PutUserSession(_session)
} }
} }
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype135, minutes)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype135, minutes))
session.SendMsg(string(this.module.GetType()), "receive", &pb.PracticeReceiveResp{Pillar: pillar, Knapsack: room.Knapsack}) session.SendMsg(string(this.module.GetType()), "receive", &pb.PracticeReceiveResp{Pillar: pillar, Knapsack: room.Knapsack})
return return
} }

View File

@ -61,7 +61,7 @@ func (this *apiComp) UnLock(session comm.IUserSession, req *pb.PracticeUnLockReq
filed: pillar, filed: pillar,
"pillarf": room.Pillarf, "pillarf": room.Pillarf,
}) })
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype152, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype152, 1))
session.SendMsg(string(this.module.GetType()), "unlock", &pb.PracticeUnLockResp{Info: room}) session.SendMsg(string(this.module.GetType()), "unlock", &pb.PracticeUnLockResp{Info: room})
return return
} }

View File

@ -74,7 +74,11 @@ func (this *ModelRtaskRecord) overrideUpdate(uid string, cfg *cfg.GameRdtaskCond
update := map[string]interface{}{ update := map[string]interface{}{
"vals": record.Vals, "vals": record.Vals,
} }
if err = this.Change(uid, update); err != nil { if err = this.Change(uid, update); err != nil {
this.moduleRtask.Error("更新失败",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "update", Value: update})
return return
} }
} }

View File

@ -133,7 +133,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (code pb
} }
} }
if len(tasks) > 0 { if len(tasks) > 0 {
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
} }
session.SendMsg(string(this.module.GetType()), "buy", &pb.ShopBuyResp{IsSucc: true}) session.SendMsg(string(this.module.GetType()), "buy", &pb.ShopBuyResp{IsSucc: true})

View File

@ -157,7 +157,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
} }
} }
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype105, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype105, 1))
this.module.modelShop.Change(session.GetUserId(), map[string]interface{}{"refreshnumgoldShop": shopData.RefreshnumgoldShop, "refreshtimegoldShop": shopData.RefreshtimegoldShop, filed: sdata}) this.module.modelShop.Change(session.GetUserId(), map[string]interface{}{"refreshnumgoldShop": shopData.RefreshnumgoldShop, "refreshtimegoldShop": shopData.RefreshtimegoldShop, filed: sdata})
} else if !req.IsManualRefresh { } else if !req.IsManualRefresh {
// refresh := int(this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType2)) // refresh := int(this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType2))
@ -200,7 +200,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
goods = transGoods(items, sdata) goods = transGoods(items, sdata)
this.module.modelShop.Change(session.GetUserId(), map[string]interface{}{filed: sdata}) this.module.modelShop.Change(session.GetUserId(), map[string]interface{}{filed: sdata})
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype105, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype105, 1))
} else { //返回以前的商品列表 } else { //返回以前的商品列表
if items, err = this.module.configure.GetShopItemsConfigureByIds(sdata.Items...); err != nil { if items, err = this.module.configure.GetShopItemsConfigureByIds(sdata.Items...); err != nil {
code = pb.ErrorCode_SystemError code = pb.ErrorCode_SystemError

View File

@ -135,5 +135,5 @@ func (this *Smithy) SendRdTask(session comm.IUserSession, Items []*pb.UserAtno)
// this.ModuleRtask.SendToRtask(session, comm.Rtype148, v, k) // this.ModuleRtask.SendToRtask(session, comm.Rtype148, v, k)
} }
tasks = append(tasks, comm.GettaskParam(comm.Rtype148, int32(len(equip)))) tasks = append(tasks, comm.GettaskParam(comm.Rtype148, int32(len(equip))))
go this.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) this.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
} }

View File

@ -55,7 +55,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
// 触发任务条件 // 触发任务条件
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype109, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype109, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype109, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype109, 1))
// 发邮件 // 发邮件
if err := this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{req.Uid}); err != nil { if err := this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{req.Uid}); err != nil {
this.module.Error("发送邮件 模板ID:GuildApproved", this.module.Error("发送邮件 模板ID:GuildApproved",

View File

@ -96,7 +96,7 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.SociatyApplyReq) (
if !isCheck { if !isCheck {
// 触发任务条件 // 触发任务条件
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype109, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype109, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype109, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype109, 1))
} }
rsp := &pb.SociatyApplyResp{ rsp := &pb.SociatyApplyResp{
Uid: uid, Uid: uid,

View File

@ -169,6 +169,6 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell
} }
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype153, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype153, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype153, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype153, 1))
return return
} }

View File

@ -133,7 +133,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
this.module.RecoverUserPsStart(user.Uid) this.module.RecoverUserPsStart(user.Uid)
// 日常登录任务 // 日常登录任务
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype8, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype8, 1)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype8, 1)) this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype8, 1))
this.module.ModulePrivilege.CheckDailyPrivilegeMail(session) this.module.ModulePrivilege.CheckDailyPrivilegeMail(session)
rsp.Data = user rsp.Data = user

View File

@ -418,7 +418,7 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
code = pb.ErrorCode_GoldNoEnough code = pb.ErrorCode_GoldNoEnough
return return
} }
go this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype68, -(add))) this.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype68, -(add)))
} }
change.Gold += int64(add) change.Gold += int64(add)
case comm.ResExp: case comm.ResExp:

View File

@ -152,6 +152,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
} }
} }
} }
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...) this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
return return
} }

View File

@ -333,7 +333,7 @@ func (this *Viking) AutoBattleOver(session comm.IUserSession, Report *pb.BattleR
} }
} }
go this.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) this.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
return return
} }