feat: 添加默认直播间-游戏模式对应关系,移除命令处理协程(避免顺序问题),添加几个协议文件。

main
NorthLan 3 years ago
parent 78b1096653
commit ca468e6d8c

@ -16,6 +16,8 @@ Kafka:
Topic: "gift-dev" Topic: "gift-dev"
ConsumerGroup: "giftToPush-dev" ConsumerGroup: "giftToPush-dev"
Game: Game:
ModeDict:
8722013: 0
Common: Common:
Commands: [ "q", "查询", "打卡", "签到" ] Commands: [ "q", "查询", "打卡", "签到" ]
Zhg: Zhg:

@ -16,6 +16,8 @@ Kafka:
Topic: "gift" Topic: "gift"
ConsumerGroup: "giftToPush" ConsumerGroup: "giftToPush"
Game: Game:
ModeDict:
8722013: 0
Common: Common:
Commands: [ "q", "查询", "打卡", "签到" ] Commands: [ "q", "查询", "打卡", "签到" ]
Zhg: Zhg:

@ -38,6 +38,7 @@ type (
Gift Kafka Gift Kafka
} }
Game struct { Game struct {
ModeDict map[int64]int32 // 直播间对应模式(临时)
// 通用模式 // 通用模式
Common struct { Common struct {
Commands []string Commands []string

@ -1,6 +1,7 @@
package game package game
import ( import (
"dcg/config"
pbRoom "dcg/game/pb/room" pbRoom "dcg/game/pb/room"
"errors" "errors"
) )
@ -23,6 +24,11 @@ func CacheGameType(roomId int64, gameType pbRoom.GameType) {
func GameTypeByLiveRoomId(roomId int64) (pbRoom.GameType, error) { func GameTypeByLiveRoomId(roomId int64) (pbRoom.GameType, error) {
if gameType, ok := LivePair[roomId]; ok { if gameType, ok := LivePair[roomId]; ok {
return gameType, nil return gameType, nil
} else {
modeCfg := config.Config.Game.ModeDict
if gtInt, ok := modeCfg[roomId]; ok {
return pbRoom.GameType(gtInt), nil
}
} }
return defaultGameType, errors.New("该直播间未加入游戏房间") return defaultGameType, errors.New("该直播间未加入游戏房间")
} }

@ -55,7 +55,7 @@ func (l *LiveGameLogic) HandleDanmaku(pushCommonMsg bool, user *pbCommon.PbUser,
cmdStruct := l.CmdParser.Parse(dm.Content) cmdStruct := l.CmdParser.Parse(dm.Content)
if cmdStruct.IsCMD { if cmdStruct.IsCMD {
for _, c := range cmdStruct.Arr { for _, c := range cmdStruct.Arr {
go l.handleCMD(dm.LiveRoomId, c, user) l.handleCMD(dm.LiveRoomId, c, user)
} }
} else if pushCommonMsg { } else if pushCommonMsg {
room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(dm.LiveRoomId) room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(dm.LiveRoomId)
@ -80,5 +80,5 @@ func (l *LiveGameLogic) HandleGift(roomId int64, user *pbCommon.PbUser, gift *pb
if l.GiftHandler == nil { if l.GiftHandler == nil {
return return
} }
go l.GiftHandler(roomId, user, gift) l.GiftHandler(roomId, user, gift)
} }

@ -35,13 +35,15 @@ namespace Pb.Common {
"bnRlZ3JhbBgFIAEoAyJ3CgpDaGVja0luTXNnEh8KBHVzZXIYASABKAsyES5w", "bnRlZ3JhbBgFIAEoAyJ3CgpDaGVja0luTXNnEh8KBHVzZXIYASABKAsyES5w",
"Yi5jb21tb24uUGJVc2VyEg8KB3N1Y2Nlc3MYAiABKAgSCwoDbXNnGAMgASgJ", "Yi5jb21tb24uUGJVc2VyEg8KB3N1Y2Nlc3MYAiABKAgSCwoDbXNnGAMgASgJ",
"EhYKDmludGVncmFsQ2hhbmdlGAQgASgDEhIKCmlzQ3JpdGljYWwYBSABKAgi", "EhYKDmludGVncmFsQ2hhbmdlGAQgASgDEhIKCmlzQ3JpdGljYWwYBSABKAgi",
"LwoMVXNlclF1ZXJ5TXNnEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJV", "ZwoOU3RhcnRlclBhY2tNc2cSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5Q",
"c2VyIj4KCkRhbm1ha3VNc2cSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5Q", "YlVzZXISDwoHc3VjY2VzcxgCIAEoCBILCgNtc2cYAyABKAkSFgoOaW50ZWdy",
"YlVzZXISDwoHY29udGVudBgCIAEoCSJ4CgdHaWZ0TXNnEh8KBHVzZXIYASAB", "YWxDaGFuZ2UYBCABKAMiLwoMVXNlclF1ZXJ5TXNnEh8KBHVzZXIYASABKAsy",
"KAsyES5wYi5jb21tb24uUGJVc2VyEg4KBmdpZnRJZBgCIAEoAxILCgNudW0Y", "ES5wYi5jb21tb24uUGJVc2VyIj4KCkRhbm1ha3VNc2cSHwoEdXNlchgBIAEo",
"AyABKAMSEAoIZ2lmdE5hbWUYBCABKAkSDQoFcHJpY2UYBSABKAMSDgoGaXNQ", "CzIRLnBiLmNvbW1vbi5QYlVzZXISDwoHY29udGVudBgCIAEoCSJ4CgdHaWZ0",
"YWlkGAYgASgIQh1aG2RjZy9nYW1lL3BiL2NvbW1vbjtwYkNvbW1vbmIGcHJv", "TXNnEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg4KBmdpZnRJ",
"dG8z")); "ZBgCIAEoAxILCgNudW0YAyABKAMSEAoIZ2lmdE5hbWUYBCABKAkSDQoFcHJp",
"Y2UYBSABKAMSDgoGaXNQYWlkGAYgASgIQh1aG2RjZy9nYW1lL3BiL2NvbW1v",
"bjtwYkNvbW1vbmIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
@ -50,6 +52,7 @@ namespace Pb.Common {
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralReq), global::Pb.Common.ChangeUserIntegralReq.Parser, new[]{ "UserId", "Change" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralReq), global::Pb.Common.ChangeUserIntegralReq.Parser, new[]{ "UserId", "Change" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralResp), global::Pb.Common.ChangeUserIntegralResp.Parser, new[]{ "Success", "Msg", "UserId", "Change", "Integral" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralResp), global::Pb.Common.ChangeUserIntegralResp.Parser, new[]{ "Success", "Msg", "UserId", "Change", "Integral" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.CheckInMsg), global::Pb.Common.CheckInMsg.Parser, new[]{ "User", "Success", "Msg", "IntegralChange", "IsCritical" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.CheckInMsg), global::Pb.Common.CheckInMsg.Parser, new[]{ "User", "Success", "Msg", "IntegralChange", "IsCritical" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.StarterPackMsg), global::Pb.Common.StarterPackMsg.Parser, new[]{ "User", "Success", "Msg", "IntegralChange" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg), global::Pb.Common.UserQueryMsg.Parser, new[]{ "User" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg), global::Pb.Common.UserQueryMsg.Parser, new[]{ "User" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.DanmakuMsg), global::Pb.Common.DanmakuMsg.Parser, new[]{ "User", "Content" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.DanmakuMsg), global::Pb.Common.DanmakuMsg.Parser, new[]{ "User", "Content" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftMsg), global::Pb.Common.GiftMsg.Parser, new[]{ "User", "GiftId", "Num", "GiftName", "Price", "IsPaid" }, null, null, null, null) new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftMsg), global::Pb.Common.GiftMsg.Parser, new[]{ "User", "GiftId", "Num", "GiftName", "Price", "IsPaid" }, null, null, null, null)
@ -1649,6 +1652,327 @@ namespace Pb.Common {
} }
/// <summary>
/// StarterPackMsg 新手礼包 push -> user.starterPack 命令(新手礼包)
/// </summary>
public sealed partial class StarterPackMsg : pb::IMessage<StarterPackMsg>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<StarterPackMsg> _parser = new pb::MessageParser<StarterPackMsg>(() => new StarterPackMsg());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<StarterPackMsg> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[5]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public StarterPackMsg() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public StarterPackMsg(StarterPackMsg other) : this() {
user_ = other.user_ != null ? other.user_.Clone() : null;
success_ = other.success_;
msg_ = other.msg_;
integralChange_ = other.integralChange_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public StarterPackMsg Clone() {
return new StarterPackMsg(this);
}
/// <summary>Field number for the "user" field.</summary>
public const int UserFieldNumber = 1;
private global::Pb.Common.PbUser user_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Pb.Common.PbUser User {
get { return user_; }
set {
user_ = value;
}
}
/// <summary>Field number for the "success" field.</summary>
public const int SuccessFieldNumber = 2;
private bool success_;
/// <summary>
/// 领取成功与否
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Success {
get { return success_; }
set {
success_ = value;
}
}
/// <summary>Field number for the "msg" field.</summary>
public const int MsgFieldNumber = 3;
private string msg_ = "";
/// <summary>
/// 领取消息: [成功无msg | 已经领过礼包了]
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Msg {
get { return msg_; }
set {
msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "integralChange" field.</summary>
public const int IntegralChangeFieldNumber = 4;
private long integralChange_;
/// <summary>
/// 积分变动
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long IntegralChange {
get { return integralChange_; }
set {
integralChange_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as StarterPackMsg);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(StarterPackMsg other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(User, other.User)) return false;
if (Success != other.Success) return false;
if (Msg != other.Msg) return false;
if (IntegralChange != other.IntegralChange) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (user_ != null) hash ^= User.GetHashCode();
if (Success != false) hash ^= Success.GetHashCode();
if (Msg.Length != 0) hash ^= Msg.GetHashCode();
if (IntegralChange != 0L) hash ^= IntegralChange.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (user_ != null) {
output.WriteRawTag(10);
output.WriteMessage(User);
}
if (Success != false) {
output.WriteRawTag(16);
output.WriteBool(Success);
}
if (Msg.Length != 0) {
output.WriteRawTag(26);
output.WriteString(Msg);
}
if (IntegralChange != 0L) {
output.WriteRawTag(32);
output.WriteInt64(IntegralChange);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (user_ != null) {
output.WriteRawTag(10);
output.WriteMessage(User);
}
if (Success != false) {
output.WriteRawTag(16);
output.WriteBool(Success);
}
if (Msg.Length != 0) {
output.WriteRawTag(26);
output.WriteString(Msg);
}
if (IntegralChange != 0L) {
output.WriteRawTag(32);
output.WriteInt64(IntegralChange);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (user_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(User);
}
if (Success != false) {
size += 1 + 1;
}
if (Msg.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
}
if (IntegralChange != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(IntegralChange);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(StarterPackMsg other) {
if (other == null) {
return;
}
if (other.user_ != null) {
if (user_ == null) {
User = new global::Pb.Common.PbUser();
}
User.MergeFrom(other.User);
}
if (other.Success != false) {
Success = other.Success;
}
if (other.Msg.Length != 0) {
Msg = other.Msg;
}
if (other.IntegralChange != 0L) {
IntegralChange = other.IntegralChange;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
if (user_ == null) {
User = new global::Pb.Common.PbUser();
}
input.ReadMessage(User);
break;
}
case 16: {
Success = input.ReadBool();
break;
}
case 26: {
Msg = input.ReadString();
break;
}
case 32: {
IntegralChange = input.ReadInt64();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
if (user_ == null) {
User = new global::Pb.Common.PbUser();
}
input.ReadMessage(User);
break;
}
case 16: {
Success = input.ReadBool();
break;
}
case 26: {
Msg = input.ReadString();
break;
}
case 32: {
IntegralChange = input.ReadInt64();
break;
}
}
}
}
#endif
}
/// <summary> /// <summary>
/// QueryIntegralMsg 用户查询信息通知 push -> user.query /// QueryIntegralMsg 用户查询信息通知 push -> user.query
/// </summary> /// </summary>
@ -1666,7 +1990,7 @@ namespace Pb.Common {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[5]; } get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[6]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -1867,7 +2191,7 @@ namespace Pb.Common {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[6]; } get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[7]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@ -2105,7 +2429,7 @@ namespace Pb.Common {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor { public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[7]; } get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[8]; }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute]

@ -380,6 +380,78 @@ func (x *CheckInMsg) GetIsCritical() bool {
return false return false
} }
// StarterPackMsg 新手礼包 push -> user.starterPack 命令(新手礼包)
type StarterPackMsg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // 领取成功与否
Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` // 领取消息: [成功无msg | 已经领过礼包了]
IntegralChange int64 `protobuf:"varint,4,opt,name=integralChange,proto3" json:"integralChange,omitempty"` // 积分变动
}
func (x *StarterPackMsg) Reset() {
*x = StarterPackMsg{}
if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StarterPackMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StarterPackMsg) ProtoMessage() {}
func (x *StarterPackMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[5]
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 StarterPackMsg.ProtoReflect.Descriptor instead.
func (*StarterPackMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{5}
}
func (x *StarterPackMsg) GetUser() *PbUser {
if x != nil {
return x.User
}
return nil
}
func (x *StarterPackMsg) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
func (x *StarterPackMsg) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
func (x *StarterPackMsg) GetIntegralChange() int64 {
if x != nil {
return x.IntegralChange
}
return 0
}
// QueryIntegralMsg 用户查询信息通知 push -> user.query // QueryIntegralMsg 用户查询信息通知 push -> user.query
type UserQueryMsg struct { type UserQueryMsg struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -392,7 +464,7 @@ type UserQueryMsg struct {
func (x *UserQueryMsg) Reset() { func (x *UserQueryMsg) Reset() {
*x = UserQueryMsg{} *x = UserQueryMsg{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[5] mi := &file_common_common_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -405,7 +477,7 @@ func (x *UserQueryMsg) String() string {
func (*UserQueryMsg) ProtoMessage() {} func (*UserQueryMsg) ProtoMessage() {}
func (x *UserQueryMsg) ProtoReflect() protoreflect.Message { func (x *UserQueryMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[5] mi := &file_common_common_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -418,7 +490,7 @@ func (x *UserQueryMsg) ProtoReflect() protoreflect.Message {
// Deprecated: Use UserQueryMsg.ProtoReflect.Descriptor instead. // Deprecated: Use UserQueryMsg.ProtoReflect.Descriptor instead.
func (*UserQueryMsg) Descriptor() ([]byte, []int) { func (*UserQueryMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{5} return file_common_common_proto_rawDescGZIP(), []int{6}
} }
func (x *UserQueryMsg) GetUser() *PbUser { func (x *UserQueryMsg) GetUser() *PbUser {
@ -441,7 +513,7 @@ type DanmakuMsg struct {
func (x *DanmakuMsg) Reset() { func (x *DanmakuMsg) Reset() {
*x = DanmakuMsg{} *x = DanmakuMsg{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[6] mi := &file_common_common_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -454,7 +526,7 @@ func (x *DanmakuMsg) String() string {
func (*DanmakuMsg) ProtoMessage() {} func (*DanmakuMsg) ProtoMessage() {}
func (x *DanmakuMsg) ProtoReflect() protoreflect.Message { func (x *DanmakuMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[6] mi := &file_common_common_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -467,7 +539,7 @@ func (x *DanmakuMsg) ProtoReflect() protoreflect.Message {
// Deprecated: Use DanmakuMsg.ProtoReflect.Descriptor instead. // Deprecated: Use DanmakuMsg.ProtoReflect.Descriptor instead.
func (*DanmakuMsg) Descriptor() ([]byte, []int) { func (*DanmakuMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{6} return file_common_common_proto_rawDescGZIP(), []int{7}
} }
func (x *DanmakuMsg) GetUser() *PbUser { func (x *DanmakuMsg) GetUser() *PbUser {
@ -501,7 +573,7 @@ type GiftMsg struct {
func (x *GiftMsg) Reset() { func (x *GiftMsg) Reset() {
*x = GiftMsg{} *x = GiftMsg{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[7] mi := &file_common_common_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -514,7 +586,7 @@ func (x *GiftMsg) String() string {
func (*GiftMsg) ProtoMessage() {} func (*GiftMsg) ProtoMessage() {}
func (x *GiftMsg) ProtoReflect() protoreflect.Message { func (x *GiftMsg) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[7] mi := &file_common_common_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -527,7 +599,7 @@ func (x *GiftMsg) ProtoReflect() protoreflect.Message {
// Deprecated: Use GiftMsg.ProtoReflect.Descriptor instead. // Deprecated: Use GiftMsg.ProtoReflect.Descriptor instead.
func (*GiftMsg) Descriptor() ([]byte, []int) { func (*GiftMsg) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{7} return file_common_common_proto_rawDescGZIP(), []int{8}
} }
func (x *GiftMsg) GetUser() *PbUser { func (x *GiftMsg) GetUser() *PbUser {
@ -617,28 +689,37 @@ var file_common_common_proto_rawDesc = []byte{
0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43,
0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69,
0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69,
0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65,
0x72, 0x79, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12,
0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x69,
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61,
0x6e, 0x67, 0x65, 0x22, 0x35, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79,
0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62,
0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x0a, 0x44, 0x61,
0x6e, 0x6d, 0x61, 0x6b, 0x75, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12,
0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x07, 0x47, 0x69,
0x66, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x0a, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06,
0x44, 0x61, 0x6e, 0x6d, 0x61, 0x6b, 0x75, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69,
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x66, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28,
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61,
0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61,
0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x07, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x47, 0x69, 0x66, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64,
0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x42, 0x1d, 0x5a, 0x1b, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f,
0x0a, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x70, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62,
0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74,
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73,
0x50, 0x61, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61,
0x69, 0x64, 0x42, 0x1d, 0x5a, 0x1b, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70,
0x62, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x70, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -653,28 +734,30 @@ func file_common_common_proto_rawDescGZIP() []byte {
return file_common_common_proto_rawDescData return file_common_common_proto_rawDescData
} }
var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_common_common_proto_goTypes = []interface{}{ var file_common_common_proto_goTypes = []interface{}{
(*PbUser)(nil), // 0: pb.common.PbUser (*PbUser)(nil), // 0: pb.common.PbUser
(*UserIntegralChanged)(nil), // 1: pb.common.UserIntegralChanged (*UserIntegralChanged)(nil), // 1: pb.common.UserIntegralChanged
(*ChangeUserIntegralReq)(nil), // 2: pb.common.ChangeUserIntegralReq (*ChangeUserIntegralReq)(nil), // 2: pb.common.ChangeUserIntegralReq
(*ChangeUserIntegralResp)(nil), // 3: pb.common.ChangeUserIntegralResp (*ChangeUserIntegralResp)(nil), // 3: pb.common.ChangeUserIntegralResp
(*CheckInMsg)(nil), // 4: pb.common.CheckInMsg (*CheckInMsg)(nil), // 4: pb.common.CheckInMsg
(*UserQueryMsg)(nil), // 5: pb.common.UserQueryMsg (*StarterPackMsg)(nil), // 5: pb.common.StarterPackMsg
(*DanmakuMsg)(nil), // 6: pb.common.DanmakuMsg (*UserQueryMsg)(nil), // 6: pb.common.UserQueryMsg
(*GiftMsg)(nil), // 7: pb.common.GiftMsg (*DanmakuMsg)(nil), // 7: pb.common.DanmakuMsg
(*GiftMsg)(nil), // 8: pb.common.GiftMsg
} }
var file_common_common_proto_depIdxs = []int32{ var file_common_common_proto_depIdxs = []int32{
0, // 0: pb.common.UserIntegralChanged.user:type_name -> pb.common.PbUser 0, // 0: pb.common.UserIntegralChanged.user:type_name -> pb.common.PbUser
0, // 1: pb.common.CheckInMsg.user:type_name -> pb.common.PbUser 0, // 1: pb.common.CheckInMsg.user:type_name -> pb.common.PbUser
0, // 2: pb.common.UserQueryMsg.user:type_name -> pb.common.PbUser 0, // 2: pb.common.StarterPackMsg.user:type_name -> pb.common.PbUser
0, // 3: pb.common.DanmakuMsg.user:type_name -> pb.common.PbUser 0, // 3: pb.common.UserQueryMsg.user:type_name -> pb.common.PbUser
0, // 4: pb.common.GiftMsg.user:type_name -> pb.common.PbUser 0, // 4: pb.common.DanmakuMsg.user:type_name -> pb.common.PbUser
5, // [5:5] is the sub-list for method output_type 0, // 5: pb.common.GiftMsg.user:type_name -> pb.common.PbUser
5, // [5:5] is the sub-list for method input_type 6, // [6:6] is the sub-list for method output_type
5, // [5:5] is the sub-list for extension type_name 6, // [6:6] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension extendee 6, // [6:6] is the sub-list for extension type_name
0, // [0:5] is the sub-list for field type_name 6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
} }
func init() { file_common_common_proto_init() } func init() { file_common_common_proto_init() }
@ -744,7 +827,7 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserQueryMsg); i { switch v := v.(*StarterPackMsg); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -756,7 +839,7 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DanmakuMsg); i { switch v := v.(*UserQueryMsg); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -768,6 +851,18 @@ func file_common_common_proto_init() {
} }
} }
file_common_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_common_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DanmakuMsg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GiftMsg); i { switch v := v.(*GiftMsg); i {
case 0: case 0:
return &v.state return &v.state
@ -786,7 +881,7 @@ func file_common_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_common_proto_rawDesc, RawDescriptor: file_common_common_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 8, NumMessages: 9,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

@ -44,6 +44,14 @@ message CheckInMsg {
bool isCritical = 5; // bool isCritical = 5; //
} }
// StarterPackMsg push -> user.starterPack ()
message StarterPackMsg {
pb.common.PbUser user = 1;
bool success = 2; //
string msg = 3; // : [msg | ]
int64 integralChange = 4; //
}
// QueryIntegralMsg push -> user.query // QueryIntegralMsg push -> user.query
message UserQueryMsg { message UserQueryMsg {
pb.common.PbUser user = 1; pb.common.PbUser user = 1;

@ -28,17 +28,25 @@ namespace Pb.Game.Zhg {
"cGUYASABKAUSDAoEdG9wThgCIAEoBSKMAQoLUmFua1B2cFJlc3ASDAoEdHlw", "cGUYASABKAUSDAoEdG9wThgCIAEoBSKMAQoLUmFua1B2cFJlc3ASDAoEdHlw",
"ZRgBIAEoBRIsCgVpdGVtcxgCIAMoCzIdLnBiLmdhbWUuemhnLlJhbmtQdnBS", "ZRgBIAEoBRIsCgVpdGVtcxgCIAMoCzIdLnBiLmdhbWUuemhnLlJhbmtQdnBS",
"ZXNwLkl0ZW0aQQoESXRlbRILCgN1aWQYASABKAMSDQoFdW5hbWUYAiABKAkS", "ZXNwLkl0ZW0aQQoESXRlbRILCgN1aWQYASABKAMSDQoFdW5hbWUYAiABKAkS",
"DQoFc2NvcmUYAyABKAMSDgoGYXZhdGFyGAQgASgJKsIBCghSYW5rVHlwZRIL", "DQoFc2NvcmUYAyABKAMSDgoGYXZhdGFyGAQgASgJIuIBChNSYW5rUnZwU3Vi",
"CgdVbmtub3duEAASCgoGRGFtYWdlEAESDAoIRGVEYW1hZ2UQAhILCgdHZW5l", "bWl0UmVzdWx0EjQKBWl0ZW1zGAEgAygLMiUucGIuZ2FtZS56aGcuUmFua1J2",
"cmFsEAMSDQoJRGVHZW5lcmFsEAQSDAoIS2lsbFVuaXQQBRIOCgpEZUtpbGxV", "cFN1Ym1pdFJlc3VsdC5JdGVtGkUKBlJld2FyZBILCgN1aWQYASABKAMSDQoF",
"bml0EAYSDgoKS2lsbFBsYXllchAHEhAKDERlS2lsbFBsYXllchAIEgcKA1dp", "dW5hbWUYAiABKAkSEAoIaW50ZWdyYWwYAyABKAMSDQoFdGl0bGUYBCABKAMa",
"bhAJEggKBExvc3QQChIOCgpGaXJzdEJsb29kEAsSEAoMRGVGaXJzdEJsb29k", "TgoESXRlbRIMCgR0eXBlGAEgASgFEjgKB3Jld2FyZHMYAiADKAsyJy5wYi5n",
"EAxCIFoeZGNnL2dhbWUvcGIvZ2FtZS96aGc7cGJHYW1lWmhnYgZwcm90bzM=")); "YW1lLnpoZy5SYW5rUnZwU3VibWl0UmVzdWx0LlJld2FyZCrCAQoIUmFua1R5",
"cGUSCwoHVW5rbm93bhAAEgoKBkRhbWFnZRABEgwKCERlRGFtYWdlEAISCwoH",
"R2VuZXJhbBADEg0KCURlR2VuZXJhbBAEEgwKCEtpbGxVbml0EAUSDgoKRGVL",
"aWxsVW5pdBAGEg4KCktpbGxQbGF5ZXIQBxIQCgxEZUtpbGxQbGF5ZXIQCBIH",
"CgNXaW4QCRIICgRMb3N0EAoSDgoKRmlyc3RCbG9vZBALEhAKDERlRmlyc3RC",
"bG9vZBAMQiBaHmRjZy9nYW1lL3BiL2dhbWUvemhnO3BiR2FtZVpoZ2IGcHJv",
"dG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Game.Zhg.RankType), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Game.Zhg.RankType), }, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpReq), global::Pb.Game.Zhg.RankPvpReq.Parser, new[]{ "Type", "TopN" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpReq), global::Pb.Game.Zhg.RankPvpReq.Parser, new[]{ "Type", "TopN" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpResp), global::Pb.Game.Zhg.RankPvpResp.Parser, new[]{ "Type", "Items" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpResp.Types.Item), global::Pb.Game.Zhg.RankPvpResp.Types.Item.Parser, new[]{ "Uid", "Uname", "Score", "Avatar" }, null, null, null, null)}) new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpResp), global::Pb.Game.Zhg.RankPvpResp.Parser, new[]{ "Type", "Items" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpResp.Types.Item), global::Pb.Game.Zhg.RankPvpResp.Types.Item.Parser, new[]{ "Uid", "Uname", "Score", "Avatar" }, null, null, null, null)}),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult), global::Pb.Game.Zhg.RankRvpSubmitResult.Parser, new[]{ "Items" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward), global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward.Parser, new[]{ "Uid", "Uname", "Integral", "Title" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item), global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item.Parser, new[]{ "Type", "Rewards" }, null, null, null, null)})
})); }));
} }
#endregion #endregion
@ -867,6 +875,734 @@ namespace Pb.Game.Zhg {
} }
/// <summary>
/// RankRvpSubmitResult 排行榜结算 push -> rank.submit 命令(排行榜结算)
/// </summary>
public sealed partial class RankRvpSubmitResult : pb::IMessage<RankRvpSubmitResult>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<RankRvpSubmitResult> _parser = new pb::MessageParser<RankRvpSubmitResult>(() => new RankRvpSubmitResult());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<RankRvpSubmitResult> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Game.Zhg.RankReflection.Descriptor.MessageTypes[2]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public RankRvpSubmitResult() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public RankRvpSubmitResult(RankRvpSubmitResult other) : this() {
items_ = other.items_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public RankRvpSubmitResult Clone() {
return new RankRvpSubmitResult(this);
}
/// <summary>Field number for the "items" field.</summary>
public const int ItemsFieldNumber = 1;
private static readonly pb::FieldCodec<global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item> _repeated_items_codec
= pb::FieldCodec.ForMessage(10, global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item.Parser);
private readonly pbc::RepeatedField<global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item> items_ = new pbc::RepeatedField<global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Item> Items {
get { return items_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as RankRvpSubmitResult);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(RankRvpSubmitResult other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if(!items_.Equals(other.items_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
hash ^= items_.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
items_.WriteTo(output, _repeated_items_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
items_.WriteTo(ref output, _repeated_items_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
size += items_.CalculateSize(_repeated_items_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(RankRvpSubmitResult other) {
if (other == null) {
return;
}
items_.Add(other.items_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
items_.AddEntriesFrom(input, _repeated_items_codec);
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
items_.AddEntriesFrom(ref input, _repeated_items_codec);
break;
}
}
}
}
#endif
#region Nested types
/// <summary>Container for nested types declared in the RankRvpSubmitResult message type.</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static partial class Types {
/// <summary>
/// Reward 具体奖励
/// </summary>
public sealed partial class Reward : pb::IMessage<Reward>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Reward> _parser = new pb::MessageParser<Reward>(() => new Reward());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<Reward> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Game.Zhg.RankRvpSubmitResult.Descriptor.NestedTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Reward() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Reward(Reward other) : this() {
uid_ = other.uid_;
uname_ = other.uname_;
integral_ = other.integral_;
title_ = other.title_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Reward Clone() {
return new Reward(this);
}
/// <summary>Field number for the "uid" field.</summary>
public const int UidFieldNumber = 1;
private long uid_;
/// <summary>
/// 用户ID
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long Uid {
get { return uid_; }
set {
uid_ = value;
}
}
/// <summary>Field number for the "uname" field.</summary>
public const int UnameFieldNumber = 2;
private string uname_ = "";
/// <summary>
/// 用户名称
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Uname {
get { return uname_; }
set {
uname_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "integral" field.</summary>
public const int IntegralFieldNumber = 3;
private long integral_;
/// <summary>
/// 积分奖励
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long Integral {
get { return integral_; }
set {
integral_ = value;
}
}
/// <summary>Field number for the "title" field.</summary>
public const int TitleFieldNumber = 4;
private long title_;
/// <summary>
/// 称号奖励(称号ID列表)
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long Title {
get { return title_; }
set {
title_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as Reward);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(Reward other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Uid != other.Uid) return false;
if (Uname != other.Uname) return false;
if (Integral != other.Integral) return false;
if (Title != other.Title) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (Uid != 0L) hash ^= Uid.GetHashCode();
if (Uname.Length != 0) hash ^= Uname.GetHashCode();
if (Integral != 0L) hash ^= Integral.GetHashCode();
if (Title != 0L) hash ^= Title.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Uid != 0L) {
output.WriteRawTag(8);
output.WriteInt64(Uid);
}
if (Uname.Length != 0) {
output.WriteRawTag(18);
output.WriteString(Uname);
}
if (Integral != 0L) {
output.WriteRawTag(24);
output.WriteInt64(Integral);
}
if (Title != 0L) {
output.WriteRawTag(32);
output.WriteInt64(Title);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Uid != 0L) {
output.WriteRawTag(8);
output.WriteInt64(Uid);
}
if (Uname.Length != 0) {
output.WriteRawTag(18);
output.WriteString(Uname);
}
if (Integral != 0L) {
output.WriteRawTag(24);
output.WriteInt64(Integral);
}
if (Title != 0L) {
output.WriteRawTag(32);
output.WriteInt64(Title);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (Uid != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Uid);
}
if (Uname.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Uname);
}
if (Integral != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Integral);
}
if (Title != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Title);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(Reward other) {
if (other == null) {
return;
}
if (other.Uid != 0L) {
Uid = other.Uid;
}
if (other.Uname.Length != 0) {
Uname = other.Uname;
}
if (other.Integral != 0L) {
Integral = other.Integral;
}
if (other.Title != 0L) {
Title = other.Title;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
Uid = input.ReadInt64();
break;
}
case 18: {
Uname = input.ReadString();
break;
}
case 24: {
Integral = input.ReadInt64();
break;
}
case 32: {
Title = input.ReadInt64();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
Uid = input.ReadInt64();
break;
}
case 18: {
Uname = input.ReadString();
break;
}
case 24: {
Integral = input.ReadInt64();
break;
}
case 32: {
Title = input.ReadInt64();
break;
}
}
}
}
#endif
}
/// <summary>
/// Item 奖励项
/// </summary>
public sealed partial class Item : pb::IMessage<Item>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<Item> _parser = new pb::MessageParser<Item>(() => new Item());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<Item> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Pb.Game.Zhg.RankRvpSubmitResult.Descriptor.NestedTypes[1]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Item() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Item(Item other) : this() {
type_ = other.type_;
rewards_ = other.rewards_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public Item Clone() {
return new Item(this);
}
/// <summary>Field number for the "type" field.</summary>
public const int TypeFieldNumber = 1;
private int type_;
/// <summary>
/// 榜单类型
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int Type {
get { return type_; }
set {
type_ = value;
}
}
/// <summary>Field number for the "rewards" field.</summary>
public const int RewardsFieldNumber = 2;
private static readonly pb::FieldCodec<global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward> _repeated_rewards_codec
= pb::FieldCodec.ForMessage(18, global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward.Parser);
private readonly pbc::RepeatedField<global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward> rewards_ = new pbc::RepeatedField<global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward>();
/// <summary>
/// 奖励项
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward> Rewards {
get { return rewards_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as Item);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(Item other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Type != other.Type) return false;
if(!rewards_.Equals(other.rewards_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (Type != 0) hash ^= Type.GetHashCode();
hash ^= rewards_.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Type != 0) {
output.WriteRawTag(8);
output.WriteInt32(Type);
}
rewards_.WriteTo(output, _repeated_rewards_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Type != 0) {
output.WriteRawTag(8);
output.WriteInt32(Type);
}
rewards_.WriteTo(ref output, _repeated_rewards_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (Type != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type);
}
size += rewards_.CalculateSize(_repeated_rewards_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(Item other) {
if (other == null) {
return;
}
if (other.Type != 0) {
Type = other.Type;
}
rewards_.Add(other.rewards_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
Type = input.ReadInt32();
break;
}
case 18: {
rewards_.AddEntriesFrom(input, _repeated_rewards_codec);
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
Type = input.ReadInt32();
break;
}
case 18: {
rewards_.AddEntriesFrom(ref input, _repeated_rewards_codec);
break;
}
}
}
}
#endif
}
}
#endregion
}
#endregion #endregion
} }

@ -211,6 +211,54 @@ func (x *RankPvpResp) GetItems() []*RankPvpResp_Item {
return nil return nil
} }
// RankRvpSubmitResult 排行榜结算 push -> rank.submit 命令(排行榜结算)
type RankRvpSubmitResult struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Items []*RankRvpSubmitResult_Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
}
func (x *RankRvpSubmitResult) Reset() {
*x = RankRvpSubmitResult{}
if protoimpl.UnsafeEnabled {
mi := &file_game_zhg_rank_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RankRvpSubmitResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RankRvpSubmitResult) ProtoMessage() {}
func (x *RankRvpSubmitResult) ProtoReflect() protoreflect.Message {
mi := &file_game_zhg_rank_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 RankRvpSubmitResult.ProtoReflect.Descriptor instead.
func (*RankRvpSubmitResult) Descriptor() ([]byte, []int) {
return file_game_zhg_rank_proto_rawDescGZIP(), []int{2}
}
func (x *RankRvpSubmitResult) GetItems() []*RankRvpSubmitResult_Item {
if x != nil {
return x.Items
}
return nil
}
type RankPvpResp_Item struct { type RankPvpResp_Item struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -225,7 +273,7 @@ type RankPvpResp_Item struct {
func (x *RankPvpResp_Item) Reset() { func (x *RankPvpResp_Item) Reset() {
*x = RankPvpResp_Item{} *x = RankPvpResp_Item{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_game_zhg_rank_proto_msgTypes[2] mi := &file_game_zhg_rank_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -238,7 +286,7 @@ func (x *RankPvpResp_Item) String() string {
func (*RankPvpResp_Item) ProtoMessage() {} func (*RankPvpResp_Item) ProtoMessage() {}
func (x *RankPvpResp_Item) ProtoReflect() protoreflect.Message { func (x *RankPvpResp_Item) ProtoReflect() protoreflect.Message {
mi := &file_game_zhg_rank_proto_msgTypes[2] mi := &file_game_zhg_rank_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -282,6 +330,134 @@ func (x *RankPvpResp_Item) GetAvatar() string {
return "" return ""
} }
// Reward 具体奖励
type RankRvpSubmitResult_Reward struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID
Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名称
Integral int64 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral,omitempty"` // 积分奖励
Title int64 `protobuf:"varint,4,opt,name=title,proto3" json:"title,omitempty"` // 称号奖励(称号ID列表)
}
func (x *RankRvpSubmitResult_Reward) Reset() {
*x = RankRvpSubmitResult_Reward{}
if protoimpl.UnsafeEnabled {
mi := &file_game_zhg_rank_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RankRvpSubmitResult_Reward) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RankRvpSubmitResult_Reward) ProtoMessage() {}
func (x *RankRvpSubmitResult_Reward) ProtoReflect() protoreflect.Message {
mi := &file_game_zhg_rank_proto_msgTypes[4]
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 RankRvpSubmitResult_Reward.ProtoReflect.Descriptor instead.
func (*RankRvpSubmitResult_Reward) Descriptor() ([]byte, []int) {
return file_game_zhg_rank_proto_rawDescGZIP(), []int{2, 0}
}
func (x *RankRvpSubmitResult_Reward) GetUid() int64 {
if x != nil {
return x.Uid
}
return 0
}
func (x *RankRvpSubmitResult_Reward) GetUname() string {
if x != nil {
return x.Uname
}
return ""
}
func (x *RankRvpSubmitResult_Reward) GetIntegral() int64 {
if x != nil {
return x.Integral
}
return 0
}
func (x *RankRvpSubmitResult_Reward) GetTitle() int64 {
if x != nil {
return x.Title
}
return 0
}
// Item 奖励项
type RankRvpSubmitResult_Item struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // 榜单类型
Rewards []*RankRvpSubmitResult_Reward `protobuf:"bytes,2,rep,name=rewards,proto3" json:"rewards,omitempty"` // 奖励项
}
func (x *RankRvpSubmitResult_Item) Reset() {
*x = RankRvpSubmitResult_Item{}
if protoimpl.UnsafeEnabled {
mi := &file_game_zhg_rank_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RankRvpSubmitResult_Item) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RankRvpSubmitResult_Item) ProtoMessage() {}
func (x *RankRvpSubmitResult_Item) ProtoReflect() protoreflect.Message {
mi := &file_game_zhg_rank_proto_msgTypes[5]
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 RankRvpSubmitResult_Item.ProtoReflect.Descriptor instead.
func (*RankRvpSubmitResult_Item) Descriptor() ([]byte, []int) {
return file_game_zhg_rank_proto_rawDescGZIP(), []int{2, 1}
}
func (x *RankRvpSubmitResult_Item) GetType() int32 {
if x != nil {
return x.Type
}
return 0
}
func (x *RankRvpSubmitResult_Item) GetRewards() []*RankRvpSubmitResult_Reward {
if x != nil {
return x.Rewards
}
return nil
}
var File_game_zhg_rank_proto protoreflect.FileDescriptor var File_game_zhg_rank_proto protoreflect.FileDescriptor
var file_game_zhg_rank_proto_rawDesc = []byte{ var file_game_zhg_rank_proto_rawDesc = []byte{
@ -301,22 +477,40 @@ var file_game_zhg_rank_proto_rawDesc = []byte{
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61,
0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x2a, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22,
0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x95, 0x02, 0x0a, 0x13, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69,
0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x61, 0x6d, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65,
0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x03, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d,
0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x04, 0x12, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69,
0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x62, 0x0a, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x10,
0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64,
0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x08, 0x12, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72,
0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72,
0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x03, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x1a, 0x5d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d,
0x6f, 0x64, 0x10, 0x0c, 0x42, 0x20, 0x5a, 0x1e, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x2f, 0x70, 0x62, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x3b, 0x70, 0x62, 0x47, 0x74, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18,
0x61, 0x6d, 0x65, 0x5a, 0x68, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e,
0x7a, 0x68, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69,
0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07,
0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2a, 0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b,
0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10,
0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a,
0x08, 0x44, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65,
0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55,
0x6e, 0x69, 0x74, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55,
0x6e, 0x69, 0x74, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61,
0x79, 0x65, 0x72, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50,
0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x08, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09,
0x12, 0x08, 0x0a, 0x04, 0x4c, 0x6f, 0x73, 0x74, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69,
0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65,
0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0c, 0x42, 0x20, 0x5a, 0x1e,
0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x61, 0x6d, 0x65,
0x2f, 0x7a, 0x68, 0x67, 0x3b, 0x70, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x5a, 0x68, 0x67, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -332,20 +526,25 @@ func file_game_zhg_rank_proto_rawDescGZIP() []byte {
} }
var file_game_zhg_rank_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_game_zhg_rank_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_game_zhg_rank_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_game_zhg_rank_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_game_zhg_rank_proto_goTypes = []interface{}{ var file_game_zhg_rank_proto_goTypes = []interface{}{
(RankType)(0), // 0: pb.game.zhg.RankType (RankType)(0), // 0: pb.game.zhg.RankType
(*RankPvpReq)(nil), // 1: pb.game.zhg.RankPvpReq (*RankPvpReq)(nil), // 1: pb.game.zhg.RankPvpReq
(*RankPvpResp)(nil), // 2: pb.game.zhg.RankPvpResp (*RankPvpResp)(nil), // 2: pb.game.zhg.RankPvpResp
(*RankPvpResp_Item)(nil), // 3: pb.game.zhg.RankPvpResp.Item (*RankRvpSubmitResult)(nil), // 3: pb.game.zhg.RankRvpSubmitResult
(*RankPvpResp_Item)(nil), // 4: pb.game.zhg.RankPvpResp.Item
(*RankRvpSubmitResult_Reward)(nil), // 5: pb.game.zhg.RankRvpSubmitResult.Reward
(*RankRvpSubmitResult_Item)(nil), // 6: pb.game.zhg.RankRvpSubmitResult.Item
} }
var file_game_zhg_rank_proto_depIdxs = []int32{ var file_game_zhg_rank_proto_depIdxs = []int32{
3, // 0: pb.game.zhg.RankPvpResp.items:type_name -> pb.game.zhg.RankPvpResp.Item 4, // 0: pb.game.zhg.RankPvpResp.items:type_name -> pb.game.zhg.RankPvpResp.Item
1, // [1:1] is the sub-list for method output_type 6, // 1: pb.game.zhg.RankRvpSubmitResult.items:type_name -> pb.game.zhg.RankRvpSubmitResult.Item
1, // [1:1] is the sub-list for method input_type 5, // 2: pb.game.zhg.RankRvpSubmitResult.Item.rewards:type_name -> pb.game.zhg.RankRvpSubmitResult.Reward
1, // [1:1] is the sub-list for extension type_name 3, // [3:3] is the sub-list for method output_type
1, // [1:1] is the sub-list for extension extendee 3, // [3:3] is the sub-list for method input_type
0, // [0:1] is the sub-list for field type_name 3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
} }
func init() { file_game_zhg_rank_proto_init() } func init() { file_game_zhg_rank_proto_init() }
@ -379,6 +578,18 @@ func file_game_zhg_rank_proto_init() {
} }
} }
file_game_zhg_rank_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_game_zhg_rank_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RankRvpSubmitResult); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_game_zhg_rank_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RankPvpResp_Item); i { switch v := v.(*RankPvpResp_Item); i {
case 0: case 0:
return &v.state return &v.state
@ -390,6 +601,30 @@ func file_game_zhg_rank_proto_init() {
return nil return nil
} }
} }
file_game_zhg_rank_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RankRvpSubmitResult_Reward); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_game_zhg_rank_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RankRvpSubmitResult_Item); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -397,7 +632,7 @@ func file_game_zhg_rank_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_game_zhg_rank_proto_rawDesc, RawDescriptor: file_game_zhg_rank_proto_rawDesc,
NumEnums: 1, NumEnums: 1,
NumMessages: 3, NumMessages: 6,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

@ -36,4 +36,21 @@ message RankPvpResp {
} }
int32 type = 1; // rank int32 type = 1; // rank
repeated Item items = 2; // rank repeated Item items = 2; // rank
}
// RankRvpSubmitResult push -> rank.submit ()
message RankRvpSubmitResult {
// Reward
message Reward {
int64 uid = 1; // ID
string uname = 2; //
int64 integral = 3; //
int64 title = 4; // (ID)
}
// Item
message Item {
int32 type = 1; //
repeated Reward rewards = 2; //
}
repeated Item items = 1;
} }

@ -71,8 +71,7 @@ func (p *Parser) Parse(content string) *CMD {
var matchedCmdArr []string var matchedCmdArr []string
if p.distinct && isCMD { if p.distinct && isCMD {
matchedCmdArr = make([]string, 0, len(matchedKeys)) matchedCmdArr = make([]string, 0, len(matchedKeys))
for i := len(matchedKeys) - 1; i >= 0; i-- { for _, s := range matchedKeys {
s := matchedKeys[i]
sRune := []rune(s) sRune := []rune(s)
if _, ok := arrMap[sRune[0]]; !ok { if _, ok := arrMap[sRune[0]]; !ok {
arrMap[sRune[0]] = struct{}{} arrMap[sRune[0]] = struct{}{}

@ -28,7 +28,7 @@ func TestParse(t *testing.T) {
"c2", "c2",
} }
p := NewCMDParser([]string{"j", "c1", "c2", "c3", "c4", "b1", "b2", "b3", "s", "b2", "b3", "w", "m1", "m2", "m3", "加入", "加入游戏"}) p := NewCMDParser(true, "j", "c1", "c2", "c3", "c4", "b1", "b2", "b3", "s", "b2", "b3", "w", "m1", "m2", "m3", "加入", "加入游戏")
for _, content := range contents { for _, content := range contents {
cmdStruct := p.Parse(content) cmdStruct := p.Parse(content)
@ -38,13 +38,13 @@ func TestParse(t *testing.T) {
} }
func TestA(t *testing.T) { func TestA(t *testing.T) {
p := NewCMDParser([]string{"j", "j1", "j2", "j3"}) p := NewCMDParser(false, "j", "j1", "j2", "j3", "结算1", "结算12")
c := p.Parse("j2j2jjjjja") c := p.Parse("结算1")
fmt.Println(c) fmt.Println(c)
} }
func BenchmarkCmd(b *testing.B) { func BenchmarkCmd(b *testing.B) {
p := NewCMDParser([]string{"j", "c1", "c2", "c3", "c4", "b1", "b2", "b3", "s", "b2", "b3", "w", "m1", "m2", "m3", "加入", "加入游戏"}) p := NewCMDParser(false, "j", "c1", "c2", "c3", "c4", "b1", "b2", "b3", "s", "b2", "b3", "w", "m1", "m2", "m3", "加入", "加入游戏")
content := "jc2m2b1s" content := "jc2m2b1s"
b.ResetTimer() b.ResetTimer()

Loading…
Cancel
Save