任务埋点数据

This commit is contained in:
meixiongfeng 2023-05-22 17:02:08 +08:00
parent d417eec3ce
commit edef2d3606
9 changed files with 50 additions and 39 deletions

View File

@ -639,14 +639,14 @@ const (
Rtype170 TaskType = 170 //获得指定材料X个
Rtype171 TaskType = 171
Rtype172 TaskType = 172 //连续战斗X次接取任务后在任意战斗内使用连续战斗一次进度便加一
Rtype173 TaskType = 173
Rtype174 TaskType = 174
Rtype175 TaskType = 175
Rtype176 TaskType = 176
Rtype177 TaskType = 177
Rtype178 TaskType = 178
Rtype179 TaskType = 179
Rtype180 TaskType = 180
Rtype173 TaskType = 173 //解锁星象点X次接取任务后每解锁任意英的星象点一次进度便加一
Rtype174 TaskType = 174 //X个X星级的英雄技能全满级创号开始记录玩家对应星级的英雄每技能全满1个进度便加1
Rtype175 TaskType = 175 //炉温点数达到X接取任务后玩家将炉温调整至>=指定数目,任务便算完成)
//Rtype176 TaskType = 176
Rtype177 TaskType = 177 //解锁X个新图纸
//Rtype178 TaskType = 178
Rtype179 TaskType = 179 //解锁X阶段装备新图纸X个
Rtype180 TaskType = 180 //在X副本内使用好友助战X次
Rtype181 TaskType = 181
Rtype182 TaskType = 182
Rtype183 TaskType = 183

View File

@ -22,7 +22,7 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.CaravanRankList
}
resp.List, rankid = this.module.modelCaravan.GetRankListData(comm.MaxRankList, session.GetUserId())
userinfo := this.module.ModuleUser.GetUser(session.GetUserId())
resp.Userinfo = &pb.CaravanRankData{
resp.Userinfo = &pb.CaravanRankInfo{
Uid: session.GetUserId(),
Name: userinfo.Name,
Userlv: userinfo.Lv,

View File

@ -65,14 +65,14 @@ func (this *modelCaravan) modifyCaravanDataByObjId(uid string, data map[string]i
return this.Change(uid, data)
}
func (this *modelCaravan) GetRankListData(rankNum int32, uid string) (list []*pb.CaravanRankData, rankid int32) {
func (this *modelCaravan) GetRankListData(rankNum int32, uid string) (list []*pb.CaravanRankInfo, rankid int32) {
var ipos int32
if _data, err := this.DBModel.DB.Find(comm.TableUser, bson.M{}, options.Find().SetSort(bson.M{"merchantmoney": -1}).SetLimit(int64(rankNum))); err == nil {
for _data.Next(context.TODO()) {
temp := &pb.DBUser{}
if err = _data.Decode(temp); err == nil {
ipos++
list = append(list, &pb.CaravanRankData{
list = append(list, &pb.CaravanRankInfo{
Uid: temp.Uid,
Name: temp.Name,
Userlv: temp.Lv,

View File

@ -132,6 +132,7 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
if maxLv {
szTask = append(szTask, comm.GettaskParam(comm.Rtype54, 1))
szTask = append(szTask, comm.GettaskParam(comm.Rtype57, 1))
szTask = append(szTask, comm.GettaskParam(comm.Rtype174, 1, _hero.Star))
}
if cfg := this.module.configure.GetHeroConfig(_hero.HeroID); cfg != nil {
szTask = append(szTask, comm.GettaskParam(comm.Rtype55, 1, cfg.Color))

View File

@ -97,6 +97,5 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
}
szTask = append(szTask, comm.GettaskParam(comm.Rtype115, utils.ToInt32(_hero.HeroID), _hero.Star))
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype115, utils.ToInt32(_hero.HeroID), _hero.Star)
return
}

View File

@ -248,6 +248,9 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
Lv: 1,
Value: 0,
}
// 解锁了新的图纸
this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype177, 1))
this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype179, nextProficiency.Value1, 1))
}
// 是否解锁新套装
if nextProficiency.Type == comm.SmithyReelType4 {

View File

@ -26,6 +26,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
del []string // 自动出售的装备
changExp map[string]int32
res []*cfg.Gameatn // 最后获得的资源
bHelp bool
)
changExp = make(map[string]int32, 0)
mapData = make(map[string]interface{}, 0)
@ -150,6 +151,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
if vikingCfg.Heroexp > 0 && !v.Ishelp { // 助战英雄不加经验
this.module.ModuleHero.AddHeroExp(session, v.Oid, vikingCfg.Heroexp)
}
if v.Ishelp {
bHelp = true
}
}
}
//给玩家加经验
@ -182,6 +186,10 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
if req.Auto {
szTask = append(szTask, comm.GettaskParam(comm.Rtype172, 1))
szTask = append(szTask, comm.GettaskParam(comm.Rtype181, req.BossId, req.Difficulty, 1))
}
if bHelp {
szTask = append(szTask, comm.GettaskParam(comm.Rtype180, req.BossId, 1))
}
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
return

View File

@ -360,7 +360,7 @@ func (x *DBCaravan) GetOldprice() map[int32]int32 {
return nil
}
type CaravanRankData struct {
type CaravanRankInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -374,8 +374,8 @@ type CaravanRankData struct {
CaravanLv int32 `protobuf:"varint,7,opt,name=caravanLv,proto3" json:"caravanLv"` // 商队等级
}
func (x *CaravanRankData) Reset() {
*x = CaravanRankData{}
func (x *CaravanRankInfo) Reset() {
*x = CaravanRankInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_caravan_caravan_db_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -383,13 +383,13 @@ func (x *CaravanRankData) Reset() {
}
}
func (x *CaravanRankData) String() string {
func (x *CaravanRankInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CaravanRankData) ProtoMessage() {}
func (*CaravanRankInfo) ProtoMessage() {}
func (x *CaravanRankData) ProtoReflect() protoreflect.Message {
func (x *CaravanRankInfo) ProtoReflect() protoreflect.Message {
mi := &file_caravan_caravan_db_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -401,54 +401,54 @@ func (x *CaravanRankData) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use CaravanRankData.ProtoReflect.Descriptor instead.
func (*CaravanRankData) Descriptor() ([]byte, []int) {
// Deprecated: Use CaravanRankInfo.ProtoReflect.Descriptor instead.
func (*CaravanRankInfo) Descriptor() ([]byte, []int) {
return file_caravan_caravan_db_proto_rawDescGZIP(), []int{4}
}
func (x *CaravanRankData) GetUid() string {
func (x *CaravanRankInfo) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *CaravanRankData) GetName() string {
func (x *CaravanRankInfo) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CaravanRankData) GetUserlv() int32 {
func (x *CaravanRankInfo) GetUserlv() int32 {
if x != nil {
return x.Userlv
}
return 0
}
func (x *CaravanRankData) GetAvatar() string {
func (x *CaravanRankInfo) GetAvatar() string {
if x != nil {
return x.Avatar
}
return ""
}
func (x *CaravanRankData) GetRank() int32 {
func (x *CaravanRankInfo) GetRank() int32 {
if x != nil {
return x.Rank
}
return 0
}
func (x *CaravanRankData) GetMerchantmoney() int32 {
func (x *CaravanRankInfo) GetMerchantmoney() int32 {
if x != nil {
return x.Merchantmoney
}
return 0
}
func (x *CaravanRankData) GetCaravanLv() int32 {
func (x *CaravanRankInfo) GetCaravanLv() int32 {
if x != nil {
return x.CaravanLv
}
@ -525,7 +525,7 @@ var file_caravan_caravan_db_proto_rawDesc = []byte{
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x72,
0x61, 0x76, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03,
0x61, 0x76, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03,
0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01,
@ -558,7 +558,7 @@ var file_caravan_caravan_db_proto_goTypes = []interface{}{
(*CityInfo)(nil), // 1: CityInfo
(*BagInfo)(nil), // 2: BagInfo
(*DBCaravan)(nil), // 3: DBCaravan
(*CaravanRankData)(nil), // 4: CaravanRankData
(*CaravanRankInfo)(nil), // 4: CaravanRankInfo
nil, // 5: CityInfo.CountEntry
nil, // 6: DBCaravan.ItemsEntry
nil, // 7: DBCaravan.GoodsEntry
@ -636,7 +636,7 @@ func file_caravan_caravan_db_proto_init() {
}
}
file_caravan_caravan_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CaravanRankData); i {
switch v := v.(*CaravanRankInfo); i {
case 0:
return &v.state
case 1:

View File

@ -546,8 +546,8 @@ type CaravanRankListResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
List []*CaravanRankData `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
Userinfo *CaravanRankData `protobuf:"bytes,2,opt,name=userinfo,proto3" json:"userinfo"` //玩家数据
List []*CaravanRankInfo `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
Userinfo *CaravanRankInfo `protobuf:"bytes,2,opt,name=userinfo,proto3" json:"userinfo"` //玩家数据
}
func (x *CaravanRankListResp) Reset() {
@ -582,14 +582,14 @@ func (*CaravanRankListResp) Descriptor() ([]byte, []int) {
return file_caravan_caravan_msg_proto_rawDescGZIP(), []int{10}
}
func (x *CaravanRankListResp) GetList() []*CaravanRankData {
func (x *CaravanRankListResp) GetList() []*CaravanRankInfo {
if x != nil {
return x.List
}
return nil
}
func (x *CaravanRankListResp) GetUserinfo() *CaravanRankData {
func (x *CaravanRankListResp) GetUserinfo() *CaravanRankInfo {
if x != nil {
return x.Userinfo
}
@ -653,10 +653,10 @@ var file_caravan_caravan_msg_proto_rawDesc = []byte{
0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x69, 0x0a, 0x13, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e,
0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x04,
0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x43, 0x61, 0x72,
0x61, 0x76, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69,
0x61, 0x76, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x6c, 0x69,
0x73, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x43, 0x61, 0x72, 0x61, 0x76, 0x61, 0x6e, 0x52, 0x61,
0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f,
0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
@ -688,7 +688,7 @@ var file_caravan_caravan_msg_proto_goTypes = []interface{}{
nil, // 11: CaravanBuyOrSellReq.ItemsEntry
(*DBCaravan)(nil), // 12: DBCaravan
(*UserAssets)(nil), // 13: UserAssets
(*CaravanRankData)(nil), // 14: CaravanRankData
(*CaravanRankInfo)(nil), // 14: CaravanRankInfo
}
var file_caravan_caravan_msg_proto_depIdxs = []int32{
12, // 0: CaravanGetListResp.data:type_name -> DBCaravan
@ -698,8 +698,8 @@ var file_caravan_caravan_msg_proto_depIdxs = []int32{
12, // 4: CaravanGetStoryResp.data:type_name -> DBCaravan
12, // 5: CaravanTaskCompletePush.data:type_name -> DBCaravan
13, // 6: CaravanTaskCompletePush.reward:type_name -> UserAssets
14, // 7: CaravanRankListResp.list:type_name -> CaravanRankData
14, // 8: CaravanRankListResp.userinfo:type_name -> CaravanRankData
14, // 7: CaravanRankListResp.list:type_name -> CaravanRankInfo
14, // 8: CaravanRankListResp.userinfo:type_name -> CaravanRankInfo
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name