diff --git a/dbproxy/mq/c_rank.go b/dbproxy/mq/c_rank.go index ab0af9f..42110c3 100644 --- a/dbproxy/mq/c_rank.go +++ b/dbproxy/mq/c_rank.go @@ -76,4 +76,20 @@ func init() { return }, }) + //年兽排行榜 + mq.RegisterHandler(&mq.RegisterHandlerParam{ + Name: model.MQRankNian, + Data: &model.NianInfo{}, + Handler: func(data interface{}) (err error) { + log, ok := data.(*model.NianInfo) + if !ok { + return + } + err = svc.RankNianUpsert(log) + if err != nil { + logger.Logger.Errorf("RankNianUpsert err: %v", err) + } + return + }, + }) } diff --git a/dbproxy/svc/l_ranknian.go b/dbproxy/svc/l_ranknian.go new file mode 100644 index 0000000..c655ba1 --- /dev/null +++ b/dbproxy/svc/l_ranknian.go @@ -0,0 +1,107 @@ +package svc + +import ( + "errors" + "github.com/globalsign/mgo" + "github.com/globalsign/mgo/bson" + "mongo.games.com/game/dbproxy/mongo" + "mongo.games.com/game/model" + "mongo.games.com/goserver/core/logger" + "net/rpc" +) + +var ( + RankNianDBName = "log" + RankNianCollName = "log_ranknian" + RankNianColError = errors.New("RankNian collection open failed") +) + +func RankNianCollection(plt string) *mongo.Collection { + s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, RankNianDBName) + if s != nil { + c, first := s.DB().C(RankNianCollName) + if first { + c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true}) + c.EnsureIndex(mgo.Index{Key: []string{"-luck"}, Background: true, Sparse: true}) + c.EnsureIndex(mgo.Index{Key: []string{"-damage"}, Background: true, Sparse: true}) + } + return c + } + return nil +} + +func RankNianUpsert(args *model.NianInfo) error { + cc := RankNianCollection(args.Platform) + if cc == nil { + return RankNianColError + } + update := bson.M{ + "$set": bson.M{ + "platform": args.Platform, + "name": args.Name, + "damage": args.Damage, + "modid": args.ModId, + "ts": args.Ts, + }, + } + if args.Luck != 0 { + update["$set"].(bson.M)["luck"] = args.Luck + } + if args.LuckTime != 0 { + update["$set"].(bson.M)["lucktime"] = args.LuckTime + } + _, err := cc.Upsert( + bson.M{"snid": args.SnId}, + update, + ) + if err != nil && !errors.Is(err, mgo.ErrNotFound) { + logger.Logger.Error("RankNianSvc.Upsert is err: ", err) + return err + } + return nil +} + +type RankNianSvc struct { +} + +func (svc *RankNianSvc) Upsert(args *model.NianInfo, ret *bool) error { + err := RankNianUpsert(args) + if err != nil { + return err + } + *ret = true + return nil +} + +// 幸运榜 +func (svc *RankNianSvc) LuckFind(args *model.FindNianListArgs, ret *model.FindNianListReply) error { + fc := RankNianCollection(args.Platform) + if fc == nil { + return RankNianColError + } + + err := fc.Find(bson.M{}).Sort("-luck").Limit(40).All(&ret.List) + if err != nil && !errors.Is(err, mgo.ErrNotFound) { + logger.Logger.Error("QueryMatchSeason is err: ", err) + return err + } + return nil +} + +// 伤害榜 +func (svc *RankNianSvc) DamageFind(args *model.FindNianListArgs, ret *model.FindNianListReply) error { + fc := RankNianCollection(args.Platform) + if fc == nil { + return RankNianColError + } + + err := fc.Find(bson.M{}).Sort("-damage").Limit(40).All(&ret.List) + if err != nil && !errors.Is(err, mgo.ErrNotFound) { + logger.Logger.Error("QueryMatchSeason is err: ", err) + return err + } + return nil +} +func init() { + rpc.Register(new(RankNianSvc)) +} diff --git a/model/player.go b/model/player.go index eadb070..3b1d44c 100644 --- a/model/player.go +++ b/model/player.go @@ -591,6 +591,7 @@ func NewWelfareData() *WelfareData { RedPacket: make(map[int64]*RedPacketData), NianData: &NianData{ OtherAwardNum: make(map[int32]int32), + GiftShop: make(map[int32]int32), }, } } @@ -697,6 +698,7 @@ type NianData struct { OtherAwardNum map[int32]int32 //奖励掉落数量 AttackMaxHp int64 //单次攻击最大血量 AttackSumHp int64 //攻击总伤害 + GiftShop map[int32]int32 //购买每日礼包记录 } func ConvertPlayerDataToWebData(param *WebPlayerDataParam) *webapi.PlayerData { diff --git a/model/rank.go b/model/rank.go index 7fcdd75..469bd26 100644 --- a/model/rank.go +++ b/model/rank.go @@ -12,6 +12,7 @@ const ( MQRankPlayerInvite = "log_rankplayerinvite" MQRankPlayerLevel = "log_rankplayerlevel" MQRankPlayerPermit = "log_rankplayerpermit" // 赛季通行证排行榜 + MQRankNian = "log_ranknian" //年兽排行榜 ) // 排行榜类型 @@ -330,3 +331,53 @@ func SaveRankInvite(args *RankInvite) error { } return nil } + +// 年兽排行榜 +type NianInfo struct { + Platform string + SnId int32 + Name string + Luck int64 + Damage int64 + ModId int32 //头像 + LuckTime int64 //幸运值更新时间 + Ts int64 //更新时间 +} + +type FindNianListArgs struct { + Platform string + StartTs int64 +} +type FindNianListReply struct { + List []*NianInfo +} + +func FindLuckNianRankList(args *FindNianListArgs) (*FindNianListReply, error) { + if rpcCli == nil { + logger.Logger.Error("model.FindLuckNianList rpcCli == nil") + return nil, nil + } + + ret := new(FindNianListReply) + err := rpcCli.CallWithTimeout("RankNianSvc.LuckFind", args, ret, time.Second*30) + if err != nil { + logger.Logger.Error("GetNianLuckRankList error:", err) + return ret, err + } + return ret, nil +} + +func FindDamageNianRankList(args *FindNianListArgs) (*FindNianListReply, error) { + if rpcCli == nil { + logger.Logger.Error("model.FindNianList rpcCli == nil") + return nil, nil + } + + ret := new(FindNianListReply) + err := rpcCli.CallWithTimeout("RankNianSvc.DamageFind", args, ret, time.Second*30) + if err != nil { + logger.Logger.Error("GetNianDamageRankList error:", err) + return ret, err + } + return ret, nil +} diff --git a/protocol/activity/nian.pb.go b/protocol/activity/nian.pb.go index 5c97118..a58715e 100644 --- a/protocol/activity/nian.pb.go +++ b/protocol/activity/nian.pb.go @@ -154,6 +154,9 @@ type SCNianData struct { BuffCount int64 `protobuf:"varint,7,opt,name=BuffCount,proto3" json:"BuffCount,omitempty"` //Buff剩余次数 BuffStatus bool `protobuf:"varint,8,opt,name=BuffStatus,proto3" json:"BuffStatus,omitempty"` //Buff领取状态 SignAwardTime int64 `protobuf:"varint,9,opt,name=SignAwardTime,proto3" json:"SignAwardTime,omitempty"` //签到领取时间 0-未领取 + BuffStartTime int64 `protobuf:"varint,10,opt,name=BuffStartTime,proto3" json:"BuffStartTime,omitempty"` //Buff开始领取时间 + BuffEndTime int64 `protobuf:"varint,11,opt,name=BuffEndTime,proto3" json:"BuffEndTime,omitempty"` //Buff结束领取时间 + ShopData []*ShopData `protobuf:"bytes,12,rep,name=shopData,proto3" json:"shopData,omitempty"` //购买礼包数量 } func (x *SCNianData) Reset() { @@ -251,6 +254,90 @@ func (x *SCNianData) GetSignAwardTime() int64 { return 0 } +func (x *SCNianData) GetBuffStartTime() int64 { + if x != nil { + return x.BuffStartTime + } + return 0 +} + +func (x *SCNianData) GetBuffEndTime() int64 { + if x != nil { + return x.BuffEndTime + } + return 0 +} + +func (x *SCNianData) GetShopData() []*ShopData { + if x != nil { + return x.ShopData + } + return nil +} + +type ShopData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ShopId int32 `protobuf:"varint,1,opt,name=ShopId,proto3" json:"ShopId,omitempty"` //shopId + ShopNum int32 `protobuf:"varint,2,opt,name=ShopNum,proto3" json:"ShopNum,omitempty"` //已购买次数 只保存有购买限制的礼包的数量 + MaxShopNum int32 `protobuf:"varint,3,opt,name=MaxShopNum,proto3" json:"MaxShopNum,omitempty"` //最大购买次数 0-无限制 +} + +func (x *ShopData) Reset() { + *x = ShopData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShopData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShopData) ProtoMessage() {} + +func (x *ShopData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[2] + 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 ShopData.ProtoReflect.Descriptor instead. +func (*ShopData) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{2} +} + +func (x *ShopData) GetShopId() int32 { + if x != nil { + return x.ShopId + } + return 0 +} + +func (x *ShopData) GetShopNum() int32 { + if x != nil { + return x.ShopNum + } + return 0 +} + +func (x *ShopData) GetMaxShopNum() int32 { + if x != nil { + return x.MaxShopNum + } + return 0 +} + //贺春 //请求领取BUFF //PACKET_CSNianBuff @@ -263,7 +350,7 @@ type CSNianBuff struct { func (x *CSNianBuff) Reset() { *x = CSNianBuff{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[2] + mi := &file_protocol_activity_nian_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -276,7 +363,7 @@ func (x *CSNianBuff) String() string { func (*CSNianBuff) ProtoMessage() {} func (x *CSNianBuff) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[2] + mi := &file_protocol_activity_nian_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -289,7 +376,7 @@ func (x *CSNianBuff) ProtoReflect() protoreflect.Message { // Deprecated: Use CSNianBuff.ProtoReflect.Descriptor instead. func (*CSNianBuff) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{2} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{3} } //PACKET_SCNianBuff @@ -304,7 +391,7 @@ type SCNianBuff struct { func (x *SCNianBuff) Reset() { *x = SCNianBuff{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[3] + mi := &file_protocol_activity_nian_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -317,7 +404,7 @@ func (x *SCNianBuff) String() string { func (*SCNianBuff) ProtoMessage() {} func (x *SCNianBuff) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[3] + mi := &file_protocol_activity_nian_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -330,7 +417,7 @@ func (x *SCNianBuff) ProtoReflect() protoreflect.Message { // Deprecated: Use SCNianBuff.ProtoReflect.Descriptor instead. func (*SCNianBuff) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{3} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{4} } func (x *SCNianBuff) GetBuffCount() int64 { @@ -352,7 +439,7 @@ type NianRankData struct { func (x *NianRankData) Reset() { *x = NianRankData{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[4] + mi := &file_protocol_activity_nian_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -365,7 +452,7 @@ func (x *NianRankData) String() string { func (*NianRankData) ProtoMessage() {} func (x *NianRankData) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[4] + mi := &file_protocol_activity_nian_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -378,7 +465,7 @@ func (x *NianRankData) ProtoReflect() protoreflect.Message { // Deprecated: Use NianRankData.ProtoReflect.Descriptor instead. func (*NianRankData) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{4} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{5} } func (x *NianRankData) GetTypeId() int32 { @@ -407,7 +494,7 @@ type NianRankInfo struct { func (x *NianRankInfo) Reset() { *x = NianRankInfo{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[5] + mi := &file_protocol_activity_nian_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -420,7 +507,7 @@ func (x *NianRankInfo) String() string { func (*NianRankInfo) ProtoMessage() {} func (x *NianRankInfo) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[5] + mi := &file_protocol_activity_nian_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -433,7 +520,7 @@ func (x *NianRankInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NianRankInfo.ProtoReflect.Descriptor instead. func (*NianRankInfo) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{5} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{6} } func (x *NianRankInfo) GetRankId() int32 { @@ -462,7 +549,7 @@ type RankAwardData struct { func (x *RankAwardData) Reset() { *x = RankAwardData{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[6] + mi := &file_protocol_activity_nian_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -475,7 +562,7 @@ func (x *RankAwardData) String() string { func (*RankAwardData) ProtoMessage() {} func (x *RankAwardData) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[6] + mi := &file_protocol_activity_nian_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -488,7 +575,7 @@ func (x *RankAwardData) ProtoReflect() protoreflect.Message { // Deprecated: Use RankAwardData.ProtoReflect.Descriptor instead. func (*RankAwardData) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{6} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{7} } func (x *RankAwardData) GetItemId() int32 { @@ -518,7 +605,7 @@ type CSNianAttack struct { func (x *CSNianAttack) Reset() { *x = CSNianAttack{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[7] + mi := &file_protocol_activity_nian_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -531,7 +618,7 @@ func (x *CSNianAttack) String() string { func (*CSNianAttack) ProtoMessage() {} func (x *CSNianAttack) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[7] + mi := &file_protocol_activity_nian_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -544,7 +631,7 @@ func (x *CSNianAttack) ProtoReflect() protoreflect.Message { // Deprecated: Use CSNianAttack.ProtoReflect.Descriptor instead. func (*CSNianAttack) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{7} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{8} } func (x *CSNianAttack) GetTypeId() int32 { @@ -574,7 +661,7 @@ type SCNianAttackData struct { func (x *SCNianAttackData) Reset() { *x = SCNianAttackData{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[8] + mi := &file_protocol_activity_nian_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -587,7 +674,7 @@ func (x *SCNianAttackData) String() string { func (*SCNianAttackData) ProtoMessage() {} func (x *SCNianAttackData) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[8] + mi := &file_protocol_activity_nian_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -600,7 +687,7 @@ func (x *SCNianAttackData) ProtoReflect() protoreflect.Message { // Deprecated: Use SCNianAttackData.ProtoReflect.Descriptor instead. func (*SCNianAttackData) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{8} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{9} } func (x *SCNianAttackData) GetTypeId() int32 { @@ -677,7 +764,7 @@ type CSNianSignAward struct { func (x *CSNianSignAward) Reset() { *x = CSNianSignAward{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[9] + mi := &file_protocol_activity_nian_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -690,7 +777,7 @@ func (x *CSNianSignAward) String() string { func (*CSNianSignAward) ProtoMessage() {} func (x *CSNianSignAward) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[9] + mi := &file_protocol_activity_nian_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -703,7 +790,7 @@ func (x *CSNianSignAward) ProtoReflect() protoreflect.Message { // Deprecated: Use CSNianSignAward.ProtoReflect.Descriptor instead. func (*CSNianSignAward) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{9} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{10} } //PACKET_SCNianSignAward @@ -719,7 +806,7 @@ type SCNianSignAward struct { func (x *SCNianSignAward) Reset() { *x = SCNianSignAward{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[10] + mi := &file_protocol_activity_nian_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -732,7 +819,7 @@ func (x *SCNianSignAward) String() string { func (*SCNianSignAward) ProtoMessage() {} func (x *SCNianSignAward) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[10] + mi := &file_protocol_activity_nian_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -745,7 +832,7 @@ func (x *SCNianSignAward) ProtoReflect() protoreflect.Message { // Deprecated: Use SCNianSignAward.ProtoReflect.Descriptor instead. func (*SCNianSignAward) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{10} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{11} } func (x *SCNianSignAward) GetSignAwardTime() int64 { @@ -775,7 +862,7 @@ type CSNianChange struct { func (x *CSNianChange) Reset() { *x = CSNianChange{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[11] + mi := &file_protocol_activity_nian_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -788,7 +875,7 @@ func (x *CSNianChange) String() string { func (*CSNianChange) ProtoMessage() {} func (x *CSNianChange) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[11] + mi := &file_protocol_activity_nian_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -801,7 +888,7 @@ func (x *CSNianChange) ProtoReflect() protoreflect.Message { // Deprecated: Use CSNianChange.ProtoReflect.Descriptor instead. func (*CSNianChange) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{11} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{12} } func (x *CSNianChange) GetNum() int32 { @@ -824,7 +911,7 @@ type SCNianChange struct { func (x *SCNianChange) Reset() { *x = SCNianChange{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_activity_nian_proto_msgTypes[12] + mi := &file_protocol_activity_nian_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -837,7 +924,7 @@ func (x *SCNianChange) String() string { func (*SCNianChange) ProtoMessage() {} func (x *SCNianChange) ProtoReflect() protoreflect.Message { - mi := &file_protocol_activity_nian_proto_msgTypes[12] + mi := &file_protocol_activity_nian_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -850,7 +937,7 @@ func (x *SCNianChange) ProtoReflect() protoreflect.Message { // Deprecated: Use SCNianChange.ProtoReflect.Descriptor instead. func (*SCNianChange) Descriptor() ([]byte, []int) { - return file_protocol_activity_nian_proto_rawDescGZIP(), []int{12} + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{13} } func (x *SCNianChange) GetNum() int32 { @@ -873,7 +960,7 @@ var file_protocol_activity_nian_proto_rawDesc = []byte{ 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2f, 0x6e, 0x69, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x4e, 0x69, - 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0xd0, 0x02, 0x0a, 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61, + 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0xc8, 0x03, 0x0a, 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, @@ -894,92 +981,105 @@ var file_protocol_activity_nian_proto_rawDesc = []byte{ 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x42, 0x75, 0x66, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x53, 0x69, 0x67, 0x6e, - 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x4e, - 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x22, 0x2a, 0x0a, 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61, - 0x6e, 0x42, 0x75, 0x66, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x44, - 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x55, 0x0a, 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x52, - 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, - 0x2d, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, - 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x41, - 0x0a, 0x0d, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, - 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, - 0x6d, 0x22, 0x26, 0x0a, 0x0c, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, - 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0xe8, 0x02, 0x0a, 0x10, 0x53, 0x43, - 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, - 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x42, 0x6f, 0x73, 0x73, 0x48, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x42, 0x6f, 0x73, 0x73, 0x48, 0x70, 0x12, 0x2d, - 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, - 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x73, 0x44, - 0x69, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x49, 0x73, 0x44, 0x69, 0x65, 0x12, - 0x33, 0x0a, 0x08, 0x44, 0x69, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, - 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x44, 0x69, 0x65, 0x41, - 0x77, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x72, 0x6f, 0x70, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, - 0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x72, 0x6f, 0x70, 0x12, 0x39, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, - 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, - 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, - 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x6e, 0x0a, 0x0f, 0x53, 0x43, 0x4e, 0x69, 0x61, - 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x69, - 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x35, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, + 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x42, 0x75, 0x66, + 0x66, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x42, 0x75, 0x66, 0x66, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x42, 0x75, 0x66, 0x66, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x42, 0x75, 0x66, 0x66, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x53, + 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, + 0x61, 0x22, 0x5c, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, + 0x06, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, + 0x68, 0x6f, 0x70, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x12, + 0x1e, 0x0a, 0x0a, 0x4d, 0x61, 0x78, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x61, 0x78, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x75, 0x6d, 0x22, + 0x0c, 0x0a, 0x0a, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x22, 0x2a, 0x0a, + 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x42, + 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x52, 0x0a, 0x0c, 0x4e, 0x69, 0x61, + 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, + 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, + 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4e, 0x69, 0x61, 0x6e, 0x52, + 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x55, 0x0a, + 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, + 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, + 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, + 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, + 0x77, 0x61, 0x72, 0x64, 0x22, 0x41, 0x0a, 0x0d, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x22, 0x26, 0x0a, 0x0c, 0x43, 0x53, 0x4e, 0x69, 0x61, + 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, + 0xe8, 0x02, 0x0a, 0x10, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x42, 0x6f, 0x73, 0x73, 0x48, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x42, 0x6f, + 0x73, 0x73, 0x48, 0x70, 0x12, 0x2d, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, - 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x53, 0x69, - 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x20, 0x0a, 0x0c, 0x43, 0x53, 0x4e, 0x69, 0x61, - 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x4f, 0x0a, 0x0c, 0x53, 0x43, 0x4e, - 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12, 0x2d, 0x0a, 0x05, 0x41, - 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x2a, 0xe2, 0x02, 0x0a, 0x0c, 0x4e, - 0x69, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x10, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4e, 0x69, 0x61, 0x6e, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, - 0x00, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, - 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe4, 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, - 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe5, - 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, - 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x10, 0xe6, 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, - 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x10, 0xe7, - 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, - 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe8, 0x14, 0x12, 0x1a, 0x0a, - 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, - 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe9, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, - 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, - 0x10, 0xea, 0x14, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, - 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xeb, - 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, - 0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xec, 0x14, 0x12, 0x1b, - 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x53, - 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xed, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x10, 0xee, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, - 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xef, 0x14, 0x42, - 0x28, 0x5a, 0x26, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, + 0x61, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x70, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x48, 0x70, 0x12, + 0x14, 0x0a, 0x05, 0x49, 0x73, 0x44, 0x69, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x49, 0x73, 0x44, 0x69, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x44, 0x69, 0x65, 0x41, 0x77, 0x61, 0x72, + 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x44, 0x69, 0x65, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75, + 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, + 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x72, + 0x61, 0x44, 0x72, 0x6f, 0x70, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x72, 0x6f, 0x70, 0x12, + 0x39, 0x0a, 0x0b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, + 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x46, + 0x6c, 0x6f, 0x6f, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x53, + 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x6e, 0x0a, + 0x0f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, + 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, + 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, + 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x20, 0x0a, + 0x0c, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, + 0x4f, 0x0a, 0x0c, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, + 0x6d, 0x12, 0x2d, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x61, 0x6e, 0x6b, + 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, + 0x2a, 0xe2, 0x02, 0x0a, 0x0c, 0x4e, 0x69, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, + 0x44, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4e, 0x69, 0x61, 0x6e, + 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, + 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe4, 0x14, 0x12, + 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x10, 0xe5, 0x14, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, + 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x10, 0xe6, 0x14, 0x12, + 0x16, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, + 0x42, 0x75, 0x66, 0x66, 0x10, 0xe7, 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, + 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, + 0x10, 0xe8, 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, + 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x10, 0xe9, 0x14, 0x12, + 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x10, 0xea, 0x14, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, + 0x44, 0x61, 0x74, 0x61, 0x10, 0xeb, 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, + 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, + 0x64, 0x10, 0xec, 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, + 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xed, + 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x4e, 0x69, + 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0xee, 0x14, 0x12, 0x18, 0x0a, 0x13, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x4e, 0x69, 0x61, 0x6e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x10, 0xef, 0x14, 0x42, 0x28, 0x5a, 0x26, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, + 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -995,38 +1095,40 @@ func file_protocol_activity_nian_proto_rawDescGZIP() []byte { } var file_protocol_activity_nian_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_protocol_activity_nian_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_protocol_activity_nian_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_protocol_activity_nian_proto_goTypes = []interface{}{ (NianPacketID)(0), // 0: activity.NianPacketID (*CSNianData)(nil), // 1: activity.CSNianData (*SCNianData)(nil), // 2: activity.SCNianData - (*CSNianBuff)(nil), // 3: activity.CSNianBuff - (*SCNianBuff)(nil), // 4: activity.SCNianBuff - (*NianRankData)(nil), // 5: activity.NianRankData - (*NianRankInfo)(nil), // 6: activity.NianRankInfo - (*RankAwardData)(nil), // 7: activity.RankAwardData - (*CSNianAttack)(nil), // 8: activity.CSNianAttack - (*SCNianAttackData)(nil), // 9: activity.SCNianAttackData - (*CSNianSignAward)(nil), // 10: activity.CSNianSignAward - (*SCNianSignAward)(nil), // 11: activity.SCNianSignAward - (*CSNianChange)(nil), // 12: activity.CSNianChange - (*SCNianChange)(nil), // 13: activity.SCNianChange + (*ShopData)(nil), // 3: activity.ShopData + (*CSNianBuff)(nil), // 4: activity.CSNianBuff + (*SCNianBuff)(nil), // 5: activity.SCNianBuff + (*NianRankData)(nil), // 6: activity.NianRankData + (*NianRankInfo)(nil), // 7: activity.NianRankInfo + (*RankAwardData)(nil), // 8: activity.RankAwardData + (*CSNianAttack)(nil), // 9: activity.CSNianAttack + (*SCNianAttackData)(nil), // 10: activity.SCNianAttackData + (*CSNianSignAward)(nil), // 11: activity.CSNianSignAward + (*SCNianSignAward)(nil), // 12: activity.SCNianSignAward + (*CSNianChange)(nil), // 13: activity.CSNianChange + (*SCNianChange)(nil), // 14: activity.SCNianChange } var file_protocol_activity_nian_proto_depIdxs = []int32{ - 5, // 0: activity.SCNianData.RankData:type_name -> activity.NianRankData - 6, // 1: activity.NianRankData.Data:type_name -> activity.NianRankInfo - 7, // 2: activity.NianRankInfo.Award:type_name -> activity.RankAwardData - 7, // 3: activity.SCNianAttackData.Award:type_name -> activity.RankAwardData - 7, // 4: activity.SCNianAttackData.DieAward:type_name -> activity.RankAwardData - 7, // 5: activity.SCNianAttackData.ExtraDrop:type_name -> activity.RankAwardData - 7, // 6: activity.SCNianAttackData.FloorReward:type_name -> activity.RankAwardData - 7, // 7: activity.SCNianSignAward.SignAward:type_name -> activity.RankAwardData - 7, // 8: activity.SCNianChange.Award:type_name -> activity.RankAwardData - 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 - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 6, // 0: activity.SCNianData.RankData:type_name -> activity.NianRankData + 3, // 1: activity.SCNianData.shopData:type_name -> activity.ShopData + 7, // 2: activity.NianRankData.Data:type_name -> activity.NianRankInfo + 8, // 3: activity.NianRankInfo.Award:type_name -> activity.RankAwardData + 8, // 4: activity.SCNianAttackData.Award:type_name -> activity.RankAwardData + 8, // 5: activity.SCNianAttackData.DieAward:type_name -> activity.RankAwardData + 8, // 6: activity.SCNianAttackData.ExtraDrop:type_name -> activity.RankAwardData + 8, // 7: activity.SCNianAttackData.FloorReward:type_name -> activity.RankAwardData + 8, // 8: activity.SCNianSignAward.SignAward:type_name -> activity.RankAwardData + 8, // 9: activity.SCNianChange.Award:type_name -> activity.RankAwardData + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_protocol_activity_nian_proto_init() } @@ -1060,7 +1162,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CSNianBuff); i { + switch v := v.(*ShopData); i { case 0: return &v.state case 1: @@ -1072,7 +1174,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SCNianBuff); i { + switch v := v.(*CSNianBuff); i { case 0: return &v.state case 1: @@ -1084,7 +1186,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NianRankData); i { + switch v := v.(*SCNianBuff); i { case 0: return &v.state case 1: @@ -1096,7 +1198,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NianRankInfo); i { + switch v := v.(*NianRankData); i { case 0: return &v.state case 1: @@ -1108,7 +1210,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankAwardData); i { + switch v := v.(*NianRankInfo); i { case 0: return &v.state case 1: @@ -1120,7 +1222,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CSNianAttack); i { + switch v := v.(*RankAwardData); i { case 0: return &v.state case 1: @@ -1132,7 +1234,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SCNianAttackData); i { + switch v := v.(*CSNianAttack); i { case 0: return &v.state case 1: @@ -1144,7 +1246,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CSNianSignAward); i { + switch v := v.(*SCNianAttackData); i { case 0: return &v.state case 1: @@ -1156,7 +1258,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SCNianSignAward); i { + switch v := v.(*CSNianSignAward); i { case 0: return &v.state case 1: @@ -1168,7 +1270,7 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CSNianChange); i { + switch v := v.(*SCNianSignAward); i { case 0: return &v.state case 1: @@ -1180,6 +1282,18 @@ func file_protocol_activity_nian_proto_init() { } } file_protocol_activity_nian_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CSNianChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_activity_nian_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SCNianChange); i { case 0: return &v.state @@ -1198,7 +1312,7 @@ func file_protocol_activity_nian_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protocol_activity_nian_proto_rawDesc, NumEnums: 1, - NumMessages: 13, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, diff --git a/protocol/activity/nian.proto b/protocol/activity/nian.proto index 198b542..db207b9 100644 --- a/protocol/activity/nian.proto +++ b/protocol/activity/nian.proto @@ -33,6 +33,15 @@ message SCNianData{ int64 BuffCount = 7;//Buff剩余次数 bool BuffStatus = 8;//Buff领取状态 int64 SignAwardTime = 9;//签到领取时间 0-未领取 + int64 BuffStartTime = 10; //Buff开始领取时间 + int64 BuffEndTime = 11; //Buff结束领取时间 + repeated ShopData shopData = 12;//购买礼包数量 +} + +message ShopData{ + int32 ShopId =1; //shopId + int32 ShopNum = 2; //已购买次数 + int32 MaxShopNum = 3; //最大购买次数 } //贺春 diff --git a/ranksrv/rank/niandamage.go b/ranksrv/rank/niandamage.go new file mode 100644 index 0000000..afcd3ab --- /dev/null +++ b/ranksrv/rank/niandamage.go @@ -0,0 +1,22 @@ +package rank + +import ( + "mongo.games.com/game/model" + "mongo.games.com/game/ranksrv/com" + "mongo.games.com/goserver/core/logger" +) + +var NianDamageMgrInstance = com.NewListMgr[*model.NianInfo]( + func() int64 { + return int64(model.GameParamData.RankTimeout) + }, + func(platform string, index int32) ([]*model.NianInfo, error) { + logger.Logger.Tracef("load rank nian luck platform:%s", platform) + list, err := model.FindDamageNianRankList(&model.FindNianListArgs{ + Platform: platform, + }) + if err != nil { + return nil, err + } + return list.List, nil + }) diff --git a/ranksrv/rank/nianluck.go b/ranksrv/rank/nianluck.go new file mode 100644 index 0000000..4ffbd7e --- /dev/null +++ b/ranksrv/rank/nianluck.go @@ -0,0 +1,22 @@ +package rank + +import ( + "mongo.games.com/game/model" + "mongo.games.com/game/ranksrv/com" + "mongo.games.com/goserver/core/logger" +) + +var NianLuckMgrInstance = com.NewListMgr[*model.NianInfo]( + func() int64 { + return int64(model.GameParamData.RankTimeout) + }, + func(platform string, index int32) ([]*model.NianInfo, error) { + logger.Logger.Tracef("load rank nian luck platform:%s", platform) + list, err := model.FindLuckNianRankList(&model.FindNianListArgs{ + Platform: platform, + }) + if err != nil { + return nil, err + } + return list.List, nil + }) diff --git a/worldsrv/action_nian.go b/worldsrv/action_nian.go index 30b65f7..05aec89 100644 --- a/worldsrv/action_nian.go +++ b/worldsrv/action_nian.go @@ -4,6 +4,7 @@ import ( "math/rand" "mongo.games.com/game/common" "mongo.games.com/game/model" + "mongo.games.com/game/mq" "mongo.games.com/game/protocol/activity" "mongo.games.com/game/srvdata" "mongo.games.com/goserver/core/logger" @@ -30,7 +31,7 @@ func CSNianData(s *netlib.Session, packetid int, data interface{}, sid int64) er logger.Logger.Warn("CSNianData p == nil") return nil } - pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + pool := WelfareMgrSington.GetConfig(p.Platform).ActivityNianConfig if pool == nil || pool.List == nil || pool.Switch == model.WelfareClose { return nil } @@ -82,6 +83,45 @@ func CSNianData(s *netlib.Session, packetid int, data interface{}, sid int64) er pack.RankData = append(pack.RankData, rankInfo) } + var intSlice []int + var shopNum []int + for _, value := range sData { + if value.Id == 17 { + str := value.PropValue + strSlice := strings.Split(str, ",") + // 转换每个字符串为 int + for _, s := range strSlice { + num, _ := strconv.Atoi(s) + intSlice = append(intSlice, num) + } + break + } + if value.Id == 18 { + str := value.PropValue + strSlice := strings.Split(str, ",") + // 转换每个字符串为 int + for _, s := range strSlice { + num, _ := strconv.Atoi(s) + shopNum = append(shopNum, num) + } + break + } + } + for pos, shopId := range intSlice { + num := shopNum[pos] + if num == 0 { + continue + } + shopInfo := &activity.ShopData{} + shopInfo.ShopId = int32(shopId) + shopInfo.ShopNum = p.WelfData.NianData.GiftShop[int32(shopId)] + shopInfo.MaxShopNum = int32(num) + pack.ShopData = append(pack.ShopData, shopInfo) + } + StartTs := common.IntToTime(int(pool.List[0].BuffStartTime)).Unix() + EndTs := common.IntToTime(int(pool.List[0].BuffEndTime)).Unix() + pack.BuffStartTime = StartTs + pack.BuffEndTime = EndTs pack.BossHp = p.WelfData.NianData.BossHp pack.BossMaxHp = BossMaxHp pack.ActivityStartTime = timestamp @@ -90,6 +130,7 @@ func CSNianData(s *netlib.Session, packetid int, data interface{}, sid int64) er pack.BuffCount = p.WelfData.NianData.BuffCount pack.BuffStatus = p.WelfData.NianData.BuffStatus pack.SignAwardTime = p.WelfData.NianData.SignAwardTime + logger.Logger.Trace("请求年兽活动信息 ", pack) p.SendToClient(int(activity.NianPacketID_PACKET_SCNianData), pack) } @@ -120,7 +161,7 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64) logger.Logger.Warn("CSNianAttack p == nil") return nil } - pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + pool := WelfareMgrSington.GetConfig(p.Platform).ActivityNianConfig if pool == nil || pool.List == nil { return nil } @@ -159,7 +200,7 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64) var items []*model.Item items = append(items, &model.Item{ ItemId: int32(itemId), - ItemNum: int64(itemNum), + ItemNum: int64(-itemNum), }) _, _, result := BagMgrSingleton.AddItems(&model.AddItemParam{ Platform: p.Platform, @@ -172,6 +213,7 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64) if !result { return nil } + items = []*model.Item{} //本次攻击总血量 AttackHp := int64(0) LuckyRankNeed := int64(0) @@ -252,10 +294,6 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64) } if p.WelfData.NianData.AttackMaxHp < randomValue { p.WelfData.NianData.AttackMaxHp = randomValue - if randomValue >= LuckyRankNeed { - //更新幸运榜 - - } } AttackHp += randomValue if typeId == 3 { @@ -339,12 +377,6 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64) } p.WelfData.NianData.BossHp -= AttackHp p.WelfData.NianData.AttackSumHp += AttackHp - if p.WelfData.NianData.AttackSumHp >= RankNeed { - //更新总榜 - - } - //更新伤害总榜 - isDie := false //是否死亡 //判断Boss是否死亡 var bossDieAward []*model.Item @@ -446,6 +478,32 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64) pack.BuffCount = p.WelfData.NianData.BuffCount p.SendToClient(int(activity.NianPacketID_PACKET_SCNianAttackData), pack) TaskSubjectSingleton.Touch(common.TaskTypeNianBossDamage, &TaskData{SnId: p.SnId, Num: AttackHp}) // 对年兽造成伤害 + //更新年兽排行榜榜 + luckValue := p.WelfData.NianData.AttackMaxHp + luckTime := time.Now().Unix() + if luckValue < LuckyRankNeed { + luckValue = 0 + luckTime = 0 + } + damage := p.WelfData.NianData.AttackSumHp + if luckValue < RankNeed { + damage = 0 + } + //if luckValue > 0 || damage > 0 { + log := &model.NianInfo{ + Platform: p.Platform, + SnId: p.SnId, + Name: p.Name, + Luck: luckValue, + Damage: damage, + ModId: p.Roles.ModId, + Ts: time.Now().Unix(), + } + if luckTime > 0 { + log.LuckTime = luckTime + } + mq.Write(log) + //} } return nil } @@ -465,7 +523,7 @@ func CSNianBuff(s *netlib.Session, packetid int, data interface{}, sid int64) er if p.WelfData.NianData.BuffStatus { return nil } - pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + pool := WelfareMgrSington.GetConfig(p.Platform).ActivityNianConfig if pool == nil || pool.List == nil { return nil } @@ -473,8 +531,10 @@ func CSNianBuff(s *netlib.Session, packetid int, data interface{}, sid int64) er logger.Logger.Trace("CSNianSignAward 活动关闭!") return nil } + StartTs := common.IntToTime(int(pool.List[0].BuffStartTime)).Unix() + EndTs := common.IntToTime(int(pool.List[0].BuffEndTime)).Unix() //判断领取时间 - if time.Now().Hour() >= int(pool.List[0].BuffStartTime) && time.Now().Hour() <= int(pool.List[0].BuffEndTime) { + if time.Now().Unix() >= StartTs && time.Now().Unix() <= EndTs { sData := srvdata.PBDB_NewYearActivityMgr.Datas.GetArr() count := int64(0) for _, value := range sData { @@ -502,7 +562,7 @@ func CSNianSignAward(s *netlib.Session, packetid int, data interface{}, sid int6 if p == nil { return nil } - pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + pool := WelfareMgrSington.GetConfig(p.Platform).ActivityNianConfig if pool == nil || pool.List == nil { return nil } diff --git a/worldsrv/action_shop.go b/worldsrv/action_shop.go index f31bcbf..87153b9 100644 --- a/worldsrv/action_shop.go +++ b/worldsrv/action_shop.go @@ -1,6 +1,9 @@ package main import ( + "mongo.games.com/game/srvdata" + "strconv" + "strings" "time" "mongo.games.com/goserver/core/basic" @@ -188,6 +191,51 @@ func (this *CSVCPayShopHandler) Process(s *netlib.Session, packetid int, data in SendClient(shop.OpResultCode_OPRC_Error) return nil } + case ShopPageNian: + sData := srvdata.PBDB_NewYearActivityMgr.Datas.GetArr() + var intSlice []int + var shopNum []int + for _, value := range sData { + if value.Id == 17 { + str := value.PropValue + strSlice := strings.Split(str, ",") + // 转换每个字符串为 int + for _, s := range strSlice { + num, err := strconv.Atoi(s) + if err != nil { + return nil + } + intSlice = append(intSlice, num) + } + break + } + if value.Id == 18 { + str := value.PropValue + strSlice := strings.Split(str, ",") + // 转换每个字符串为 int + for _, s := range strSlice { + num, err := strconv.Atoi(s) + if err != nil { + return nil + } + shopNum = append(shopNum, num) + } + break + } + } + shopPos := 0 + for i, id := range intSlice { + if id == int(shopInfo.Id) { + shopPos = i + break + } + } + num := shopNum[shopPos] + if num > 0 { + if p.WelfData.NianData.GiftShop[shopInfo.Id] >= int32(num) { + return nil + } + } default: } @@ -474,6 +522,47 @@ func (this *CSPayInfoHandler) Process(s *netlib.Session, packetid int, data inte return nil } } + if shopInfo.Page == ShopPageNian { + sData := srvdata.PBDB_NewYearActivityMgr.Datas.GetArr() + var intSlice []int + var shopNum []int + for _, value := range sData { + if value.Id == 17 { + str := value.PropValue + strSlice := strings.Split(str, ",") + // 转换每个字符串为 int + for _, s := range strSlice { + num, _ := strconv.Atoi(s) + intSlice = append(intSlice, num) + } + break + } + if value.Id == 18 { + str := value.PropValue + strSlice := strings.Split(str, ",") + // 转换每个字符串为 int + for _, s := range strSlice { + num, _ := strconv.Atoi(s) + shopNum = append(shopNum, num) + } + break + } + } + shopPos := 0 + for i, id := range intSlice { + if id == int(shopInfo.Id) { + shopPos = i + break + } + } + num := shopNum[shopPos] + if num > 0 { + if p.WelfData.NianData.GiftShop[shopInfo.Id] >= int32(num) { + SendClient(shop.OpResultCode_OPRC_Error) + return nil + } + } + } ShopMgrSington.SendAPICreateOrder(p, msg.ConfigPayId, shopInfo, "shop_goods_xj") } else { diff --git a/worldsrv/mq.go b/worldsrv/mq.go index 36f0640..7389fa7 100644 --- a/worldsrv/mq.go +++ b/worldsrv/mq.go @@ -34,6 +34,7 @@ func init() { mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.BackSystemFreeGive, Data: &model.SystemFreeGive{}}) mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.DBLotteryCode, Data: &model.LotteryCode{}}) mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.DBLotteryLog, Data: &model.LotteryLog{}}) + mq.RegisterMessage(&mq.RegisterMessageParam{Name: model.MQRankNian, Data: &model.NianInfo{}}) } func init() { diff --git a/worldsrv/player.go b/worldsrv/player.go index 4973b60..b2c4b72 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -2901,6 +2901,10 @@ func (this *Player) DoShopInfo(info *model.DbShop, isLogin bool) { Num: 1, }) } + //年兽礼包 + if info.PageId == ShopPageNian { + this.WelfData.NianData.GiftShop[info.ShopId] += 1 + } switch info.Remark { case "BlindBox": diff --git a/worldsrv/shopmgr.go b/worldsrv/shopmgr.go index a46f850..b076fc4 100644 --- a/worldsrv/shopmgr.go +++ b/worldsrv/shopmgr.go @@ -46,16 +46,16 @@ const ( // page类型 const ( - ShopPageCoin = 1 //金币页面 - ShopPageDiamond = 2 //钻石页面 - ShopPageItem = 3 //道具页面 - ShopPageVip = 4 //VIP页面 - ShopPagePrivilege = 5 //VIP特权礼包 - ShopPageGift = 7 //礼包页面 - ShopPageDiamondBank = 8 //钻石存储罐 - ShopPagePermit = 9 //赛季通行证 - ShopPageFangKa = 10 //房卡页面 - + ShopPageCoin = 1 //金币页面 + ShopPageDiamond = 2 //钻石页面 + ShopPageItem = 3 //道具页面 + ShopPageVip = 4 //VIP页面 + ShopPagePrivilege = 5 //VIP特权礼包 + ShopPageGift = 7 //礼包页面 + ShopPageDiamondBank = 8 //钻石存储罐 + ShopPagePermit = 9 //赛季通行证 + ShopPageFangKa = 10 //房卡页面 + ShopPageNian = 12 //年兽活动页面 ShopPagePhoneScore = 61 //手机积分商城 ShopPagePhoneScoreGoogle = 62 ShopPageBackend = 63 //并不是页面,是后台加币记录类型 diff --git a/worldsrv/taskmgr.go b/worldsrv/taskmgr.go index 49a1c79..e453e87 100644 --- a/worldsrv/taskmgr.go +++ b/worldsrv/taskmgr.go @@ -200,7 +200,7 @@ func (t *TaskHandle) AllTask(id int, data any) { switch v.GetActivityType() { case common.TaskActivityTypeNianEveryDay, common.TaskActivityTypeNian: //判断是否在开启时间段内 - pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + pool := WelfareMgrSington.GetConfig(p.Platform).ActivityNianConfig if pool == nil || pool.List == nil { continue } @@ -340,7 +340,7 @@ func IsTaskReward(p *Player, id int32) bool { } return true case common.TaskActivityTypeNian: - pool := PlatformMgrSingleton.GetConfig(p.Platform).ActivityNianConfig + pool := WelfareMgrSington.GetConfig(p.Platform).ActivityNianConfig if pool == nil || pool.List == nil { return false } diff --git a/worldsrv/trascate_webapi.go b/worldsrv/trascate_webapi.go index 4e22871..1792b46 100644 --- a/worldsrv/trascate_webapi.go +++ b/worldsrv/trascate_webapi.go @@ -2304,6 +2304,7 @@ func init() { return err } InviteTask(msg.Platform, psnid, info.SnId, common.InviteScoreTypePay, int64(info.ConsumeNum)) + return nil }), nil, "InvitePayTask").Start() } diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index f764c15..95211a2 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -2216,8 +2216,8 @@ func (this *WelfareMgr) DayReserNian(p *Player) { p.WelfData.NianData.SignAwardTime = 0 p.WelfData.NianData.OtherAwardNum = make(map[int32]int32) p.WelfData.NianData.AttackMaxHp = 0 + p.WelfData.NianData.GiftShop = make(map[int32]int32) } - } // 年兽活动结束清除数据 diff --git a/xlsx/DB_NewYearActivity.xlsx b/xlsx/DB_NewYearActivity.xlsx index c5a3abe..729eb72 100644 Binary files a/xlsx/DB_NewYearActivity.xlsx and b/xlsx/DB_NewYearActivity.xlsx differ