主线任务埋点

This commit is contained in:
meixiongfeng 2023-02-02 18:15:02 +08:00
parent cd17d09bef
commit 4701ab2fb7
3 changed files with 262 additions and 41 deletions

View File

@ -175,18 +175,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
}) })
} }
} }
// 加主角经验
// if stageConf.Exp > 0 {
// res := make([]*cfg.Gameatn, 0)
// res = append(res, &cfg.Gameatn{
// A: "attr",
// T: "exp",
// N: stageConf.Exp,
// })
// if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success {
// this.module.Debugf("Mline Commonaward DispenseRes err:+%v", res)
// }
// }
// 加英雄经验 // 加英雄经验
if stageConf.HeroExp > 0 { if stageConf.HeroExp > 0 {
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
@ -203,5 +192,38 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
// 主线任务统计 Rtype60 // 主线任务统计 Rtype60
this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1) this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1)
this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.StageId)) this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.StageId))
var (
ChapterStar int32
bAll3Star bool
allStar int32
)
bAll3Star = true
for _, v1 := range curChapter.Star {
star := 0
for _, v := range szStar {
if v1&v == v {
ChapterStar++
star++
}
}
if star != 3 && bAll3Star {
bAll3Star = false
}
}
this.module.ModuleRtask.SendToRtask(session, comm.Rtype158, curChapter.ChapterId, ChapterStar)
if bAll3Star {
this.module.ModuleRtask.SendToRtask(session, comm.Rtype159, curChapter.ChapterId)
}
for _, v2 := range list {
for _, v1 := range v2.Star {
for _, v := range szStar {
if v1&v == v {
allStar++
}
}
}
}
this.module.ModuleRtask.SendToRtask(session, comm.Rtype160, allStar)
return return
} }

View File

@ -470,7 +470,7 @@ type DBArenaUser struct {
Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像 Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像
Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级 Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级
Integral int32 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral"` //积分 Integral int32 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral"` //积分
// int32 ticket = 6; //挑战券 // int32 ticket = 6; //挑战券
Dan int32 `protobuf:"varint,7,opt,name=dan,proto3" json:"dan"` //段位 Dan int32 `protobuf:"varint,7,opt,name=dan,proto3" json:"dan"` //段位
Attack *DBPlayerBattleFormt `protobuf:"bytes,8,opt,name=attack,proto3" json:"attack"` //进攻阵型 Attack *DBPlayerBattleFormt `protobuf:"bytes,8,opt,name=attack,proto3" json:"attack"` //进攻阵型
Defend *DBPlayerBattleFormt `protobuf:"bytes,9,opt,name=defend,proto3" json:"defend"` //防守阵型 Defend *DBPlayerBattleFormt `protobuf:"bytes,9,opt,name=defend,proto3" json:"defend"` //防守阵型

View File

@ -1356,6 +1356,157 @@ func (x *ArenaRTimePvpPush) GetInfo() *BattleInfo {
return nil return nil
} }
//实时pvp 指令请求
type ArenaRtPvpCmdReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RoomId string `protobuf:"bytes,1,opt,name=RoomId,proto3" json:"RoomId"`
CmdType string `protobuf:"bytes,2,opt,name=CmdType,proto3" json:"CmdType"`
Cmd []byte `protobuf:"bytes,3,opt,name=Cmd,proto3" json:"Cmd"`
}
func (x *ArenaRtPvpCmdReq) Reset() {
*x = ArenaRtPvpCmdReq{}
if protoimpl.UnsafeEnabled {
mi := &file_arena_arena_msg_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ArenaRtPvpCmdReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ArenaRtPvpCmdReq) ProtoMessage() {}
func (x *ArenaRtPvpCmdReq) ProtoReflect() protoreflect.Message {
mi := &file_arena_arena_msg_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ArenaRtPvpCmdReq.ProtoReflect.Descriptor instead.
func (*ArenaRtPvpCmdReq) Descriptor() ([]byte, []int) {
return file_arena_arena_msg_proto_rawDescGZIP(), []int{25}
}
func (x *ArenaRtPvpCmdReq) GetRoomId() string {
if x != nil {
return x.RoomId
}
return ""
}
func (x *ArenaRtPvpCmdReq) GetCmdType() string {
if x != nil {
return x.CmdType
}
return ""
}
func (x *ArenaRtPvpCmdReq) GetCmd() []byte {
if x != nil {
return x.Cmd
}
return nil
}
//实时pvp 指令请求回应
type ArenaRtPvpCmdResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
IsSucc bool `protobuf:"varint,1,opt,name=IsSucc,proto3" json:"IsSucc"`
}
func (x *ArenaRtPvpCmdResp) Reset() {
*x = ArenaRtPvpCmdResp{}
if protoimpl.UnsafeEnabled {
mi := &file_arena_arena_msg_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ArenaRtPvpCmdResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ArenaRtPvpCmdResp) ProtoMessage() {}
func (x *ArenaRtPvpCmdResp) ProtoReflect() protoreflect.Message {
mi := &file_arena_arena_msg_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ArenaRtPvpCmdResp.ProtoReflect.Descriptor instead.
func (*ArenaRtPvpCmdResp) Descriptor() ([]byte, []int) {
return file_arena_arena_msg_proto_rawDescGZIP(), []int{26}
}
func (x *ArenaRtPvpCmdResp) GetIsSucc() bool {
if x != nil {
return x.IsSucc
}
return false
}
//实时Pvp 指令推送
type ArenaRtPvpCmdPush struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ArenaRtPvpCmdPush) Reset() {
*x = ArenaRtPvpCmdPush{}
if protoimpl.UnsafeEnabled {
mi := &file_arena_arena_msg_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ArenaRtPvpCmdPush) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ArenaRtPvpCmdPush) ProtoMessage() {}
func (x *ArenaRtPvpCmdPush) ProtoReflect() protoreflect.Message {
mi := &file_arena_arena_msg_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ArenaRtPvpCmdPush.ProtoReflect.Descriptor instead.
func (*ArenaRtPvpCmdPush) Descriptor() ([]byte, []int) {
return file_arena_arena_msg_proto_rawDescGZIP(), []int{27}
}
var File_arena_arena_msg_proto protoreflect.FileDescriptor var File_arena_arena_msg_proto protoreflect.FileDescriptor
var file_arena_arena_msg_proto_rawDesc = []byte{ var file_arena_arena_msg_proto_rawDesc = []byte{
@ -1477,8 +1628,17 @@ var file_arena_arena_msg_proto_rawDesc = []byte{
0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68,
0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66,
0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6f, 0x22, 0x56, 0x0a, 0x10, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x52, 0x74, 0x50, 0x76, 0x70, 0x43,
0x33, 0x6d, 0x64, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a,
0x07, 0x43, 0x6d, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x43, 0x6d, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x43, 0x6d, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x43, 0x6d, 0x64, 0x22, 0x2b, 0x0a, 0x11, 0x41, 0x72, 0x65,
0x6e, 0x61, 0x52, 0x74, 0x50, 0x76, 0x70, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16,
0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,
0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x22, 0x13, 0x0a, 0x11, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x52,
0x74, 0x50, 0x76, 0x70, 0x43, 0x6d, 0x64, 0x50, 0x75, 0x73, 0x68, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -1493,7 +1653,7 @@ func file_arena_arena_msg_proto_rawDescGZIP() []byte {
return file_arena_arena_msg_proto_rawDescData return file_arena_arena_msg_proto_rawDescData
} }
var file_arena_arena_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_arena_arena_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 29)
var file_arena_arena_msg_proto_goTypes = []interface{}{ var file_arena_arena_msg_proto_goTypes = []interface{}{
(*ArenaInfoReq)(nil), // 0: ArenaInfoReq (*ArenaInfoReq)(nil), // 0: ArenaInfoReq
(*ArenaInfoResp)(nil), // 1: ArenaInfoResp (*ArenaInfoResp)(nil), // 1: ArenaInfoResp
@ -1520,32 +1680,35 @@ var file_arena_arena_msg_proto_goTypes = []interface{}{
(*ArenaPlotRewardReq)(nil), // 22: ArenaPlotRewardReq (*ArenaPlotRewardReq)(nil), // 22: ArenaPlotRewardReq
(*ArenaPlotRewardResp)(nil), // 23: ArenaPlotRewardResp (*ArenaPlotRewardResp)(nil), // 23: ArenaPlotRewardResp
(*ArenaRTimePvpPush)(nil), // 24: ArenaRTimePvpPush (*ArenaRTimePvpPush)(nil), // 24: ArenaRTimePvpPush
nil, // 25: ArenaPlotRewardResp.NpcEntry (*ArenaRtPvpCmdReq)(nil), // 25: ArenaRtPvpCmdReq
(*DBArenaUser)(nil), // 26: DBArenaUser (*ArenaRtPvpCmdResp)(nil), // 26: ArenaRtPvpCmdResp
(*ArenaPlayer)(nil), // 27: ArenaPlayer (*ArenaRtPvpCmdPush)(nil), // 27: ArenaRtPvpCmdPush
(*BattleFormation)(nil), // 28: BattleFormation nil, // 28: ArenaPlotRewardResp.NpcEntry
(ErrorCode)(0), // 29: ErrorCode (*DBArenaUser)(nil), // 29: DBArenaUser
(*BattleInfo)(nil), // 30: BattleInfo (*ArenaPlayer)(nil), // 30: ArenaPlayer
(*BattleReport)(nil), // 31: BattleReport (*BattleFormation)(nil), // 31: BattleFormation
(*DBNpc)(nil), // 32: DBNpc (ErrorCode)(0), // 32: ErrorCode
(*BattleInfo)(nil), // 33: BattleInfo
(*BattleReport)(nil), // 34: BattleReport
(*DBNpc)(nil), // 35: DBNpc
} }
var file_arena_arena_msg_proto_depIdxs = []int32{ var file_arena_arena_msg_proto_depIdxs = []int32{
26, // 0: ArenaInfoResp.info:type_name -> DBArenaUser 29, // 0: ArenaInfoResp.info:type_name -> DBArenaUser
26, // 1: ArenaOtherInfoResp.info:type_name -> DBArenaUser 29, // 1: ArenaOtherInfoResp.info:type_name -> DBArenaUser
27, // 2: ArenaMatcheResp.players:type_name -> ArenaPlayer 30, // 2: ArenaMatcheResp.players:type_name -> ArenaPlayer
28, // 3: ArenaChallengeReq.battle:type_name -> BattleFormation 31, // 3: ArenaChallengeReq.battle:type_name -> BattleFormation
29, // 4: ArenaChallengeResp.code:type_name -> ErrorCode 32, // 4: ArenaChallengeResp.code:type_name -> ErrorCode
30, // 5: ArenaChallengeResp.info:type_name -> BattleInfo 33, // 5: ArenaChallengeResp.info:type_name -> BattleInfo
31, // 6: ArenaChallengeRewardReq.report:type_name -> BattleReport 34, // 6: ArenaChallengeRewardReq.report:type_name -> BattleReport
27, // 7: ArenaRankResp.players:type_name -> ArenaPlayer 30, // 7: ArenaRankResp.players:type_name -> ArenaPlayer
26, // 8: ArenaRankResp.info:type_name -> DBArenaUser 29, // 8: ArenaRankResp.info:type_name -> DBArenaUser
28, // 9: ArenaPlotReq.battle:type_name -> BattleFormation 31, // 9: ArenaPlotReq.battle:type_name -> BattleFormation
29, // 10: ArenaPlotResp.code:type_name -> ErrorCode 32, // 10: ArenaPlotResp.code:type_name -> ErrorCode
30, // 11: ArenaPlotResp.info:type_name -> BattleInfo 33, // 11: ArenaPlotResp.info:type_name -> BattleInfo
31, // 12: ArenaPlotRewardReq.report:type_name -> BattleReport 34, // 12: ArenaPlotRewardReq.report:type_name -> BattleReport
25, // 13: ArenaPlotRewardResp.npc:type_name -> ArenaPlotRewardResp.NpcEntry 28, // 13: ArenaPlotRewardResp.npc:type_name -> ArenaPlotRewardResp.NpcEntry
30, // 14: ArenaRTimePvpPush.info:type_name -> BattleInfo 33, // 14: ArenaRTimePvpPush.info:type_name -> BattleInfo
32, // 15: ArenaPlotRewardResp.NpcEntry.value:type_name -> DBNpc 35, // 15: ArenaPlotRewardResp.NpcEntry.value:type_name -> DBNpc
16, // [16:16] is the sub-list for method output_type 16, // [16:16] is the sub-list for method output_type
16, // [16:16] is the sub-list for method input_type 16, // [16:16] is the sub-list for method input_type
16, // [16:16] is the sub-list for extension type_name 16, // [16:16] is the sub-list for extension type_name
@ -1862,6 +2025,42 @@ func file_arena_arena_msg_proto_init() {
return nil return nil
} }
} }
file_arena_arena_msg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ArenaRtPvpCmdReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_arena_arena_msg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ArenaRtPvpCmdResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_arena_arena_msg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ArenaRtPvpCmdPush); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -1869,7 +2068,7 @@ func file_arena_arena_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_arena_arena_msg_proto_rawDesc, RawDescriptor: file_arena_arena_msg_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 26, NumMessages: 29,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },