随机任务埋点
This commit is contained in:
parent
91026c85c3
commit
431c95ebb0
@ -21,7 +21,7 @@
|
||||
],
|
||||
"probability": 100,
|
||||
"floors": 1,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
@ -46,7 +46,7 @@
|
||||
],
|
||||
"probability": 100,
|
||||
"floors": 1,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
@ -71,7 +71,7 @@
|
||||
],
|
||||
"probability": 100,
|
||||
"floors": 1,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
@ -96,7 +96,7 @@
|
||||
],
|
||||
"probability": 100,
|
||||
"floors": 2,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
@ -121,7 +121,7 @@
|
||||
],
|
||||
"probability": 100,
|
||||
"floors": 3,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
@ -146,7 +146,7 @@
|
||||
],
|
||||
"probability": 100,
|
||||
"floors": 4,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
@ -171,7 +171,7 @@
|
||||
],
|
||||
"probability": 100,
|
||||
"floors": 5,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
@ -196,7 +196,7 @@
|
||||
],
|
||||
"probability": 100,
|
||||
"floors": 5,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
@ -221,7 +221,7 @@
|
||||
],
|
||||
"probability": 100,
|
||||
"floors": 5,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
@ -235,7 +235,7 @@
|
||||
"starupneed": [],
|
||||
"probability": 100,
|
||||
"floors": -1,
|
||||
"time": 300,
|
||||
"time": 15,
|
||||
"desk": ""
|
||||
},
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ const (
|
||||
Rtype1 TaskType = 1 //英雄指定
|
||||
Rtype2 TaskType = 2 //主线之内触发了剧情Id
|
||||
Rtype3 TaskType = 3 //每日任务
|
||||
Rtask4 TaskType = 4 //指定英雄的等级限制
|
||||
Rtype4 TaskType = 4 //指定英雄的等级限制
|
||||
Rtype5 TaskType = 5 //指定英雄的装备数量
|
||||
Rtype6 TaskType = 6 //指定英雄的星级
|
||||
Rtype7 TaskType = 7 //日常登录一次
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/utils"
|
||||
"strconv"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
@ -119,5 +120,12 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
|
||||
chanegCard = append(chanegCard, _hero)
|
||||
session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: chanegCard})
|
||||
session.SendMsg(string(this.module.GetType()), Awaken, &pb.HeroAwakenResp{Hero: _hero})
|
||||
//任务相关
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype34, 1, _hero.JuexingLv)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype35, _hero.JuexingLv, utils.ToInt32(_hero.HeroID))
|
||||
cfg := this.module.configure.GetHero(_hero.HeroID)
|
||||
if cfg != nil {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype36, 1, cfg.Color, cfg.Job, cfg.Race, _hero.JuexingLv)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -190,5 +190,26 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
||||
|
||||
rsp.Heroes = szCards
|
||||
session.SendMsg(string(this.module.GetType()), DrawCard, rsp)
|
||||
|
||||
// 任务统计
|
||||
if req.DrawType == 0 { //普通招募
|
||||
if drawCount == 10 {
|
||||
sz := make(map[int32]int32, 0)
|
||||
for _, star := range szStar {
|
||||
sz[star]++
|
||||
}
|
||||
for k, v := range sz {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype17, k, v)
|
||||
}
|
||||
}
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype14, drawCount)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype18, drawCount)
|
||||
} else { // 阵营招募
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype15, drawCount)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype19, drawCount)
|
||||
}
|
||||
for _, star := range szStar {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype16, star, 1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
@ -168,5 +169,16 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
||||
chanegCard = append(chanegCard, _hero)
|
||||
session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: chanegCard})
|
||||
session.SendMsg(string(this.module.GetType()), StrengthenUpStar, &pb.HeroStrengthenUpStarResp{Hero: _hero})
|
||||
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype6, utils.ToInt32(_hero.HeroID), _hero.Star)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype25, 1, utils.ToInt32(_hero.HeroID), _hero.Star)
|
||||
if _hero.Star == 4 {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype26, 1)
|
||||
} else if _hero.Star == 5 {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype27, 1)
|
||||
} else if _hero.Star == 6 {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype28, 1)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package hero
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
@ -189,6 +190,15 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
|
||||
session.SendMsg(string(this.module.GetType()), StrengthenUplv, &pb.HeroStrengthenUplvResp{Hero: _hero})
|
||||
if iLvUp > 0 { // 升级了 统计任务
|
||||
this.module.ModuleTask.SendToTask(session, comm.TaskTypeUpHeroLevel, &pb.TaskParam{Second: iLvUp})
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype4, utils.ToInt32(_hero.HeroID), _hero.Lv)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype23, 1, _hero.Star, _hero.Lv)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype24, iLvUp)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype29, 1, _hero.Lv, utils.ToInt32(_hero.HeroID))
|
||||
cfg := this.module.configure.GetHero(_hero.HeroID)
|
||||
if cfg != nil {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype32, 1, cfg.Color, _hero.Lv)
|
||||
}
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype33, 1, 1, _hero.Lv)
|
||||
}
|
||||
|
||||
return
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/utils"
|
||||
)
|
||||
|
||||
func NewModule() core.IModule {
|
||||
@ -71,10 +72,21 @@ func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string,
|
||||
}
|
||||
|
||||
if len(initUpdate) != 0 {
|
||||
|
||||
this.ModuleUser.ChangeUserExpand(uid, initUpdate)
|
||||
}
|
||||
}
|
||||
}(session.GetUserId(), heroCfgId)
|
||||
// 统计任务
|
||||
this.ModuleRtask.SendToRtask(session, comm.Rtype1, utils.ToInt32(heroCfgId))
|
||||
// 查品质
|
||||
cfg := this.configure.GetHero(heroCfgId)
|
||||
if cfg != nil {
|
||||
|
||||
this.ModuleRtask.SendToRtask(session, comm.Rtype30, 1, cfg.Color)
|
||||
this.ModuleRtask.SendToRtask(session, comm.Rtype31, 1, cfg.Color)
|
||||
}
|
||||
|
||||
if bPush { //推送
|
||||
session.SendMsg("hero", "change", &pb.HeroChangePush{List: []*pb.DBHero{_hero}})
|
||||
}
|
||||
@ -197,6 +209,13 @@ func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string]
|
||||
continue
|
||||
}
|
||||
changeHero = append(changeHero, hero)
|
||||
// 查品质
|
||||
cfg := this.configure.GetHero(heroCfgId)
|
||||
if cfg != nil {
|
||||
|
||||
this.ModuleRtask.SendToRtask(session, comm.Rtype30, 1, cfg.Color)
|
||||
this.ModuleRtask.SendToRtask(session, comm.Rtype31, 1, cfg.Color)
|
||||
}
|
||||
}
|
||||
|
||||
// 添加图鉴
|
||||
@ -218,6 +237,11 @@ func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string]
|
||||
}
|
||||
}
|
||||
}(session.GetUserId(), heros)
|
||||
for k := range heros { // 任务统计
|
||||
this.ModuleRtask.SendToRtask(session, comm.Rtype1, utils.ToInt32(k))
|
||||
|
||||
}
|
||||
|
||||
if bPush && len(changeHero) > 0 { //推送
|
||||
session.SendMsg("hero", "change", &pb.HeroChangePush{List: changeHero})
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ func (this *ModuleRtask) initRtaskHandle() {
|
||||
cfg: typeCfg,
|
||||
fn: this.modelRtask.HeroTarget,
|
||||
})
|
||||
case comm.Rtask4:
|
||||
case comm.Rtype4:
|
||||
this.register(v.Id, &rtaskCondi{
|
||||
cfg: typeCfg,
|
||||
fn: this.modelRtask.HeroLvTarget,
|
||||
|
@ -115,7 +115,7 @@ func (x *DBHunting) GetChallengeTime() map[int32]int32 {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 维京远征排行榜
|
||||
// 狩猎排行榜
|
||||
type DBHuntingRank struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
Loading…
Reference in New Issue
Block a user