埋点数据调整

This commit is contained in:
meixiongfeng 2023-05-24 18:46:02 +08:00
parent 458c2347a6
commit 1202958027
12 changed files with 47 additions and 47 deletions

View File

@ -636,6 +636,10 @@ const (
Rtype160 TaskType = 160 //主线总星数达到X星
Rtype161 TaskType = 161 //在自动战斗过程中完成另一场战斗
Rtype165 TaskType = 165 //铁匠铺收藏X件收藏品
Rtype166 TaskType = 166 //铁匠铺图鉴收藏总计达到X个
Rtype167 TaskType = 167 //铁匠铺收藏积分达到X分
Rtype168 TaskType = 168 //完成功夫大师挑战塔第X层
Rtype169 TaskType = 169 //触发指定套装的套装效果
Rtype170 TaskType = 170 //获得指定材料X个

View File

@ -65,7 +65,7 @@ type (
//英雄
IHero interface {
//查询用户卡片数量
QueryHeroAmount(uId string, heroCfgId string) (amount uint32)
QueryHeroByConfId(uId string, heroCfgId string) (hero *pb.DBHero)
// 批量创建英雄
CreateRepeatHeros(session IUserSession, heros map[string]int32, bPush bool) (hero *pb.DBHero, atno []*pb.UserAtno, code pb.ErrorCode)
@ -422,10 +422,7 @@ type (
IReddot
}
ILibrary interface {
//与N个英雄好感度等级达到A
CheckRtype132(uid string, num int32, lv int32) bool
//与指定英雄好感度等级达到N
CheckRtype133(uid string, heroId string, lv int32) bool
// 任务完成通知
TaskFinishNotify(uid string, taskId, fetterId int32) error
}

View File

@ -101,9 +101,11 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
}
var szTask []*comm.TaskParam
szTask = append(szTask, comm.GettaskParam(comm.Rtype34, 1, _hero.JuexingLv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype119, _hero.JuexingLv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype119, _hero.JuexingLv, utils.ToInt32(_hero.HeroID)))
szTask = append(szTask, comm.GettaskParam(comm.Rtype35, _hero.JuexingLv, utils.ToInt32(_hero.HeroID)))
szTask = append(szTask, comm.GettaskParam(comm.Rtype118, _hero.Lv, _hero.JuexingLv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype120, _hero.JuexingLv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype122, _hero.JuexingLv, _hero.Star))
cfg := this.module.configure.GetHeroConfig(_hero.HeroID)
if cfg != nil {
szTask = append(szTask, comm.GettaskParam(comm.Rtype121, cfg.Race, utils.ToInt32(_hero.HeroID), _hero.JuexingLv))

View File

@ -137,7 +137,9 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
if cfg := this.module.configure.GetHeroConfig(_hero.HeroID); cfg != nil {
szTask = append(szTask, comm.GettaskParam(comm.Rtype55, 1, cfg.Color))
szTask = append(szTask, comm.GettaskParam(comm.Rtype56, 1, 1, cfg.Job))
szTask = append(szTask, comm.GettaskParam(comm.Rtype116, lvUpCount, cfg.Race))
}
szTask = append(szTask, comm.GettaskParam(comm.Rtype117, lvUpCount, utils.ToInt32(_hero.HeroID)))
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
return
}

View File

@ -95,7 +95,8 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
} else if _hero.Star == 6 {
szTask = append(szTask, comm.GettaskParam(comm.Rtype28, 1))
}
szTask = append(szTask, comm.GettaskParam(comm.Rtype115, utils.ToInt32(_hero.HeroID), _hero.Star))
szTask = append(szTask, comm.GettaskParam(comm.Rtype114, _hero.Star, utils.ToInt32(_hero.HeroID)))
szTask = append(szTask, comm.GettaskParam(comm.Rtype115, 1, _hero.Star))
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
return
}

View File

@ -4,6 +4,7 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/utils"
)
//参数校验
@ -134,5 +135,19 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
Telnet: talent,
TalentID: req.TalentID, // 返回刚学习过的天赋ID
})
var szTask []*comm.TaskParam
// 查询英雄相关信息
if heroObj := this.module.QueryHeroByConfId(session.GetUserId(), talent.HeroId); heroObj != nil {
szTask = append(szTask, comm.GettaskParam(comm.Rtype123, 1, heroObj.Lv, heroObj.Star))
szTask = append(szTask, comm.GettaskParam(comm.Rtype124, 1))
szTask = append(szTask, comm.GettaskParam(comm.Rtype125, 1, utils.ToInt32(heroObj.HeroID)))
if cfg := this.module.configure.GetHeroConfig(heroObj.HeroID); cfg != nil {
szTask = append(szTask, comm.GettaskParam(comm.Rtype126, 1, cfg.Race))
}
szTask = append(szTask, comm.GettaskParam(comm.Rtype127, 1, heroObj.Star))
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
}
return
}

View File

@ -603,7 +603,11 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
}
}
}
szTask = append(szTask, comm.GettaskParam(comm.Rtype111, 1, hero.Lv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype112, 1, hero.Lv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype113, hero.Lv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype33, 1, 1, hero.Lv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype118, hero.Lv, hero.JuexingLv))
go this.moduleHero.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
//this.moduleHero.ModuleRtask.SendToRtask(session, comm.Rtype33, 1, 1, hero.Lv)
}

View File

@ -182,15 +182,14 @@ func (this *Hero) GetHeroList(uid string) []*pb.DBHero {
return this.modelHero.getHeroList(uid)
}
// 查询英雄数量
func (this *Hero) QueryHeroAmount(uId string, heroCfgId string) (amount uint32) {
func (this *Hero) QueryHeroByConfId(uId string, heroCfgId string) (hero *pb.DBHero) {
heroes := this.GetHeroList(uId)
for _, v := range heroes {
if v.HeroID == heroCfgId {
amount++
return v
}
}
return amount
return nil
}
// 删除指定卡牌

View File

@ -157,8 +157,13 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
})
}
}
var szTask []*comm.TaskParam
szTask = append(szTask, comm.GettaskParam(comm.Rtype132, 1, _heroObj.Favorlv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype133, _heroObj.Favorlv, utils.ToInt32(_heroObj.Heroid)))
szTask = append(szTask, comm.GettaskParam(comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv))
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv))
//go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv))
}
return

View File

@ -252,38 +252,6 @@ func (this *Library) Rpc_ModuleFetter(ctx context.Context, args *pb.RPCGeneralRe
return
}
//与N个英雄好感度等级达到A
func (this *Library) CheckRtype132(uid string, num int32, lv int32) bool {
fetter := this.GetHeroFetterList(uid)
if len(fetter) == 0 {
return false
}
for _, v := range fetter {
if v.Favorlv >= lv {
num--
}
}
if num >= 0 {
return true
}
return false
}
//与指定英雄好感度等级达到N
func (this *Library) CheckRtype133(uid string, heroId string, lv int32) bool {
fetter := this.GetHeroFetterList(uid)
if len(fetter) == 0 {
return false
}
for _, v := range fetter {
if v.Heroid == heroId && v.Favorlv >= lv {
return true
}
}
return false
}
func (this *Library) TaskFinishNotify(uid string, taskId, fetterId int32) error {
ft := this.modelFetterstory.getFetterTasks(uid, fetterId)
if ft == nil {

View File

@ -59,6 +59,7 @@ func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtla
code = pb.ErrorCode_SmithyNoFoundAtlas
return
}
this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype166, 1))
} else if conf.TypeId == 2 {
if v, ok := atlas.Collect[req.Id]; ok {
if !v.Activate { // 激活
@ -74,8 +75,10 @@ func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtla
code = pb.ErrorCode_SmithyNoFoundAtlas
return
}
}
this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype165, 1))
}
this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype167, atlas.Score))
session.SendMsg(string(this.module.GetType()), "atlasactivate", &pb.SmithyAtlasActivateResp{Data: atlas})
return
}

View File

@ -61,7 +61,7 @@ func (this *apiComp) Rise(session comm.IUserSession, req *pb.SmithyRiseReq) (cod
this.module.modelStove.updateSmithyStove(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), "rise", &pb.SmithyRiseResp{Data: stove})
tasks := make([]*comm.TaskParam, 0)
tasks = append(tasks, comm.GettaskParam(comm.Rtype171, stove.Temperature))
tasks = append(tasks, comm.GettaskParam(comm.Rtype175, stove.Temperature))
this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...)
}