This commit is contained in:
meixiongfeng 2023-07-31 17:11:03 +08:00
commit db2ca38d15
3 changed files with 14 additions and 7 deletions

View File

@ -789,6 +789,8 @@ const (
Rtype203 TaskType = 203 //完成指定试卷组 Rtype203 TaskType = 203 //完成指定试卷组
Rtype204 TaskType = 204 //完成任意一场考试 Rtype204 TaskType = 204 //完成任意一场考试
Rtype205 TaskType = 205 //拾取宝箱 Rtype205 TaskType = 205 //拾取宝箱
Rtype206 TaskType = 206 //完成X次复合事件
Rtype207 TaskType = 207 //完成X组事件
) )
const ( const (
MailLineEasy int32 = 1 // 简单 MailLineEasy int32 = 1 // 简单

View File

@ -80,9 +80,10 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (errda
if msg.Ctype == pb.ChatType_Text { //过滤敏感词 if msg.Ctype == pb.ChatType_Text { //过滤敏感词
msg.Content = wordfilter.Replace(msg.Content, '*') msg.Content = wordfilter.Replace(msg.Content, '*')
} }
go this.module.modelChat.sendChatToWorld(msg, max_chat) go func() {
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype62, 1) this.module.modelChat.sendChatToWorld(msg, max_chat)
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype62, 1)) this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype62, 1))
}()
break break
case pb.ChatChannel_Union: case pb.ChatChannel_Union:
if msg.Ctype == pb.ChatType_Text { //过滤敏感词 if msg.Ctype == pb.ChatType_Text { //过滤敏感词
@ -119,10 +120,10 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (errda
return return
} }
msg.ChannelId = userexpand.Chatchannel //指定频道 msg.ChannelId = userexpand.Chatchannel //指定频道
go func() {
go this.module.modelChat.sendChatToCrossServer(msg, max_chat) this.module.modelChat.sendChatToCrossServer(msg, max_chat)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype106, 1) this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype106, 1))
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype106, 1)) }()
break break
default: default:
this.module.Errorf("不存在的聊天频道类型channel:%d ", req.Channel) this.module.Errorf("不存在的聊天频道类型channel:%d ", req.Channel)

View File

@ -22,6 +22,7 @@ func (this *apiComp) EventComplete(session comm.IUserSession, req *pb.WTaskEvent
award []*pb.UserAssets award []*pb.UserAssets
err error err error
ok bool ok bool
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
) )
if errdata = this.EventCompleteCheck(session, req); errdata != nil { if errdata = this.EventCompleteCheck(session, req); errdata != nil {
return return
@ -94,6 +95,9 @@ func (this *apiComp) EventComplete(session comm.IUserSession, req *pb.WTaskEvent
return 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}) session.SendMsg(string(this.module.GetType()), "eventcomplete", &pb.WTaskEventCompleteResp{Group: req.Group, Event: event, Award: award})
return return
} }