钻石抽奖白名单权限

This commit is contained in:
by 2024-07-10 17:49:46 +08:00
parent 351d5979ba
commit f299b5ca13
3 changed files with 171 additions and 82 deletions

View File

@ -6896,9 +6896,9 @@ type DiamondLotteryPlayers struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uid int32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
Count int32 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` //抽奖次数
AwatdId []int32 `protobuf:"varint,3,rep,packed,name=AwatdId,proto3" json:"AwatdId,omitempty"` //配置表里的奖励ID
Uid int32 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
Count int32 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` //抽奖次数
Award []*AwardData `protobuf:"bytes,3,rep,name=Award,proto3" json:"Award,omitempty"` //配置表里的奖励ID
}
func (x *DiamondLotteryPlayers) Reset() {
@ -6947,13 +6947,68 @@ func (x *DiamondLotteryPlayers) GetCount() int32 {
return 0
}
func (x *DiamondLotteryPlayers) GetAwatdId() []int32 {
func (x *DiamondLotteryPlayers) GetAward() []*AwardData {
if x != nil {
return x.AwatdId
return x.Award
}
return nil
}
type AwardData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AwardId int32 `protobuf:"varint,1,opt,name=AwardId,proto3" json:"AwardId,omitempty"`
Weight int32 `protobuf:"varint,2,opt,name=Weight,proto3" json:"Weight,omitempty"`
}
func (x *AwardData) Reset() {
*x = AwardData{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[70]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AwardData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AwardData) ProtoMessage() {}
func (x *AwardData) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[70]
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 AwardData.ProtoReflect.Descriptor instead.
func (*AwardData) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{70}
}
func (x *AwardData) GetAwardId() int32 {
if x != nil {
return x.AwardId
}
return 0
}
func (x *AwardData) GetWeight() int32 {
if x != nil {
return x.Weight
}
return 0
}
type DiamondLotteryData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -6969,7 +7024,7 @@ type DiamondLotteryData struct {
func (x *DiamondLotteryData) Reset() {
*x = DiamondLotteryData{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[70]
mi := &file_common_proto_msgTypes[71]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -6982,7 +7037,7 @@ func (x *DiamondLotteryData) String() string {
func (*DiamondLotteryData) ProtoMessage() {}
func (x *DiamondLotteryData) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[70]
mi := &file_common_proto_msgTypes[71]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -6995,7 +7050,7 @@ func (x *DiamondLotteryData) ProtoReflect() protoreflect.Message {
// Deprecated: Use DiamondLotteryData.ProtoReflect.Descriptor instead.
func (*DiamondLotteryData) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{70}
return file_common_proto_rawDescGZIP(), []int{71}
}
func (x *DiamondLotteryData) GetChannel() string {
@ -7046,7 +7101,7 @@ type DiamondLotteryConfig struct {
func (x *DiamondLotteryConfig) Reset() {
*x = DiamondLotteryConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[71]
mi := &file_common_proto_msgTypes[72]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -7059,7 +7114,7 @@ func (x *DiamondLotteryConfig) String() string {
func (*DiamondLotteryConfig) ProtoMessage() {}
func (x *DiamondLotteryConfig) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[71]
mi := &file_common_proto_msgTypes[72]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -7072,7 +7127,7 @@ func (x *DiamondLotteryConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use DiamondLotteryConfig.ProtoReflect.Descriptor instead.
func (*DiamondLotteryConfig) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{71}
return file_common_proto_rawDescGZIP(), []int{72}
}
func (x *DiamondLotteryConfig) GetPlatform() string {
@ -7102,7 +7157,7 @@ type ItemConfig struct {
func (x *ItemConfig) Reset() {
*x = ItemConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[72]
mi := &file_common_proto_msgTypes[73]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -7115,7 +7170,7 @@ func (x *ItemConfig) String() string {
func (*ItemConfig) ProtoMessage() {}
func (x *ItemConfig) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[72]
mi := &file_common_proto_msgTypes[73]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -7128,7 +7183,7 @@ func (x *ItemConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use ItemConfig.ProtoReflect.Descriptor instead.
func (*ItemConfig) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{72}
return file_common_proto_rawDescGZIP(), []int{73}
}
func (x *ItemConfig) GetPlatform() string {
@ -8247,42 +8302,46 @@ var file_common_proto_rawDesc = []byte{
0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x47, 0x72,
0x61, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x47, 0x72, 0x61, 0x64, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x4f, 0x64, 0x64, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x4f, 0x64, 0x64, 0x72, 0x61, 0x74, 0x65, 0x22, 0x59, 0x0a, 0x15, 0x44, 0x69,
0x05, 0x52, 0x07, 0x4f, 0x64, 0x64, 0x72, 0x61, 0x74, 0x65, 0x22, 0x68, 0x0a, 0x15, 0x44, 0x69,
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x79,
0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x41,
0x77, 0x61, 0x74, 0x64, 0x49, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x41, 0x77,
0x61, 0x74, 0x64, 0x49, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x12, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e,
0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x69,
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, 0x78, 0x53, 0x63, 0x6f,
0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x4d, 0x61, 0x78, 0x53, 0x63, 0x6f,
0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4e, 0x75, 0x6d,
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4e,
0x75, 0x6d, 0x12, 0x37, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x69, 0x61,
0x6d, 0x6f, 0x6e, 0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x65,
0x72, 0x73, 0x52, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x70, 0x0a, 0x14, 0x44,
0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 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,
0x3c, 0x0a, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x69,
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61,
0x52, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0x53, 0x0a,
0x0a, 0x49, 0x74, 0x65, 0x6d, 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, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
0x44, 0x42, 0x5f, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x49, 0x74, 0x65,
0x6d, 0x73, 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,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x41,
0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x62,
0x61, 0x70, 0x69, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x41,
0x77, 0x61, 0x72, 0x64, 0x22, 0x3d, 0x0a, 0x09, 0x41, 0x77, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74,
0x61, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x57,
0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x57, 0x65, 0x69,
0x67, 0x68, 0x74, 0x22, 0xd3, 0x01, 0x0a, 0x12, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4c,
0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x69, 0x61, 0x6d,
0x6f, 0x6e, 0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04,
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, 0x78, 0x53, 0x63, 0x6f, 0x72, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x4d, 0x61, 0x78, 0x53, 0x63, 0x6f, 0x72, 0x65,
0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4e, 0x75, 0x6d, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x4e, 0x75, 0x6d,
0x12, 0x37, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x69, 0x61, 0x6d, 0x6f,
0x6e, 0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73,
0x52, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x70, 0x0a, 0x14, 0x44, 0x69, 0x61,
0x6d, 0x6f, 0x6e, 0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 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, 0x3c, 0x0a,
0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x69, 0x61, 0x6d,
0x6f, 0x6e, 0x64, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b,
0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0x53, 0x0a, 0x0a, 0x49,
0x74, 0x65, 0x6d, 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, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x42,
0x5f, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73,
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 (
@ -8297,7 +8356,7 @@ func file_common_proto_rawDescGZIP() []byte {
return file_common_proto_rawDescData
}
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 79)
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 80)
var file_common_proto_goTypes = []interface{}{
(*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting
(*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting
@ -8369,31 +8428,32 @@ var file_common_proto_goTypes = []interface{}{
(*ActPermitConfig)(nil), // 67: webapi.ActPermitConfig
(*DiamondLotteryInfo)(nil), // 68: webapi.DiamondLotteryInfo
(*DiamondLotteryPlayers)(nil), // 69: webapi.DiamondLotteryPlayers
(*DiamondLotteryData)(nil), // 70: webapi.DiamondLotteryData
(*DiamondLotteryConfig)(nil), // 71: webapi.DiamondLotteryConfig
(*ItemConfig)(nil), // 72: webapi.ItemConfig
nil, // 73: webapi.Platform.BindTelRewardEntry
nil, // 74: webapi.PlayerData.RankScoreEntry
nil, // 75: webapi.ItemShop.AwardEntry
nil, // 76: webapi.VIPcfg.AwardEntry
nil, // 77: webapi.VIPcfg.Privilege7Entry
nil, // 78: webapi.ActInviteConfig.PayScoreEntry
(*server.DB_GameFree)(nil), // 79: server.DB_GameFree
(*server.DB_GameItem)(nil), // 80: server.DB_GameItem
(*AwardData)(nil), // 70: webapi.AwardData
(*DiamondLotteryData)(nil), // 71: webapi.DiamondLotteryData
(*DiamondLotteryConfig)(nil), // 72: webapi.DiamondLotteryConfig
(*ItemConfig)(nil), // 73: webapi.ItemConfig
nil, // 74: webapi.Platform.BindTelRewardEntry
nil, // 75: webapi.PlayerData.RankScoreEntry
nil, // 76: webapi.ItemShop.AwardEntry
nil, // 77: webapi.VIPcfg.AwardEntry
nil, // 78: webapi.VIPcfg.Privilege7Entry
nil, // 79: webapi.ActInviteConfig.PayScoreEntry
(*server.DB_GameFree)(nil), // 80: server.DB_GameFree
(*server.DB_GameItem)(nil), // 81: server.DB_GameItem
}
var file_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
73, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
74, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus
79, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
80, // 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
79, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
74, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
80, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
75, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
31, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo
20, // 13: webapi.OnlineReport.GameCount:type_name -> webapi.OnlineGameCnt
22, // 14: webapi.CommonNoticeList.List:type_name -> webapi.CommonNotice
@ -8401,7 +8461,7 @@ var file_common_proto_depIdxs = []int32{
25, // 16: webapi.ExchangeShop.TelData:type_name -> webapi.TelChargeData
24, // 17: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop
28, // 18: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight
75, // 19: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
76, // 19: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
29, // 20: webapi.ItemShopList.List:type_name -> webapi.ItemShop
31, // 21: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo
32, // 22: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward
@ -8422,12 +8482,12 @@ var file_common_proto_depIdxs = []int32{
37, // 37: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate
47, // 38: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree
47, // 39: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree
76, // 40: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
77, // 41: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
77, // 40: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
78, // 41: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
50, // 42: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg
37, // 43: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate
54, // 44: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig
78, // 45: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
79, // 45: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
61, // 46: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward
61, // 47: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward
61, // 48: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward
@ -8440,15 +8500,16 @@ var file_common_proto_depIdxs = []int32{
64, // 55: webapi.PermitChannelConfig.ExchangeConfig:type_name -> webapi.PermitExchangeConfig
65, // 56: webapi.PermitChannelConfig.RankConfig:type_name -> webapi.PermitRankConfig
66, // 57: webapi.ActPermitConfig.Configs:type_name -> webapi.PermitChannelConfig
68, // 58: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo
69, // 59: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers
70, // 60: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData
80, // 61: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
62, // [62:62] is the sub-list for method output_type
62, // [62:62] is the sub-list for method input_type
62, // [62:62] is the sub-list for extension type_name
62, // [62:62] is the sub-list for extension extendee
0, // [0:62] is the sub-list for field type_name
70, // 58: webapi.DiamondLotteryPlayers.Award:type_name -> webapi.AwardData
68, // 59: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo
69, // 60: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers
71, // 61: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData
81, // 62: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
63, // [63:63] is the sub-list for method output_type
63, // [63:63] is the sub-list for method input_type
63, // [63:63] is the sub-list for extension type_name
63, // [63:63] is the sub-list for extension extendee
0, // [0:63] is the sub-list for field type_name
}
func init() { file_common_proto_init() }
@ -9298,7 +9359,7 @@ func file_common_proto_init() {
}
}
file_common_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiamondLotteryData); i {
switch v := v.(*AwardData); i {
case 0:
return &v.state
case 1:
@ -9310,7 +9371,7 @@ func file_common_proto_init() {
}
}
file_common_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiamondLotteryConfig); i {
switch v := v.(*DiamondLotteryData); i {
case 0:
return &v.state
case 1:
@ -9322,6 +9383,18 @@ func file_common_proto_init() {
}
}
file_common_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DiamondLotteryConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ItemConfig); i {
case 0:
return &v.state
@ -9340,7 +9413,7 @@ func file_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_proto_rawDesc,
NumEnums: 0,
NumMessages: 79,
NumMessages: 80,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -768,7 +768,11 @@ message DiamondLotteryInfo{
message DiamondLotteryPlayers{
int32 uid = 1;
int32 Count = 2; //
repeated int32 AwatdId = 3; //ID
repeated AwardData Award = 3; //ID
}
message AwardData{
int32 AwardId = 1;
int32 Weight = 2;
}
message DiamondLotteryData{
string Channel = 1; //

View File

@ -339,8 +339,20 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
}
if status {
//白名单从列表里获取奖励
id := rand.Intn(len(playerData.AwatdId))
awardId := playerData.AwatdId[id]
weight = 0
awardId := int32(0)
for _, awardData := range playerData.Award {
weight += int(awardData.Weight)
}
random = rand.Intn(weight) + 1
for _, awardData := range playerData.Award {
value += int(awardData.Weight)
if random <= value {
awardId = awardData.AwardId
break
}
}
for _, lotteryInfo := range config.Info {
if lotteryInfo.Id == awardId {
items = append(items, &Item{