mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-06-08 09:43:35 +08:00
Custom Teams (#1731)
* Add support for creating and deleting custom teams. * Add support for creating and deleting custom teams. * Move some logic to TeamInfo::toProto
This commit is contained in:
committed by
GitHub
Unverified
parent
4f015c1077
commit
712d17631f
@@ -76,21 +76,21 @@ public final class AvatarDataNotifyOuterClass {
|
||||
int key);
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* @return A list containing the unk3000NIGPICLBHMA.
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @return A list containing the customTeamIds.
|
||||
*/
|
||||
java.util.List<java.lang.Integer> getUnk3000NIGPICLBHMAList();
|
||||
java.util.List<java.lang.Integer> getCustomTeamIdsList();
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* @return The count of unk3000NIGPICLBHMA.
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @return The count of customTeamIds.
|
||||
*/
|
||||
int getUnk3000NIGPICLBHMACount();
|
||||
int getCustomTeamIdsCount();
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The unk3000NIGPICLBHMA at the given index.
|
||||
* @return The customTeamIds at the given index.
|
||||
*/
|
||||
int getUnk3000NIGPICLBHMA(int index);
|
||||
int getCustomTeamIds(int index);
|
||||
|
||||
/**
|
||||
* <code>repeated uint64 temp_avatar_guid_list = 12;</code>
|
||||
@@ -160,8 +160,7 @@ public final class AvatarDataNotifyOuterClass {
|
||||
* <pre>
|
||||
* CmdId: 1633
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: false
|
||||
* IsAllowClient: true
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code AvatarDataNotify}
|
||||
@@ -177,7 +176,7 @@ public final class AvatarDataNotifyOuterClass {
|
||||
}
|
||||
private AvatarDataNotify() {
|
||||
ownedCostumeList_ = emptyIntList();
|
||||
unk3000NIGPICLBHMA_ = emptyIntList();
|
||||
customTeamIds_ = emptyIntList();
|
||||
tempAvatarGuidList_ = emptyLongList();
|
||||
ownedFlycloakList_ = emptyIntList();
|
||||
avatarList_ = java.util.Collections.emptyList();
|
||||
@@ -269,21 +268,21 @@ public final class AvatarDataNotifyOuterClass {
|
||||
}
|
||||
case 72: {
|
||||
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
|
||||
unk3000NIGPICLBHMA_ = newIntList();
|
||||
customTeamIds_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000004;
|
||||
}
|
||||
unk3000NIGPICLBHMA_.addInt(input.readUInt32());
|
||||
customTeamIds_.addInt(input.readUInt32());
|
||||
break;
|
||||
}
|
||||
case 74: {
|
||||
int length = input.readRawVarint32();
|
||||
int limit = input.pushLimit(length);
|
||||
if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
|
||||
unk3000NIGPICLBHMA_ = newIntList();
|
||||
customTeamIds_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000004;
|
||||
}
|
||||
while (input.getBytesUntilLimit() > 0) {
|
||||
unk3000NIGPICLBHMA_.addInt(input.readUInt32());
|
||||
customTeamIds_.addInt(input.readUInt32());
|
||||
}
|
||||
input.popLimit(limit);
|
||||
break;
|
||||
@@ -352,7 +351,7 @@ public final class AvatarDataNotifyOuterClass {
|
||||
avatarList_ = java.util.Collections.unmodifiableList(avatarList_);
|
||||
}
|
||||
if (((mutable_bitField0_ & 0x00000004) != 0)) {
|
||||
unk3000NIGPICLBHMA_.makeImmutable(); // C
|
||||
customTeamIds_.makeImmutable(); // C
|
||||
}
|
||||
if (((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
ownedCostumeList_.makeImmutable(); // C
|
||||
@@ -509,33 +508,33 @@ public final class AvatarDataNotifyOuterClass {
|
||||
return map.get(key);
|
||||
}
|
||||
|
||||
public static final int UNK3000_NIGPICLBHMA_FIELD_NUMBER = 9;
|
||||
private com.google.protobuf.Internal.IntList unk3000NIGPICLBHMA_;
|
||||
public static final int CUSTOM_TEAM_IDS_FIELD_NUMBER = 9;
|
||||
private com.google.protobuf.Internal.IntList customTeamIds_;
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* @return A list containing the unk3000NIGPICLBHMA.
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @return A list containing the customTeamIds.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<java.lang.Integer>
|
||||
getUnk3000NIGPICLBHMAList() {
|
||||
return unk3000NIGPICLBHMA_;
|
||||
getCustomTeamIdsList() {
|
||||
return customTeamIds_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* @return The count of unk3000NIGPICLBHMA.
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @return The count of customTeamIds.
|
||||
*/
|
||||
public int getUnk3000NIGPICLBHMACount() {
|
||||
return unk3000NIGPICLBHMA_.size();
|
||||
public int getCustomTeamIdsCount() {
|
||||
return customTeamIds_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The unk3000NIGPICLBHMA at the given index.
|
||||
* @return The customTeamIds at the given index.
|
||||
*/
|
||||
public int getUnk3000NIGPICLBHMA(int index) {
|
||||
return unk3000NIGPICLBHMA_.getInt(index);
|
||||
public int getCustomTeamIds(int index) {
|
||||
return customTeamIds_.getInt(index);
|
||||
}
|
||||
private int unk3000NIGPICLBHMAMemoizedSerializedSize = -1;
|
||||
private int customTeamIdsMemoizedSerializedSize = -1;
|
||||
|
||||
public static final int TEMP_AVATAR_GUID_LIST_FIELD_NUMBER = 12;
|
||||
private com.google.protobuf.Internal.LongList tempAvatarGuidList_;
|
||||
@@ -681,12 +680,12 @@ public final class AvatarDataNotifyOuterClass {
|
||||
if (chooseAvatarGuid_ != 0L) {
|
||||
output.writeUInt64(8, chooseAvatarGuid_);
|
||||
}
|
||||
if (getUnk3000NIGPICLBHMAList().size() > 0) {
|
||||
if (getCustomTeamIdsList().size() > 0) {
|
||||
output.writeUInt32NoTag(74);
|
||||
output.writeUInt32NoTag(unk3000NIGPICLBHMAMemoizedSerializedSize);
|
||||
output.writeUInt32NoTag(customTeamIdsMemoizedSerializedSize);
|
||||
}
|
||||
for (int i = 0; i < unk3000NIGPICLBHMA_.size(); i++) {
|
||||
output.writeUInt32NoTag(unk3000NIGPICLBHMA_.getInt(i));
|
||||
for (int i = 0; i < customTeamIds_.size(); i++) {
|
||||
output.writeUInt32NoTag(customTeamIds_.getInt(i));
|
||||
}
|
||||
if (getOwnedCostumeListList().size() > 0) {
|
||||
output.writeUInt32NoTag(90);
|
||||
@@ -749,17 +748,17 @@ public final class AvatarDataNotifyOuterClass {
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < unk3000NIGPICLBHMA_.size(); i++) {
|
||||
for (int i = 0; i < customTeamIds_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32SizeNoTag(unk3000NIGPICLBHMA_.getInt(i));
|
||||
.computeUInt32SizeNoTag(customTeamIds_.getInt(i));
|
||||
}
|
||||
size += dataSize;
|
||||
if (!getUnk3000NIGPICLBHMAList().isEmpty()) {
|
||||
if (!getCustomTeamIdsList().isEmpty()) {
|
||||
size += 1;
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32SizeNoTag(dataSize);
|
||||
}
|
||||
unk3000NIGPICLBHMAMemoizedSerializedSize = dataSize;
|
||||
customTeamIdsMemoizedSerializedSize = dataSize;
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
@@ -810,8 +809,8 @@ public final class AvatarDataNotifyOuterClass {
|
||||
!= other.getChooseAvatarGuid()) return false;
|
||||
if (!internalGetAvatarTeamMap().equals(
|
||||
other.internalGetAvatarTeamMap())) return false;
|
||||
if (!getUnk3000NIGPICLBHMAList()
|
||||
.equals(other.getUnk3000NIGPICLBHMAList())) return false;
|
||||
if (!getCustomTeamIdsList()
|
||||
.equals(other.getCustomTeamIdsList())) return false;
|
||||
if (!getTempAvatarGuidListList()
|
||||
.equals(other.getTempAvatarGuidListList())) return false;
|
||||
if (!getOwnedFlycloakListList()
|
||||
@@ -842,9 +841,9 @@ public final class AvatarDataNotifyOuterClass {
|
||||
hash = (37 * hash) + AVATAR_TEAM_MAP_FIELD_NUMBER;
|
||||
hash = (53 * hash) + internalGetAvatarTeamMap().hashCode();
|
||||
}
|
||||
if (getUnk3000NIGPICLBHMACount() > 0) {
|
||||
hash = (37 * hash) + UNK3000_NIGPICLBHMA_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getUnk3000NIGPICLBHMAList().hashCode();
|
||||
if (getCustomTeamIdsCount() > 0) {
|
||||
hash = (37 * hash) + CUSTOM_TEAM_IDS_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getCustomTeamIdsList().hashCode();
|
||||
}
|
||||
if (getTempAvatarGuidListCount() > 0) {
|
||||
hash = (37 * hash) + TEMP_AVATAR_GUID_LIST_FIELD_NUMBER;
|
||||
@@ -959,8 +958,7 @@ public final class AvatarDataNotifyOuterClass {
|
||||
* <pre>
|
||||
* CmdId: 1633
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: false
|
||||
* IsAllowClient: true
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code AvatarDataNotify}
|
||||
@@ -1028,7 +1026,7 @@ public final class AvatarDataNotifyOuterClass {
|
||||
chooseAvatarGuid_ = 0L;
|
||||
|
||||
internalGetMutableAvatarTeamMap().clear();
|
||||
unk3000NIGPICLBHMA_ = emptyIntList();
|
||||
customTeamIds_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
tempAvatarGuidList_ = emptyLongList();
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
@@ -1078,10 +1076,10 @@ public final class AvatarDataNotifyOuterClass {
|
||||
result.avatarTeamMap_ = internalGetAvatarTeamMap();
|
||||
result.avatarTeamMap_.makeImmutable();
|
||||
if (((bitField0_ & 0x00000004) != 0)) {
|
||||
unk3000NIGPICLBHMA_.makeImmutable();
|
||||
customTeamIds_.makeImmutable();
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
}
|
||||
result.unk3000NIGPICLBHMA_ = unk3000NIGPICLBHMA_;
|
||||
result.customTeamIds_ = customTeamIds_;
|
||||
if (((bitField0_ & 0x00000008) != 0)) {
|
||||
tempAvatarGuidList_.makeImmutable();
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
@@ -1165,13 +1163,13 @@ public final class AvatarDataNotifyOuterClass {
|
||||
}
|
||||
internalGetMutableAvatarTeamMap().mergeFrom(
|
||||
other.internalGetAvatarTeamMap());
|
||||
if (!other.unk3000NIGPICLBHMA_.isEmpty()) {
|
||||
if (unk3000NIGPICLBHMA_.isEmpty()) {
|
||||
unk3000NIGPICLBHMA_ = other.unk3000NIGPICLBHMA_;
|
||||
if (!other.customTeamIds_.isEmpty()) {
|
||||
if (customTeamIds_.isEmpty()) {
|
||||
customTeamIds_ = other.customTeamIds_;
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
} else {
|
||||
ensureUnk3000NIGPICLBHMAIsMutable();
|
||||
unk3000NIGPICLBHMA_.addAll(other.unk3000NIGPICLBHMA_);
|
||||
ensureCustomTeamIdsIsMutable();
|
||||
customTeamIds_.addAll(other.customTeamIds_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
@@ -1492,80 +1490,80 @@ public final class AvatarDataNotifyOuterClass {
|
||||
return this;
|
||||
}
|
||||
|
||||
private com.google.protobuf.Internal.IntList unk3000NIGPICLBHMA_ = emptyIntList();
|
||||
private void ensureUnk3000NIGPICLBHMAIsMutable() {
|
||||
private com.google.protobuf.Internal.IntList customTeamIds_ = emptyIntList();
|
||||
private void ensureCustomTeamIdsIsMutable() {
|
||||
if (!((bitField0_ & 0x00000004) != 0)) {
|
||||
unk3000NIGPICLBHMA_ = mutableCopy(unk3000NIGPICLBHMA_);
|
||||
customTeamIds_ = mutableCopy(customTeamIds_);
|
||||
bitField0_ |= 0x00000004;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* @return A list containing the unk3000NIGPICLBHMA.
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @return A list containing the customTeamIds.
|
||||
*/
|
||||
public java.util.List<java.lang.Integer>
|
||||
getUnk3000NIGPICLBHMAList() {
|
||||
getCustomTeamIdsList() {
|
||||
return ((bitField0_ & 0x00000004) != 0) ?
|
||||
java.util.Collections.unmodifiableList(unk3000NIGPICLBHMA_) : unk3000NIGPICLBHMA_;
|
||||
java.util.Collections.unmodifiableList(customTeamIds_) : customTeamIds_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* @return The count of unk3000NIGPICLBHMA.
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @return The count of customTeamIds.
|
||||
*/
|
||||
public int getUnk3000NIGPICLBHMACount() {
|
||||
return unk3000NIGPICLBHMA_.size();
|
||||
public int getCustomTeamIdsCount() {
|
||||
return customTeamIds_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The unk3000NIGPICLBHMA at the given index.
|
||||
* @return The customTeamIds at the given index.
|
||||
*/
|
||||
public int getUnk3000NIGPICLBHMA(int index) {
|
||||
return unk3000NIGPICLBHMA_.getInt(index);
|
||||
public int getCustomTeamIds(int index) {
|
||||
return customTeamIds_.getInt(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @param index The index to set the value at.
|
||||
* @param value The unk3000NIGPICLBHMA to set.
|
||||
* @param value The customTeamIds to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setUnk3000NIGPICLBHMA(
|
||||
public Builder setCustomTeamIds(
|
||||
int index, int value) {
|
||||
ensureUnk3000NIGPICLBHMAIsMutable();
|
||||
unk3000NIGPICLBHMA_.setInt(index, value);
|
||||
ensureCustomTeamIdsIsMutable();
|
||||
customTeamIds_.setInt(index, value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* @param value The unk3000NIGPICLBHMA to add.
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @param value The customTeamIds to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addUnk3000NIGPICLBHMA(int value) {
|
||||
ensureUnk3000NIGPICLBHMAIsMutable();
|
||||
unk3000NIGPICLBHMA_.addInt(value);
|
||||
public Builder addCustomTeamIds(int value) {
|
||||
ensureCustomTeamIdsIsMutable();
|
||||
customTeamIds_.addInt(value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* @param values The unk3000NIGPICLBHMA to add.
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @param values The customTeamIds to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addAllUnk3000NIGPICLBHMA(
|
||||
public Builder addAllCustomTeamIds(
|
||||
java.lang.Iterable<? extends java.lang.Integer> values) {
|
||||
ensureUnk3000NIGPICLBHMAIsMutable();
|
||||
ensureCustomTeamIdsIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, unk3000NIGPICLBHMA_);
|
||||
values, customTeamIds_);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk3000_NIGPICLBHMA = 9;</code>
|
||||
* <code>repeated uint32 custom_team_ids = 9;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearUnk3000NIGPICLBHMA() {
|
||||
unk3000NIGPICLBHMA_ = emptyIntList();
|
||||
public Builder clearCustomTeamIds() {
|
||||
customTeamIds_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
onChanged();
|
||||
return this;
|
||||
@@ -2072,17 +2070,17 @@ public final class AvatarDataNotifyOuterClass {
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\026AvatarDataNotify.proto\032\020AvatarInfo.pro" +
|
||||
"to\032\020AvatarTeam.proto\"\343\002\n\020AvatarDataNotif" +
|
||||
"to\032\020AvatarTeam.proto\"\337\002\n\020AvatarDataNotif" +
|
||||
"y\022\032\n\022owned_costume_list\030\013 \003(\r\022\032\n\022choose_" +
|
||||
"avatar_guid\030\010 \001(\004\022=\n\017avatar_team_map\030\007 \003" +
|
||||
"(\0132$.AvatarDataNotify.AvatarTeamMapEntry" +
|
||||
"\022\033\n\023Unk3000_NIGPICLBHMA\030\t \003(\r\022\035\n\025temp_av" +
|
||||
"atar_guid_list\030\014 \003(\004\022\033\n\023owned_flycloak_l" +
|
||||
"ist\030\001 \003(\r\022 \n\013avatar_list\030\006 \003(\0132\013.AvatarI" +
|
||||
"nfo\022\032\n\022cur_avatar_team_id\030\002 \001(\r\032A\n\022Avata" +
|
||||
"rTeamMapEntry\022\013\n\003key\030\001 \001(\r\022\032\n\005value\030\002 \001(" +
|
||||
"\0132\013.AvatarTeam:\0028\001B\033\n\031emu.grasscutter.ne" +
|
||||
"t.protob\006proto3"
|
||||
"\022\027\n\017custom_team_ids\030\t \003(\r\022\035\n\025temp_avatar" +
|
||||
"_guid_list\030\014 \003(\004\022\033\n\023owned_flycloak_list\030" +
|
||||
"\001 \003(\r\022 \n\013avatar_list\030\006 \003(\0132\013.AvatarInfo\022" +
|
||||
"\032\n\022cur_avatar_team_id\030\002 \001(\r\032A\n\022AvatarTea" +
|
||||
"mMapEntry\022\013\n\003key\030\001 \001(\r\022\032\n\005value\030\002 \001(\0132\013." +
|
||||
"AvatarTeam:\0028\001B\033\n\031emu.grasscutter.net.pr" +
|
||||
"otob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
@@ -2095,7 +2093,7 @@ public final class AvatarDataNotifyOuterClass {
|
||||
internal_static_AvatarDataNotify_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_AvatarDataNotify_descriptor,
|
||||
new java.lang.String[] { "OwnedCostumeList", "ChooseAvatarGuid", "AvatarTeamMap", "Unk3000NIGPICLBHMA", "TempAvatarGuidList", "OwnedFlycloakList", "AvatarList", "CurAvatarTeamId", });
|
||||
new java.lang.String[] { "OwnedCostumeList", "ChooseAvatarGuid", "AvatarTeamMap", "CustomTeamIds", "TempAvatarGuidList", "OwnedFlycloakList", "AvatarList", "CurAvatarTeamId", });
|
||||
internal_static_AvatarDataNotify_AvatarTeamMapEntry_descriptor =
|
||||
internal_static_AvatarDataNotify_descriptor.getNestedTypes().get(0);
|
||||
internal_static_AvatarDataNotify_AvatarTeamMapEntry_fieldAccessorTable = new
|
||||
|
||||
Reference in New Issue
Block a user