Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
482112158b
@ -66,7 +66,10 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
|
||||
}
|
||||
|
||||
this.module.DispenseRes(session, level.Award, true)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype151, 1))
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype151, 1))
|
||||
})
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "receive", &pb.AcademyReceiveResp{Issucc: true})
|
||||
return
|
||||
|
@ -26,6 +26,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
|
||||
bulestate pb.BattleRecordState
|
||||
err error
|
||||
iswin bool
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
if errdata = this.ChallengeRewardCheck(session, req); errdata != nil {
|
||||
return
|
||||
@ -288,8 +289,13 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype128, red.Integral))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype129, red.Dan))
|
||||
session.SendMsg(string(this.module.GetType()), "challengereward", &pb.ArenaChallengeRewardResp{Issucc: true, Integral: info.Integral, Dan: info.Dan})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype128, red.Integral), comm.GetBuriedParam(comm.Rtype129, red.Dan))
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -137,6 +137,7 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
|
||||
conf *cfg.GameBattleReadyData
|
||||
conn *db.DBConn
|
||||
err error
|
||||
tasks []*pb.BuriedParam
|
||||
)
|
||||
if !this.IsCross() {
|
||||
conn, err = db.Local()
|
||||
@ -177,7 +178,7 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
|
||||
for _, v := range req.Format.Friendformat {
|
||||
if v != "" {
|
||||
flag = true
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype108, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype108, 1))
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -186,8 +187,15 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
|
||||
return
|
||||
}
|
||||
if flag {
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype12, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype12, 1))
|
||||
|
||||
}
|
||||
if len(tasks) > 0 {
|
||||
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@ -319,6 +327,7 @@ func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLP
|
||||
conf *cfg.GameBattleReadyData
|
||||
conn *db.DBConn
|
||||
err error
|
||||
tasks []*pb.BuriedParam
|
||||
)
|
||||
if !this.IsCross() {
|
||||
conn, err = db.Local()
|
||||
@ -352,7 +361,7 @@ func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLP
|
||||
if v != "" {
|
||||
flag = true
|
||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype108, 1)
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype108, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype108, 1))
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -368,8 +377,16 @@ func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLP
|
||||
return
|
||||
}
|
||||
if flag {
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype12, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype12, 1))
|
||||
|
||||
}
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@ -486,6 +503,7 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt
|
||||
reply *pb.BattleCheckResults
|
||||
ctx context.Context
|
||||
err error
|
||||
tasks []*pb.BuriedParam
|
||||
)
|
||||
if report == nil {
|
||||
iswin = false
|
||||
@ -514,8 +532,13 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt
|
||||
}
|
||||
this.moonfantasy.Trigger(session, report)
|
||||
for _, v := range report.Completetask {
|
||||
// this.ModuleBuried.SendToRtask(session, comm.Rtype157, int32(report.Info.Ptype), v)
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype157, int32(report.Info.Ptype), v))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype157, int32(report.Info.Ptype), v))
|
||||
}
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
if (report.WinSide == 1 && report.Info.RedCompId == session.GetUserId()) || (report.WinSide == 2 && report.Info.BlueCompId == session.GetUserId()) {
|
||||
|
@ -557,8 +557,8 @@ func (this *Buried) TriggerBuried(session comm.IUserSession, burieds ...*pb.Buri
|
||||
} else {
|
||||
this.trigger(session, burieds...)
|
||||
}
|
||||
session.Push()
|
||||
this.service.PutUserSession(session)
|
||||
// session.Push()
|
||||
// this.service.PutUserSession(session)
|
||||
}
|
||||
|
||||
func (this *Buried) trigger(session comm.IUserSession, burieds ...*pb.BuriedParam) {
|
||||
|
@ -230,7 +230,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
})
|
||||
|
||||
// 任务统计
|
||||
var szTask []*pb.BuriedParam
|
||||
var tasks []*pb.BuriedParam
|
||||
|
||||
if req.IsBuy {
|
||||
// 209购买指定城市的急需货物X个
|
||||
@ -238,7 +238,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
for _, v1 := range v.Exspecial { // 急需的货物
|
||||
for k2, v2 := range req.Items {
|
||||
if k2 == v1 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype209, v2, k))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype209, v2, k))
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -247,11 +247,12 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
|
||||
// szTask = append(szTask, comm.GetBuriedParam(comm.Rtype209, req.City, opCount))
|
||||
} else { // 卖
|
||||
//向指定X城市贩卖货物,贩卖货物价值需要X虚拟币以上
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype210, req.City, sellValue))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype210, req.City, sellValue))
|
||||
// Rtype211 TaskType = 211 // 向指定X城市,贩卖价值X虚拟币以上的对应城市急需货物
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype211, req.City, sellSpValue))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype211, req.City, sellSpValue))
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -128,8 +128,11 @@ func (this *apiComp) GotoCity(session comm.IUserSession, req *pb.CaravanGotoCity
|
||||
resp.Newtask = bNewTask
|
||||
session.SendMsg(string(this.module.GetType()), "gotocity", resp)
|
||||
// 任务统计
|
||||
var szTask []*pb.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype212, req.City)) // 接取任务后,商队抵达指定城市
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
var tasks []*pb.BuriedParam
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype212, req.City)) // 接取任务后,商队抵达指定城市
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -80,10 +80,11 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (errda
|
||||
if msg.Ctype == pb.ChatType_Text { //过滤敏感词
|
||||
msg.Content = wordfilter.Replace(msg.Content, '*')
|
||||
}
|
||||
go func(_session comm.IUserSession) {
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.modelChat.sendChatToWorld(msg, max_chat)
|
||||
this.module.ModuleBuried.TriggerBuried(_session, comm.GetBuriedParam(comm.Rtype62, 1))
|
||||
}(session.Clone())
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype62, 1))
|
||||
})
|
||||
break
|
||||
case pb.ChatChannel_Union:
|
||||
if msg.Ctype == pb.ChatType_Text { //过滤敏感词
|
||||
@ -120,10 +121,10 @@ func (this *apiComp) Send(session comm.IUserSession, req *pb.ChatSendReq) (errda
|
||||
return
|
||||
}
|
||||
msg.ChannelId = userexpand.Chatchannel //指定频道
|
||||
go func() {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.modelChat.sendChatToCrossServer(msg, max_chat)
|
||||
this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype106, 1))
|
||||
}()
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype106, 1))
|
||||
})
|
||||
break
|
||||
default:
|
||||
this.module.Errorf("不存在的聊天频道类型channel:%d ", req.Channel)
|
||||
|
@ -83,8 +83,6 @@ func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errda
|
||||
return
|
||||
}
|
||||
|
||||
rsp := &pb.DispatchDoResp{}
|
||||
|
||||
if err := this.module.modelDispatch.dispatch(session.GetUserId(), req.TaskId, req.HeroIds, d); err != nil {
|
||||
var errCustom = new(comm.CustomError)
|
||||
var code pb.ErrorCode
|
||||
@ -106,12 +104,15 @@ func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errda
|
||||
return
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype186, 1))
|
||||
|
||||
//扣除门票
|
||||
this.module.ConsumeRes(session, []*cfg.Gameatn{ticketAtn}, true)
|
||||
|
||||
rsp.IsSucc = true
|
||||
session.SendMsg(string(this.module.GetType()), "do", rsp)
|
||||
session.SendMsg(string(this.module.GetType()), "do", &pb.DispatchDoResp{
|
||||
IsSucc: true,
|
||||
})
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype186, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -111,8 +111,11 @@ func (this *apiComp) Ench(session comm.IUserSession, req *pb.EquipmentEnchReq) (
|
||||
return
|
||||
}
|
||||
}
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype94, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype94, 1))
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "ench", &pb.EquipmentEnchResp{Issucc: true, Equipment: equip})
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype94, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -213,10 +213,12 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype42, equipNum, minstar))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype5, equipNum, utils.ToInt32(hero.HeroID)))
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "equip", &pb.EquipmentEquipResp{Equipments: updatequipment, Suits: suits})
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype95, 1))
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -288,9 +288,13 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype96, 1))
|
||||
}
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype92, 1))
|
||||
if len(tasks) > 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.EquipmentUpgradeResp{IsSucc: issucc, Equipment: modifyequipments})
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype95, 1))
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -78,8 +78,11 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) (
|
||||
break
|
||||
}
|
||||
}
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype95, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype95, 1))
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "wash", &pb.EquipmentWashResp{Eid: req.Eid, AdverbEntry: adverbEntry})
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype95, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -137,7 +137,9 @@ func (this *modelEquipmentComp) AddEquipments(session comm.IUserSession, cIds ma
|
||||
|
||||
//异步出发任务启动
|
||||
if len(tasks) > 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
if len(add) > 0 {
|
||||
|
@ -266,8 +266,10 @@ func (this *Equipment) AddEquipment(session comm.IUserSession, equip *pb.DB_Equi
|
||||
} else if configure.Pos == 6 {
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype101, 1, configure.Color))
|
||||
}
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
this.equipmentsChangePush(session, []*pb.DB_Equipment{equip})
|
||||
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -171,15 +171,20 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e
|
||||
go this.module.ModuleSys.CheckOpenCond(session.Clone(), comm.OpencondTypeFriend, int32(len(self.FriendIds)))
|
||||
// 拥有xx个好友
|
||||
// this.moduleFriend.ModuleRtask.SendToRtask(session, comm.Rtype10, int32(len(agreeIds)))
|
||||
var sz []*pb.BuriedParam
|
||||
var tasks []*pb.BuriedParam
|
||||
for _, v := range req.FriendIds {
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype10, v))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype10, v))
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), sz...)
|
||||
resp := &pb.FriendAgreeResp{
|
||||
Num: optNum,
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), FriendSubTypeAgree, resp)
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -112,7 +112,8 @@ func (this *apiComp) Assisthero(session comm.IUserSession, req *pb.FriendAssisth
|
||||
}
|
||||
|
||||
// 随机任务Rtype13
|
||||
// this.moduleFriend.ModuleRtask.SendToRtask(session, comm.Rtype13, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype13, 1))
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype13, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -131,7 +131,8 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (errda
|
||||
session.SendMsg(string(this.module.GetType()), FriendSubTypeZan, rsp)
|
||||
|
||||
// 赠送X次友情点
|
||||
// this.moduleFriend.ModuleRtask.SendToRtask(session, comm.Rtype11, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype11, 1))
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype11, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -94,6 +94,8 @@ func (this *apiComp) CreateFood(session comm.IUserSession, req *pb.GourmetCreate
|
||||
Cid: curFood,
|
||||
FirstGet: bFirst,
|
||||
})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype150, 1))
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype150, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -101,15 +101,15 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (e
|
||||
} else {
|
||||
this.module.Errorf("no found userdata uid:%s", session.GetUserId())
|
||||
}
|
||||
var szTask []*pb.BuriedParam
|
||||
var tasks []*pb.BuriedParam
|
||||
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype34, _hero.HeroID, _hero.JuexingLv))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype34, _hero.HeroID, _hero.JuexingLv))
|
||||
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype119, 1, utils.ToInt32(_hero.HeroID)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype35, _hero.JuexingLv, utils.ToInt32(_hero.HeroID)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype118, _hero.Lv, _hero.JuexingLv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype120, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype122, _hero.JuexingLv, _hero.Star))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype119, 1, utils.ToInt32(_hero.HeroID)))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype35, _hero.JuexingLv, utils.ToInt32(_hero.HeroID)))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype118, _hero.Lv, _hero.JuexingLv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype120, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype122, _hero.JuexingLv, _hero.Star))
|
||||
cfg, err := this.module.configure.GetHeroConfig(_hero.HeroID)
|
||||
if err == nil {
|
||||
|
||||
@ -127,13 +127,13 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (e
|
||||
if this.module.configure.GetHeroTalentMaxLv(_hero.HeroID) == _l {
|
||||
bManAwaken = true
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype121, 1, cfg.Race))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype36, _hero.HeroID, cfg.Color, cfg.Job, cfg.Race, _hero.JuexingLv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype121, 1, cfg.Race))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype36, _hero.HeroID, cfg.Color, cfg.Job, cfg.Race, _hero.JuexingLv))
|
||||
_, err = this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
||||
if err != nil { // 达到满级觉醒
|
||||
if _hero.Lv == this.module.configure.GetHeroMaxLv(_hero.Star) && bManAwaken {
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype38, _hero.HeroID))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype37, _hero.HeroID, cfg.Color))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype38, _hero.HeroID))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype37, _hero.HeroID, cfg.Color))
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,6 +145,8 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (e
|
||||
|
||||
return
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -128,9 +128,9 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
|
||||
}
|
||||
|
||||
// 推送 世界任务消息
|
||||
var szTask []*pb.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype52, 1, utils.ToInt32(_hero.HeroID)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype53, 1))
|
||||
var tasks []*pb.BuriedParam
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype52, 1, utils.ToInt32(_hero.HeroID)))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype53, 1))
|
||||
|
||||
// 检查是不是满级技能
|
||||
maxLv := true
|
||||
@ -142,17 +142,19 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
|
||||
}
|
||||
}
|
||||
if maxLv {
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype54, _hero.HeroID))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype54, _hero.HeroID))
|
||||
//szTask = append(szTask, comm.GetBuriedParam(comm.Rtype57, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype174, 1, _hero.Star))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype174, 1, _hero.Star))
|
||||
}
|
||||
|
||||
if cfg, err := this.module.configure.GetHeroConfig(_hero.HeroID); err == nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype55, 1, cfg.Color))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype56, 1, 1, cfg.Job))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype116, lvUpCount, cfg.Race))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype55, 1, cfg.Color))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype56, 1, 1, cfg.Job))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype116, lvUpCount, cfg.Race))
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype117, lvUpCount, utils.ToInt32(_hero.HeroID)))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype117, lvUpCount, utils.ToInt32(_hero.HeroID)))
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -101,19 +101,21 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
||||
}
|
||||
|
||||
// 推送 世界任务消息
|
||||
var szTask []*pb.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype6, _hero.Star, utils.ToInt32(_hero.HeroID)))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype25, _hero.HeroID, _hero.Star))
|
||||
var tasks []*pb.BuriedParam
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype6, _hero.Star, utils.ToInt32(_hero.HeroID)))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype25, _hero.HeroID, _hero.Star))
|
||||
if _hero.Star == 4 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype26, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype26, 1))
|
||||
|
||||
} else if _hero.Star == 5 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype27, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype27, 1))
|
||||
} else if _hero.Star == 6 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype28, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype28, 1))
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype114, _hero.Star, utils.ToInt32(_hero.HeroID)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype115, 1, _hero.Star))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype114, _hero.Star, utils.ToInt32(_hero.HeroID)))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype115, 1, _hero.Star))
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -188,35 +188,37 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
|
||||
|
||||
// 查询英雄相关信息
|
||||
if heroObj := this.module.QueryHeroByConfId(session.GetUserId(), talent.HeroId); heroObj != nil {
|
||||
var szTask []*pb.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype123, heroObj.HeroID, heroObj.Star))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype124, heroObj.HeroID))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype123, 1, int32(len(talent.Talent)), heroObj.Star))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype124, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype125, 1, utils.ToInt32(heroObj.HeroID)))
|
||||
var tasks []*pb.BuriedParam
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype123, heroObj.HeroID, heroObj.Star))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype124, heroObj.HeroID))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype123, 1, int32(len(talent.Talent)), heroObj.Star))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype124, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype125, 1, utils.ToInt32(heroObj.HeroID)))
|
||||
cfg, err := this.module.configure.GetHeroConfig(heroObj.HeroID)
|
||||
if err == nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype126, 1, cfg.Race))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype126, 1, cfg.Race))
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype127, 1, heroObj.Star))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype40, 1, int32(len(talent.Talent))))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype127, 1, heroObj.Star))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype40, 1, int32(len(talent.Talent))))
|
||||
_, err = this.module.configure.GetHeroAwakenConfig(heroObj.HeroID, heroObj.JuexingLv+1)
|
||||
if err != nil { // 达到满级觉醒
|
||||
if heroObj.Lv == this.module.configure.GetHeroMaxLv(heroObj.Star) {
|
||||
|
||||
if this.module.configure.GetHeroTalentMaxLv(heroObj.HeroID) == int32(len(talent.Talent)) {
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype37, heroObj.HeroID, cfg.Color))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype38, heroObj.HeroID))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype37, heroObj.HeroID, cfg.Color))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype38, heroObj.HeroID))
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// 满回响
|
||||
if this.module.configure.GetHeroTalentMaxLv(heroObj.HeroID) == int32(len(talent.Talent)) {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype128, 1, cfg.Race))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype128, 1, cfg.Race))
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype199, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype199, 1))
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -478,7 +478,14 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
|
||||
}
|
||||
|
||||
_data := this.module.configure.GetHeroLv(curLv)
|
||||
if _data != nil {
|
||||
if _data == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var maxExp int32
|
||||
maxExp = _data.Heroexp
|
||||
if maxLv <= curLv && curExp >= maxExp { // 加经验之前校验是否达到最大等级
|
||||
@ -552,16 +559,16 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
|
||||
}
|
||||
|
||||
if curLv-preLv > 0 { // 升级了 统计任务
|
||||
var szTask []*pb.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype147, utils.ToInt32(hero.HeroID), curLv-preLv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype113, curLv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype4, hero.Lv, utils.ToInt32(hero.HeroID)))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype23, hero.HeroID, hero.Star, hero.Lv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype24, curLv-preLv))
|
||||
var tasks []*pb.BuriedParam
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype147, utils.ToInt32(hero.HeroID), curLv-preLv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype113, curLv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype4, hero.Lv, utils.ToInt32(hero.HeroID)))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype23, hero.HeroID, hero.Star, hero.Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype24, curLv-preLv))
|
||||
// szTask = append(szTask, comm.GetBuriedParam(comm.Rtype29, 1, hero.Lv, utils.ToInt32(hero.HeroID)))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype23, hero.HeroID, hero.Star, hero.Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype23, hero.HeroID, hero.Star, hero.Lv))
|
||||
if cfg, _ := this.module.configure.GetHeroConfig(hero.HeroID); cfg != nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype32, hero.HeroID, cfg.Color, hero.Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype32, hero.HeroID, cfg.Color, hero.Lv))
|
||||
//xx英雄满级、共鸣、觉醒至最高状态
|
||||
nextAwaken, _ := this.module.configure.GetHeroAwakenConfig(hero.HeroID, hero.JuexingLv+1)
|
||||
if nextAwaken == nil { // 达到满级觉醒
|
||||
@ -577,21 +584,22 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
|
||||
}
|
||||
}
|
||||
if this.module.configure.GetHeroTalentMaxLv(hero.HeroID) == _l {
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype37, hero.HeroID, cfg.Color))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype38, hero.HeroID))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype37, hero.HeroID, cfg.Color))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype38, hero.HeroID))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype111, hero.HeroID, hero.Lv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype112, 1, hero.Lv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype113, hero.Lv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype33, 1, 1, hero.Lv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype118, hero.Lv, hero.JuexingLv))
|
||||
go this.module.passon.HeroUpLv(session.Clone(), hero.HeroID, curLv)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype111, hero.HeroID, hero.Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype112, 1, hero.Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype113, hero.Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype33, 1, 1, hero.Lv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype118, hero.Lv, hero.JuexingLv))
|
||||
|
||||
}
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.passon.HeroUpLv(session.Clone(), hero.HeroID, curLv)
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ func (this *Hero) Start() (err error) {
|
||||
func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string, num int32) (hero *pb.DBHero, bFirst bool, atno []*pb.UserAtno, errdata *pb.ErrorData) {
|
||||
var (
|
||||
err error
|
||||
szTask []*pb.BuriedParam
|
||||
tasks []*pb.BuriedParam
|
||||
cfg *cfg.GameHeroData
|
||||
)
|
||||
if cfg, err = this.configure.GetHeroConfig(heroCfgId); err != nil {
|
||||
@ -106,7 +106,7 @@ func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string,
|
||||
hero, bFirst, atno, err = this.modelHero.createHero(session, heroCfgId, num)
|
||||
if err == nil && bFirst {
|
||||
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype228, cfg.Star))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype228, cfg.Star))
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
@ -116,10 +116,12 @@ func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string,
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype1, 1, utils.ToInt32(heroCfgId)))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype30, heroCfgId, cfg.Color))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype31, num, cfg.Color))
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype1, 1, utils.ToInt32(heroCfgId)))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype30, heroCfgId, cfg.Color))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype31, num, cfg.Color))
|
||||
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@ -659,7 +661,7 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat
|
||||
func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCount int32, drawtype int32) {
|
||||
// 任务统计
|
||||
var (
|
||||
szTask []*pb.BuriedParam
|
||||
tasks []*pb.BuriedParam
|
||||
)
|
||||
|
||||
if drawtype == comm.DrawCardType0 { //普通招募
|
||||
@ -669,33 +671,35 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou
|
||||
sz[star]++
|
||||
}
|
||||
for k := range sz {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype17, 1, k))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype17, 1, k))
|
||||
}
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype14, drawCount))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype18, drawCount))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype141, drawCount))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype143, drawCount))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype145, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype14, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype18, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype141, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype143, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype145, drawCount))
|
||||
} else { // 阵营招募
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype15, drawCount))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype19, drawCount))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype142, drawCount))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype144, drawCount))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype146, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype15, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype19, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype142, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype144, drawCount))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype146, drawCount))
|
||||
if drawCount == 10 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype91, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype91, 1))
|
||||
}
|
||||
}
|
||||
for _, star := range szStar {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype16, star, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype16, star, 1))
|
||||
}
|
||||
if drawCount == 10 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype90, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype90, 1))
|
||||
}
|
||||
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype89, drawCount))
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype89, drawCount))
|
||||
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
func (this *Hero) RegisterInstructor(session comm.IUserSession, heroOid []string, fulllvenr int32) (errdata *pb.ErrorData) {
|
||||
|
@ -20,6 +20,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgrade
|
||||
front *cfg.GameHoroscopeData
|
||||
ok bool
|
||||
err error
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
if errdata = this.UpgradeCheck(session, req); errdata != nil {
|
||||
return
|
||||
@ -72,7 +73,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgrade
|
||||
}
|
||||
info.Nodes[conf.NodeId] = conf.Lv + 1
|
||||
if info.Nodes[conf.NodeId] == 1 { //解锁
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype173, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype173, 1))
|
||||
}
|
||||
|
||||
for _, v := range conf.CostItem {
|
||||
@ -102,5 +103,11 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgrade
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.HoroscopeUpgradeResp{Nid: conf.NodeId, Lv: conf.Lv + 1})
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -200,6 +200,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype83, 1, req.BossType, req.Difficulty))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype202, consumPs))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype200, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -234,7 +234,9 @@ func (this *Items) AddItems(session comm.IUserSession, items map[string]int32, b
|
||||
}
|
||||
}
|
||||
if len(tasks) > 0 {
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
|
||||
likeStates int32 // 0 普通食物 1 喜欢 2 不喜欢
|
||||
addExp int32 // 获得的经验
|
||||
sCount int32 // 赠送开始次数
|
||||
tasks []*pb.BuriedParam
|
||||
)
|
||||
attenuation = make(map[int32]int32, 0)
|
||||
if errdata = this.UseGiftCheck(session, req); errdata != nil {
|
||||
@ -190,12 +191,15 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
|
||||
return
|
||||
}
|
||||
}
|
||||
var szTask []*pb.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype132, 1, _heroObj.Favorlv))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype133, _heroObj.Favorlv, utils.ToInt32(_heroObj.Heroid)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype134, upLv))
|
||||
szTask = append(szTask, comm.GetBuriedParam2(comm.Rtype132, _heroObj.Heroid, _heroObj.Favorlv))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype132, 1, _heroObj.Favorlv))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype133, _heroObj.Favorlv, utils.ToInt32(_heroObj.Heroid)))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype134, upLv))
|
||||
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype132, _heroObj.Heroid, _heroObj.Favorlv))
|
||||
}
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -180,7 +180,10 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype60, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype61, 1, int32(req.Level)))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
go this.module.ModuleSys.CheckOpenCond(session.Clone(), comm.OpencondTypeMaxmapid, req.Level)
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
this.module.ModuleSys.CheckOpenCond(session, comm.OpencondTypeMaxmapid, req.Level)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -132,6 +132,9 @@ func (this *apiComp) LevelPass(session comm.IUserSession, req *pb.MainlineLevelP
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype60, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype61, 1, int32(req.Level)))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -256,8 +256,10 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
|
||||
}
|
||||
}
|
||||
}
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype160, allStar)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype160, allStar, stageConf.Chapterid))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -851,3 +851,10 @@ func (this *ModuleBase) FormatRes(res []*cfg.Gameatn) (ret []*cfg.Gameatn) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//异步调用用户处理流
|
||||
func (this *ModuleBase) AsynHandleSession(session comm.IUserSession, handle func(session comm.IUserSession)) {
|
||||
handle(session)
|
||||
session.Push()
|
||||
this.PutUserSession(session)
|
||||
}
|
||||
|
@ -133,6 +133,8 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattle
|
||||
Tasks: record.Tasks,
|
||||
},
|
||||
})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype88, 1))
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype88, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -135,7 +135,9 @@ func (this *modelDreamComp) trigger(session comm.IUserSession) {
|
||||
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})
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype87, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype87, 1))
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype87, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@ -188,8 +190,9 @@ func (this *modelDreamComp) triggerbyid(session comm.IUserSession, boosid string
|
||||
}
|
||||
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})
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype87, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype87, 1))
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype87, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -182,13 +182,15 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
||||
this.module.SetPagodaRankList("pagodaList"+strconv.Itoa(int(newData.PagodaId)), pagoda.PagodaId, newData.Id)
|
||||
}
|
||||
|
||||
go this.module.ModuleSys.CheckOpenCond(session.Clone(), comm.OpencondTypePagoda, conf.Key)
|
||||
// 通关奖励
|
||||
errdata = this.module.DispenseRes(session, conf.Reward, true)
|
||||
if errdata != nil {
|
||||
return
|
||||
}
|
||||
// 任务相关
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype168, pagoda.Data[conf.Tab], conf.Tab))
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleSys.CheckOpenCond(session, comm.OpencondTypePagoda, conf.Key)
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype168, pagoda.Data[conf.Tab], conf.Tab))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -179,12 +179,14 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
|
||||
this.module.SetRacePagodaRankList("race"+strconv.Itoa(int(conf.Restriction)), race.Race[conf.Restriction].Curfloor, session.GetUserId(), newData.Id)
|
||||
}
|
||||
// 任务相关
|
||||
var sz []*pb.BuriedParam
|
||||
sz = append(sz, comm.GetBuriedParam(comm.Rtype232, conf.Restriction, conf.Floors))
|
||||
var tasks []*pb.BuriedParam
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype232, conf.Restriction, conf.Floors))
|
||||
|
||||
if conf.Restriction >= 10 {
|
||||
sz = append(sz, comm.GetBuriedParam(comm.Rtype231, conf.Floors))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype231, conf.Floors))
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), sz...)
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -200,11 +200,11 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery
|
||||
return
|
||||
}
|
||||
}
|
||||
go func(_session comm.IUserSession) {
|
||||
this.ModuleHero.RechargeMoney(args.Uid, args.Price)
|
||||
this.ModuleBuried.TriggerBuried(_session, comm.GetBuriedParam(comm.Rtype229, 1, conf.Pid))
|
||||
}(session.Clone())
|
||||
|
||||
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.ModuleHero.RechargeMoney(args.Uid, args.Price)
|
||||
this.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype229, 1, conf.Pid))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -132,6 +132,9 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.PracticeAcceptReq
|
||||
this.module.SendMsgToUser(string(this.module.GetType()), "qiecuonotify",
|
||||
&pb.PracticeQiecuonotifyPush{Uid: session.GetUserId(), NotifyType: 2}, req.Uid)
|
||||
_session, _ := this.module.GetUserSession(req.Uid)
|
||||
go this.module.ModuleBuried.TriggerBuried(_session.Clone(), comm.GetBuriedParam(comm.Rtype183, 1))
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(_session.Clone(), comm.GetBuriedParam(comm.Rtype183, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ func (this *apiComp) GetGymBuff(session comm.IUserSession, req *pb.PracticeGetGy
|
||||
buff *cfg.GamePandamasBuffData
|
||||
room *pb.DBPracticeRoom
|
||||
award []*pb.UserAssets
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
err error
|
||||
)
|
||||
|
||||
@ -40,7 +41,6 @@ func (this *apiComp) GetGymBuff(session comm.IUserSession, req *pb.PracticeGetGy
|
||||
}
|
||||
return
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype185, 1))
|
||||
|
||||
if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -67,7 +67,10 @@ func (this *apiComp) GetGymBuff(session comm.IUserSession, req *pb.PracticeGetGy
|
||||
"lastgymtime": room.Lastgymtime,
|
||||
})
|
||||
}
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype185, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "getgymbuff", &pb.PracticeGetGymBuffResp{Buffid: buff.Id, Award: award})
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ func (this *apiComp) GymInfo(session comm.IUserSession, req *pb.PracticeGymInfoR
|
||||
var (
|
||||
err error
|
||||
room *pb.DBPracticeRoom
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -33,7 +34,11 @@ func (this *apiComp) GymInfo(session comm.IUserSession, req *pb.PracticeGymInfoR
|
||||
"gymrefresh": room.Gymrefresh,
|
||||
})
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype185, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype185, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "gyminfo", &pb.PracticeGymInfoResp{Lastaction: room.Gymaction, Refreshnum: room.Gymrefresh})
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ func (this *apiComp) Loot(session comm.IUserSession, req *pb.PracticeLootReq) (e
|
||||
pillarconfigure *cfg.GamePandamasMzData
|
||||
tconfigure *cfg.GamePandamasJxData
|
||||
pconfigure *cfg.GamePandamasJxData
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
extra int32 = 0
|
||||
)
|
||||
if froom, err = this.module.modelPandata.queryUserMartialhall(req.Friend); err != nil {
|
||||
@ -125,7 +126,12 @@ func (this *apiComp) Loot(session comm.IUserSession, req *pb.PracticeLootReq) (e
|
||||
} else {
|
||||
this.module.PutUserSession(_session)
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype184, 1))
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype184, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "loot", &pb.PracticeLootResp{Friend: req.Friend, Pillar: froom.Pillarf})
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ func (this *apiComp) NPCBattkleFinish(session comm.IUserSession, req *pb.Practic
|
||||
err error
|
||||
room *pb.DBPracticeRoom
|
||||
conf *cfg.GameDispatch_BattleData
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -58,8 +59,7 @@ func (this *apiComp) NPCBattkleFinish(session comm.IUserSession, req *pb.Practic
|
||||
"npcstate": room.Npcstate,
|
||||
"refresh": room.Refresh,
|
||||
})
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype182, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype182, 1))
|
||||
} else {
|
||||
room.Npcstate = 1
|
||||
room.Battlenum++
|
||||
@ -87,5 +87,9 @@ func (this *apiComp) NPCBattkleFinish(session comm.IUserSession, req *pb.Practic
|
||||
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "npcbattklefinish", &pb.PracticeNPCBattkleFinishResp{Issucc: true})
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic
|
||||
pconfigure *cfg.GamePandamasJxData
|
||||
extra int32 = 0
|
||||
filed string
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -234,7 +235,11 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic
|
||||
"knapsack": room.Knapsack,
|
||||
filed: pillar,
|
||||
})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype149, 1))
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype149, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "practice", &pb.PracticePracticeResp{Pillar: pillar})
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.PracticeReceiveR
|
||||
exp1 int32
|
||||
ants1 []*cfg.Gameatn
|
||||
ants2 []*cfg.Gameatn
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
if req.Friend != "" {
|
||||
if froom, err = this.module.modelPandata.queryUserMartialhall(req.Friend); err != nil {
|
||||
@ -295,7 +296,11 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.PracticeReceiveR
|
||||
this.module.PutUserSession(_session)
|
||||
}
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype135, minutes))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype135, minutes))
|
||||
session.SendMsg(string(this.module.GetType()), "receive", &pb.PracticeReceiveResp{Pillar: pillar, Knapsack: room.Knapsack})
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ func (this *apiComp) UnLock(session comm.IUserSession, req *pb.PracticeUnLockReq
|
||||
room *pb.DBPracticeRoom
|
||||
pillar *pb.DBPracticePillar
|
||||
filed string
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
if room, err = this.module.modelPandata.queryUserMartialhall(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -72,7 +73,12 @@ func (this *apiComp) UnLock(session comm.IUserSession, req *pb.PracticeUnLockReq
|
||||
filed: pillar,
|
||||
"pillarf": room.Pillarf,
|
||||
})
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype152, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype152, 1))
|
||||
session.SendMsg(string(this.module.GetType()), "unlock", &pb.PracticeUnLockResp{Info: room})
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -398,7 +398,9 @@ func (this *Practice) RPC_ModulePracticeUnLockPillar(ctx context.Context, args *
|
||||
}
|
||||
|
||||
_session, _ := this.GetUserSession(args.Param1)
|
||||
go this.ModuleBuried.TriggerBuried(_session, comm.GetBuriedParam(comm.Rtype152, 1))
|
||||
go this.AsynHandleSession(_session, func(session comm.IUserSession) {
|
||||
this.ModuleBuried.TriggerBuried(_session, comm.GetBuriedParam(comm.Rtype152, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,6 @@ func (this *apiComp) Answer(session comm.IUserSession, req *pb.QuestionnaireAnsw
|
||||
}
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype203, 1, req.Group))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype204, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
if err = this.module.modelQuestionnaire.updateUserQuestionnaire(session.GetUserId(), info); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -106,5 +105,11 @@ func (this *apiComp) Answer(session comm.IUserSession, req *pb.QuestionnaireAnsw
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "answer", &pb.QuestionnaireAnswerResp{Info: info.Group[req.Group], Group: req.Group, Complete: finish, Award: award})
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -222,10 +222,12 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype67, v.N, utils.ToInt32(v.T))
|
||||
}
|
||||
}
|
||||
if len(tasks) > 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "buy", &pb.ShopBuyResp{IsSucc: true})
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
equiconf *cfg.GameEquipData
|
||||
equibuyconf *cfg.GameShopBuyequiCosData
|
||||
leftrefnum int32
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
if errdata = this.GetlistCheck(session, req); errdata != nil {
|
||||
return
|
||||
@ -220,7 +221,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
}
|
||||
goods = transGoods(items, sdata)
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype105, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype105, 1))
|
||||
this.module.modelShop.Change(session.GetUserId(), map[string]interface{}{"refreshnumgoldShop": shopData.RefreshnumgoldShop, "refreshtimegoldShop": shopData.RefreshtimegoldShop, filed: sdata})
|
||||
} else if !req.IsManualRefresh {
|
||||
// refresh := int(this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType2))
|
||||
@ -299,8 +300,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
}
|
||||
goods = transGoods(items, sdata)
|
||||
this.module.modelShop.Change(session.GetUserId(), map[string]interface{}{filed: sdata})
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype105, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype105, 1))
|
||||
} else { //返回以前的商品列表
|
||||
keys := make([]int32, len(sdata.Items))
|
||||
for i, v := range sdata.Items {
|
||||
@ -325,5 +325,12 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "getlist", &pb.ShopGetListResp{SType: req.SType, IsManualRefresh: req.IsManualRefresh, Goods: goods, SurplusRefreshNum: leftrefnum, Lastrefreshtime: sdata.LastRefreshTime, Leftfreerefreshnum: sdata.Leftfreerefreshnum})
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ func (this *apiComp) AtlasActivateCheck(session comm.IUserSession, req *pb.Smith
|
||||
func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtlasActivateReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
addScore int32 // 更新图鉴增加的积分
|
||||
szTask []*pb.BuriedParam
|
||||
tasks []*pb.BuriedParam
|
||||
update map[string]interface{}
|
||||
)
|
||||
update = make(map[string]interface{}, 0)
|
||||
@ -114,10 +114,12 @@ func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtla
|
||||
update["score"] = atlas.Score
|
||||
update["collect"] = atlas.Collect
|
||||
this.module.modelAtlas.modifySmithyAtlasList(session.GetUserId(), update)
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype165, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype166, int32(len(atlas.Collect))))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype167, atlas.Score))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype165, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype166, int32(len(atlas.Collect))))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype167, atlas.Score))
|
||||
session.SendMsg(string(this.module.GetType()), "atlasactivate", &pb.SmithyAtlasActivateResp{Data: atlas})
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -302,7 +302,6 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype177, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype179, 1, nextProficiency.Value1))
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
}
|
||||
// 是否解锁新套装
|
||||
if nextProficiency.Type == comm.SmithyReelType4 {
|
||||
@ -329,7 +328,11 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
|
||||
// 炉温恢复时间红点推送
|
||||
i, err := this.module.service.GetModule(comm.ModuleReddot)
|
||||
if err != nil {
|
||||
this.module.Error(err.Error())
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if b, y := i.(comm.IReddot); y {
|
||||
@ -355,7 +358,10 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype189, req.Count)) // 进行N次定制打造
|
||||
}
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype148, req.Count))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ func (this *apiComp) RiseCheck(session comm.IUserSession, req *pb.SmithyRiseReq)
|
||||
func (this *apiComp) Rise(session comm.IUserSession, req *pb.SmithyRiseReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
cost []*cfg.Gameatn // 消耗材料
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
|
||||
if errdata = this.RiseCheck(session, req); errdata != nil {
|
||||
@ -85,9 +86,12 @@ func (this *apiComp) Rise(session comm.IUserSession, req *pb.SmithyRiseReq) (err
|
||||
Nextchanagetime: stove.RecoveTime,
|
||||
})
|
||||
}
|
||||
tasks := make([]*pb.BuriedParam, 0)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype175, stove.Temperature))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -23,6 +23,10 @@ func (this *apiComp) AgreeCheck(session comm.IUserSession, req *pb.SociatyAgreeR
|
||||
}
|
||||
|
||||
func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
|
||||
if errdata = this.AgreeCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
@ -95,8 +99,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
|
||||
}
|
||||
|
||||
// 触发任务条件
|
||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype109, 1)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype109, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype109, 1))
|
||||
// 发邮件
|
||||
if err := this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{req.Uid}); err != nil {
|
||||
this.module.Error("发送邮件 模板ID:GuildApproved",
|
||||
@ -113,16 +116,15 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), SociatySubTypeAgree, rsp)
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
//审核通过推送给申请人
|
||||
if err := this.module.SendMsgToUser(string(this.module.GetType()), "pagree", &pb.SociatyPAgreePush{
|
||||
Uid: uid,
|
||||
Uid: req.Uid,
|
||||
SociatyId: sociaty.Id,
|
||||
}, req.Uid); err != nil {
|
||||
this.module.Error("审核通过推送",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "申请人", Value: req.Uid},
|
||||
log.Field{Key: "sociatyId", Value: sociaty.Id},
|
||||
)
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ func (this *apiComp) ApplyCheck(session comm.IUserSession, req *pb.SociatyApplyR
|
||||
func (this *apiComp) Apply(session comm.IUserSession, req *pb.SociatyApplyReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
sociaty *pb.DBSociaty
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
err error
|
||||
)
|
||||
|
||||
@ -143,12 +144,17 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.SociatyApplyReq) (
|
||||
// 无需审核
|
||||
if !isCheck {
|
||||
// 触发任务条件
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype109, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype109, 1))
|
||||
}
|
||||
rsp := &pb.SociatyApplyResp{
|
||||
Uid: uid,
|
||||
ScoiatyId: req.SociatyId,
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), SociatySubTypeApply, rsp)
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -33,6 +33,10 @@ func (this *apiComp) CreateCheck(session comm.IUserSession, req *pb.SociatyCreat
|
||||
}
|
||||
|
||||
func (this *apiComp) Create(session comm.IUserSession, req *pb.SociatyCreateReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
|
||||
if errdata = this.CreateCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
@ -206,8 +210,7 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.SociatyCreateReq)
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype188, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype188, 1))
|
||||
// 初始化玩家公会任务
|
||||
if err := this.module.modelSociatyTask.initSociatyTask(user.Uid, sociaty.Id); err != nil {
|
||||
this.module.Error("初始化玩家公会任务",
|
||||
@ -223,5 +226,11 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.SociatyCreateReq)
|
||||
Id: sociaty.Id,
|
||||
Uid: uid,
|
||||
})
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -169,13 +169,17 @@ func (this *apiComp) EnterLevel(session comm.IUserSession, req *pb.StonehengeEnt
|
||||
Room: stone.Rooms,
|
||||
})
|
||||
|
||||
var szTask []*pb.BuriedParam
|
||||
var tasks []*pb.BuriedParam
|
||||
for _, v := range szEvent { // 首次触发指定ID的事件
|
||||
if c, e := this.module.configure.GetStoneEventDataById(v); e == nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype223, c.EventType, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype223, c.EventType, 1))
|
||||
}
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
reward []*pb.UserAtno
|
||||
curbuff int32
|
||||
newbuff int32 // 新获得的buff
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
update = make(map[string]interface{})
|
||||
if errdata = this.EventCheck(session, req); errdata != nil {
|
||||
@ -162,9 +163,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
update["hero"] = stone.Hero
|
||||
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
|
||||
// 战斗失败埋点处理
|
||||
var szTask []*pb.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype225, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype225, 1))
|
||||
return
|
||||
}
|
||||
if !bWin { // 战斗失败直接返回
|
||||
@ -472,9 +471,8 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
})
|
||||
|
||||
// 埋点处理
|
||||
var szTask []*pb.BuriedParam
|
||||
for k := range stone.Rooms.Eventid { // 首次触发指定ID的事件
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype215, k))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype215, k))
|
||||
}
|
||||
var totalhp int32
|
||||
//上阵英雄都为指定职业
|
||||
@ -494,13 +492,13 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
totalhp += v.Currhp * 1000 / maxHp
|
||||
}
|
||||
if job != 0 { // 上阵英雄都为指定职业
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype216, job, stone.StageID)) //上阵英雄都为指定职业,击败石阵秘境中指定关卡的首领
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype216, job, stone.StageID)) //上阵英雄都为指定职业,击败石阵秘境中指定关卡的首领
|
||||
}
|
||||
for _, v := range stone.Webuff {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype217, v, stone.StageID))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype217, v, stone.StageID))
|
||||
}
|
||||
for _, v := range stone.Enemybuff {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype217, v, stone.StageID))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype217, v, stone.StageID))
|
||||
}
|
||||
// Rtype218 统计类型
|
||||
var buffType map[int32]int32
|
||||
@ -517,36 +515,40 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
}
|
||||
}
|
||||
for k, v := range buffType {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype218, k, v, stone.StageID)) //携带指定类型、≥指定数量的buff,击败石阵秘境中指定关卡的首领
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype218, k, v, stone.StageID)) //携带指定类型、≥指定数量的buff,击败石阵秘境中指定关卡的首领
|
||||
}
|
||||
// 累计击败石阵秘境任意关卡的首领N次
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype219, stone.StageID))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype219, stone.StageID))
|
||||
|
||||
//击败指定关卡的首领时,背包中指定道具数量≥指定数量
|
||||
if item, err := this.module.ModuleItems.QueryUserPack(session.GetUserId()); err != nil {
|
||||
for _, v := range item {
|
||||
if v.Amount > 0 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype222, stone.StageID, utils.ToInt32(v.ItemId), int32(v.Amount)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype226, stone.StageID, utils.ToInt32(v.ItemId), int32(v.Amount)))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype222, stone.StageID, utils.ToInt32(v.ItemId), int32(v.Amount)))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype226, stone.StageID, utils.ToInt32(v.ItemId), int32(v.Amount)))
|
||||
}
|
||||
}
|
||||
}
|
||||
//击败石阵秘境中指定关卡的首领时,每名上阵英雄血量≤比例(千分比)
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype224, totalhp, stone.StageID))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype224, totalhp, stone.StageID))
|
||||
}
|
||||
|
||||
// 强化商店
|
||||
if eventConf.EventType == EventType29 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype220, 1)) // 强化buff 埋点
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype220, 1)) // 强化buff 埋点
|
||||
}
|
||||
// 累计获得指定类型buff
|
||||
if eventConf.EventType == EventType25 {
|
||||
if newbuff != 0 {
|
||||
if conf, err := this.module.configure.GetStoneBuffDataById(newbuff); err == nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype221, conf.Type, 1)) //累计获得N个指定类型的buff
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype221, conf.Type, 1)) //累计获得N个指定类型的buff
|
||||
}
|
||||
}
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -165,13 +165,16 @@ func (this *apiComp) GotoRoom(session comm.IUserSession, req *pb.StonehengeGotoR
|
||||
})
|
||||
|
||||
// 埋点
|
||||
var szTask []*pb.BuriedParam
|
||||
var tasks []*pb.BuriedParam
|
||||
for _, v := range szEvent { // 首次触发指定ID的事件
|
||||
if c, e := this.module.configure.GetStoneEventDataById(v); e == nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype223, c.EventType, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype223, c.EventType, 1))
|
||||
}
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -31,6 +31,10 @@ func (this *apiComp) CreateCheck(session comm.IUserSession, req *pb.UserCreateRe
|
||||
|
||||
// 创角
|
||||
func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
|
||||
if errdata = this.CreateCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
@ -113,41 +117,15 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
||||
_ = this.module.DispenseRes(session, res, true)
|
||||
}
|
||||
|
||||
//初始化用户设置
|
||||
// this.module.modelSetting.InitSetting(session.GetUserId())
|
||||
|
||||
// go func() {
|
||||
// //初始化公会 date3.10
|
||||
// sociaty := this.module.CrossCreateSociaty(uid, req.NickName)
|
||||
// if sociaty == nil {
|
||||
// return
|
||||
// }
|
||||
// this.module.Debugf("公会ID:%v", sociaty.Id)
|
||||
// exUpdate := map[string]interface{}{
|
||||
// "sociatyId": sociaty.Id,
|
||||
// }
|
||||
|
||||
// if err := this.module.ModuleUser.ChangeUserExpand(uid, exUpdate); err != nil {
|
||||
// errdata = &pb.ErrorData{
|
||||
// Code: pb.ErrorCode_DBError,
|
||||
// Title: pb.ErrorCode_DBError.ToString(),
|
||||
// Message: err.Error(),
|
||||
// }
|
||||
// this.module.Error("更新玩家公会ID",
|
||||
// log.Field{Key: "uid", Value: uid},
|
||||
// log.Field{Key: "sociatyId", Value: sociaty.Id},
|
||||
// log.Field{Key: "err", Value: err.Error()},
|
||||
// )
|
||||
// return
|
||||
// }
|
||||
|
||||
// }()
|
||||
// resp.IsSucc = true
|
||||
// this.sendMsg(session, UserSubTypeCreate, resp)
|
||||
session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{})
|
||||
if req.Figure != 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype72, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype72, 1))
|
||||
}
|
||||
this.mail.SendMailByCid(session, comm.Welcomemail, nil)
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -2,8 +2,6 @@ package user
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/event"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/utils"
|
||||
@ -24,33 +22,31 @@ func (this *apiComp) LoginCheck(session comm.IUserSession, req *pb.UserLoginReq)
|
||||
|
||||
// 登录
|
||||
func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (errdata *pb.ErrorData) {
|
||||
if errdata = this.LoginCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
var (
|
||||
err error
|
||||
user *pb.DBUser
|
||||
expand *pb.DBUserExpand
|
||||
lastLoginTime int64
|
||||
update map[string]interface{} = make(map[string]interface{})
|
||||
err error
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
|
||||
rsp := &pb.UserLoginResp{}
|
||||
if errdata = this.LoginCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
//从mgo查询user
|
||||
user, err = this.module.modelUser.FindByAccount(req.Sid, req.Account)
|
||||
if err != nil {
|
||||
if err != mongo.ErrNoDocuments {
|
||||
log.Error("User_FindByAccount",
|
||||
log.Field{Key: "uid", Value: req.Sid},
|
||||
log.Field{Key: "account", Value: req.Account},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
if err != nil && err != mongo.ErrNoDocuments {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
var isNewUser bool
|
||||
if user == nil {
|
||||
if err == mongo.ErrNoDocuments {
|
||||
//如果是新玩家,创建一条基础的数据,页面会引导进入创角页面
|
||||
user = &pb.DBUser{
|
||||
Sid: req.Sid,
|
||||
@ -64,10 +60,14 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
}
|
||||
err = this.module.modelUser.User_Create(user)
|
||||
if err != nil {
|
||||
log.Errorf("User_CreateUser err %v", err)
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
isNewUser = true
|
||||
expand = &pb.DBUserExpand{}
|
||||
} else {
|
||||
// 玩家是否已在线
|
||||
if isession, ok := this.module.ModuleBase.GetUserSession(user.Uid); ok {
|
||||
@ -76,19 +76,57 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
isession.UnBind()
|
||||
this.module.PutUserSession(isession)
|
||||
}
|
||||
}
|
||||
lastLoginTime = user.Logintime
|
||||
user.Logintime = configure.Now().Unix()
|
||||
user.Lastloginip = session.GetIP()
|
||||
user.Offlinetime = 0
|
||||
user.Area = req.Area
|
||||
user.Channel = req.Channel
|
||||
user.Vcode = req.Vcode
|
||||
user.Vname = req.Vname
|
||||
update["logintime"] = user.Logintime
|
||||
update["lastloginip"] = user.Lastloginip
|
||||
update["offlinetime"] = user.Offlinetime
|
||||
update["Channel"] = user.Channel
|
||||
update["vcode"] = user.Vcode
|
||||
update["vname"] = user.Vname
|
||||
|
||||
//bind user
|
||||
err = session.Bind(user.Uid, this.service.GetId())
|
||||
if err != nil {
|
||||
if expand, err = this.module.GetUserExpand(session.GetUserId()); err != nil {
|
||||
if err != mongo.ErrNoDocuments {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_BindUser,
|
||||
Title: pb.ErrorCode_BindUser.ToString(),
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if !utils.IsToday(lastLoginTime) { //当天第一次登录
|
||||
user.Nologindays = int32(utils.DiffDays(lastLoginTime, configure.Now().Unix()))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
this.module.modelExpand.Change(session.GetUserId(), map[string]interface{}{
|
||||
"loginAddCount": expand.LoginAddCount + 1,
|
||||
"globalbuff": 0,
|
||||
"consumPs": 0, // 重置每日消耗体力
|
||||
"loginContinueCount": expand.LoginContinueCount + 1,
|
||||
})
|
||||
// 清理点赞
|
||||
|
||||
}
|
||||
err = this.module.modelUser.Change(user.Uid, update)
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype7, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype230, 1, int32(configure.Now().Weekday())))
|
||||
//缓存user session
|
||||
err = this.module.modelSession.addUserSession(user.Uid, session)
|
||||
if err != nil {
|
||||
@ -100,82 +138,97 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
}
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), UserSubTypeLogin, &pb.UserLoginResp{
|
||||
Data: user,
|
||||
Ex: expand,
|
||||
TimeNow: configure.Now().Unix(),
|
||||
})
|
||||
|
||||
// 在logintime更新前判断是否是昨天
|
||||
if utils.IsYestoday(user.Logintime) {
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype9, 1))
|
||||
} else {
|
||||
this.module.ModuleBuried.ResetBuriedByType(user.Uid, comm.Rtype9)
|
||||
}
|
||||
|
||||
//不是新账号
|
||||
if !isNewUser {
|
||||
lastLoginTime = user.Logintime
|
||||
user.Logintime = configure.Now().Unix()
|
||||
user.Lastloginip = session.GetIP()
|
||||
user.Offlinetime = 0
|
||||
user.Area = req.Area
|
||||
user.Channel = req.Channel
|
||||
user.Vcode = req.Vcode
|
||||
user.Vname = req.Vname
|
||||
update := utils.StructToMap(user) //尽量不要更新整个数据
|
||||
err = this.module.modelUser.Change(user.Uid, update)
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if this.module.modelUser.isLoginFirst(lastLoginTime) {
|
||||
this.module.ModuleHero.NoLoginDay(user.Uid, int32(utils.DiffDays(lastLoginTime, configure.Now().Unix())))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
this.module.modelExpand.updateLoginDay(user.Uid, lastLoginTime)
|
||||
// 清理点赞
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleFriend.ResetFriend(user.Uid)
|
||||
this.module.modelSign.UserSign(session)
|
||||
this.module.ModuleItems.InitItemBagData(session)
|
||||
}
|
||||
|
||||
// 判断昨日是否登录
|
||||
|
||||
rsp.Data = user
|
||||
|
||||
// 查询玩家扩展数据
|
||||
if expand, err := this.module.GetUserExpand(session.GetUserId()); err != nil {
|
||||
if err != mongo.ErrNoDocuments {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
} else {
|
||||
rsp.Ex = expand
|
||||
}
|
||||
} else { //新号
|
||||
rsp.Ex = &pb.DBUserExpand{}
|
||||
this.module.modelSign.UserSign(session)
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
}
|
||||
|
||||
this.module.ModuleHero.CheckPeachReward(session, user.Ctime)
|
||||
go this.module.RecoverUserPsStart(session.Clone())
|
||||
// 日常登录任务
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype7, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype230, 1, int32(configure.Now().Weekday())))
|
||||
this.module.ModulePrivilege.CheckDailyPrivilegeMail(session)
|
||||
|
||||
rsp.Data = user
|
||||
rsp.TimeNow = configure.Now().Unix() // 设置服务器时间
|
||||
session.SendMsg(string(this.module.GetType()), UserSubTypeLogin, rsp)
|
||||
if len(tasks) > 0 {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
}
|
||||
})
|
||||
|
||||
event.TriggerEvent(comm.EventUserLogin, session.Clone())
|
||||
// 在logintime更新前判断是否是昨天
|
||||
// if utils.IsYestoday(user.Logintime) {
|
||||
// tasks = append(tasks, comm.GetBuriedParam(comm.Rtype9, 1))
|
||||
// } else {
|
||||
// this.module.ModuleBuried.ResetBuriedByType(user.Uid, comm.Rtype9)
|
||||
// }
|
||||
|
||||
//不是新账号
|
||||
// if !isNewUser {
|
||||
// lastLoginTime = user.Logintime
|
||||
// user.Logintime = configure.Now().Unix()
|
||||
// user.Lastloginip = session.GetIP()
|
||||
// user.Offlinetime = 0
|
||||
// user.Area = req.Area
|
||||
// user.Channel = req.Channel
|
||||
// user.Vcode = req.Vcode
|
||||
// user.Vname = req.Vname
|
||||
// update := utils.StructToMap(user) //尽量不要更新整个数据
|
||||
// err = this.module.modelUser.Change(user.Uid, update)
|
||||
// if err != nil {
|
||||
// errdata = &pb.ErrorData{
|
||||
// Code: pb.ErrorCode_DBError,
|
||||
// Title: pb.ErrorCode_DBError.ToString(),
|
||||
// Message: err.Error(),
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
|
||||
// if this.module.modelUser.isLoginFirst(lastLoginTime) {
|
||||
// this.module.ModuleHero.NoLoginDay(user.Uid, int32(utils.DiffDays(lastLoginTime, configure.Now().Unix())))
|
||||
// tasks = append(tasks, comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
// this.module.modelExpand.updateLoginDay(user.Uid, lastLoginTime)
|
||||
// // 清理点赞
|
||||
// this.module.ModuleFriend.ResetFriend(user.Uid)
|
||||
// this.module.modelSign.UserSign(session)
|
||||
// this.module.ModuleItems.InitItemBagData(session)
|
||||
// }
|
||||
|
||||
// // 判断昨日是否登录
|
||||
|
||||
// rsp.Data = user
|
||||
|
||||
// // 查询玩家扩展数据
|
||||
// if expand, err := this.module.GetUserExpand(session.GetUserId()); err != nil {
|
||||
// if err != mongo.ErrNoDocuments {
|
||||
// errdata = &pb.ErrorData{
|
||||
// Code: pb.ErrorCode_DBError,
|
||||
// Title: pb.ErrorCode_DBError.ToString(),
|
||||
// Message: err.Error(),
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
// } else {
|
||||
// rsp.Ex = expand
|
||||
// }
|
||||
// } else { //新号
|
||||
// rsp.Ex = &pb.DBUserExpand{}
|
||||
// this.module.modelSign.UserSign(session)
|
||||
// tasks = append(tasks, comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
// }
|
||||
|
||||
// this.module.ModuleHero.CheckPeachReward(session, user.Ctime)
|
||||
// go this.module.RecoverUserPsStart(session.Clone())
|
||||
// // 日常登录任务
|
||||
// tasks = append(tasks, comm.GetBuriedParam(comm.Rtype7, 1))
|
||||
// tasks = append(tasks, comm.GetBuriedParam(comm.Rtype230, 1, int32(configure.Now().Weekday())))
|
||||
// this.module.ModulePrivilege.CheckDailyPrivilegeMail(session)
|
||||
|
||||
// rsp.Data = user
|
||||
// rsp.TimeNow = configure.Now().Unix() // 设置服务器时间
|
||||
// session.SendMsg(string(this.module.GetType()), UserSubTypeLogin, rsp)
|
||||
// if len(tasks) > 0 {
|
||||
// go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
// }
|
||||
|
||||
// event.TriggerEvent(comm.EventUserLogin, session.Clone())
|
||||
return
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import (
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/sys/db"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
@ -94,22 +93,22 @@ func (this *ModelExpand) ChangeUserExpand(uid string, value map[string]interface
|
||||
|
||||
}
|
||||
|
||||
// 累计登录天数 和 全局buff清理
|
||||
func (this *ModelExpand) updateLoginDay(uid string, timestamp int64) (err error) {
|
||||
var de *pb.DBUserExpand
|
||||
if de, err = this.GetUserExpand(uid); err == nil {
|
||||
count := de.LoginAddCount + 1
|
||||
update := map[string]interface{}{
|
||||
"loginAddCount": count,
|
||||
"globalbuff": 0,
|
||||
"consumPs": 0, // 重置每日消耗体力
|
||||
}
|
||||
// // 累计登录天数 和 全局buff清理
|
||||
// func (this *ModelExpand) updateLoginDay(uid string, timestamp int64) (err error) {
|
||||
// var de *pb.DBUserExpand
|
||||
// if de, err = this.GetUserExpand(uid); err == nil {
|
||||
// count := de.LoginAddCount + 1
|
||||
// update := map[string]interface{}{
|
||||
// "loginAddCount": count,
|
||||
// "globalbuff": 0,
|
||||
// "consumPs": 0, // 重置每日消耗体力
|
||||
// }
|
||||
|
||||
// 更新连续等登录天数
|
||||
if utils.IsYestoday(timestamp) {
|
||||
update["loginContinueCount"] = de.LoginContinueCount + 1
|
||||
}
|
||||
err = this.ChangeUserExpand(uid, update)
|
||||
}
|
||||
return
|
||||
}
|
||||
// // 更新连续等登录天数
|
||||
// if utils.IsYestoday(timestamp) {
|
||||
// update["loginContinueCount"] = de.LoginContinueCount + 1
|
||||
// }
|
||||
// err = this.ChangeUserExpand(uid, update)
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
|
@ -80,10 +80,13 @@ func (this *ModelUser) User_Create(user *pb.DBUser) (err error) {
|
||||
user.Lv = 1 //初始等级
|
||||
user.Ctime = now
|
||||
user.Logintime = now
|
||||
_, err = this.DB.InsertOne(comm.TableUser, user)
|
||||
if _, err = this.DB.InsertOne(comm.TableUser, user); err != nil {
|
||||
this.module.Errorln("创建用户", log.Field{Key: "sid", Value: user.Sid}, log.Field{Key: "account", Value: user.Binduid}, log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
key := fmt.Sprintf("%s:%s", this.TableName, user.Uid)
|
||||
if err = this.Redis.HMSet(key, user); err != nil {
|
||||
this.module.Error("创建用户", log.Field{Key: "sid", Value: user.Sid}, log.Field{Key: "account", Value: user.Binduid})
|
||||
this.module.Error("创建用户", log.Field{Key: "sid", Value: user.Sid}, log.Field{Key: "account", Value: user.Binduid}, log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
return
|
||||
|
@ -773,7 +773,9 @@ func (this *User) AddAttributeValues(session comm.IUserSession, attrs map[string
|
||||
}
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.ModuleBuried.TriggerBuried(session.Clone(), tasks...)
|
||||
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -218,30 +218,34 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
||||
this.module.Errorf("no found userdata uid:%s", session.GetUserId())
|
||||
}
|
||||
// 随机任务统计
|
||||
var szTask []*pb.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype73, 1, req.BossId, req.Difficulty))
|
||||
var tasks []*pb.BuriedParam
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype73, 1, req.BossId, req.Difficulty))
|
||||
//szTask = append(szTask, comm.GetBuriedParam(comm.Rtype74, req.BossId, req.Difficulty))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype78, req.BossId, req.Report.Costtime/1000, req.Difficulty))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype78, req.BossId, req.Report.Costtime/1000, req.Difficulty))
|
||||
|
||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||
if v.Ishelp { // 判断是否有助战
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype79, req.Difficulty, req.BossId))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype79, req.Difficulty, req.BossId))
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if req.Auto > 0 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype75, req.BossId, req.Difficulty))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype172, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype181, 1, req.BossId, req.Difficulty))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype75, req.BossId, req.Difficulty))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype172, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype181, 1, req.BossId, req.Difficulty))
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype201, consumPs))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype76, 1, req.BossId))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype201, consumPs))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype76, 1, req.BossId))
|
||||
if bHelp {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype180, req.BossId, 1))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype180, req.BossId, 1))
|
||||
}
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
return
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ func (this *apiComp) BattleFinish(session comm.IUserSession, req *pb.WTaskBattle
|
||||
conf *cfg.GameWorldBattleData
|
||||
prop []*cfg.Gameatn
|
||||
award []*pb.UserAssets
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
err error
|
||||
isWin bool
|
||||
)
|
||||
@ -99,10 +100,16 @@ func (this *apiComp) BattleFinish(session comm.IUserSession, req *pb.WTaskBattle
|
||||
return
|
||||
}
|
||||
//触发任务
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype70, 1, req.BattleConfId))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype70, 1, req.BattleConfId))
|
||||
} else {
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype227, 1, req.BattleConfId))
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype227, 1, req.BattleConfId))
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "battlefinish", &pb.WTaskBattleFinishResp{BattleConfId: req.BattleConfId, Award: award})
|
||||
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ func (this *apiComp) BoxReceive(session comm.IUserSession, req *pb.WTaskBoxRecei
|
||||
award []*pb.UserAtno
|
||||
ok bool
|
||||
err error
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
)
|
||||
if errdata = this.BoxReceiveCheck(session, req); errdata != nil {
|
||||
return
|
||||
@ -110,8 +111,13 @@ func (this *apiComp) BoxReceive(session comm.IUserSession, req *pb.WTaskBoxRecei
|
||||
}
|
||||
return
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype205, 1))
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "boxreceive", &pb.WTaskBoxReceiveResp{Tid: req.Tid, Boxid: req.Boxid, Award: award})
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype205, 1))
|
||||
if len(tasks) > 0 {
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -97,7 +97,11 @@ func (this *apiComp) EventComplete(session comm.IUserSession, req *pb.WTaskEvent
|
||||
|
||||
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...)
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "eventcomplete", &pb.WTaskEventCompleteResp{Group: req.Group, Event: event, Award: award})
|
||||
return
|
||||
}
|
||||
|
@ -155,6 +155,7 @@ type DBUser struct {
|
||||
Deposit int64 `protobuf:"varint,42,opt,name=deposit,proto3" json:"deposit" bson:"deposit"` //储蓄
|
||||
Profit int64 `protobuf:"varint,43,opt,name=profit,proto3" json:"profit" bson:"profit"` //商队盈利
|
||||
Integral int64 `protobuf:"varint,44,opt,name=integral,proto3" json:"integral" bson:"integral"` //充值积分
|
||||
Nologindays int32 `protobuf:"varint,45,opt,name=nologindays,proto3" json:"nologindays" bson:"nologindays"` //连续多少天未登录
|
||||
}
|
||||
|
||||
func (x *DBUser) Reset() {
|
||||
@ -490,6 +491,13 @@ func (x *DBUser) GetIntegral() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBUser) GetNologindays() int32 {
|
||||
if x != nil {
|
||||
return x.Nologindays
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DBUserSetting struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -815,7 +823,7 @@ var file_user_user_db_proto_rawDesc = []byte{
|
||||
0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xa4, 0x08, 0x0a,
|
||||
0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xc6, 0x08, 0x0a,
|
||||
0x06, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69,
|
||||
@ -882,46 +890,48 @@ var file_user_user_db_proto_rawDesc = []byte{
|
||||
0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67,
|
||||
0x72, 0x61, 0x6c, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67,
|
||||
0x72, 0x61, 0x6c, 0x22, 0xc7, 0x02, 0x0a, 0x0d, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68,
|
||||
0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, 0x69, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x75, 0x6c,
|
||||
0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75,
|
||||
0x73, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67,
|
||||
0x75, 0x61, 0x6a, 0x69, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, 0x75, 0x61, 0x6a,
|
||||
0x69, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75,
|
||||
0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61,
|
||||
0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x78, 0x75,
|
||||
0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69,
|
||||
0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x22, 0xb8, 0x01,
|
||||
0x0a, 0x06, 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61,
|
||||
0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x70, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x70, 0x75,
|
||||
0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x74, 0x69, 0x70, 0x73, 0x22, 0x57, 0x0a, 0x0c, 0x44, 0x42, 0x52, 0x61,
|
||||
0x6e, 0x64, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x5f, 0x63, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x61, 0x6d, 0x65, 0x43,
|
||||
0x6e, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x72, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x64, 0x61,
|
||||
0x79, 0x73, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x69,
|
||||
0x6e, 0x64, 0x61, 0x79, 0x73, 0x22, 0xc7, 0x02, 0x0a, 0x0d, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72,
|
||||
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x75, 0x61,
|
||||
0x7a, 0x68, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68,
|
||||
0x69, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x77,
|
||||
0x75, 0x6c, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
|
||||
0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, 0x75,
|
||||
0x61, 0x6a, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x6e,
|
||||
0x73, 0x75, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75,
|
||||
0x6f, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78,
|
||||
0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
|
||||
0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x61, 0x69,
|
||||
0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x22,
|
||||
0xb8, 0x01, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x73, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
|
||||
0x73, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x64, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x70, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06,
|
||||
0x70, 0x75, 0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x70, 0x73, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x69, 0x70, 0x73, 0x22, 0x57, 0x0a, 0x0c, 0x44, 0x42,
|
||||
0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x5f, 0x63, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x43, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -61,7 +61,7 @@ type DBUserExpand struct {
|
||||
Race map[int32]int32 `protobuf:"bytes,37,rep,name=race,proto3" json:"race" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 阵营ID 1~4 value 总好感度
|
||||
Herofrag map[string]int32 `protobuf:"bytes,38,rep,name=herofrag,proto3" json:"herofrag" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //当获得重复守护者时获得的守护之心次数
|
||||
Passonlv int32 `protobuf:"varint,39,opt,name=passonlv,proto3" json:"passonlv"` //传功等级
|
||||
ConsumPs int32 `protobuf:"varint,40,opt,name=consumPs,proto3" json:"consumPs"` // 今天消耗的体力
|
||||
ConsumPs int32 `protobuf:"varint,40,opt,name=consumPs,proto3" json:"consumPs"` //今天消耗的体力
|
||||
}
|
||||
|
||||
func (x *DBUserExpand) Reset() {
|
||||
|
Loading…
Reference in New Issue
Block a user