diff --git a/comm/const.go b/comm/const.go index b2c45d4c8..46feabba3 100644 --- a/comm/const.go +++ b/comm/const.go @@ -789,6 +789,8 @@ const ( Rtype203 TaskType = 203 //完成指定试卷组 Rtype204 TaskType = 204 //完成任意一场考试 Rtype205 TaskType = 205 //拾取宝箱 + Rtype206 TaskType = 206 //完成X次复合事件 + Rtype207 TaskType = 207 //完成X组事件 ) const ( MailLineEasy int32 = 1 // 简单 diff --git a/modules/chat/api_send.go b/modules/chat/api_send.go index b2975ad46..35e1d848e 100644 --- a/modules/chat/api_send.go +++ b/modules/chat/api_send.go @@ -80,9 +80,10 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (errda if msg.Ctype == pb.ChatType_Text { //过滤敏感词 msg.Content = wordfilter.Replace(msg.Content, '*') } - go this.module.modelChat.sendChatToWorld(msg, max_chat) - // this.module.ModuleRtask.SendToRtask(session, comm.Rtype62, 1) - go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype62, 1)) + go func() { + this.module.modelChat.sendChatToWorld(msg, max_chat) + this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype62, 1)) + }() break case pb.ChatChannel_Union: if msg.Ctype == pb.ChatType_Text { //过滤敏感词 @@ -119,10 +120,10 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (errda return } msg.ChannelId = userexpand.Chatchannel //指定频道 - - go this.module.modelChat.sendChatToCrossServer(msg, max_chat) - // this.module.ModuleRtask.SendToRtask(session, comm.Rtype106, 1) - go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype106, 1)) + go func() { + this.module.modelChat.sendChatToCrossServer(msg, max_chat) + this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype106, 1)) + }() break default: this.module.Errorf("不存在的聊天频道类型channel:%d ", req.Channel) diff --git a/modules/wtask/api_eventcomplete.go b/modules/wtask/api_eventcomplete.go index 38340e7a1..5f396d7a0 100644 --- a/modules/wtask/api_eventcomplete.go +++ b/modules/wtask/api_eventcomplete.go @@ -22,6 +22,7 @@ func (this *apiComp) EventComplete(session comm.IUserSession, req *pb.WTaskEvent award []*pb.UserAssets err error ok bool + tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0) ) if errdata = this.EventCompleteCheck(session, req); errdata != nil { return @@ -94,6 +95,9 @@ func (this *apiComp) EventComplete(session comm.IUserSession, req *pb.WTaskEvent return } + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype206, 1)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype207, 1, req.Group)) + go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...) session.SendMsg(string(this.module.GetType()), "eventcomplete", &pb.WTaskEventCompleteResp{Group: req.Group, Event: event, Award: award}) return }