统计类型任务
This commit is contained in:
parent
c8ef9eb4ec
commit
778ca8879f
@ -135,7 +135,12 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c
|
||||
|
||||
// 拥有xx个好友
|
||||
// this.moduleFriend.ModuleRtask.SendToRtask(session, comm.Rtype10, int32(len(agreeIds)))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype10, int32(len(agreeIds))))
|
||||
var sz []*comm.BuriedParam
|
||||
for _, v := range req.FriendIds {
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype10, v))
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), sz...)
|
||||
resp := &pb.FriendAgreeResp{
|
||||
Num: optNum,
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
|
||||
chanegCard []*pb.DBHero // change
|
||||
_heroMap map[string]interface{}
|
||||
err error
|
||||
bManAwaken bool // 是否达到满级共鸣
|
||||
)
|
||||
_heroMap = make(map[string]interface{}, 0)
|
||||
chanegCard = make([]*pb.DBHero, 0)
|
||||
@ -102,8 +103,10 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
|
||||
this.module.Errorf("no found userdata uid:%s", session.GetUserId())
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam2(comm.Rtype34, _hero.HeroID, _hero.JuexingLv))
|
||||
|
||||
var szTask []*comm.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype34, 1, _hero.JuexingLv))
|
||||
//szTask = append(szTask, comm.GetBuriedParam(comm.Rtype34, 1, _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))
|
||||
@ -111,31 +114,34 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype122, _hero.JuexingLv, _hero.Star))
|
||||
cfg, err := this.module.configure.GetHeroConfig(_hero.HeroID)
|
||||
if err == nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype121, 1, cfg.Race))
|
||||
|
||||
//xx英雄满级、共鸣、觉醒至最高状态
|
||||
_, err := this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
||||
if err != nil { // 达到满级觉醒
|
||||
if _hero.Lv == this.module.configure.GetHeroMaxLv(_hero.Star) {
|
||||
// 校验共鸣满级
|
||||
var _l int32
|
||||
talent, err := this.module.modelTalent.GetHerotalent(session.GetUserId())
|
||||
if err == nil {
|
||||
for _, v := range talent {
|
||||
if v.HeroId == _hero.HeroID {
|
||||
_l = int32(len(v.Talent))
|
||||
break
|
||||
}
|
||||
}
|
||||
var sz []*comm.BuriedParam
|
||||
// 校验共鸣满级
|
||||
var _l int32
|
||||
talent, err := this.module.modelTalent.GetHerotalent(session.GetUserId())
|
||||
if err == nil {
|
||||
for _, v := range talent {
|
||||
if v.HeroId == _hero.HeroID {
|
||||
_l = int32(len(v.Talent))
|
||||
break
|
||||
}
|
||||
if this.module.configure.GetHeroTalentMaxLv(_hero.HeroID) == _l {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype37, 1, cfg.Color))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype38, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype36, 1, cfg.Color, cfg.Job, cfg.Race, _hero.JuexingLv))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if this.module.configure.GetHeroTalentMaxLv(_hero.HeroID) == _l {
|
||||
bManAwaken = true
|
||||
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype121, 1, cfg.Race))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), 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 {
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype37, _hero.HeroID, cfg.Color))
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype38, _hero.HeroID))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), sz...)
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
data.Message = err.Error()
|
||||
|
@ -132,7 +132,8 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
|
||||
}
|
||||
}
|
||||
if maxLv {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype54, 1))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam2(comm.Rtype54, _hero.HeroID))
|
||||
// szTask = append(szTask, comm.GetBuriedParam(comm.Rtype54, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype57, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype174, 1, _hero.Star))
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
||||
// 推送 世界任务消息
|
||||
var szTask []*comm.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype6, _hero.Star, utils.ToInt32(_hero.HeroID)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype25, 1, utils.ToInt32(_hero.HeroID), _hero.Star))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam2(comm.Rtype25, _hero.HeroID, _hero.Star))
|
||||
|
||||
if _hero.Star == 4 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype26, 1))
|
||||
|
@ -139,7 +139,10 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
|
||||
var szTask []*comm.BuriedParam
|
||||
// 查询英雄相关信息
|
||||
if heroObj := this.module.QueryHeroByConfId(session.GetUserId(), talent.HeroId); heroObj != nil {
|
||||
var sz []*comm.BuriedParam
|
||||
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype123, heroObj.HeroID, heroObj.Star))
|
||||
sz = append(sz, 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)))
|
||||
@ -154,13 +157,15 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
|
||||
if heroObj.Lv == this.module.configure.GetHeroMaxLv(heroObj.Star) {
|
||||
|
||||
if this.module.configure.GetHeroTalentMaxLv(heroObj.HeroID) == int32(len(talent.Talent)) {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype37, 1, cfg.Color))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype38, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype36, 1, cfg.Color, cfg.Job, cfg.Race, heroObj.JuexingLv))
|
||||
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype37, heroObj.HeroID, cfg.Color))
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype38, heroObj.HeroID))
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), sz...)
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -594,8 +594,10 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype24, 1))
|
||||
// szTask = append(szTask, comm.GetBuriedParam(comm.Rtype29, 1, hero.Lv, utils.ToInt32(hero.HeroID)))
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam2(comm.Rtype23, hero.HeroID, hero.Star, hero.Lv))
|
||||
if cfg, _ := this.module.configure.GetHeroConfig(hero.HeroID); cfg != nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype32, 1, cfg.Color, hero.Lv))
|
||||
//szTask = append(szTask, comm.GetBuriedParam(comm.Rtype32, 1, cfg.Color, hero.Lv))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam2(comm.Rtype32, hero.HeroID, cfg.Color, hero.Lv))
|
||||
|
||||
//xx英雄满级、共鸣、觉醒至最高状态
|
||||
nextAwaken, _ := this.module.configure.GetHeroAwakenConfig(hero.HeroID, hero.JuexingLv+1)
|
||||
@ -612,14 +614,17 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
|
||||
}
|
||||
}
|
||||
if this.module.configure.GetHeroTalentMaxLv(hero.HeroID) == _l {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype37, 1, cfg.Color))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype38, 1))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype36, 1, cfg.Color, cfg.Job, cfg.Race, hero.JuexingLv))
|
||||
//szTask = append(szTask, comm.GetBuriedParam(comm.Rtype37, 1, cfg.Color))
|
||||
var sz []*comm.BuriedParam
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype37, hero.HeroID, cfg.Color))
|
||||
sz = append(sz, comm.GetBuriedParam2(comm.Rtype38, hero.HeroID))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), sz...)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype111, 1, hero.Lv))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam2(comm.Rtype111, hero.HeroID, hero.Lv))
|
||||
//szTask = append(szTask, comm.GetBuriedParam(comm.Rtype111, 1, 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))
|
||||
|
@ -98,7 +98,8 @@ func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string,
|
||||
if cfg != nil {
|
||||
var szTask []*comm.BuriedParam
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype1, 1, utils.ToInt32(heroCfgId)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype30, 1, cfg.Color))
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam2(comm.Rtype30, heroCfgId, cfg.Color))
|
||||
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype31, 1, cfg.Color))
|
||||
go this.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
}
|
||||
|
@ -166,6 +166,8 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype133, _heroObj.Favorlv, utils.ToInt32(_heroObj.Heroid)))
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype134, upLv))
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), szTask...)
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam2(comm.Rtype132, _heroObj.Heroid, _heroObj.Favorlv))
|
||||
}
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user