diff --git a/bloodybattle/src/main/java/com/ljsd/jieling/protocols/ChatProto.java b/bloodybattle/src/main/java/com/ljsd/jieling/protocols/ChatProto.java index 6e37e71f0..8023cb1a1 100644 --- a/bloodybattle/src/main/java/com/ljsd/jieling/protocols/ChatProto.java +++ b/bloodybattle/src/main/java/com/ljsd/jieling/protocols/ChatProto.java @@ -334,6 +334,34 @@ public final class ChatProto { * */ int getFrequency(); + + // optional int32 speed = 20; + /** + * optional int32 speed = 20; + */ + boolean hasSpeed(); + /** + * optional int32 speed = 20; + */ + int getSpeed(); + + // optional int32 multiple = 21; + /** + * optional int32 multiple = 21; + * + *
+     *显示次数
+     * 
+ */ + boolean hasMultiple(); + /** + * optional int32 multiple = 21; + * + *
+     *显示次数
+     * 
+ */ + int getMultiple(); } /** * Protobuf type {@code com.ljsd.jieling.protocols.ChatInfo} @@ -471,6 +499,16 @@ public final class ChatProto { frequency_ = input.readInt32(); break; } + case 160: { + bitField0_ |= 0x00020000; + speed_ = input.readInt32(); + break; + } + case 168: { + bitField0_ |= 0x00040000; + multiple_ = input.readInt32(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -981,6 +1019,46 @@ public final class ChatProto { return frequency_; } + // optional int32 speed = 20; + public static final int SPEED_FIELD_NUMBER = 20; + private int speed_; + /** + * optional int32 speed = 20; + */ + public boolean hasSpeed() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional int32 speed = 20; + */ + public int getSpeed() { + return speed_; + } + + // optional int32 multiple = 21; + public static final int MULTIPLE_FIELD_NUMBER = 21; + private int multiple_; + /** + * optional int32 multiple = 21; + * + *
+     *显示次数
+     * 
+ */ + public boolean hasMultiple() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional int32 multiple = 21; + * + *
+     *显示次数
+     * 
+ */ + public int getMultiple() { + return multiple_; + } + private void initFields() { senderId_ = 0; senderName_ = ""; @@ -999,6 +1077,8 @@ public final class ChatProto { endTime_ = 0; priorityLevel_ = 0; frequency_ = 0; + speed_ = 0; + multiple_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1063,6 +1143,12 @@ public final class ChatProto { if (((bitField0_ & 0x00010000) == 0x00010000)) { output.writeInt32(19, frequency_); } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + output.writeInt32(20, speed_); + } + if (((bitField0_ & 0x00040000) == 0x00040000)) { + output.writeInt32(21, multiple_); + } getUnknownFields().writeTo(output); } @@ -1140,6 +1226,14 @@ public final class ChatProto { size += com.google.protobuf.CodedOutputStream .computeInt32Size(19, frequency_); } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(20, speed_); + } + if (((bitField0_ & 0x00040000) == 0x00040000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(21, multiple_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -1290,6 +1384,10 @@ public final class ChatProto { bitField0_ = (bitField0_ & ~0x00008000); frequency_ = 0; bitField0_ = (bitField0_ & ~0x00010000); + speed_ = 0; + bitField0_ = (bitField0_ & ~0x00020000); + multiple_ = 0; + bitField0_ = (bitField0_ & ~0x00040000); return this; } @@ -1386,6 +1484,14 @@ public final class ChatProto { to_bitField0_ |= 0x00010000; } result.frequency_ = frequency_; + if (((from_bitField0_ & 0x00020000) == 0x00020000)) { + to_bitField0_ |= 0x00020000; + } + result.speed_ = speed_; + if (((from_bitField0_ & 0x00040000) == 0x00040000)) { + to_bitField0_ |= 0x00040000; + } + result.multiple_ = multiple_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -1457,6 +1563,12 @@ public final class ChatProto { if (other.hasFrequency()) { setFrequency(other.getFrequency()); } + if (other.hasSpeed()) { + setSpeed(other.getSpeed()); + } + if (other.hasMultiple()) { + setMultiple(other.getMultiple()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2415,6 +2527,88 @@ public final class ChatProto { return this; } + // optional int32 speed = 20; + private int speed_ ; + /** + * optional int32 speed = 20; + */ + public boolean hasSpeed() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional int32 speed = 20; + */ + public int getSpeed() { + return speed_; + } + /** + * optional int32 speed = 20; + */ + public Builder setSpeed(int value) { + bitField0_ |= 0x00020000; + speed_ = value; + onChanged(); + return this; + } + /** + * optional int32 speed = 20; + */ + public Builder clearSpeed() { + bitField0_ = (bitField0_ & ~0x00020000); + speed_ = 0; + onChanged(); + return this; + } + + // optional int32 multiple = 21; + private int multiple_ ; + /** + * optional int32 multiple = 21; + * + *
+       *显示次数
+       * 
+ */ + public boolean hasMultiple() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional int32 multiple = 21; + * + *
+       *显示次数
+       * 
+ */ + public int getMultiple() { + return multiple_; + } + /** + * optional int32 multiple = 21; + * + *
+       *显示次数
+       * 
+ */ + public Builder setMultiple(int value) { + bitField0_ |= 0x00040000; + multiple_ = value; + onChanged(); + return this; + } + /** + * optional int32 multiple = 21; + * + *
+       *显示次数
+       * 
+ */ + public Builder clearMultiple() { + bitField0_ = (bitField0_ & ~0x00040000); + multiple_ = 0; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.ChatInfo) } @@ -5553,25 +5747,25 @@ public final class ChatProto { static { java.lang.String[] descriptorData = { "\n\017ChatProto.proto\022\032com.ljsd.jieling.prot" + - "ocols\"\266\002\n\010ChatInfo\022\020\n\010senderId\030\001 \001(\005\022\022\n\n" + + "ocols\"\327\002\n\010ChatInfo\022\020\n\010senderId\030\001 \001(\005\022\022\n\n" + "senderName\030\002 \001(\t\022\023\n\013senderlevel\030\003 \001(\005\022\021\n" + "\tsendervip\030\005 \001(\005\022\r\n\005times\030\006 \001(\004\022\013\n\003msg\030\007" + " \001(\t\022\014\n\004head\030\010 \001(\005\022\r\n\005frame\030\t \001(\005\022\017\n\007sou" + "lVal\030\n \001(\005\022\021\n\tmessageId\030\013 \001(\004\022\023\n\013message" + "Type\030\r \001(\005\022\016\n\006itemId\030\016 \001(\005\022\014\n\004type\030\017 \001(\005" + "\022\021\n\tstartTime\030\020 \001(\005\022\017\n\007endTime\030\021 \001(\005\022\025\n\r" + - "PriorityLevel\030\022 \001(\005\022\021\n\tFrequency\030\023 \001(\005\"@" + - "\n\031GetChatMessageInfoRequest\022\020\n\010chatType\030", - "\001 \001(\005\022\021\n\tmessageId\030\002 \001(\004\"T\n\032GetChatMessa" + - "geInfoResponse\0226\n\010chatInfo\030\001 \003(\0132$.com.l" + - "jsd.jieling.protocols.ChatInfo\"I\n\022SendCh" + - "atInfoReqest\022\020\n\010chatType\030\001 \001(\005\022\017\n\007messag" + - "e\030\002 \001(\t\022\020\n\010friendId\030\003 \001(\005\"N\n\024SendChatInf" + - "oResponse\0226\n\010chatInfo\030\001 \001(\0132$.com.ljsd.j" + - "ieling.protocols.ChatInfo\"^\n\026SendChatInf" + - "oIndication\0226\n\010chatInfo\030\001 \001(\0132$.com.ljsd" + - ".jieling.protocols.ChatInfo\022\014\n\004type\030\002 \001(" + - "\005B\002H\001" + "PriorityLevel\030\022 \001(\005\022\021\n\tFrequency\030\023 \001(\005\022\r" + + "\n\005speed\030\024 \001(\005\022\020\n\010multiple\030\025 \001(\005\"@\n\031GetCh", + "atMessageInfoRequest\022\020\n\010chatType\030\001 \001(\005\022\021" + + "\n\tmessageId\030\002 \001(\004\"T\n\032GetChatMessageInfoR" + + "esponse\0226\n\010chatInfo\030\001 \003(\0132$.com.ljsd.jie" + + "ling.protocols.ChatInfo\"I\n\022SendChatInfoR" + + "eqest\022\020\n\010chatType\030\001 \001(\005\022\017\n\007message\030\002 \001(\t" + + "\022\020\n\010friendId\030\003 \001(\005\"N\n\024SendChatInfoRespon" + + "se\0226\n\010chatInfo\030\001 \001(\0132$.com.ljsd.jieling." + + "protocols.ChatInfo\"^\n\026SendChatInfoIndica" + + "tion\0226\n\010chatInfo\030\001 \001(\0132$.com.ljsd.jielin" + + "g.protocols.ChatInfo\022\014\n\004type\030\002 \001(\005B\002H\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -5583,7 +5777,7 @@ public final class ChatProto { internal_static_com_ljsd_jieling_protocols_ChatInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_ljsd_jieling_protocols_ChatInfo_descriptor, - new java.lang.String[] { "SenderId", "SenderName", "Senderlevel", "Sendervip", "Times", "Msg", "Head", "Frame", "SoulVal", "MessageId", "MessageType", "ItemId", "Type", "StartTime", "EndTime", "PriorityLevel", "Frequency", }); + new java.lang.String[] { "SenderId", "SenderName", "Senderlevel", "Sendervip", "Times", "Msg", "Head", "Frame", "SoulVal", "MessageId", "MessageType", "ItemId", "Type", "StartTime", "EndTime", "PriorityLevel", "Frequency", "Speed", "Multiple", }); internal_static_com_ljsd_jieling_protocols_GetChatMessageInfoRequest_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_com_ljsd_jieling_protocols_GetChatMessageInfoRequest_fieldAccessorTable = new diff --git a/bloodybattle/src/main/java/com/ljsd/jieling/protocols/MessageTypeProto.java b/bloodybattle/src/main/java/com/ljsd/jieling/protocols/MessageTypeProto.java index 7a790a82d..240e05571 100644 --- a/bloodybattle/src/main/java/com/ljsd/jieling/protocols/MessageTypeProto.java +++ b/bloodybattle/src/main/java/com/ljsd/jieling/protocols/MessageTypeProto.java @@ -2701,6 +2701,18 @@ public final class MessageTypeProto { * VIP_TAKE_REWARD_RESPONSE = 12105; */ VIP_TAKE_REWARD_RESPONSE(429, 12105), + /** + * VIEW_HERO_INFO_REQUEST = 12106; + * + *
+     * 查看英雄详情信息
+     * 
+ */ + VIEW_HERO_INFO_REQUEST(430, 12106), + /** + * VIEW_HERO_INFO_RESPONSE = 12107; + */ + VIEW_HERO_INFO_RESPONSE(431, 12107), /** * WORKSHOP_FOUNDATION_REQUEST = 12200; * @@ -2708,11 +2720,11 @@ public final class MessageTypeProto { * W 12200 * */ - WORKSHOP_FOUNDATION_REQUEST(430, 12200), + WORKSHOP_FOUNDATION_REQUEST(432, 12200), /** * WORKSHOP_FOUNDATION_RESPONSE = 12201; */ - WORKSHOP_FOUNDATION_RESPONSE(431, 12201), + WORKSHOP_FOUNDATION_RESPONSE(433, 12201), /** * WORKSHOP_EQUIP_CREATE_REQUEST = 12202; * @@ -2720,11 +2732,11 @@ public final class MessageTypeProto { *装备打造 * */ - WORKSHOP_EQUIP_CREATE_REQUEST(432, 12202), + WORKSHOP_EQUIP_CREATE_REQUEST(434, 12202), /** * WORKSHOP_EQUIP_CREATE_RESPONSE = 12203; */ - WORKSHOP_EQUIP_CREATE_RESPONSE(433, 12203), + WORKSHOP_EQUIP_CREATE_RESPONSE(435, 12203), /** * WORKSHOP_REBUILD_REQUEST = 12204; * @@ -2732,11 +2744,11 @@ public final class MessageTypeProto { *装备重铸 * */ - WORKSHOP_REBUILD_REQUEST(434, 12204), + WORKSHOP_REBUILD_REQUEST(436, 12204), /** * WORKSHOP_REBUILD_RESPONSE = 12205; */ - WORKSHOP_REBUILD_RESPONSE(435, 12205), + WORKSHOP_REBUILD_RESPONSE(437, 12205), /** * WORKSHOP_REBUILD_CONFIRM_REQUEST = 12206; * @@ -2744,11 +2756,11 @@ public final class MessageTypeProto { * 重铸确认 * */ - WORKSHOP_REBUILD_CONFIRM_REQUEST(436, 12206), + WORKSHOP_REBUILD_CONFIRM_REQUEST(438, 12206), /** * WORKSHOP_REBUILD_CONFIRM_RESONSE = 12207; */ - WORKSHOP_REBUILD_CONFIRM_RESONSE(437, 12207), + WORKSHOP_REBUILD_CONFIRM_RESONSE(439, 12207), /** * WORKSHOP_LEVELUP_REQUEST = 12208; * @@ -2756,11 +2768,11 @@ public final class MessageTypeProto { *工坊升级 * */ - WORKSHOP_LEVELUP_REQUEST(438, 12208), + WORKSHOP_LEVELUP_REQUEST(440, 12208), /** * WORKSHOP_LEVELUP_RESPONSE = 12209; */ - WORKSHOP_LEVELUP_RESPONSE(439, 12209), + WORKSHOP_LEVELUP_RESPONSE(441, 12209), /** * WORKSHOP_TECHNOLOGY_LEVEL_REQUEST = 12210; * @@ -2768,11 +2780,11 @@ public final class MessageTypeProto { *科技树升级 * */ - WORKSHOP_TECHNOLOGY_LEVEL_REQUEST(440, 12210), + WORKSHOP_TECHNOLOGY_LEVEL_REQUEST(442, 12210), /** * WORKSHOP_TECHNOLOGY_RESPONSE = 12211; */ - WORKSHOP_TECHNOLOGY_RESPONSE(441, 12211), + WORKSHOP_TECHNOLOGY_RESPONSE(443, 12211), /** * WORKSHOP_TECHNOLOGY_RESET_REQUEST = 12212; * @@ -2780,11 +2792,11 @@ public final class MessageTypeProto { *科技树重置 * */ - WORKSHOP_TECHNOLOGY_RESET_REQUEST(442, 12212), + WORKSHOP_TECHNOLOGY_RESET_REQUEST(444, 12212), /** * WORKSHOP_TECHNOLOGY_RESET_RESPONSE = 12213; */ - WORKSHOP_TECHNOLOGY_RESET_RESPONSE(443, 12213), + WORKSHOP_TECHNOLOGY_RESET_RESPONSE(445, 12213), ; /** @@ -5475,6 +5487,18 @@ public final class MessageTypeProto { * VIP_TAKE_REWARD_RESPONSE = 12105; */ public static final int VIP_TAKE_REWARD_RESPONSE_VALUE = 12105; + /** + * VIEW_HERO_INFO_REQUEST = 12106; + * + *
+     * 查看英雄详情信息
+     * 
+ */ + public static final int VIEW_HERO_INFO_REQUEST_VALUE = 12106; + /** + * VIEW_HERO_INFO_RESPONSE = 12107; + */ + public static final int VIEW_HERO_INFO_RESPONSE_VALUE = 12107; /** * WORKSHOP_FOUNDATION_REQUEST = 12200; * @@ -5995,6 +6019,8 @@ public final class MessageTypeProto { case 12103: return VIP_LEVELUP_RESPONSE; case 12104: return VIP_TAKE_REWARD_REQUEST; case 12105: return VIP_TAKE_REWARD_RESPONSE; + case 12106: return VIEW_HERO_INFO_REQUEST; + case 12107: return VIEW_HERO_INFO_RESPONSE; case 12200: return WORKSHOP_FOUNDATION_REQUEST; case 12201: return WORKSHOP_FOUNDATION_RESPONSE; case 12202: return WORKSHOP_EQUIP_CREATE_REQUEST; @@ -6070,7 +6096,7 @@ public final class MessageTypeProto { static { java.lang.String[] descriptorData = { "\n\026MessageTypeProto.proto\022\032com.ljsd.jieli" + - "ng.protocols*\202o\n\013MessageType\022\027\n\022HEART_BE" + + "ng.protocols*\275o\n\013MessageType\022\027\n\022HEART_BE" + "AT_REQUEST\020\350\007\022\030\n\023HEART_BEAT_RESPONSE\020\351\007\022" + "\036\n\031ACTIVITE_WORKSHOP_REQUEST\020\224N\022\037\n\032ACTIV" + "ITE_WORKSHOP_RESPONSE\020\225N\022\027\n\022ARENA_INFO_R" + @@ -6413,19 +6439,21 @@ public final class MessageTypeProto { "SPONSE\020\305^\022\030\n\023VIP_LEVELUP_REQEUST\020\306^\022\031\n\024V" + "IP_LEVELUP_RESPONSE\020\307^\022\034\n\027VIP_TAKE_REWAR" + "D_REQUEST\020\310^\022\035\n\030VIP_TAKE_REWARD_RESPONSE" + - "\020\311^\022 \n\033WORKSHOP_FOUNDATION_REQUEST\020\250_\022!\n" + - "\034WORKSHOP_FOUNDATION_RESPONSE\020\251_\022\"\n\035WORK" + - "SHOP_EQUIP_CREATE_REQUEST\020\252_\022#\n\036WORKSHOP" + - "_EQUIP_CREATE_RESPONSE\020\253_\022\035\n\030WORKSHOP_RE" + - "BUILD_REQUEST\020\254_\022\036\n\031WORKSHOP_REBUILD_RES" + - "PONSE\020\255_\022%\n WORKSHOP_REBUILD_CONFIRM_REQ", - "UEST\020\256_\022%\n WORKSHOP_REBUILD_CONFIRM_RESO" + - "NSE\020\257_\022\035\n\030WORKSHOP_LEVELUP_REQUEST\020\260_\022\036\n" + - "\031WORKSHOP_LEVELUP_RESPONSE\020\261_\022&\n!WORKSHO" + - "P_TECHNOLOGY_LEVEL_REQUEST\020\262_\022!\n\034WORKSHO" + - "P_TECHNOLOGY_RESPONSE\020\263_\022&\n!WORKSHOP_TEC" + - "HNOLOGY_RESET_REQUEST\020\264_\022\'\n\"WORKSHOP_TEC" + - "HNOLOGY_RESET_RESPONSE\020\265_B\002H\001" + "\020\311^\022\033\n\026VIEW_HERO_INFO_REQUEST\020\312^\022\034\n\027VIEW" + + "_HERO_INFO_RESPONSE\020\313^\022 \n\033WORKSHOP_FOUND" + + "ATION_REQUEST\020\250_\022!\n\034WORKSHOP_FOUNDATION_" + + "RESPONSE\020\251_\022\"\n\035WORKSHOP_EQUIP_CREATE_REQ" + + "UEST\020\252_\022#\n\036WORKSHOP_EQUIP_CREATE_RESPONS" + + "E\020\253_\022\035\n\030WORKSHOP_REBUILD_REQUEST\020\254_\022\036\n\031W", + "ORKSHOP_REBUILD_RESPONSE\020\255_\022%\n WORKSHOP_" + + "REBUILD_CONFIRM_REQUEST\020\256_\022%\n WORKSHOP_R" + + "EBUILD_CONFIRM_RESONSE\020\257_\022\035\n\030WORKSHOP_LE" + + "VELUP_REQUEST\020\260_\022\036\n\031WORKSHOP_LEVELUP_RES" + + "PONSE\020\261_\022&\n!WORKSHOP_TECHNOLOGY_LEVEL_RE" + + "QUEST\020\262_\022!\n\034WORKSHOP_TECHNOLOGY_RESPONSE" + + "\020\263_\022&\n!WORKSHOP_TECHNOLOGY_RESET_REQUEST" + + "\020\264_\022\'\n\"WORKSHOP_TECHNOLOGY_RESET_RESPONS" + + "E\020\265_B\002H\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { diff --git a/bloodybattle/src/main/java/com/ljsd/jieling/protocols/PlayerInfoProto.java b/bloodybattle/src/main/java/com/ljsd/jieling/protocols/PlayerInfoProto.java index 7cb3fd320..afdcc585d 100644 --- a/bloodybattle/src/main/java/com/ljsd/jieling/protocols/PlayerInfoProto.java +++ b/bloodybattle/src/main/java/com/ljsd/jieling/protocols/PlayerInfoProto.java @@ -84348,6 +84348,2174 @@ public final class PlayerInfoProto { // @@protoc_insertion_point(class_scope:com.ljsd.jieling.protocols.MailDelRequest) } + public interface ViewHeroInfoRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 targetUid = 1; + /** + * optional int32 targetUid = 1; + */ + boolean hasTargetUid(); + /** + * optional int32 targetUid = 1; + */ + int getTargetUid(); + + // optional string heroId = 2; + /** + * optional string heroId = 2; + * + *
+     * 动态id
+     * 
+ */ + boolean hasHeroId(); + /** + * optional string heroId = 2; + * + *
+     * 动态id
+     * 
+ */ + java.lang.String getHeroId(); + /** + * optional string heroId = 2; + * + *
+     * 动态id
+     * 
+ */ + com.google.protobuf.ByteString + getHeroIdBytes(); + } + /** + * Protobuf type {@code com.ljsd.jieling.protocols.ViewHeroInfoRequest} + */ + public static final class ViewHeroInfoRequest extends + com.google.protobuf.GeneratedMessage + implements ViewHeroInfoRequestOrBuilder { + // Use ViewHeroInfoRequest.newBuilder() to construct. + private ViewHeroInfoRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ViewHeroInfoRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ViewHeroInfoRequest defaultInstance; + public static ViewHeroInfoRequest getDefaultInstance() { + return defaultInstance; + } + + public ViewHeroInfoRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ViewHeroInfoRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + targetUid_ = input.readInt32(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + heroId_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest.class, com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ViewHeroInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ViewHeroInfoRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional int32 targetUid = 1; + public static final int TARGETUID_FIELD_NUMBER = 1; + private int targetUid_; + /** + * optional int32 targetUid = 1; + */ + public boolean hasTargetUid() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 targetUid = 1; + */ + public int getTargetUid() { + return targetUid_; + } + + // optional string heroId = 2; + public static final int HEROID_FIELD_NUMBER = 2; + private java.lang.Object heroId_; + /** + * optional string heroId = 2; + * + *
+     * 动态id
+     * 
+ */ + public boolean hasHeroId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string heroId = 2; + * + *
+     * 动态id
+     * 
+ */ + public java.lang.String getHeroId() { + java.lang.Object ref = heroId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + heroId_ = s; + } + return s; + } + } + /** + * optional string heroId = 2; + * + *
+     * 动态id
+     * 
+ */ + public com.google.protobuf.ByteString + getHeroIdBytes() { + java.lang.Object ref = heroId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + heroId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + targetUid_ = 0; + heroId_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, targetUid_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getHeroIdBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, targetUid_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getHeroIdBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.ljsd.jieling.protocols.ViewHeroInfoRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest.class, com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest.Builder.class); + } + + // Construct using com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + targetUid_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + heroId_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_descriptor; + } + + public com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest getDefaultInstanceForType() { + return com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest.getDefaultInstance(); + } + + public com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest build() { + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest buildPartial() { + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest result = new com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.targetUid_ = targetUid_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.heroId_ = heroId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest) { + return mergeFrom((com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest other) { + if (other == com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest.getDefaultInstance()) return this; + if (other.hasTargetUid()) { + setTargetUid(other.getTargetUid()); + } + if (other.hasHeroId()) { + bitField0_ |= 0x00000002; + heroId_ = other.heroId_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional int32 targetUid = 1; + private int targetUid_ ; + /** + * optional int32 targetUid = 1; + */ + public boolean hasTargetUid() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 targetUid = 1; + */ + public int getTargetUid() { + return targetUid_; + } + /** + * optional int32 targetUid = 1; + */ + public Builder setTargetUid(int value) { + bitField0_ |= 0x00000001; + targetUid_ = value; + onChanged(); + return this; + } + /** + * optional int32 targetUid = 1; + */ + public Builder clearTargetUid() { + bitField0_ = (bitField0_ & ~0x00000001); + targetUid_ = 0; + onChanged(); + return this; + } + + // optional string heroId = 2; + private java.lang.Object heroId_ = ""; + /** + * optional string heroId = 2; + * + *
+       * 动态id
+       * 
+ */ + public boolean hasHeroId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string heroId = 2; + * + *
+       * 动态id
+       * 
+ */ + public java.lang.String getHeroId() { + java.lang.Object ref = heroId_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + heroId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string heroId = 2; + * + *
+       * 动态id
+       * 
+ */ + public com.google.protobuf.ByteString + getHeroIdBytes() { + java.lang.Object ref = heroId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + heroId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string heroId = 2; + * + *
+       * 动态id
+       * 
+ */ + public Builder setHeroId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + heroId_ = value; + onChanged(); + return this; + } + /** + * optional string heroId = 2; + * + *
+       * 动态id
+       * 
+ */ + public Builder clearHeroId() { + bitField0_ = (bitField0_ & ~0x00000002); + heroId_ = getDefaultInstance().getHeroId(); + onChanged(); + return this; + } + /** + * optional string heroId = 2; + * + *
+       * 动态id
+       * 
+ */ + public Builder setHeroIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + heroId_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.ViewHeroInfoRequest) + } + + static { + defaultInstance = new ViewHeroInfoRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.ljsd.jieling.protocols.ViewHeroInfoRequest) + } + + public interface ViewHeroInfoResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.ljsd.jieling.protocols.Hero hero = 1; + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + boolean hasHero(); + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + com.ljsd.jieling.protocols.CommonProto.Hero getHero(); + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + com.ljsd.jieling.protocols.CommonProto.HeroOrBuilder getHeroOrBuilder(); + + // repeated .com.ljsd.jieling.protocols.Equip equip = 2; + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + java.util.List + getEquipList(); + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + com.ljsd.jieling.protocols.CommonProto.Equip getEquip(int index); + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + int getEquipCount(); + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + java.util.List + getEquipOrBuilderList(); + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + com.ljsd.jieling.protocols.CommonProto.EquipOrBuilder getEquipOrBuilder( + int index); + + // repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + java.util.List + getSpecialEffectsList(); + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + com.ljsd.jieling.protocols.CommonProto.SpecialEffects getSpecialEffects(int index); + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + int getSpecialEffectsCount(); + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + java.util.List + getSpecialEffectsOrBuilderList(); + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + com.ljsd.jieling.protocols.CommonProto.SpecialEffectsOrBuilder getSpecialEffectsOrBuilder( + int index); + + // optional int32 force = 4; + /** + * optional int32 force = 4; + * + *
+     *战力
+     * 
+ */ + boolean hasForce(); + /** + * optional int32 force = 4; + * + *
+     *战力
+     * 
+ */ + int getForce(); + } + /** + * Protobuf type {@code com.ljsd.jieling.protocols.ViewHeroInfoResponse} + */ + public static final class ViewHeroInfoResponse extends + com.google.protobuf.GeneratedMessage + implements ViewHeroInfoResponseOrBuilder { + // Use ViewHeroInfoResponse.newBuilder() to construct. + private ViewHeroInfoResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ViewHeroInfoResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ViewHeroInfoResponse defaultInstance; + public static ViewHeroInfoResponse getDefaultInstance() { + return defaultInstance; + } + + public ViewHeroInfoResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ViewHeroInfoResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.ljsd.jieling.protocols.CommonProto.Hero.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = hero_.toBuilder(); + } + hero_ = input.readMessage(com.ljsd.jieling.protocols.CommonProto.Hero.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hero_); + hero_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + equip_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + equip_.add(input.readMessage(com.ljsd.jieling.protocols.CommonProto.Equip.PARSER, extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + specialEffects_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + specialEffects_.add(input.readMessage(com.ljsd.jieling.protocols.CommonProto.SpecialEffects.PARSER, extensionRegistry)); + break; + } + case 32: { + bitField0_ |= 0x00000002; + force_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + equip_ = java.util.Collections.unmodifiableList(equip_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + specialEffects_ = java.util.Collections.unmodifiableList(specialEffects_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse.class, com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ViewHeroInfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ViewHeroInfoResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional .com.ljsd.jieling.protocols.Hero hero = 1; + public static final int HERO_FIELD_NUMBER = 1; + private com.ljsd.jieling.protocols.CommonProto.Hero hero_; + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public boolean hasHero() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public com.ljsd.jieling.protocols.CommonProto.Hero getHero() { + return hero_; + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public com.ljsd.jieling.protocols.CommonProto.HeroOrBuilder getHeroOrBuilder() { + return hero_; + } + + // repeated .com.ljsd.jieling.protocols.Equip equip = 2; + public static final int EQUIP_FIELD_NUMBER = 2; + private java.util.List equip_; + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + public java.util.List getEquipList() { + return equip_; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + public java.util.List + getEquipOrBuilderList() { + return equip_; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + public int getEquipCount() { + return equip_.size(); + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.Equip getEquip(int index) { + return equip_.get(index); + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+     * 英雄所穿装备、法宝、魂印
+     * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.EquipOrBuilder getEquipOrBuilder( + int index) { + return equip_.get(index); + } + + // repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + public static final int SPECIALEFFECTS_FIELD_NUMBER = 3; + private java.util.List specialEffects_; + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + public java.util.List getSpecialEffectsList() { + return specialEffects_; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + public java.util.List + getSpecialEffectsOrBuilderList() { + return specialEffects_; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + public int getSpecialEffectsCount() { + return specialEffects_.size(); + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.SpecialEffects getSpecialEffects(int index) { + return specialEffects_.get(index); + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+     *属性信息
+     * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.SpecialEffectsOrBuilder getSpecialEffectsOrBuilder( + int index) { + return specialEffects_.get(index); + } + + // optional int32 force = 4; + public static final int FORCE_FIELD_NUMBER = 4; + private int force_; + /** + * optional int32 force = 4; + * + *
+     *战力
+     * 
+ */ + public boolean hasForce() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 force = 4; + * + *
+     *战力
+     * 
+ */ + public int getForce() { + return force_; + } + + private void initFields() { + hero_ = com.ljsd.jieling.protocols.CommonProto.Hero.getDefaultInstance(); + equip_ = java.util.Collections.emptyList(); + specialEffects_ = java.util.Collections.emptyList(); + force_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, hero_); + } + for (int i = 0; i < equip_.size(); i++) { + output.writeMessage(2, equip_.get(i)); + } + for (int i = 0; i < specialEffects_.size(); i++) { + output.writeMessage(3, specialEffects_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(4, force_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, hero_); + } + for (int i = 0; i < equip_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, equip_.get(i)); + } + for (int i = 0; i < specialEffects_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, specialEffects_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.ljsd.jieling.protocols.ViewHeroInfoResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse.class, com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse.Builder.class); + } + + // Construct using com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getHeroFieldBuilder(); + getEquipFieldBuilder(); + getSpecialEffectsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (heroBuilder_ == null) { + hero_ = com.ljsd.jieling.protocols.CommonProto.Hero.getDefaultInstance(); + } else { + heroBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (equipBuilder_ == null) { + equip_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + equipBuilder_.clear(); + } + if (specialEffectsBuilder_ == null) { + specialEffects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + specialEffectsBuilder_.clear(); + } + force_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.ljsd.jieling.protocols.PlayerInfoProto.internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_descriptor; + } + + public com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse getDefaultInstanceForType() { + return com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse.getDefaultInstance(); + } + + public com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse build() { + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse buildPartial() { + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse result = new com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (heroBuilder_ == null) { + result.hero_ = hero_; + } else { + result.hero_ = heroBuilder_.build(); + } + if (equipBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + equip_ = java.util.Collections.unmodifiableList(equip_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.equip_ = equip_; + } else { + result.equip_ = equipBuilder_.build(); + } + if (specialEffectsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + specialEffects_ = java.util.Collections.unmodifiableList(specialEffects_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.specialEffects_ = specialEffects_; + } else { + result.specialEffects_ = specialEffectsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000002; + } + result.force_ = force_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse) { + return mergeFrom((com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse other) { + if (other == com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse.getDefaultInstance()) return this; + if (other.hasHero()) { + mergeHero(other.getHero()); + } + if (equipBuilder_ == null) { + if (!other.equip_.isEmpty()) { + if (equip_.isEmpty()) { + equip_ = other.equip_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEquipIsMutable(); + equip_.addAll(other.equip_); + } + onChanged(); + } + } else { + if (!other.equip_.isEmpty()) { + if (equipBuilder_.isEmpty()) { + equipBuilder_.dispose(); + equipBuilder_ = null; + equip_ = other.equip_; + bitField0_ = (bitField0_ & ~0x00000002); + equipBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getEquipFieldBuilder() : null; + } else { + equipBuilder_.addAllMessages(other.equip_); + } + } + } + if (specialEffectsBuilder_ == null) { + if (!other.specialEffects_.isEmpty()) { + if (specialEffects_.isEmpty()) { + specialEffects_ = other.specialEffects_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSpecialEffectsIsMutable(); + specialEffects_.addAll(other.specialEffects_); + } + onChanged(); + } + } else { + if (!other.specialEffects_.isEmpty()) { + if (specialEffectsBuilder_.isEmpty()) { + specialEffectsBuilder_.dispose(); + specialEffectsBuilder_ = null; + specialEffects_ = other.specialEffects_; + bitField0_ = (bitField0_ & ~0x00000004); + specialEffectsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSpecialEffectsFieldBuilder() : null; + } else { + specialEffectsBuilder_.addAllMessages(other.specialEffects_); + } + } + } + if (other.hasForce()) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.ljsd.jieling.protocols.PlayerInfoProto.ViewHeroInfoResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .com.ljsd.jieling.protocols.Hero hero = 1; + private com.ljsd.jieling.protocols.CommonProto.Hero hero_ = com.ljsd.jieling.protocols.CommonProto.Hero.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.ljsd.jieling.protocols.CommonProto.Hero, com.ljsd.jieling.protocols.CommonProto.Hero.Builder, com.ljsd.jieling.protocols.CommonProto.HeroOrBuilder> heroBuilder_; + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public boolean hasHero() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public com.ljsd.jieling.protocols.CommonProto.Hero getHero() { + if (heroBuilder_ == null) { + return hero_; + } else { + return heroBuilder_.getMessage(); + } + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public Builder setHero(com.ljsd.jieling.protocols.CommonProto.Hero value) { + if (heroBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hero_ = value; + onChanged(); + } else { + heroBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public Builder setHero( + com.ljsd.jieling.protocols.CommonProto.Hero.Builder builderForValue) { + if (heroBuilder_ == null) { + hero_ = builderForValue.build(); + onChanged(); + } else { + heroBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public Builder mergeHero(com.ljsd.jieling.protocols.CommonProto.Hero value) { + if (heroBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + hero_ != com.ljsd.jieling.protocols.CommonProto.Hero.getDefaultInstance()) { + hero_ = + com.ljsd.jieling.protocols.CommonProto.Hero.newBuilder(hero_).mergeFrom(value).buildPartial(); + } else { + hero_ = value; + } + onChanged(); + } else { + heroBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public Builder clearHero() { + if (heroBuilder_ == null) { + hero_ = com.ljsd.jieling.protocols.CommonProto.Hero.getDefaultInstance(); + onChanged(); + } else { + heroBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public com.ljsd.jieling.protocols.CommonProto.Hero.Builder getHeroBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeroFieldBuilder().getBuilder(); + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + public com.ljsd.jieling.protocols.CommonProto.HeroOrBuilder getHeroOrBuilder() { + if (heroBuilder_ != null) { + return heroBuilder_.getMessageOrBuilder(); + } else { + return hero_; + } + } + /** + * optional .com.ljsd.jieling.protocols.Hero hero = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.ljsd.jieling.protocols.CommonProto.Hero, com.ljsd.jieling.protocols.CommonProto.Hero.Builder, com.ljsd.jieling.protocols.CommonProto.HeroOrBuilder> + getHeroFieldBuilder() { + if (heroBuilder_ == null) { + heroBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.ljsd.jieling.protocols.CommonProto.Hero, com.ljsd.jieling.protocols.CommonProto.Hero.Builder, com.ljsd.jieling.protocols.CommonProto.HeroOrBuilder>( + hero_, + getParentForChildren(), + isClean()); + hero_ = null; + } + return heroBuilder_; + } + + // repeated .com.ljsd.jieling.protocols.Equip equip = 2; + private java.util.List equip_ = + java.util.Collections.emptyList(); + private void ensureEquipIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + equip_ = new java.util.ArrayList(equip_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.ljsd.jieling.protocols.CommonProto.Equip, com.ljsd.jieling.protocols.CommonProto.Equip.Builder, com.ljsd.jieling.protocols.CommonProto.EquipOrBuilder> equipBuilder_; + + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public java.util.List getEquipList() { + if (equipBuilder_ == null) { + return java.util.Collections.unmodifiableList(equip_); + } else { + return equipBuilder_.getMessageList(); + } + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public int getEquipCount() { + if (equipBuilder_ == null) { + return equip_.size(); + } else { + return equipBuilder_.getCount(); + } + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.Equip getEquip(int index) { + if (equipBuilder_ == null) { + return equip_.get(index); + } else { + return equipBuilder_.getMessage(index); + } + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public Builder setEquip( + int index, com.ljsd.jieling.protocols.CommonProto.Equip value) { + if (equipBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEquipIsMutable(); + equip_.set(index, value); + onChanged(); + } else { + equipBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public Builder setEquip( + int index, com.ljsd.jieling.protocols.CommonProto.Equip.Builder builderForValue) { + if (equipBuilder_ == null) { + ensureEquipIsMutable(); + equip_.set(index, builderForValue.build()); + onChanged(); + } else { + equipBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public Builder addEquip(com.ljsd.jieling.protocols.CommonProto.Equip value) { + if (equipBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEquipIsMutable(); + equip_.add(value); + onChanged(); + } else { + equipBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public Builder addEquip( + int index, com.ljsd.jieling.protocols.CommonProto.Equip value) { + if (equipBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEquipIsMutable(); + equip_.add(index, value); + onChanged(); + } else { + equipBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public Builder addEquip( + com.ljsd.jieling.protocols.CommonProto.Equip.Builder builderForValue) { + if (equipBuilder_ == null) { + ensureEquipIsMutable(); + equip_.add(builderForValue.build()); + onChanged(); + } else { + equipBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public Builder addEquip( + int index, com.ljsd.jieling.protocols.CommonProto.Equip.Builder builderForValue) { + if (equipBuilder_ == null) { + ensureEquipIsMutable(); + equip_.add(index, builderForValue.build()); + onChanged(); + } else { + equipBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public Builder addAllEquip( + java.lang.Iterable values) { + if (equipBuilder_ == null) { + ensureEquipIsMutable(); + super.addAll(values, equip_); + onChanged(); + } else { + equipBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public Builder clearEquip() { + if (equipBuilder_ == null) { + equip_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + equipBuilder_.clear(); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public Builder removeEquip(int index) { + if (equipBuilder_ == null) { + ensureEquipIsMutable(); + equip_.remove(index); + onChanged(); + } else { + equipBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.Equip.Builder getEquipBuilder( + int index) { + return getEquipFieldBuilder().getBuilder(index); + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.EquipOrBuilder getEquipOrBuilder( + int index) { + if (equipBuilder_ == null) { + return equip_.get(index); } else { + return equipBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public java.util.List + getEquipOrBuilderList() { + if (equipBuilder_ != null) { + return equipBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(equip_); + } + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.Equip.Builder addEquipBuilder() { + return getEquipFieldBuilder().addBuilder( + com.ljsd.jieling.protocols.CommonProto.Equip.getDefaultInstance()); + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.Equip.Builder addEquipBuilder( + int index) { + return getEquipFieldBuilder().addBuilder( + index, com.ljsd.jieling.protocols.CommonProto.Equip.getDefaultInstance()); + } + /** + * repeated .com.ljsd.jieling.protocols.Equip equip = 2; + * + *
+       * 英雄所穿装备、法宝、魂印
+       * 
+ */ + public java.util.List + getEquipBuilderList() { + return getEquipFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.ljsd.jieling.protocols.CommonProto.Equip, com.ljsd.jieling.protocols.CommonProto.Equip.Builder, com.ljsd.jieling.protocols.CommonProto.EquipOrBuilder> + getEquipFieldBuilder() { + if (equipBuilder_ == null) { + equipBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.ljsd.jieling.protocols.CommonProto.Equip, com.ljsd.jieling.protocols.CommonProto.Equip.Builder, com.ljsd.jieling.protocols.CommonProto.EquipOrBuilder>( + equip_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + equip_ = null; + } + return equipBuilder_; + } + + // repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + private java.util.List specialEffects_ = + java.util.Collections.emptyList(); + private void ensureSpecialEffectsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + specialEffects_ = new java.util.ArrayList(specialEffects_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.ljsd.jieling.protocols.CommonProto.SpecialEffects, com.ljsd.jieling.protocols.CommonProto.SpecialEffects.Builder, com.ljsd.jieling.protocols.CommonProto.SpecialEffectsOrBuilder> specialEffectsBuilder_; + + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public java.util.List getSpecialEffectsList() { + if (specialEffectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(specialEffects_); + } else { + return specialEffectsBuilder_.getMessageList(); + } + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public int getSpecialEffectsCount() { + if (specialEffectsBuilder_ == null) { + return specialEffects_.size(); + } else { + return specialEffectsBuilder_.getCount(); + } + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.SpecialEffects getSpecialEffects(int index) { + if (specialEffectsBuilder_ == null) { + return specialEffects_.get(index); + } else { + return specialEffectsBuilder_.getMessage(index); + } + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public Builder setSpecialEffects( + int index, com.ljsd.jieling.protocols.CommonProto.SpecialEffects value) { + if (specialEffectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialEffectsIsMutable(); + specialEffects_.set(index, value); + onChanged(); + } else { + specialEffectsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public Builder setSpecialEffects( + int index, com.ljsd.jieling.protocols.CommonProto.SpecialEffects.Builder builderForValue) { + if (specialEffectsBuilder_ == null) { + ensureSpecialEffectsIsMutable(); + specialEffects_.set(index, builderForValue.build()); + onChanged(); + } else { + specialEffectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public Builder addSpecialEffects(com.ljsd.jieling.protocols.CommonProto.SpecialEffects value) { + if (specialEffectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialEffectsIsMutable(); + specialEffects_.add(value); + onChanged(); + } else { + specialEffectsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public Builder addSpecialEffects( + int index, com.ljsd.jieling.protocols.CommonProto.SpecialEffects value) { + if (specialEffectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialEffectsIsMutable(); + specialEffects_.add(index, value); + onChanged(); + } else { + specialEffectsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public Builder addSpecialEffects( + com.ljsd.jieling.protocols.CommonProto.SpecialEffects.Builder builderForValue) { + if (specialEffectsBuilder_ == null) { + ensureSpecialEffectsIsMutable(); + specialEffects_.add(builderForValue.build()); + onChanged(); + } else { + specialEffectsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public Builder addSpecialEffects( + int index, com.ljsd.jieling.protocols.CommonProto.SpecialEffects.Builder builderForValue) { + if (specialEffectsBuilder_ == null) { + ensureSpecialEffectsIsMutable(); + specialEffects_.add(index, builderForValue.build()); + onChanged(); + } else { + specialEffectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public Builder addAllSpecialEffects( + java.lang.Iterable values) { + if (specialEffectsBuilder_ == null) { + ensureSpecialEffectsIsMutable(); + super.addAll(values, specialEffects_); + onChanged(); + } else { + specialEffectsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public Builder clearSpecialEffects() { + if (specialEffectsBuilder_ == null) { + specialEffects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + specialEffectsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public Builder removeSpecialEffects(int index) { + if (specialEffectsBuilder_ == null) { + ensureSpecialEffectsIsMutable(); + specialEffects_.remove(index); + onChanged(); + } else { + specialEffectsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.SpecialEffects.Builder getSpecialEffectsBuilder( + int index) { + return getSpecialEffectsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.SpecialEffectsOrBuilder getSpecialEffectsOrBuilder( + int index) { + if (specialEffectsBuilder_ == null) { + return specialEffects_.get(index); } else { + return specialEffectsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public java.util.List + getSpecialEffectsOrBuilderList() { + if (specialEffectsBuilder_ != null) { + return specialEffectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(specialEffects_); + } + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.SpecialEffects.Builder addSpecialEffectsBuilder() { + return getSpecialEffectsFieldBuilder().addBuilder( + com.ljsd.jieling.protocols.CommonProto.SpecialEffects.getDefaultInstance()); + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public com.ljsd.jieling.protocols.CommonProto.SpecialEffects.Builder addSpecialEffectsBuilder( + int index) { + return getSpecialEffectsFieldBuilder().addBuilder( + index, com.ljsd.jieling.protocols.CommonProto.SpecialEffects.getDefaultInstance()); + } + /** + * repeated .com.ljsd.jieling.protocols.SpecialEffects SpecialEffects = 3; + * + *
+       *属性信息
+       * 
+ */ + public java.util.List + getSpecialEffectsBuilderList() { + return getSpecialEffectsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.ljsd.jieling.protocols.CommonProto.SpecialEffects, com.ljsd.jieling.protocols.CommonProto.SpecialEffects.Builder, com.ljsd.jieling.protocols.CommonProto.SpecialEffectsOrBuilder> + getSpecialEffectsFieldBuilder() { + if (specialEffectsBuilder_ == null) { + specialEffectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.ljsd.jieling.protocols.CommonProto.SpecialEffects, com.ljsd.jieling.protocols.CommonProto.SpecialEffects.Builder, com.ljsd.jieling.protocols.CommonProto.SpecialEffectsOrBuilder>( + specialEffects_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + specialEffects_ = null; + } + return specialEffectsBuilder_; + } + + // optional int32 force = 4; + private int force_ ; + /** + * optional int32 force = 4; + * + *
+       *战力
+       * 
+ */ + public boolean hasForce() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 force = 4; + * + *
+       *战力
+       * 
+ */ + public int getForce() { + return force_; + } + /** + * optional int32 force = 4; + * + *
+       *战力
+       * 
+ */ + public Builder setForce(int value) { + bitField0_ |= 0x00000008; + force_ = value; + onChanged(); + return this; + } + /** + * optional int32 force = 4; + * + *
+       *战力
+       * 
+ */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000008); + force_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.ljsd.jieling.protocols.ViewHeroInfoResponse) + } + + static { + defaultInstance = new ViewHeroInfoResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.ljsd.jieling.protocols.ViewHeroInfoResponse) + } + private static com.google.protobuf.Descriptors.Descriptor internal_static_com_ljsd_jieling_protocols_ErrorMsgResponse_descriptor; private static @@ -84958,6 +87126,16 @@ public final class PlayerInfoProto { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_ljsd_jieling_protocols_MailDelRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -85235,7 +87413,13 @@ public final class PlayerInfoProto { "sks\030\001 \003(\0132\'.com.ljsd.jieling.protocols.R" + "efreshTask\"*\n\031TreasureLevelUpIndication\022" + "\r\n\005level\030\001 \001(\005\" \n\016MailDelRequest\022\016\n\006mail" + - "Id\030\001 \003(\tB\002H\001" + "Id\030\001 \003(\t\"8\n\023ViewHeroInfoRequest\022\021\n\ttarge" + + "tUid\030\001 \001(\005\022\016\n\006heroId\030\002 \001(\t\"\313\001\n\024ViewHeroI", + "nfoResponse\022.\n\004hero\030\001 \001(\0132 .com.ljsd.jie" + + "ling.protocols.Hero\0220\n\005equip\030\002 \003(\0132!.com" + + ".ljsd.jieling.protocols.Equip\022B\n\016Special" + + "Effects\030\003 \003(\0132*.com.ljsd.jieling.protoco" + + "ls.SpecialEffects\022\r\n\005force\030\004 \001(\005B\002H\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -85974,6 +88158,18 @@ public final class PlayerInfoProto { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_ljsd_jieling_protocols_MailDelRequest_descriptor, new java.lang.String[] { "MailId", }); + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(122); + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoRequest_descriptor, + new java.lang.String[] { "TargetUid", "HeroId", }); + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_descriptor = + getDescriptor().getMessageTypes().get(123); + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_ljsd_jieling_protocols_ViewHeroInfoResponse_descriptor, + new java.lang.String[] { "Hero", "Equip", "SpecialEffects", "Force", }); return null; } }; diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java index 547dd8c70..db4cfd652 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/map/MapLogic.java @@ -1765,7 +1765,7 @@ public class MapLogic { if (hero == null) { continue; } - heroForces += HeroLogic.getInstance().calHeoForce(user, hero, true); + heroForces += HeroLogic.getInstance().calHeoForce(user, hero); crossInfo.getHeroIds().add(hero.getTemplateId()); } diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/player/ViewHeroInfoHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/player/ViewHeroInfoHandler.java new file mode 100644 index 000000000..f35788f59 --- /dev/null +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/player/ViewHeroInfoHandler.java @@ -0,0 +1,19 @@ +package com.ljsd.jieling.handler.player; + +import com.ljsd.jieling.handler.BaseHandler; +import com.ljsd.jieling.logic.player.PlayerLogic; +import com.ljsd.jieling.network.session.ISession; +import com.ljsd.jieling.protocols.MessageTypeProto; +import com.ljsd.jieling.protocols.PlayerInfoProto; + +public class ViewHeroInfoHandler extends BaseHandler { + @Override + public MessageTypeProto.MessageType getMessageCode() { + return MessageTypeProto.MessageType.VIEW_HERO_INFO_REQUEST; + } + + @Override + public void processWithProto(ISession iSession, PlayerInfoProto.ViewHeroInfoRequest proto) throws Exception { + PlayerLogic.getInstance().viewHeroInfo(iSession,proto.getTargetUid(),proto.getHeroId()); + } +} diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java index e8e615fd7..98748105e 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java @@ -1300,7 +1300,7 @@ public class HeroLogic { } - public int calHeoForce(User user, Hero hero,boolean isMyself){ + public int calHeoForce(User user, Hero hero){ Map heroAllAttribute; heroAllAttribute = calHeroNotBufferAttribute(user, hero,true,0); //战力保存 @@ -1309,7 +1309,7 @@ public class HeroLogic { } - private int calForce( Map heroAllAttribute ){ + public int calForce( Map heroAllAttribute ){ double result = 0; for(Map.Entry item : heroAllAttribute.entrySet()){ Integer propertyId = item.getKey(); @@ -1806,7 +1806,7 @@ public class HeroLogic { if (hero == null) { continue; } - totalForce +=calHeoForce(targetUser, hero,isMyself); + totalForce +=calHeoForce(targetUser, hero); } return totalForce; } @@ -2054,7 +2054,7 @@ public class HeroLogic { for(TeamPosHeroInfo teamPosHeroInfo: teamPosHeroInfoList){ String heroId = teamPosHeroInfo.getHeroId(); Hero hero = heroMap.get(heroId); - heroPosMap.put(teamPosHeroInfo.getPosition(),calHeoForce(user,hero,false)); + heroPosMap.put(teamPosHeroInfo.getPosition(),calHeoForce(user,hero)); } for(int i=1;i<6;i++){ Integer force = heroPosMap.get(i); diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java index 5ad519b90..123c0b41d 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java @@ -35,6 +35,7 @@ import manager.STableManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import util.MathUtils; +import util.StringUtil; import util.TimeUtils; import java.util.*; @@ -470,6 +471,40 @@ public class PlayerLogic { } + public void viewHeroInfo(ISession session,int uid,String heroId) throws Exception { + User userInMem = UserManager.getUserInMem(uid); + int resMsgId = MessageTypeProto.MessageType.VIEW_HERO_INFO_RESPONSE_VALUE; + if(userInMem == null){ + MessageUtil.sendErrorResponse(session,0,resMsgId,"not allowed"); + return; + } + Hero hero = userInMem.getHeroManager().getHeroMap().get(heroId); + if(hero == null){ + MessageUtil.sendErrorResponse(session,0,resMsgId,"hero no"); + return; + } + PlayerInfoProto.ViewHeroInfoResponse.Builder builder = PlayerInfoProto.ViewHeroInfoResponse.newBuilder(); + Map heroNotBufferAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(userInMem, hero, true, 0); + for(Map.Entry item : heroNotBufferAttribute.entrySet()){ + builder.addSpecialEffects(CommonProto.SpecialEffects.newBuilder().setPropertyId(item.getKey()).setPropertyValue(item.getValue()).build()); + } + EquipManager equipManager = userInMem.getEquipManager(); + Map equipMap = equipManager.getEquipMap(); + for(String equipId : hero.getEquipByPositionMap().values()){ + builder.addEquip(CBean2Proto.getEquipProto(equipMap.get(equipId))); + } + Map soulEquipMap = equipManager.getSoulEquipMap(); + for(String equipId : hero.getSoulEquipByPositionMap().values()){ + builder.addEquip(CBean2Proto.getEquipProto(soulEquipMap.get(equipId))); + } + String especialEquip = hero.getEspecialEquip(); + if(!StringUtil.isEmpty(especialEquip)){ + builder.addEquip(CBean2Proto.getEquipProto(equipManager.getEspecialEquipMap().get(especialEquip))); + } + builder.setForce(HeroLogic.getInstance().calForce(heroNotBufferAttribute)); + MessageUtil.sendMessage(session,1,resMsgId,builder.build(),true); + } + public void takeSevenScoreReward(ISession iSession) throws Exception { User user = UserManager.getUser(iSession.getUid()); int msgId = MessageTypeProto.MessageType.TAKE_SEVEN_HAPPY_REWARD_RESPONSE_VALUE;