mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-18 00:04:36 +01:00
Make a config option for setting server friend info
This commit is contained in:
@@ -39,6 +39,11 @@ public final class SimpleInfoOuterClass {
|
|||||||
*/
|
*/
|
||||||
private int uid;
|
private int uid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 chat_bubble_id = 13;</code>
|
||||||
|
*/
|
||||||
|
private int chatBubbleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .PlatformType platform_type = 7;</code>
|
* <code>optional .PlatformType platform_type = 7;</code>
|
||||||
*/
|
*/
|
||||||
@@ -222,12 +227,49 @@ public final class SimpleInfoOuterClass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 chat_bubble_id = 13;</code>
|
||||||
|
* @return whether the chatBubbleId field is set
|
||||||
|
*/
|
||||||
|
public boolean hasChatBubbleId() {
|
||||||
|
return (bitField0_ & 0x00000010) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 chat_bubble_id = 13;</code>
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SimpleInfo clearChatBubbleId() {
|
||||||
|
bitField0_ &= ~0x00000010;
|
||||||
|
chatBubbleId = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 chat_bubble_id = 13;</code>
|
||||||
|
* @return the chatBubbleId
|
||||||
|
*/
|
||||||
|
public int getChatBubbleId() {
|
||||||
|
return chatBubbleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional uint32 chat_bubble_id = 13;</code>
|
||||||
|
* @param value the chatBubbleId to set
|
||||||
|
* @return this
|
||||||
|
*/
|
||||||
|
public SimpleInfo setChatBubbleId(final int value) {
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
chatBubbleId = value;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .PlatformType platform_type = 7;</code>
|
* <code>optional .PlatformType platform_type = 7;</code>
|
||||||
* @return whether the platformType field is set
|
* @return whether the platformType field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasPlatformType() {
|
public boolean hasPlatformType() {
|
||||||
return (bitField0_ & 0x00000010) != 0;
|
return (bitField0_ & 0x00000020) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -235,7 +277,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo clearPlatformType() {
|
public SimpleInfo clearPlatformType() {
|
||||||
bitField0_ &= ~0x00000010;
|
bitField0_ &= ~0x00000020;
|
||||||
platformType = 0;
|
platformType = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -268,7 +310,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo setPlatformTypeValue(final int value) {
|
public SimpleInfo setPlatformTypeValue(final int value) {
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000020;
|
||||||
platformType = value;
|
platformType = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -279,7 +321,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo setPlatformType(final PlatformTypeOuterClass.PlatformType value) {
|
public SimpleInfo setPlatformType(final PlatformTypeOuterClass.PlatformType value) {
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000020;
|
||||||
platformType = value.getNumber();
|
platformType = value.getNumber();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -289,7 +331,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return whether the onlineStatus field is set
|
* @return whether the onlineStatus field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasOnlineStatus() {
|
public boolean hasOnlineStatus() {
|
||||||
return (bitField0_ & 0x00000020) != 0;
|
return (bitField0_ & 0x00000040) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -297,7 +339,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo clearOnlineStatus() {
|
public SimpleInfo clearOnlineStatus() {
|
||||||
bitField0_ &= ~0x00000020;
|
bitField0_ &= ~0x00000040;
|
||||||
onlineStatus = 0;
|
onlineStatus = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -330,7 +372,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo setOnlineStatusValue(final int value) {
|
public SimpleInfo setOnlineStatusValue(final int value) {
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000040;
|
||||||
onlineStatus = value;
|
onlineStatus = value;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -341,7 +383,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo setOnlineStatus(final FriendOnlineStatusOuterClass.FriendOnlineStatus value) {
|
public SimpleInfo setOnlineStatus(final FriendOnlineStatusOuterClass.FriendOnlineStatus value) {
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000040;
|
||||||
onlineStatus = value.getNumber();
|
onlineStatus = value.getNumber();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -351,7 +393,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return whether the simpleAvatarInfo field is set
|
* @return whether the simpleAvatarInfo field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasSimpleAvatarInfo() {
|
public boolean hasSimpleAvatarInfo() {
|
||||||
return (bitField0_ & 0x00000040) != 0;
|
return (bitField0_ & 0x00000080) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -359,7 +401,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo clearSimpleAvatarInfo() {
|
public SimpleInfo clearSimpleAvatarInfo() {
|
||||||
bitField0_ &= ~0x00000040;
|
bitField0_ &= ~0x00000080;
|
||||||
simpleAvatarInfo.clear();
|
simpleAvatarInfo.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -388,7 +430,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return internal storage object for modifications
|
* @return internal storage object for modifications
|
||||||
*/
|
*/
|
||||||
public SimpleAvatarInfoOuterClass.SimpleAvatarInfo getMutableSimpleAvatarInfo() {
|
public SimpleAvatarInfoOuterClass.SimpleAvatarInfo getMutableSimpleAvatarInfo() {
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000080;
|
||||||
return simpleAvatarInfo;
|
return simpleAvatarInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +440,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo setSimpleAvatarInfo(final SimpleAvatarInfoOuterClass.SimpleAvatarInfo value) {
|
public SimpleInfo setSimpleAvatarInfo(final SimpleAvatarInfoOuterClass.SimpleAvatarInfo value) {
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000080;
|
||||||
simpleAvatarInfo.copyFrom(value);
|
simpleAvatarInfo.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -408,7 +450,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return whether the nickname field is set
|
* @return whether the nickname field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasNickname() {
|
public boolean hasNickname() {
|
||||||
return (bitField0_ & 0x00000080) != 0;
|
return (bitField0_ & 0x00000100) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -416,7 +458,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo clearNickname() {
|
public SimpleInfo clearNickname() {
|
||||||
bitField0_ &= ~0x00000080;
|
bitField0_ &= ~0x00000100;
|
||||||
nickname.clear();
|
nickname.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -442,7 +484,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return internal {@code Utf8String} representation of nickname for modifications
|
* @return internal {@code Utf8String} representation of nickname for modifications
|
||||||
*/
|
*/
|
||||||
public Utf8String getMutableNicknameBytes() {
|
public Utf8String getMutableNicknameBytes() {
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
return this.nickname;
|
return this.nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -452,7 +494,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo setNickname(final CharSequence value) {
|
public SimpleInfo setNickname(final CharSequence value) {
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
nickname.copyFrom(value);
|
nickname.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -463,7 +505,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo setNickname(final Utf8String value) {
|
public SimpleInfo setNickname(final Utf8String value) {
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
nickname.copyFrom(value);
|
nickname.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -473,7 +515,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return whether the signature field is set
|
* @return whether the signature field is set
|
||||||
*/
|
*/
|
||||||
public boolean hasSignature() {
|
public boolean hasSignature() {
|
||||||
return (bitField0_ & 0x00000100) != 0;
|
return (bitField0_ & 0x00000200) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -481,7 +523,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo clearSignature() {
|
public SimpleInfo clearSignature() {
|
||||||
bitField0_ &= ~0x00000100;
|
bitField0_ &= ~0x00000200;
|
||||||
signature.clear();
|
signature.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -507,7 +549,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return internal {@code Utf8String} representation of signature for modifications
|
* @return internal {@code Utf8String} representation of signature for modifications
|
||||||
*/
|
*/
|
||||||
public Utf8String getMutableSignatureBytes() {
|
public Utf8String getMutableSignatureBytes() {
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
return this.signature;
|
return this.signature;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -517,7 +559,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo setSignature(final CharSequence value) {
|
public SimpleInfo setSignature(final CharSequence value) {
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
signature.copyFrom(value);
|
signature.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -528,7 +570,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public SimpleInfo setSignature(final Utf8String value) {
|
public SimpleInfo setSignature(final Utf8String value) {
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
signature.copyFrom(value);
|
signature.copyFrom(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -542,6 +584,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
level = other.level;
|
level = other.level;
|
||||||
headIcon = other.headIcon;
|
headIcon = other.headIcon;
|
||||||
uid = other.uid;
|
uid = other.uid;
|
||||||
|
chatBubbleId = other.chatBubbleId;
|
||||||
platformType = other.platformType;
|
platformType = other.platformType;
|
||||||
onlineStatus = other.onlineStatus;
|
onlineStatus = other.onlineStatus;
|
||||||
simpleAvatarInfo.copyFrom(other.simpleAvatarInfo);
|
simpleAvatarInfo.copyFrom(other.simpleAvatarInfo);
|
||||||
@@ -569,6 +612,9 @@ public final class SimpleInfoOuterClass {
|
|||||||
if (other.hasUid()) {
|
if (other.hasUid()) {
|
||||||
setUid(other.uid);
|
setUid(other.uid);
|
||||||
}
|
}
|
||||||
|
if (other.hasChatBubbleId()) {
|
||||||
|
setChatBubbleId(other.chatBubbleId);
|
||||||
|
}
|
||||||
if (other.hasPlatformType()) {
|
if (other.hasPlatformType()) {
|
||||||
setPlatformTypeValue(other.platformType);
|
setPlatformTypeValue(other.platformType);
|
||||||
}
|
}
|
||||||
@@ -598,6 +644,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
level = 0;
|
level = 0;
|
||||||
headIcon = 0;
|
headIcon = 0;
|
||||||
uid = 0;
|
uid = 0;
|
||||||
|
chatBubbleId = 0;
|
||||||
platformType = 0;
|
platformType = 0;
|
||||||
onlineStatus = 0;
|
onlineStatus = 0;
|
||||||
simpleAvatarInfo.clear();
|
simpleAvatarInfo.clear();
|
||||||
@@ -633,6 +680,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
&& (!hasLevel() || level == other.level)
|
&& (!hasLevel() || level == other.level)
|
||||||
&& (!hasHeadIcon() || headIcon == other.headIcon)
|
&& (!hasHeadIcon() || headIcon == other.headIcon)
|
||||||
&& (!hasUid() || uid == other.uid)
|
&& (!hasUid() || uid == other.uid)
|
||||||
|
&& (!hasChatBubbleId() || chatBubbleId == other.chatBubbleId)
|
||||||
&& (!hasPlatformType() || platformType == other.platformType)
|
&& (!hasPlatformType() || platformType == other.platformType)
|
||||||
&& (!hasOnlineStatus() || onlineStatus == other.onlineStatus)
|
&& (!hasOnlineStatus() || onlineStatus == other.onlineStatus)
|
||||||
&& (!hasSimpleAvatarInfo() || simpleAvatarInfo.equals(other.simpleAvatarInfo))
|
&& (!hasSimpleAvatarInfo() || simpleAvatarInfo.equals(other.simpleAvatarInfo))
|
||||||
@@ -659,22 +707,26 @@ public final class SimpleInfoOuterClass {
|
|||||||
output.writeUInt32NoTag(uid);
|
output.writeUInt32NoTag(uid);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000010) != 0) {
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
|
output.writeRawByte((byte) 104);
|
||||||
|
output.writeUInt32NoTag(chatBubbleId);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
output.writeRawByte((byte) 56);
|
output.writeRawByte((byte) 56);
|
||||||
output.writeEnumNoTag(platformType);
|
output.writeEnumNoTag(platformType);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000020) != 0) {
|
if ((bitField0_ & 0x00000040) != 0) {
|
||||||
output.writeRawByte((byte) 120);
|
output.writeRawByte((byte) 120);
|
||||||
output.writeEnumNoTag(onlineStatus);
|
output.writeEnumNoTag(onlineStatus);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000040) != 0) {
|
if ((bitField0_ & 0x00000080) != 0) {
|
||||||
output.writeRawByte((byte) 26);
|
output.writeRawByte((byte) 26);
|
||||||
output.writeMessageNoTag(simpleAvatarInfo);
|
output.writeMessageNoTag(simpleAvatarInfo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000080) != 0) {
|
if ((bitField0_ & 0x00000100) != 0) {
|
||||||
output.writeRawByte((byte) 34);
|
output.writeRawByte((byte) 34);
|
||||||
output.writeStringNoTag(nickname);
|
output.writeStringNoTag(nickname);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000100) != 0) {
|
if ((bitField0_ & 0x00000200) != 0) {
|
||||||
output.writeRawByte((byte) 74);
|
output.writeRawByte((byte) 74);
|
||||||
output.writeStringNoTag(signature);
|
output.writeStringNoTag(signature);
|
||||||
}
|
}
|
||||||
@@ -696,18 +748,21 @@ public final class SimpleInfoOuterClass {
|
|||||||
size += 1 + ProtoSink.computeUInt32SizeNoTag(uid);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(uid);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000010) != 0) {
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
size += 1 + ProtoSink.computeEnumSizeNoTag(platformType);
|
size += 1 + ProtoSink.computeUInt32SizeNoTag(chatBubbleId);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000020) != 0) {
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
size += 1 + ProtoSink.computeEnumSizeNoTag(onlineStatus);
|
size += 1 + ProtoSink.computeEnumSizeNoTag(platformType);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000040) != 0) {
|
if ((bitField0_ & 0x00000040) != 0) {
|
||||||
size += 1 + ProtoSink.computeMessageSizeNoTag(simpleAvatarInfo);
|
size += 1 + ProtoSink.computeEnumSizeNoTag(onlineStatus);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000080) != 0) {
|
if ((bitField0_ & 0x00000080) != 0) {
|
||||||
size += 1 + ProtoSink.computeStringSizeNoTag(nickname);
|
size += 1 + ProtoSink.computeMessageSizeNoTag(simpleAvatarInfo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000100) != 0) {
|
if ((bitField0_ & 0x00000100) != 0) {
|
||||||
|
size += 1 + ProtoSink.computeStringSizeNoTag(nickname);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000200) != 0) {
|
||||||
size += 1 + ProtoSink.computeStringSizeNoTag(signature);
|
size += 1 + ProtoSink.computeStringSizeNoTag(signature);
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
@@ -752,6 +807,15 @@ public final class SimpleInfoOuterClass {
|
|||||||
uid = input.readUInt32();
|
uid = input.readUInt32();
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000008;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
|
if (tag != 104) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 104: {
|
||||||
|
// chatBubbleId
|
||||||
|
chatBubbleId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
tag = input.readTag();
|
||||||
if (tag != 56) {
|
if (tag != 56) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -761,7 +825,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
final int value = input.readInt32();
|
final int value = input.readInt32();
|
||||||
if (PlatformTypeOuterClass.PlatformType.forNumber(value) != null) {
|
if (PlatformTypeOuterClass.PlatformType.forNumber(value) != null) {
|
||||||
platformType = value;
|
platformType = value;
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000020;
|
||||||
}
|
}
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 120) {
|
if (tag != 120) {
|
||||||
@@ -773,7 +837,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
final int value = input.readInt32();
|
final int value = input.readInt32();
|
||||||
if (FriendOnlineStatusOuterClass.FriendOnlineStatus.forNumber(value) != null) {
|
if (FriendOnlineStatusOuterClass.FriendOnlineStatus.forNumber(value) != null) {
|
||||||
onlineStatus = value;
|
onlineStatus = value;
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000040;
|
||||||
}
|
}
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 26) {
|
if (tag != 26) {
|
||||||
@@ -783,7 +847,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
case 26: {
|
case 26: {
|
||||||
// simpleAvatarInfo
|
// simpleAvatarInfo
|
||||||
input.readMessage(simpleAvatarInfo);
|
input.readMessage(simpleAvatarInfo);
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000080;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 34) {
|
if (tag != 34) {
|
||||||
break;
|
break;
|
||||||
@@ -792,7 +856,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
case 34: {
|
case 34: {
|
||||||
// nickname
|
// nickname
|
||||||
input.readString(nickname);
|
input.readString(nickname);
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 74) {
|
if (tag != 74) {
|
||||||
break;
|
break;
|
||||||
@@ -801,7 +865,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
case 74: {
|
case 74: {
|
||||||
// signature
|
// signature
|
||||||
input.readString(signature);
|
input.readString(signature);
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
tag = input.readTag();
|
tag = input.readTag();
|
||||||
if (tag != 0) {
|
if (tag != 0) {
|
||||||
break;
|
break;
|
||||||
@@ -837,18 +901,21 @@ public final class SimpleInfoOuterClass {
|
|||||||
output.writeUInt32(FieldNames.uid, uid);
|
output.writeUInt32(FieldNames.uid, uid);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000010) != 0) {
|
if ((bitField0_ & 0x00000010) != 0) {
|
||||||
output.writeEnum(FieldNames.platformType, platformType, PlatformTypeOuterClass.PlatformType.converter());
|
output.writeUInt32(FieldNames.chatBubbleId, chatBubbleId);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000020) != 0) {
|
if ((bitField0_ & 0x00000020) != 0) {
|
||||||
output.writeEnum(FieldNames.onlineStatus, onlineStatus, FriendOnlineStatusOuterClass.FriendOnlineStatus.converter());
|
output.writeEnum(FieldNames.platformType, platformType, PlatformTypeOuterClass.PlatformType.converter());
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000040) != 0) {
|
if ((bitField0_ & 0x00000040) != 0) {
|
||||||
output.writeMessage(FieldNames.simpleAvatarInfo, simpleAvatarInfo);
|
output.writeEnum(FieldNames.onlineStatus, onlineStatus, FriendOnlineStatusOuterClass.FriendOnlineStatus.converter());
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000080) != 0) {
|
if ((bitField0_ & 0x00000080) != 0) {
|
||||||
output.writeString(FieldNames.nickname, nickname);
|
output.writeMessage(FieldNames.simpleAvatarInfo, simpleAvatarInfo);
|
||||||
}
|
}
|
||||||
if ((bitField0_ & 0x00000100) != 0) {
|
if ((bitField0_ & 0x00000100) != 0) {
|
||||||
|
output.writeString(FieldNames.nickname, nickname);
|
||||||
|
}
|
||||||
|
if ((bitField0_ & 0x00000200) != 0) {
|
||||||
output.writeString(FieldNames.signature, signature);
|
output.writeString(FieldNames.signature, signature);
|
||||||
}
|
}
|
||||||
output.endObject();
|
output.endObject();
|
||||||
@@ -907,6 +974,18 @@ public final class SimpleInfoOuterClass {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case -678761921:
|
||||||
|
case 1892426119: {
|
||||||
|
if (input.isAtField(FieldNames.chatBubbleId)) {
|
||||||
|
if (!input.trySkipNullValue()) {
|
||||||
|
chatBubbleId = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
input.skipUnknownField();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 155581005:
|
case 155581005:
|
||||||
case 538062726: {
|
case 538062726: {
|
||||||
if (input.isAtField(FieldNames.platformType)) {
|
if (input.isAtField(FieldNames.platformType)) {
|
||||||
@@ -914,7 +993,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
final PlatformTypeOuterClass.PlatformType value = input.readEnum(PlatformTypeOuterClass.PlatformType.converter());
|
final PlatformTypeOuterClass.PlatformType value = input.readEnum(PlatformTypeOuterClass.PlatformType.converter());
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
platformType = value.getNumber();
|
platformType = value.getNumber();
|
||||||
bitField0_ |= 0x00000010;
|
bitField0_ |= 0x00000020;
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownEnumValue();
|
input.skipUnknownEnumValue();
|
||||||
}
|
}
|
||||||
@@ -931,7 +1010,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
final FriendOnlineStatusOuterClass.FriendOnlineStatus value = input.readEnum(FriendOnlineStatusOuterClass.FriendOnlineStatus.converter());
|
final FriendOnlineStatusOuterClass.FriendOnlineStatus value = input.readEnum(FriendOnlineStatusOuterClass.FriendOnlineStatus.converter());
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
onlineStatus = value.getNumber();
|
onlineStatus = value.getNumber();
|
||||||
bitField0_ |= 0x00000020;
|
bitField0_ |= 0x00000040;
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownEnumValue();
|
input.skipUnknownEnumValue();
|
||||||
}
|
}
|
||||||
@@ -946,7 +1025,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
if (input.isAtField(FieldNames.simpleAvatarInfo)) {
|
if (input.isAtField(FieldNames.simpleAvatarInfo)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readMessage(simpleAvatarInfo);
|
input.readMessage(simpleAvatarInfo);
|
||||||
bitField0_ |= 0x00000040;
|
bitField0_ |= 0x00000080;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -957,7 +1036,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
if (input.isAtField(FieldNames.nickname)) {
|
if (input.isAtField(FieldNames.nickname)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readString(nickname);
|
input.readString(nickname);
|
||||||
bitField0_ |= 0x00000080;
|
bitField0_ |= 0x00000100;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -968,7 +1047,7 @@ public final class SimpleInfoOuterClass {
|
|||||||
if (input.isAtField(FieldNames.signature)) {
|
if (input.isAtField(FieldNames.signature)) {
|
||||||
if (!input.trySkipNullValue()) {
|
if (!input.trySkipNullValue()) {
|
||||||
input.readString(signature);
|
input.readString(signature);
|
||||||
bitField0_ |= 0x00000100;
|
bitField0_ |= 0x00000200;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input.skipUnknownField();
|
input.skipUnknownField();
|
||||||
@@ -1035,6 +1114,8 @@ public final class SimpleInfoOuterClass {
|
|||||||
|
|
||||||
static final FieldName uid = FieldName.forField("uid");
|
static final FieldName uid = FieldName.forField("uid");
|
||||||
|
|
||||||
|
static final FieldName chatBubbleId = FieldName.forField("chatBubbleId", "chat_bubble_id");
|
||||||
|
|
||||||
static final FieldName platformType = FieldName.forField("platformType", "platform_type");
|
static final FieldName platformType = FieldName.forField("platformType", "platform_type");
|
||||||
|
|
||||||
static final FieldName onlineStatus = FieldName.forField("onlineStatus", "online_status");
|
static final FieldName onlineStatus = FieldName.forField("onlineStatus", "online_status");
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ public class Config {
|
|||||||
public int staminaReserveRecoveryRate = 18 * 60;
|
public int staminaReserveRecoveryRate = 18 * 60;
|
||||||
public String language = "EN";
|
public String language = "EN";
|
||||||
public Set<String> defaultPermissions = Set.of("*");
|
public Set<String> defaultPermissions = Set.of("*");
|
||||||
|
|
||||||
|
public ServerProfile serverFriendInfo = new ServerProfile();
|
||||||
public WelcomeMail welcomeMail = new WelcomeMail();
|
public WelcomeMail welcomeMail = new WelcomeMail();
|
||||||
|
|
||||||
public int getStaminaRecoveryRate() {
|
public int getStaminaRecoveryRate() {
|
||||||
@@ -104,6 +106,17 @@ public class Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public static class ServerProfile {
|
||||||
|
public String name = "Server";
|
||||||
|
public String signature = "Type /help for a list of commands";
|
||||||
|
public int level = 1;
|
||||||
|
public int headIcon = 201001;
|
||||||
|
public int chatBubbleId = 0;
|
||||||
|
public int displayAvatarId = 1001;
|
||||||
|
public int displayAvatarLevel = 1;
|
||||||
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public static class WelcomeMail {
|
public static class WelcomeMail {
|
||||||
public String title;
|
public String title;
|
||||||
|
|||||||
@@ -797,6 +797,7 @@ public class Player {
|
|||||||
.setNickname(this.getName())
|
.setNickname(this.getName())
|
||||||
.setSignature(this.getSignature())
|
.setSignature(this.getSignature())
|
||||||
.setLevel(this.getLevel())
|
.setLevel(this.getLevel())
|
||||||
|
.setChatBubbleId(this.getChatBubble())
|
||||||
.setOnlineStatus(this.isOnline() ? FriendOnlineStatus.FRIEND_ONLINE_STATUS_ONLINE : FriendOnlineStatus.FRIEND_ONLINE_STATUS_OFFLINE)
|
.setOnlineStatus(this.isOnline() ? FriendOnlineStatus.FRIEND_ONLINE_STATUS_ONLINE : FriendOnlineStatus.FRIEND_ONLINE_STATUS_OFFLINE)
|
||||||
.setPlatformType(PlatformType.PC)
|
.setPlatformType(PlatformType.PC)
|
||||||
.setLastActiveTime(this.getLastActiveTime())
|
.setLastActiveTime(this.getLastActiveTime())
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package emu.lunarcore.server.packet.send;
|
package emu.lunarcore.server.packet.send;
|
||||||
|
|
||||||
import emu.lunarcore.GameConstants;
|
import emu.lunarcore.GameConstants;
|
||||||
|
import emu.lunarcore.LunarCore;
|
||||||
import emu.lunarcore.game.friends.FriendList;
|
import emu.lunarcore.game.friends.FriendList;
|
||||||
import emu.lunarcore.proto.FriendListInfoOuterClass.FriendListInfo;
|
import emu.lunarcore.proto.FriendListInfoOuterClass.FriendListInfo;
|
||||||
import emu.lunarcore.proto.FriendOnlineStatusOuterClass.FriendOnlineStatus;
|
import emu.lunarcore.proto.FriendOnlineStatusOuterClass.FriendOnlineStatus;
|
||||||
@@ -16,16 +17,20 @@ public class PacketGetFriendListInfoScRsp extends BasePacket {
|
|||||||
public PacketGetFriendListInfoScRsp(FriendList friendList) {
|
public PacketGetFriendListInfoScRsp(FriendList friendList) {
|
||||||
super(CmdId.GetFriendListInfoScRsp);
|
super(CmdId.GetFriendListInfoScRsp);
|
||||||
|
|
||||||
|
// Get friend info from config
|
||||||
|
var serverFriendInfo = LunarCore.getConfig().getServerOptions().getServerFriendInfo();
|
||||||
|
|
||||||
// Inject server console as friend
|
// Inject server console as friend
|
||||||
var consoleFriend = SimpleInfo.newInstance()
|
var consoleFriend = SimpleInfo.newInstance()
|
||||||
.setUid(GameConstants.SERVER_CONSOLE_UID)
|
.setUid(GameConstants.SERVER_CONSOLE_UID)
|
||||||
.setNickname("Server")
|
.setNickname(serverFriendInfo.getName())
|
||||||
.setSignature("Type /help for a list of commands")
|
.setSignature(serverFriendInfo.getSignature())
|
||||||
.setLevel(1)
|
.setLevel(serverFriendInfo.getLevel())
|
||||||
|
.setChatBubbleId(serverFriendInfo.getChatBubbleId())
|
||||||
.setOnlineStatus(FriendOnlineStatus.FRIEND_ONLINE_STATUS_ONLINE)
|
.setOnlineStatus(FriendOnlineStatus.FRIEND_ONLINE_STATUS_ONLINE)
|
||||||
.setPlatformType(PlatformType.PC)
|
.setPlatformType(PlatformType.PC)
|
||||||
.setSimpleAvatarInfo(SimpleAvatarInfo.newInstance().setAvatarId(1001).setLevel(1))
|
.setSimpleAvatarInfo(SimpleAvatarInfo.newInstance().setAvatarId(serverFriendInfo.getDisplayAvatarId()).setLevel(serverFriendInfo.getDisplayAvatarLevel()))
|
||||||
.setHeadIcon(201001);
|
.setHeadIcon(serverFriendInfo.getHeadIcon());
|
||||||
|
|
||||||
var data = GetFriendListInfoScRsp.newInstance()
|
var data = GetFriendListInfoScRsp.newInstance()
|
||||||
.addFriendList(FriendListInfo.newInstance().setSimpleInfo(consoleFriend));
|
.addFriendList(FriendListInfo.newInstance().setSimpleInfo(consoleFriend));
|
||||||
|
|||||||
Reference in New Issue
Block a user