From e4b85bf50338494a00c47cbb62aec7ece5a36b8a Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Thu, 2 Jan 2025 16:14:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B4=E5=85=BD=E5=85=91=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/player.go | 2 + protocol/activity/nian.pb.go | 223 ++++++++++++++++---- protocol/activity/nian.proto | 15 +- protocol/webapi/common.pb.go | 387 +++++++++++++++++++++++++++-------- protocol/webapi/common.proto | 14 ++ worldsrv/action_nian.go | 89 +++++++- worldsrv/welfmgr.go | 1 + xlsx/DB_NewYearActivity.xlsx | Bin 11837 -> 11934 bytes 8 files changed, 605 insertions(+), 126 deletions(-) diff --git a/model/player.go b/model/player.go index 1b84697..231018a 100644 --- a/model/player.go +++ b/model/player.go @@ -689,6 +689,8 @@ type NianData struct { LittleHurt int32 //小爆竹次数 BigHurt int32 //大爆竹次数 OtherAwardNum map[int32]int32 //奖励掉落数量 + AttackMaxHp int64 //单次攻击最大血量 + AttackSumHp int64 //攻击总伤害 } func ConvertPlayerDataToWebData(param *WebPlayerDataParam) *webapi.PlayerData { diff --git a/protocol/activity/nian.pb.go b/protocol/activity/nian.pb.go index cc51864..501b5c9 100644 --- a/protocol/activity/nian.pb.go +++ b/protocol/activity/nian.pb.go @@ -34,6 +34,8 @@ const ( NianPacketID_PACKET_SCNianAttackData NianPacketID = 2667 //返回攻击年兽信息 NianPacketID_PACKET_CSNianSignAward NianPacketID = 2668 //请求签到 NianPacketID_PACKET_SCNianSignAward NianPacketID = 2669 //签到返回 + NianPacketID_PACKET_CSNianChange NianPacketID = 2670 //请求兑换小爆竹 + NianPacketID_PACKET_SCNianChange NianPacketID = 2671 //返回兑换道具 ) // Enum value maps for NianPacketID. @@ -50,6 +52,8 @@ var ( 2667: "PACKET_SCNianAttackData", 2668: "PACKET_CSNianSignAward", 2669: "PACKET_SCNianSignAward", + 2670: "PACKET_CSNianChange", + 2671: "PACKET_SCNianChange", } NianPacketID_value = map[string]int32{ "PACKET_Nian_ZERO": 0, @@ -63,6 +67,8 @@ var ( "PACKET_SCNianAttackData": 2667, "PACKET_CSNianSignAward": 2668, "PACKET_SCNianSignAward": 2669, + "PACKET_CSNianChange": 2670, + "PACKET_SCNianChange": 2671, } ) @@ -147,8 +153,7 @@ type SCNianData struct { AwardTime int64 `protobuf:"varint,6,opt,name=AwardTime,proto3" json:"AwardTime,omitempty"` //每日签到领取时间 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领取状态 - On int32 `protobuf:"varint,9,opt,name=On,proto3" json:"On,omitempty"` //活动开关 1开启 2关闭 - SignAwardTime int64 `protobuf:"varint,10,opt,name=SignAwardTime,proto3" json:"SignAwardTime,omitempty"` //签到领取时间 0-未领取 + SignAwardTime int64 `protobuf:"varint,9,opt,name=SignAwardTime,proto3" json:"SignAwardTime,omitempty"` //签到领取时间 0-未领取 } func (x *SCNianData) Reset() { @@ -239,13 +244,6 @@ func (x *SCNianData) GetBuffStatus() bool { return false } -func (x *SCNianData) GetOn() int32 { - if x != nil { - return x.On - } - return 0 -} - func (x *SCNianData) GetSignAwardTime() int64 { if x != nil { return x.SignAwardTime @@ -838,13 +836,118 @@ func (x *SCNianSignAward) GetSignAward() []*RankAwardData { return nil } +//兑换 +//PACKET_CSNianChange +type CSNianChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Num int32 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` +} + +func (x *CSNianChange) Reset() { + *x = CSNianChange{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CSNianChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CSNianChange) ProtoMessage() {} + +func (x *CSNianChange) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[12] + 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 CSNianChange.ProtoReflect.Descriptor instead. +func (*CSNianChange) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{12} +} + +func (x *CSNianChange) GetNum() int32 { + if x != nil { + return x.Num + } + return 0 +} + +//PACKET_SCNianChange +type SCNianChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Num int32 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` + Award []*RankAwardData `protobuf:"bytes,2,rep,name=Award,proto3" json:"Award,omitempty"` +} + +func (x *SCNianChange) Reset() { + *x = SCNianChange{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_activity_nian_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SCNianChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SCNianChange) ProtoMessage() {} + +func (x *SCNianChange) ProtoReflect() protoreflect.Message { + mi := &file_protocol_activity_nian_proto_msgTypes[13] + 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 SCNianChange.ProtoReflect.Descriptor instead. +func (*SCNianChange) Descriptor() ([]byte, []int) { + return file_protocol_activity_nian_proto_rawDescGZIP(), []int{13} +} + +func (x *SCNianChange) GetNum() int32 { + if x != nil { + return x.Num + } + return 0 +} + +func (x *SCNianChange) GetAward() []*RankAwardData { + if x != nil { + return x.Award + } + return nil +} + var File_protocol_activity_nian_proto protoreflect.FileDescriptor 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, 0xdc, 0x02, 0x0a, 0x0a, 0x53, 0x43, 0x4e, 0x69, 0x61, + 0x61, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x22, 0xcc, 0x02, 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, @@ -863,9 +966,8 @@ var file_protocol_activity_nian_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x42, 0x75, 0x66, 0x66, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x42, 0x75, 0x66, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x42, 0x75, 0x66, 0x66, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x41, 0x77, 0x61, 0x72, + 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, @@ -924,29 +1026,39 @@ var file_protocol_activity_nian_proto_rawDesc = []byte{ 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, 0x2a, 0xae, 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, 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, + 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 ( @@ -962,7 +1074,7 @@ 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, 12) +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 @@ -977,6 +1089,8 @@ var file_protocol_activity_nian_proto_goTypes = []interface{}{ (*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{ 7, // 0: activity.SCNianData.LuckData:type_name -> activity.RankData @@ -987,11 +1101,12 @@ var file_protocol_activity_nian_proto_depIdxs = []int32{ 8, // 5: activity.SCNianAttackData.ExtraDrop:type_name -> activity.RankAwardData 8, // 6: activity.SCNianAttackData.FloorReward:type_name -> activity.RankAwardData 8, // 7: activity.SCNianSignAward.SignAward:type_name -> activity.RankAwardData - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 8, // 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 } func init() { file_protocol_activity_nian_proto_init() } @@ -1144,6 +1259,30 @@ func file_protocol_activity_nian_proto_init() { return nil } } + 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 + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1151,7 +1290,7 @@ func file_protocol_activity_nian_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protocol_activity_nian_proto_rawDesc, NumEnums: 1, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, diff --git a/protocol/activity/nian.proto b/protocol/activity/nian.proto index 12f2b76..6f8f47d 100644 --- a/protocol/activity/nian.proto +++ b/protocol/activity/nian.proto @@ -14,6 +14,8 @@ enum NianPacketID { PACKET_SCNianAttackData = 2667; //返回攻击年兽信息 PACKET_CSNianSignAward = 2668; //请求签到 PACKET_SCNianSignAward = 2669; //签到返回 + PACKET_CSNianChange = 2670;//请求兑换小爆竹 + PACKET_SCNianChange = 2671;//返回兑换道具 } //获取年兽活动信息 @@ -30,8 +32,7 @@ message SCNianData{ int64 AwardTime = 6;//每日签到领取时间 int64 BuffCount = 7;//Buff剩余次数 bool BuffStatus = 8;//Buff领取状态 - int32 On = 9;//活动开关 1开启 2关闭 - int64 SignAwardTime = 10;//签到领取时间 0-未领取 + int64 SignAwardTime = 9;//签到领取时间 0-未领取 } //贺春 @@ -90,4 +91,14 @@ message CSNianSignAward{ message SCNianSignAward{ int64 SignAwardTime = 1; repeated RankAwardData SignAward = 2;//签到奖励 +} +//兑换 +//PACKET_CSNianChange +message CSNianChange{ + int32 Num = 1; +} +//PACKET_SCNianChange +message SCNianChange{ + int32 Num = 1; + repeated RankAwardData Award =2; } \ No newline at end of file diff --git a/protocol/webapi/common.pb.go b/protocol/webapi/common.pb.go index 3800625..dcb7d67 100644 --- a/protocol/webapi/common.pb.go +++ b/protocol/webapi/common.pb.go @@ -10098,6 +10098,173 @@ func (x *NianDropInfo) GetDropUp() int32 { return 0 } +//年兽排行榜奖励 +//etcd /game/activity_nian_rank +type NianRankReward struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台 + RankData []*NianRankData `protobuf:"bytes,2,rep,name=RankData,proto3" json:"RankData,omitempty"` +} + +func (x *NianRankReward) Reset() { + *x = NianRankReward{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_webapi_common_proto_msgTypes[107] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NianRankReward) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NianRankReward) ProtoMessage() {} + +func (x *NianRankReward) ProtoReflect() protoreflect.Message { + mi := &file_protocol_webapi_common_proto_msgTypes[107] + 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 NianRankReward.ProtoReflect.Descriptor instead. +func (*NianRankReward) Descriptor() ([]byte, []int) { + return file_protocol_webapi_common_proto_rawDescGZIP(), []int{107} +} + +func (x *NianRankReward) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (x *NianRankReward) GetRankData() []*NianRankData { + if x != nil { + return x.RankData + } + return nil +} + +type NianRankData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeId int32 `protobuf:"varint,1,opt,name=TypeId,proto3" json:"TypeId,omitempty"` //1-幸运榜 2-伤害榜 + RankInfo []*NianRankAwardInfo `protobuf:"bytes,2,rep,name=RankInfo,proto3" json:"RankInfo,omitempty"` +} + +func (x *NianRankData) Reset() { + *x = NianRankData{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_webapi_common_proto_msgTypes[108] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NianRankData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NianRankData) ProtoMessage() {} + +func (x *NianRankData) ProtoReflect() protoreflect.Message { + mi := &file_protocol_webapi_common_proto_msgTypes[108] + 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 NianRankData.ProtoReflect.Descriptor instead. +func (*NianRankData) Descriptor() ([]byte, []int) { + return file_protocol_webapi_common_proto_rawDescGZIP(), []int{108} +} + +func (x *NianRankData) GetTypeId() int32 { + if x != nil { + return x.TypeId + } + return 0 +} + +func (x *NianRankData) GetRankInfo() []*NianRankAwardInfo { + if x != nil { + return x.RankInfo + } + return nil +} + +type NianRankAwardInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankId int32 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排名 + Award []*ItemInfo `protobuf:"bytes,2,rep,name=Award,proto3" json:"Award,omitempty"` //奖励 +} + +func (x *NianRankAwardInfo) Reset() { + *x = NianRankAwardInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_protocol_webapi_common_proto_msgTypes[109] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NianRankAwardInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NianRankAwardInfo) ProtoMessage() {} + +func (x *NianRankAwardInfo) ProtoReflect() protoreflect.Message { + mi := &file_protocol_webapi_common_proto_msgTypes[109] + 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 NianRankAwardInfo.ProtoReflect.Descriptor instead. +func (*NianRankAwardInfo) Descriptor() ([]byte, []int) { + return file_protocol_webapi_common_proto_rawDescGZIP(), []int{109} +} + +func (x *NianRankAwardInfo) GetRankId() int32 { + if x != nil { + return x.RankId + } + return 0 +} + +func (x *NianRankAwardInfo) GetAward() []*ItemInfo { + if x != nil { + return x.Award + } + return nil +} + // etcd /game/act_redpacket type RedPacketConfig struct { state protoimpl.MessageState @@ -10112,7 +10279,7 @@ type RedPacketConfig struct { func (x *RedPacketConfig) Reset() { *x = RedPacketConfig{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_webapi_common_proto_msgTypes[107] + mi := &file_protocol_webapi_common_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10125,7 +10292,7 @@ func (x *RedPacketConfig) String() string { func (*RedPacketConfig) ProtoMessage() {} func (x *RedPacketConfig) ProtoReflect() protoreflect.Message { - mi := &file_protocol_webapi_common_proto_msgTypes[107] + mi := &file_protocol_webapi_common_proto_msgTypes[110] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10138,7 +10305,7 @@ func (x *RedPacketConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use RedPacketConfig.ProtoReflect.Descriptor instead. func (*RedPacketConfig) Descriptor() ([]byte, []int) { - return file_protocol_webapi_common_proto_rawDescGZIP(), []int{107} + return file_protocol_webapi_common_proto_rawDescGZIP(), []int{110} } func (x *RedPacketConfig) GetPlatform() string { @@ -10182,7 +10349,7 @@ type RedPacketInfo struct { func (x *RedPacketInfo) Reset() { *x = RedPacketInfo{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_webapi_common_proto_msgTypes[108] + mi := &file_protocol_webapi_common_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10195,7 +10362,7 @@ func (x *RedPacketInfo) String() string { func (*RedPacketInfo) ProtoMessage() {} func (x *RedPacketInfo) ProtoReflect() protoreflect.Message { - mi := &file_protocol_webapi_common_proto_msgTypes[108] + mi := &file_protocol_webapi_common_proto_msgTypes[111] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10208,7 +10375,7 @@ func (x *RedPacketInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use RedPacketInfo.ProtoReflect.Descriptor instead. func (*RedPacketInfo) Descriptor() ([]byte, []int) { - return file_protocol_webapi_common_proto_rawDescGZIP(), []int{108} + return file_protocol_webapi_common_proto_rawDescGZIP(), []int{111} } func (x *RedPacketInfo) GetId() int64 { @@ -10293,7 +10460,7 @@ type RedInfo struct { func (x *RedInfo) Reset() { *x = RedInfo{} if protoimpl.UnsafeEnabled { - mi := &file_protocol_webapi_common_proto_msgTypes[109] + mi := &file_protocol_webapi_common_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10306,7 +10473,7 @@ func (x *RedInfo) String() string { func (*RedInfo) ProtoMessage() {} func (x *RedInfo) ProtoReflect() protoreflect.Message { - mi := &file_protocol_webapi_common_proto_msgTypes[109] + mi := &file_protocol_webapi_common_proto_msgTypes[112] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10319,7 +10486,7 @@ func (x *RedInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use RedInfo.ProtoReflect.Descriptor instead. func (*RedInfo) Descriptor() ([]byte, []int) { - return file_protocol_webapi_common_proto_rawDescGZIP(), []int{109} + return file_protocol_webapi_common_proto_rawDescGZIP(), []int{112} } func (x *RedInfo) GetNum() int64 { @@ -11899,38 +12066,56 @@ var file_protocol_webapi_common_proto_rawDesc = []byte{ 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x44, 0x72, 0x6f, 0x70, 0x55, 0x70, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x44, 0x72, 0x6f, 0x70, 0x55, 0x70, 0x22, 0x7a, 0x0a, 0x0f, 0x52, - 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, - 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x29, 0x0a, 0x04, 0x4c, 0x69, - 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, - 0x69, 0x2e, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x50, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x94, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x64, 0x50, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x48, 0x4d, 0x53, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x48, 0x4d, 0x53, 0x12, 0x16, 0x0a, 0x06, 0x45, 0x6e, 0x64, 0x48, 0x4d, 0x53, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x45, 0x6e, 0x64, 0x48, 0x4d, 0x53, 0x12, 0x16, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x79, 0x54, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x53, - 0x74, 0x61, 0x79, 0x54, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x4c, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, - 0x4e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, - 0x4e, 0x75, 0x6d, 0x12, 0x29, 0x0a, 0x07, 0x52, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x0a, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, - 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x52, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x2f, - 0x0a, 0x07, 0x52, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x52, - 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x52, 0x61, 0x74, 0x65, 0x42, - 0x26, 0x5a, 0x24, 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, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x44, 0x72, 0x6f, 0x70, 0x55, 0x70, 0x22, 0x5e, 0x0a, 0x0e, 0x4e, + 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x30, 0x0a, 0x08, 0x52, 0x61, 0x6e, + 0x6b, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x65, + 0x62, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x22, 0x5d, 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, 0x35, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x4e, + 0x69, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x53, 0x0a, 0x11, 0x4e, 0x69, + 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 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, 0x26, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, + 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, + 0x7a, 0x0a, 0x0f, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x29, + 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x77, + 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x94, 0x02, 0x0a, 0x0d, + 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, + 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x1a, 0x0a, + 0x08, 0x53, 0x74, 0x61, 0x72, 0x74, 0x48, 0x4d, 0x53, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x53, 0x74, 0x61, 0x72, 0x74, 0x48, 0x4d, 0x53, 0x12, 0x16, 0x0a, 0x06, 0x45, 0x6e, 0x64, + 0x48, 0x4d, 0x53, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x45, 0x6e, 0x64, 0x48, 0x4d, + 0x53, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x79, 0x54, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x79, 0x54, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, 0x78, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x4d, 0x61, 0x78, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x4c, 0x65, 0x73, 0x73, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x12, 0x29, 0x0a, 0x07, 0x52, 0x65, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, + 0x69, 0x2e, 0x52, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x52, 0x65, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x22, 0x2f, 0x0a, 0x07, 0x52, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, + 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12, + 0x12, 0x0a, 0x04, 0x52, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x52, + 0x61, 0x74, 0x65, 0x42, 0x26, 0x5a, 0x24, 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, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -11945,7 +12130,7 @@ func file_protocol_webapi_common_proto_rawDescGZIP() []byte { return file_protocol_webapi_common_proto_rawDescData } -var file_protocol_webapi_common_proto_msgTypes = make([]protoimpl.MessageInfo, 120) +var file_protocol_webapi_common_proto_msgTypes = make([]protoimpl.MessageInfo, 123) var file_protocol_webapi_common_proto_goTypes = []interface{}{ (*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting (*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting @@ -12054,35 +12239,38 @@ var file_protocol_webapi_common_proto_goTypes = []interface{}{ (*ActivityNianConfig)(nil), // 104: webapi.ActivityNianConfig (*NianInfo)(nil), // 105: webapi.NianInfo (*NianDropInfo)(nil), // 106: webapi.NianDropInfo - (*RedPacketConfig)(nil), // 107: webapi.RedPacketConfig - (*RedPacketInfo)(nil), // 108: webapi.RedPacketInfo - (*RedInfo)(nil), // 109: webapi.RedInfo - nil, // 110: webapi.Platform.BindTelRewardEntry - nil, // 111: webapi.PlayerData.RankScoreEntry - nil, // 112: webapi.ItemShop.AwardEntry - nil, // 113: webapi.VIPcfg.AwardEntry - nil, // 114: webapi.VIPcfg.Privilege1Entry - nil, // 115: webapi.VIPcfg.Privilege7Entry - nil, // 116: webapi.VIPcfg.Privilege9Entry - nil, // 117: webapi.ActInviteConfig.PayScoreEntry - nil, // 118: webapi.SkinLevel.UpItemEntry - nil, // 119: webapi.SkinItem.UnlockParamEntry - (*server.DB_GameFree)(nil), // 120: server.DB_GameFree - (*server.DB_GameItem)(nil), // 121: server.DB_GameItem + (*NianRankReward)(nil), // 107: webapi.NianRankReward + (*NianRankData)(nil), // 108: webapi.NianRankData + (*NianRankAwardInfo)(nil), // 109: webapi.NianRankAwardInfo + (*RedPacketConfig)(nil), // 110: webapi.RedPacketConfig + (*RedPacketInfo)(nil), // 111: webapi.RedPacketInfo + (*RedInfo)(nil), // 112: webapi.RedInfo + nil, // 113: webapi.Platform.BindTelRewardEntry + nil, // 114: webapi.PlayerData.RankScoreEntry + nil, // 115: webapi.ItemShop.AwardEntry + nil, // 116: webapi.VIPcfg.AwardEntry + nil, // 117: webapi.VIPcfg.Privilege1Entry + nil, // 118: webapi.VIPcfg.Privilege7Entry + nil, // 119: webapi.VIPcfg.Privilege9Entry + nil, // 120: webapi.ActInviteConfig.PayScoreEntry + nil, // 121: webapi.SkinLevel.UpItemEntry + nil, // 122: webapi.SkinItem.UnlockParamEntry + (*server.DB_GameFree)(nil), // 123: server.DB_GameFree + (*server.DB_GameItem)(nil), // 124: server.DB_GameItem } var file_protocol_webapi_common_proto_depIdxs = []int32{ 2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch 3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig 4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame - 110, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry + 113, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry 6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus - 120, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree + 123, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree 8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree 0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting 1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting 1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting - 120, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree - 111, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry + 123, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree + 114, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry 32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo 14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo 14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo @@ -12095,7 +12283,7 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{ 32, // 21: webapi.ExchangeShop.Items:type_name -> webapi.ItemInfo 25, // 22: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop 29, // 23: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight - 112, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry + 115, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry 30, // 25: webapi.ItemShopList.List:type_name -> webapi.ItemShop 32, // 26: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo 33, // 27: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward @@ -12116,14 +12304,14 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{ 38, // 42: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate 48, // 43: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree 48, // 44: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree - 113, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry - 114, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry - 115, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry - 116, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry + 116, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry + 117, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry + 118, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry + 119, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry 51, // 49: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg 38, // 50: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate 55, // 51: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig - 117, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry + 120, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry 62, // 53: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward 62, // 54: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward 62, // 55: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward @@ -12140,12 +12328,12 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{ 69, // 66: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo 70, // 67: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers 72, // 68: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData - 121, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem + 124, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem 32, // 70: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo 75, // 71: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo 76, // 72: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo - 118, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry - 119, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry + 121, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry + 122, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry 78, // 75: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel 79, // 76: webapi.SkinConfig.Items:type_name -> webapi.SkinItem 82, // 77: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData @@ -12168,13 +12356,16 @@ var file_protocol_webapi_common_proto_depIdxs = []int32{ 32, // 94: webapi.NianInfo.SignReward:type_name -> webapi.ItemInfo 32, // 95: webapi.NianInfo.BossDieReward:type_name -> webapi.ItemInfo 106, // 96: webapi.NianInfo.BossDieOtherReward:type_name -> webapi.NianDropInfo - 108, // 97: webapi.RedPacketConfig.List:type_name -> webapi.RedPacketInfo - 109, // 98: webapi.RedPacketInfo.RedList:type_name -> webapi.RedInfo - 99, // [99:99] is the sub-list for method output_type - 99, // [99:99] is the sub-list for method input_type - 99, // [99:99] is the sub-list for extension type_name - 99, // [99:99] is the sub-list for extension extendee - 0, // [0:99] is the sub-list for field type_name + 108, // 97: webapi.NianRankReward.RankData:type_name -> webapi.NianRankData + 109, // 98: webapi.NianRankData.RankInfo:type_name -> webapi.NianRankAwardInfo + 32, // 99: webapi.NianRankAwardInfo.Award:type_name -> webapi.ItemInfo + 111, // 100: webapi.RedPacketConfig.List:type_name -> webapi.RedPacketInfo + 112, // 101: webapi.RedPacketInfo.RedList:type_name -> webapi.RedInfo + 102, // [102:102] is the sub-list for method output_type + 102, // [102:102] is the sub-list for method input_type + 102, // [102:102] is the sub-list for extension type_name + 102, // [102:102] is the sub-list for extension extendee + 0, // [0:102] is the sub-list for field type_name } func init() { file_protocol_webapi_common_proto_init() } @@ -13468,7 +13659,7 @@ func file_protocol_webapi_common_proto_init() { } } file_protocol_webapi_common_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedPacketConfig); i { + switch v := v.(*NianRankReward); i { case 0: return &v.state case 1: @@ -13480,7 +13671,7 @@ func file_protocol_webapi_common_proto_init() { } } file_protocol_webapi_common_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedPacketInfo); i { + switch v := v.(*NianRankData); i { case 0: return &v.state case 1: @@ -13492,6 +13683,42 @@ func file_protocol_webapi_common_proto_init() { } } file_protocol_webapi_common_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NianRankAwardInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_webapi_common_proto_msgTypes[110].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedPacketConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_webapi_common_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedPacketInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protocol_webapi_common_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RedInfo); i { case 0: return &v.state @@ -13510,7 +13737,7 @@ func file_protocol_webapi_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protocol_webapi_common_proto_rawDesc, NumEnums: 0, - NumMessages: 120, + NumMessages: 123, NumExtensions: 0, NumServices: 0, }, diff --git a/protocol/webapi/common.proto b/protocol/webapi/common.proto index 0347298..166e85b 100644 --- a/protocol/webapi/common.proto +++ b/protocol/webapi/common.proto @@ -1120,6 +1120,20 @@ message NianDropInfo{ int32 DropRate = 4;//掉落概率 int32 DropUp = 5;//掉落上限 } +//年兽排行榜奖励 +//etcd /game/activity_nian_rank +message NianRankReward{ + string Platform = 1; // 平台 + repeated NianRankData RankData = 2; +} +message NianRankData{ + int32 TypeId = 1; //1-幸运榜 2-伤害榜 + repeated NianRankAwardInfo RankInfo = 2; +} +message NianRankAwardInfo{ + int32 RankId =1;//排名 + repeated ItemInfo Award = 2; //奖励 +} // etcd /game/act_redpacket message RedPacketConfig{ diff --git a/worldsrv/action_nian.go b/worldsrv/action_nian.go index ca15794..f35d2e0 100644 --- a/worldsrv/action_nian.go +++ b/worldsrv/action_nian.go @@ -154,6 +154,20 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64) } //本次攻击总血量 AttackHp := int64(0) + LuckyRankNeed := int64(0) + RankNeed := int64(0) + for _, value := range sData { + if value.Id == 7 { + LuckyRankNeed, _ = strconv.ParseInt(value.PropValue, 10, 64) + break + } + } + for _, value := range sData { + if value.Id == 8 { + RankNeed, _ = strconv.ParseInt(value.PropValue, 10, 64) + break + } + } //伤害范围 var intSlice []int if typeId == 1 || typeId == 2 { @@ -216,6 +230,13 @@ func CSNianAttack(s *netlib.Session, packetid int, data interface{}, sid int64) randomValue = randomValue + randomValue/2 p.WelfData.NianData.BuffCount -= 1 } + if p.WelfData.NianData.AttackMaxHp < randomValue { + p.WelfData.NianData.AttackMaxHp = randomValue + if randomValue >= LuckyRankNeed { + //更新幸运榜 + + } + } AttackHp += randomValue if typeId == 3 { p.WelfData.NianData.BigHurt += 1 @@ -295,10 +316,15 @@ 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 @@ -497,9 +523,68 @@ func CSNianSignAward(s *netlib.Session, packetid int, data interface{}, sid int6 return nil } +func CSNianChange(s *netlib.Session, packetid int, data interface{}, sid int64) error { + if msg, ok := data.(*activity.CSNianChange); ok { + num := msg.Num + if num <= 0 || num > 99 { + return nil + } + p := PlayerMgrSington.GetOnlinePlayer(sid) + logger.Logger.Trace("客户端请求请求年兽兑换 snid = ", p.SnId) + if p == nil { + return nil + } + sData := srvdata.PBDB_NewYearActivityMgr.Datas.GetArr() + itemNum := 0 + coin := 0 + diamond := 0 + for _, value := range sData { + if value.Id == 21 { + strSlice := strings.Split(value.PropValue, ",") + diamond, _ = strconv.Atoi(strSlice[0]) + itemNum, _ = strconv.Atoi(strSlice[1]) + coin, _ = strconv.Atoi(strSlice[2]) + break + } + } + if p.Diamond < int64(diamond*int(num)) { + return nil + } + p.AddDiamond(int64(-diamond*int(num)), 0, common.GainWayNianCost, "sys", "年兽活动兑换道具") + var items []*model.Item + items = append(items, &model.Item{ + ItemId: common.ItemIDCoin, + ItemNum: int64(coin * int(num)), + }) + items = append(items, &model.Item{ + ItemId: common.ItemIDLittleGuaranteed, + ItemNum: int64(itemNum * int(num)), + }) + BagMgrSingleton.AddItems(&model.AddItemParam{ + Platform: p.Platform, + SnId: p.SnId, + Change: items, + GainWay: common.GainWayNianGain, + Operator: "system", + Remark: "年兽活动-兑换", + }) + pack := &activity.SCNianChange{} + pack.Num = num + for _, item := range items { + info := &activity.RankAwardData{ + ItemId: item.ItemId, + ItemNum: item.ItemNum, + } + pack.Award = append(pack.Award, info) + } + p.SendToClient(int(activity.NianPacketID_PACKET_SCNianChange), pack) + } + return nil +} func init() { common.Register(int(activity.NianPacketID_PACKET_CSNianData), activity.CSNianData{}, CSNianData) common.Register(int(activity.NianPacketID_PACKET_CSNianAttack), activity.CSNianAttack{}, CSNianAttack) common.Register(int(activity.NianPacketID_PACKET_CSNianBuff), activity.CSNianBuff{}, CSNianBuff) common.Register(int(activity.NianPacketID_PACKET_CSNianSignAward), activity.CSNianSignAward{}, CSNianSignAward) + common.Register(int(activity.NianPacketID_PACKET_CSNianChange), activity.CSNianChange{}, CSNianChange) } diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index 40de761..3a4b8af 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -2214,6 +2214,7 @@ func (this *WelfareMgr) DayReserNian(p *Player) { p.WelfData.NianData.BuffCount = 0 p.WelfData.NianData.SignAwardTime = 0 p.WelfData.NianData.OtherAwardNum = make(map[int32]int32) + p.WelfData.NianData.AttackMaxHp = 0 } } diff --git a/xlsx/DB_NewYearActivity.xlsx b/xlsx/DB_NewYearActivity.xlsx index c47938bca792833cf22fa15b88673274dd891a2e..c5a3abe38744643cfc6a4a0a74f993229dcb0717 100644 GIT binary patch delta 3501 zcmY*cc{tQx-=49rgA7T+*e5f#WEs0i_GE7?$)07b(U30@PqL4FnV2+Wix62#WNh&p zN!e8`JB&nuKT)Ay93^_77qsK`4u_!!61+i4G6>q z0)gBxuGfPw0l~7am>_qVa6jMs8P4Xha?tKs(*sE9Dw$@7bYGrPe{!l4EqLj?W#?J z%$QzxvIua0ke>o~d595cZ>({RN9I;AGNqKz&`;P47|0)OqvZOJRLRoZWf}gnyJiW^ zmao3Xsx_uJyrVUx_clW<*1>)Wqsv&t7D+HJ|Lm;gCV!lG*C42(?`@uk%GEK z3)1F8OP2HQ%?HiX$4XE5)nCgheAS`TwcFVM}raPLoeAM>NzNS91N z3wvRkZQM}2B9AKcdipf)CrGXf6R*jfN!Sdg2F@#c2On=$`w?svk}m(c5qH)YnqEWb zX^Ai!b_QmE*ZRY~{lD#$8bsk(Nzr}m?q1np7DRR~kCRs?-rr<6ukJ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