mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-06-19 14:05:01 +08:00
Compare commits
44 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
23f1298d6c | ||
|
025e5d3c1c | ||
|
d1d39db56c | ||
|
5bb43ac074 | ||
|
4e75361ad4 | ||
|
bb342f9114 | ||
|
953272489d | ||
|
ec3cdc040f | ||
|
ef55e5515c | ||
|
558471237a | ||
|
bf8ee32382 | ||
|
f801fe0305 | ||
|
4da4c03ecc | ||
|
98ac42a6c6 | ||
|
a4f10208de | ||
|
e23536e7ba | ||
|
004a765e5b | ||
|
a520bc9416 | ||
|
0b9cab5ad5 | ||
|
dd6e1bb8a3 | ||
|
f6ce7e349d | ||
|
960318651c | ||
|
c2e620bf7c | ||
|
5ffc07cf59 | ||
|
4154229722 | ||
|
badda3626f | ||
|
2f2eb1dba0 | ||
|
fbc0219cba | ||
|
a90455a7a4 | ||
|
0d64e2e810 | ||
|
794350aa63 | ||
|
ad64d71165 | ||
|
e9f5d98466 | ||
|
08f361954a | ||
|
9671a76af2 | ||
|
08fdcf6ed4 | ||
|
21ff749dca | ||
|
070edd263a | ||
|
72c16d7ecb | ||
|
767e598bea | ||
|
57bb747118 | ||
|
d3bf5b585f | ||
|
a9ca80e490 | ||
|
210e9e9732 |
23
.github/workflows/protect_files.yml
vendored
Normal file
23
.github/workflows/protect_files.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
name: Protect write-access files from being PR'd
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
branches:
|
||||
- development
|
||||
paths:
|
||||
- '.github/'
|
||||
- '.editorconfig'
|
||||
- 'CODE_OF_CONDUCT.md'
|
||||
- 'CONTRIBUTING.md'
|
||||
- 'LICENSE'
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: superbrothers/close-pull-request@v3
|
||||
with:
|
||||
comment: "This PR has been closed for modifying protected files. See `CONTIBUTING.md` for more information."
|
@ -21,3 +21,11 @@ Your code should follow the standards set below:
|
||||
- Dependencies that use a separate language (ex. Kotlin) that can run on a JVM are acceptable.
|
||||
- Dependencies that require the use of native code (ex. JNI) are prohibited.
|
||||
- Directly adding foreign code (other languages, ex. Kotlin) into the main codebase is prohibited.
|
||||
- Certain files and folders are forbidden to modify in Pull Requests and may only be changed by Write-Access members. The current list for this can be found in `.github/workflows/protect_files.yml`.
|
||||
|
||||
## Intellectual Property
|
||||
|
||||
Please avoid adding any direct references to the following, whenever possible:
|
||||
- Game names
|
||||
- Character names
|
||||
- Notable weapon names
|
||||
|
29
README.md
29
README.md
@ -24,7 +24,7 @@
|
||||
|
||||
### Requirements
|
||||
|
||||
* [Java SE - 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||
* [Java SE - 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) or higher
|
||||
|
||||
**Note:** If you just want to **run it**, then **jre** only is fine.
|
||||
|
||||
@ -45,28 +45,29 @@
|
||||
|
||||
½. Create an account using [server console command](https://github.com/Grasscutters/Grasscutter/wiki/Commands#targeting).
|
||||
|
||||
1. Redirect traffic: (choose one)
|
||||
1. Redirect traffic: (choose one only)
|
||||
- mitmdump: `mitmdump -s proxy.py -k`
|
||||
|
||||
Trust CA certificate:
|
||||
- Trust CA certificate:
|
||||
|
||||
**Note:** The CA certificate is usually stored in `%USERPROFILE%\.mitmproxy`, or you can download it from `http://mitm.it`
|
||||
- The CA certificate is usually stored in `%USERPROFILE%\.mitmproxy`, double click `mitmproxy-ca-cert.cer` to [install](https://docs.microsoft.com/en-us/skype-sdk/sdn/articles/installing-the-trusted-root-certificate#installing-a-trusted-root-certificate) or...
|
||||
|
||||
Double click for [install](https://docs.microsoft.com/en-us/skype-sdk/sdn/articles/installing-the-trusted-root-certificate#installing-a-trusted-root-certificate) or ...
|
||||
- Via command line *(needs administration privileges)*
|
||||
|
||||
- Via command line (needs administration privileges)
|
||||
```shell
|
||||
certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer
|
||||
```
|
||||
|
||||
```shell
|
||||
certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer
|
||||
```
|
||||
|
||||
- Fiddler Classic: Run Fiddler Classic, turn on `Decrypt HTTPS traffic` in (Tools -> Options -> HTTPS) and change the default port in (Tools -> Options -> Connections) to anything other than `8888`, and load [this script](https://github.com/Grasscutters/Grasscutter/wiki/Resources#fiddler-classic-jscript) (copy and paste the script in the `FiddlerScript` tab).
|
||||
- Fiddler Classic: Run Fiddler Classic, turn on `Decrypt HTTPS traffic` in (Tools -> Options -> HTTPS) and change the default port in (Tools -> Options -> Connections) to anything other than `8888`, load [this script](https://github.com/Grasscutters/Grasscutter/wiki/Resources#fiddler-classic-jscript) (copy and paste the script in the `FiddlerScript` tab) and click the `Save Script` button.
|
||||
|
||||
- [Hosts file](https://github.com/Grasscutters/Grasscutter/wiki/Resources#hosts-file)
|
||||
|
||||
2. Set network proxy to `127.0.0.1:8080` or the proxy port you specified.
|
||||
|
||||
**You can also use `start.cmd` to start servers and proxy daemons automatically, but you have to set up JAVA_HOME enviroment and configure the `start_config.cmd` file.**
|
||||
- For mitmproxy: After setting up the network proxy and installing the certificate, check http://mitm.it/ if traffic is passing through mitmproxy.
|
||||
|
||||
**You can also use `start.cmd` to start servers and proxy daemons automatically, but you have to set up `JAVA_HOME` enviroment and configure the `start_config.cmd` file.**
|
||||
|
||||
### Building
|
||||
|
||||
@ -74,7 +75,7 @@ Grasscutter uses Gradle to handle dependencies & building.
|
||||
|
||||
**Requirements:**
|
||||
|
||||
- [Java SE Development Kits - 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||
- [Java SE Development Kits - 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) or higher
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
|
||||
##### Windows
|
||||
@ -101,7 +102,7 @@ You can find the output jar in the root of the project folder.
|
||||
|
||||
# Quick Troubleshooting
|
||||
|
||||
* If compiling wasn't successful, please check your JDK installation (JDK 17 and validated JDK's bin PATH variable)
|
||||
* If compiling wasn't successful, please check your JDK installation (Make sure its JDK 17 or higher and validated JDK's bin PATH variable)
|
||||
* My client doesn't connect, doesn't login, 4206, etc... - Mostly your proxy daemon setup is *the issue*, if using
|
||||
Fiddler make sure it running on another port except 8888
|
||||
* Startup sequence: MongoDB > Grasscutter > Proxy daemon (mitmdump, fiddler, etc.) > Game
|
||||
* Startup sequence: MongoDB > Grasscutter > Proxy Daemon (mitmdump, fiddler, etc.) > Game
|
||||
|
@ -43,7 +43,7 @@ sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
group = 'xyz.grasscutters'
|
||||
version = '1.3.1-dev'
|
||||
version = '1.4.0'
|
||||
|
||||
sourceCompatibility = 17
|
||||
targetCompatibility = 17
|
||||
|
@ -0,0 +1,677 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: ActivityShopSheetInfo.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class ActivityShopSheetInfoOuterClass {
|
||||
private ActivityShopSheetInfoOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface ActivityShopSheetInfoOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:ActivityShopSheetInfo)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>uint32 end_time = 1;</code>
|
||||
* @return The endTime.
|
||||
*/
|
||||
int getEndTime();
|
||||
|
||||
/**
|
||||
* <code>uint32 begin_time = 12;</code>
|
||||
* @return The beginTime.
|
||||
*/
|
||||
int getBeginTime();
|
||||
|
||||
/**
|
||||
* <code>uint32 sheet_id = 2;</code>
|
||||
* @return The sheetId.
|
||||
*/
|
||||
int getSheetId();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code ActivityShopSheetInfo}
|
||||
*/
|
||||
public static final class ActivityShopSheetInfo extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:ActivityShopSheetInfo)
|
||||
ActivityShopSheetInfoOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use ActivityShopSheetInfo.newBuilder() to construct.
|
||||
private ActivityShopSheetInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private ActivityShopSheetInfo() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new ActivityShopSheetInfo();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private ActivityShopSheetInfo(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 8: {
|
||||
|
||||
endTime_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
|
||||
sheetId_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
case 96: {
|
||||
|
||||
beginTime_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.internal_static_ActivityShopSheetInfo_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.internal_static_ActivityShopSheetInfo_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.class, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder.class);
|
||||
}
|
||||
|
||||
public static final int END_TIME_FIELD_NUMBER = 1;
|
||||
private int endTime_;
|
||||
/**
|
||||
* <code>uint32 end_time = 1;</code>
|
||||
* @return The endTime.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getEndTime() {
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
public static final int BEGIN_TIME_FIELD_NUMBER = 12;
|
||||
private int beginTime_;
|
||||
/**
|
||||
* <code>uint32 begin_time = 12;</code>
|
||||
* @return The beginTime.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getBeginTime() {
|
||||
return beginTime_;
|
||||
}
|
||||
|
||||
public static final int SHEET_ID_FIELD_NUMBER = 2;
|
||||
private int sheetId_;
|
||||
/**
|
||||
* <code>uint32 sheet_id = 2;</code>
|
||||
* @return The sheetId.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getSheetId() {
|
||||
return sheetId_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (endTime_ != 0) {
|
||||
output.writeUInt32(1, endTime_);
|
||||
}
|
||||
if (sheetId_ != 0) {
|
||||
output.writeUInt32(2, sheetId_);
|
||||
}
|
||||
if (beginTime_ != 0) {
|
||||
output.writeUInt32(12, beginTime_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (endTime_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(1, endTime_);
|
||||
}
|
||||
if (sheetId_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(2, sheetId_);
|
||||
}
|
||||
if (beginTime_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(12, beginTime_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo other = (emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo) obj;
|
||||
|
||||
if (getEndTime()
|
||||
!= other.getEndTime()) return false;
|
||||
if (getBeginTime()
|
||||
!= other.getBeginTime()) return false;
|
||||
if (getSheetId()
|
||||
!= other.getSheetId()) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + END_TIME_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getEndTime();
|
||||
hash = (37 * hash) + BEGIN_TIME_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getBeginTime();
|
||||
hash = (37 * hash) + SHEET_ID_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getSheetId();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code ActivityShopSheetInfo}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:ActivityShopSheetInfo)
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.internal_static_ActivityShopSheetInfo_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.internal_static_ActivityShopSheetInfo_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.class, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
endTime_ = 0;
|
||||
|
||||
beginTime_ = 0;
|
||||
|
||||
sheetId_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.internal_static_ActivityShopSheetInfo_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo build() {
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo buildPartial() {
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo result = new emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo(this);
|
||||
result.endTime_ = endTime_;
|
||||
result.beginTime_ = beginTime_;
|
||||
result.sheetId_ = sheetId_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo other) {
|
||||
if (other == emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.getDefaultInstance()) return this;
|
||||
if (other.getEndTime() != 0) {
|
||||
setEndTime(other.getEndTime());
|
||||
}
|
||||
if (other.getBeginTime() != 0) {
|
||||
setBeginTime(other.getBeginTime());
|
||||
}
|
||||
if (other.getSheetId() != 0) {
|
||||
setSheetId(other.getSheetId());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private int endTime_ ;
|
||||
/**
|
||||
* <code>uint32 end_time = 1;</code>
|
||||
* @return The endTime.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getEndTime() {
|
||||
return endTime_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 end_time = 1;</code>
|
||||
* @param value The endTime to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setEndTime(int value) {
|
||||
|
||||
endTime_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 end_time = 1;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearEndTime() {
|
||||
|
||||
endTime_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int beginTime_ ;
|
||||
/**
|
||||
* <code>uint32 begin_time = 12;</code>
|
||||
* @return The beginTime.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getBeginTime() {
|
||||
return beginTime_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 begin_time = 12;</code>
|
||||
* @param value The beginTime to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setBeginTime(int value) {
|
||||
|
||||
beginTime_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 begin_time = 12;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearBeginTime() {
|
||||
|
||||
beginTime_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int sheetId_ ;
|
||||
/**
|
||||
* <code>uint32 sheet_id = 2;</code>
|
||||
* @return The sheetId.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getSheetId() {
|
||||
return sheetId_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 sheet_id = 2;</code>
|
||||
* @param value The sheetId to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setSheetId(int value) {
|
||||
|
||||
sheetId_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 sheet_id = 2;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearSheetId() {
|
||||
|
||||
sheetId_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:ActivityShopSheetInfo)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:ActivityShopSheetInfo)
|
||||
private static final emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<ActivityShopSheetInfo>
|
||||
PARSER = new com.google.protobuf.AbstractParser<ActivityShopSheetInfo>() {
|
||||
@java.lang.Override
|
||||
public ActivityShopSheetInfo parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new ActivityShopSheetInfo(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<ActivityShopSheetInfo> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<ActivityShopSheetInfo> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_ActivityShopSheetInfo_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_ActivityShopSheetInfo_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\033ActivityShopSheetInfo.proto\"O\n\025Activit" +
|
||||
"yShopSheetInfo\022\020\n\010end_time\030\001 \001(\r\022\022\n\nbegi" +
|
||||
"n_time\030\014 \001(\r\022\020\n\010sheet_id\030\002 \001(\rB\033\n\031emu.gr" +
|
||||
"asscutter.net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_ActivityShopSheetInfo_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_ActivityShopSheetInfo_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_ActivityShopSheetInfo_descriptor,
|
||||
new java.lang.String[] { "EndTime", "BeginTime", "SheetId", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,537 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: GetActivityShopSheetInfoReq.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class GetActivityShopSheetInfoReqOuterClass {
|
||||
private GetActivityShopSheetInfoReqOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface GetActivityShopSheetInfoReqOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:GetActivityShopSheetInfoReq)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>uint32 shop_type = 7;</code>
|
||||
* @return The shopType.
|
||||
*/
|
||||
int getShopType();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code GetActivityShopSheetInfoReq}
|
||||
*/
|
||||
public static final class GetActivityShopSheetInfoReq extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:GetActivityShopSheetInfoReq)
|
||||
GetActivityShopSheetInfoReqOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use GetActivityShopSheetInfoReq.newBuilder() to construct.
|
||||
private GetActivityShopSheetInfoReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private GetActivityShopSheetInfoReq() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new GetActivityShopSheetInfoReq();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private GetActivityShopSheetInfoReq(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 56: {
|
||||
|
||||
shopType_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.internal_static_GetActivityShopSheetInfoReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.internal_static_GetActivityShopSheetInfoReq_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq.class, emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq.Builder.class);
|
||||
}
|
||||
|
||||
public static final int SHOP_TYPE_FIELD_NUMBER = 7;
|
||||
private int shopType_;
|
||||
/**
|
||||
* <code>uint32 shop_type = 7;</code>
|
||||
* @return The shopType.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getShopType() {
|
||||
return shopType_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (shopType_ != 0) {
|
||||
output.writeUInt32(7, shopType_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (shopType_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(7, shopType_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq other = (emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq) obj;
|
||||
|
||||
if (getShopType()
|
||||
!= other.getShopType()) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + SHOP_TYPE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getShopType();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code GetActivityShopSheetInfoReq}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:GetActivityShopSheetInfoReq)
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReqOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.internal_static_GetActivityShopSheetInfoReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.internal_static_GetActivityShopSheetInfoReq_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq.class, emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
shopType_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.internal_static_GetActivityShopSheetInfoReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq build() {
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq buildPartial() {
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq result = new emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq(this);
|
||||
result.shopType_ = shopType_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq other) {
|
||||
if (other == emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq.getDefaultInstance()) return this;
|
||||
if (other.getShopType() != 0) {
|
||||
setShopType(other.getShopType());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private int shopType_ ;
|
||||
/**
|
||||
* <code>uint32 shop_type = 7;</code>
|
||||
* @return The shopType.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getShopType() {
|
||||
return shopType_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 shop_type = 7;</code>
|
||||
* @param value The shopType to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setShopType(int value) {
|
||||
|
||||
shopType_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 shop_type = 7;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearShopType() {
|
||||
|
||||
shopType_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:GetActivityShopSheetInfoReq)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:GetActivityShopSheetInfoReq)
|
||||
private static final emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<GetActivityShopSheetInfoReq>
|
||||
PARSER = new com.google.protobuf.AbstractParser<GetActivityShopSheetInfoReq>() {
|
||||
@java.lang.Override
|
||||
public GetActivityShopSheetInfoReq parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new GetActivityShopSheetInfoReq(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<GetActivityShopSheetInfoReq> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<GetActivityShopSheetInfoReq> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetActivityShopSheetInfoReqOuterClass.GetActivityShopSheetInfoReq getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_GetActivityShopSheetInfoReq_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_GetActivityShopSheetInfoReq_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n!GetActivityShopSheetInfoReq.proto\"0\n\033G" +
|
||||
"etActivityShopSheetInfoReq\022\021\n\tshop_type\030" +
|
||||
"\007 \001(\rB\033\n\031emu.grasscutter.net.protob\006prot" +
|
||||
"o3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_GetActivityShopSheetInfoReq_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_GetActivityShopSheetInfoReq_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_GetActivityShopSheetInfoReq_descriptor,
|
||||
new java.lang.String[] { "ShopType", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,986 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: GetActivityShopSheetInfoRsp.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class GetActivityShopSheetInfoRspOuterClass {
|
||||
private GetActivityShopSheetInfoRspOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface GetActivityShopSheetInfoRspOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:GetActivityShopSheetInfoRsp)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
java.util.List<emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo>
|
||||
getSheetInfoListList();
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo getSheetInfoList(int index);
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
int getSheetInfoListCount();
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
java.util.List<? extends emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder>
|
||||
getSheetInfoListOrBuilderList();
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder getSheetInfoListOrBuilder(
|
||||
int index);
|
||||
|
||||
/**
|
||||
* <code>uint32 shop_type = 8;</code>
|
||||
* @return The shopType.
|
||||
*/
|
||||
int getShopType();
|
||||
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
int getRetcode();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code GetActivityShopSheetInfoRsp}
|
||||
*/
|
||||
public static final class GetActivityShopSheetInfoRsp extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:GetActivityShopSheetInfoRsp)
|
||||
GetActivityShopSheetInfoRspOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use GetActivityShopSheetInfoRsp.newBuilder() to construct.
|
||||
private GetActivityShopSheetInfoRsp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private GetActivityShopSheetInfoRsp() {
|
||||
sheetInfoList_ = java.util.Collections.emptyList();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new GetActivityShopSheetInfoRsp();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private GetActivityShopSheetInfoRsp(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 50: {
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
sheetInfoList_ = new java.util.ArrayList<emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo>();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
sheetInfoList_.add(
|
||||
input.readMessage(emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.parser(), extensionRegistry));
|
||||
break;
|
||||
}
|
||||
case 64: {
|
||||
|
||||
shopType_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
case 104: {
|
||||
|
||||
retcode_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
if (((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
sheetInfoList_ = java.util.Collections.unmodifiableList(sheetInfoList_);
|
||||
}
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.internal_static_GetActivityShopSheetInfoRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.internal_static_GetActivityShopSheetInfoRsp_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp.class, emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp.Builder.class);
|
||||
}
|
||||
|
||||
public static final int SHEET_INFO_LIST_FIELD_NUMBER = 6;
|
||||
private java.util.List<emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo> sheetInfoList_;
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo> getSheetInfoListList() {
|
||||
return sheetInfoList_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<? extends emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder>
|
||||
getSheetInfoListOrBuilderList() {
|
||||
return sheetInfoList_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getSheetInfoListCount() {
|
||||
return sheetInfoList_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo getSheetInfoList(int index) {
|
||||
return sheetInfoList_.get(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder getSheetInfoListOrBuilder(
|
||||
int index) {
|
||||
return sheetInfoList_.get(index);
|
||||
}
|
||||
|
||||
public static final int SHOP_TYPE_FIELD_NUMBER = 8;
|
||||
private int shopType_;
|
||||
/**
|
||||
* <code>uint32 shop_type = 8;</code>
|
||||
* @return The shopType.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getShopType() {
|
||||
return shopType_;
|
||||
}
|
||||
|
||||
public static final int RETCODE_FIELD_NUMBER = 13;
|
||||
private int retcode_;
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getRetcode() {
|
||||
return retcode_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
for (int i = 0; i < sheetInfoList_.size(); i++) {
|
||||
output.writeMessage(6, sheetInfoList_.get(i));
|
||||
}
|
||||
if (shopType_ != 0) {
|
||||
output.writeUInt32(8, shopType_);
|
||||
}
|
||||
if (retcode_ != 0) {
|
||||
output.writeInt32(13, retcode_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
for (int i = 0; i < sheetInfoList_.size(); i++) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(6, sheetInfoList_.get(i));
|
||||
}
|
||||
if (shopType_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(8, shopType_);
|
||||
}
|
||||
if (retcode_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(13, retcode_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp other = (emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp) obj;
|
||||
|
||||
if (!getSheetInfoListList()
|
||||
.equals(other.getSheetInfoListList())) return false;
|
||||
if (getShopType()
|
||||
!= other.getShopType()) return false;
|
||||
if (getRetcode()
|
||||
!= other.getRetcode()) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
if (getSheetInfoListCount() > 0) {
|
||||
hash = (37 * hash) + SHEET_INFO_LIST_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getSheetInfoListList().hashCode();
|
||||
}
|
||||
hash = (37 * hash) + SHOP_TYPE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getShopType();
|
||||
hash = (37 * hash) + RETCODE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getRetcode();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code GetActivityShopSheetInfoRsp}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:GetActivityShopSheetInfoRsp)
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRspOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.internal_static_GetActivityShopSheetInfoRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.internal_static_GetActivityShopSheetInfoRsp_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp.class, emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
getSheetInfoListFieldBuilder();
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
sheetInfoList_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
sheetInfoListBuilder_.clear();
|
||||
}
|
||||
shopType_ = 0;
|
||||
|
||||
retcode_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.internal_static_GetActivityShopSheetInfoRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp build() {
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp buildPartial() {
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp result = new emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
if (((bitField0_ & 0x00000001) != 0)) {
|
||||
sheetInfoList_ = java.util.Collections.unmodifiableList(sheetInfoList_);
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
}
|
||||
result.sheetInfoList_ = sheetInfoList_;
|
||||
} else {
|
||||
result.sheetInfoList_ = sheetInfoListBuilder_.build();
|
||||
}
|
||||
result.shopType_ = shopType_;
|
||||
result.retcode_ = retcode_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp other) {
|
||||
if (other == emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp.getDefaultInstance()) return this;
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
if (!other.sheetInfoList_.isEmpty()) {
|
||||
if (sheetInfoList_.isEmpty()) {
|
||||
sheetInfoList_ = other.sheetInfoList_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
ensureSheetInfoListIsMutable();
|
||||
sheetInfoList_.addAll(other.sheetInfoList_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
} else {
|
||||
if (!other.sheetInfoList_.isEmpty()) {
|
||||
if (sheetInfoListBuilder_.isEmpty()) {
|
||||
sheetInfoListBuilder_.dispose();
|
||||
sheetInfoListBuilder_ = null;
|
||||
sheetInfoList_ = other.sheetInfoList_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
sheetInfoListBuilder_ =
|
||||
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
|
||||
getSheetInfoListFieldBuilder() : null;
|
||||
} else {
|
||||
sheetInfoListBuilder_.addAllMessages(other.sheetInfoList_);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (other.getShopType() != 0) {
|
||||
setShopType(other.getShopType());
|
||||
}
|
||||
if (other.getRetcode() != 0) {
|
||||
setRetcode(other.getRetcode());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.util.List<emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo> sheetInfoList_ =
|
||||
java.util.Collections.emptyList();
|
||||
private void ensureSheetInfoListIsMutable() {
|
||||
if (!((bitField0_ & 0x00000001) != 0)) {
|
||||
sheetInfoList_ = new java.util.ArrayList<emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo>(sheetInfoList_);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
}
|
||||
|
||||
private com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder> sheetInfoListBuilder_;
|
||||
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public java.util.List<emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo> getSheetInfoListList() {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
return java.util.Collections.unmodifiableList(sheetInfoList_);
|
||||
} else {
|
||||
return sheetInfoListBuilder_.getMessageList();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public int getSheetInfoListCount() {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
return sheetInfoList_.size();
|
||||
} else {
|
||||
return sheetInfoListBuilder_.getCount();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo getSheetInfoList(int index) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
return sheetInfoList_.get(index);
|
||||
} else {
|
||||
return sheetInfoListBuilder_.getMessage(index);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public Builder setSheetInfoList(
|
||||
int index, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo value) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureSheetInfoListIsMutable();
|
||||
sheetInfoList_.set(index, value);
|
||||
onChanged();
|
||||
} else {
|
||||
sheetInfoListBuilder_.setMessage(index, value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public Builder setSheetInfoList(
|
||||
int index, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder builderForValue) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
ensureSheetInfoListIsMutable();
|
||||
sheetInfoList_.set(index, builderForValue.build());
|
||||
onChanged();
|
||||
} else {
|
||||
sheetInfoListBuilder_.setMessage(index, builderForValue.build());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public Builder addSheetInfoList(emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo value) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureSheetInfoListIsMutable();
|
||||
sheetInfoList_.add(value);
|
||||
onChanged();
|
||||
} else {
|
||||
sheetInfoListBuilder_.addMessage(value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public Builder addSheetInfoList(
|
||||
int index, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo value) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureSheetInfoListIsMutable();
|
||||
sheetInfoList_.add(index, value);
|
||||
onChanged();
|
||||
} else {
|
||||
sheetInfoListBuilder_.addMessage(index, value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public Builder addSheetInfoList(
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder builderForValue) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
ensureSheetInfoListIsMutable();
|
||||
sheetInfoList_.add(builderForValue.build());
|
||||
onChanged();
|
||||
} else {
|
||||
sheetInfoListBuilder_.addMessage(builderForValue.build());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public Builder addSheetInfoList(
|
||||
int index, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder builderForValue) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
ensureSheetInfoListIsMutable();
|
||||
sheetInfoList_.add(index, builderForValue.build());
|
||||
onChanged();
|
||||
} else {
|
||||
sheetInfoListBuilder_.addMessage(index, builderForValue.build());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public Builder addAllSheetInfoList(
|
||||
java.lang.Iterable<? extends emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo> values) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
ensureSheetInfoListIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, sheetInfoList_);
|
||||
onChanged();
|
||||
} else {
|
||||
sheetInfoListBuilder_.addAllMessages(values);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public Builder clearSheetInfoList() {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
sheetInfoList_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
} else {
|
||||
sheetInfoListBuilder_.clear();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public Builder removeSheetInfoList(int index) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
ensureSheetInfoListIsMutable();
|
||||
sheetInfoList_.remove(index);
|
||||
onChanged();
|
||||
} else {
|
||||
sheetInfoListBuilder_.remove(index);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder getSheetInfoListBuilder(
|
||||
int index) {
|
||||
return getSheetInfoListFieldBuilder().getBuilder(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder getSheetInfoListOrBuilder(
|
||||
int index) {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
return sheetInfoList_.get(index); } else {
|
||||
return sheetInfoListBuilder_.getMessageOrBuilder(index);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public java.util.List<? extends emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder>
|
||||
getSheetInfoListOrBuilderList() {
|
||||
if (sheetInfoListBuilder_ != null) {
|
||||
return sheetInfoListBuilder_.getMessageOrBuilderList();
|
||||
} else {
|
||||
return java.util.Collections.unmodifiableList(sheetInfoList_);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder addSheetInfoListBuilder() {
|
||||
return getSheetInfoListFieldBuilder().addBuilder(
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.getDefaultInstance());
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder addSheetInfoListBuilder(
|
||||
int index) {
|
||||
return getSheetInfoListFieldBuilder().addBuilder(
|
||||
index, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.getDefaultInstance());
|
||||
}
|
||||
/**
|
||||
* <code>repeated .ActivityShopSheetInfo sheet_info_list = 6;</code>
|
||||
*/
|
||||
public java.util.List<emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder>
|
||||
getSheetInfoListBuilderList() {
|
||||
return getSheetInfoListFieldBuilder().getBuilderList();
|
||||
}
|
||||
private com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder>
|
||||
getSheetInfoListFieldBuilder() {
|
||||
if (sheetInfoListBuilder_ == null) {
|
||||
sheetInfoListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfo.Builder, emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.ActivityShopSheetInfoOrBuilder>(
|
||||
sheetInfoList_,
|
||||
((bitField0_ & 0x00000001) != 0),
|
||||
getParentForChildren(),
|
||||
isClean());
|
||||
sheetInfoList_ = null;
|
||||
}
|
||||
return sheetInfoListBuilder_;
|
||||
}
|
||||
|
||||
private int shopType_ ;
|
||||
/**
|
||||
* <code>uint32 shop_type = 8;</code>
|
||||
* @return The shopType.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getShopType() {
|
||||
return shopType_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 shop_type = 8;</code>
|
||||
* @param value The shopType to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setShopType(int value) {
|
||||
|
||||
shopType_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 shop_type = 8;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearShopType() {
|
||||
|
||||
shopType_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int retcode_ ;
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getRetcode() {
|
||||
return retcode_;
|
||||
}
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @param value The retcode to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setRetcode(int value) {
|
||||
|
||||
retcode_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearRetcode() {
|
||||
|
||||
retcode_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:GetActivityShopSheetInfoRsp)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:GetActivityShopSheetInfoRsp)
|
||||
private static final emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<GetActivityShopSheetInfoRsp>
|
||||
PARSER = new com.google.protobuf.AbstractParser<GetActivityShopSheetInfoRsp>() {
|
||||
@java.lang.Override
|
||||
public GetActivityShopSheetInfoRsp parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new GetActivityShopSheetInfoRsp(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<GetActivityShopSheetInfoRsp> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<GetActivityShopSheetInfoRsp> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetActivityShopSheetInfoRspOuterClass.GetActivityShopSheetInfoRsp getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_GetActivityShopSheetInfoRsp_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_GetActivityShopSheetInfoRsp_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n!GetActivityShopSheetInfoRsp.proto\032\033Act" +
|
||||
"ivityShopSheetInfo.proto\"r\n\033GetActivityS" +
|
||||
"hopSheetInfoRsp\022/\n\017sheet_info_list\030\006 \003(\013" +
|
||||
"2\026.ActivityShopSheetInfo\022\021\n\tshop_type\030\010 " +
|
||||
"\001(\r\022\017\n\007retcode\030\r \001(\005B\033\n\031emu.grasscutter." +
|
||||
"net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.getDescriptor(),
|
||||
});
|
||||
internal_static_GetActivityShopSheetInfoRsp_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_GetActivityShopSheetInfoRsp_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_GetActivityShopSheetInfoRsp_descriptor,
|
||||
new java.lang.String[] { "SheetInfoList", "ShopType", "Retcode", });
|
||||
emu.grasscutter.net.proto.ActivityShopSheetInfoOuterClass.getDescriptor();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,550 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: GetFriendShowNameCardInfoReq.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class GetFriendShowNameCardInfoReqOuterClass {
|
||||
private GetFriendShowNameCardInfoReqOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface GetFriendShowNameCardInfoReqOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:GetFriendShowNameCardInfoReq)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>uint32 uid = 3;</code>
|
||||
* @return The uid.
|
||||
*/
|
||||
int getUid();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4061
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* IsAllowClient: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code GetFriendShowNameCardInfoReq}
|
||||
*/
|
||||
public static final class GetFriendShowNameCardInfoReq extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:GetFriendShowNameCardInfoReq)
|
||||
GetFriendShowNameCardInfoReqOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use GetFriendShowNameCardInfoReq.newBuilder() to construct.
|
||||
private GetFriendShowNameCardInfoReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private GetFriendShowNameCardInfoReq() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new GetFriendShowNameCardInfoReq();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private GetFriendShowNameCardInfoReq(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 24: {
|
||||
|
||||
uid_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.class, emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.Builder.class);
|
||||
}
|
||||
|
||||
public static final int UID_FIELD_NUMBER = 3;
|
||||
private int uid_;
|
||||
/**
|
||||
* <code>uint32 uid = 3;</code>
|
||||
* @return The uid.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getUid() {
|
||||
return uid_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (uid_ != 0) {
|
||||
output.writeUInt32(3, uid_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (uid_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(3, uid_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq other = (emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq) obj;
|
||||
|
||||
if (getUid()
|
||||
!= other.getUid()) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + UID_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getUid();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4061
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* IsAllowClient: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code GetFriendShowNameCardInfoReq}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:GetFriendShowNameCardInfoReq)
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReqOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.class, emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
uid_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.internal_static_GetFriendShowNameCardInfoReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq build() {
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq buildPartial() {
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq result = new emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq(this);
|
||||
result.uid_ = uid_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq other) {
|
||||
if (other == emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq.getDefaultInstance()) return this;
|
||||
if (other.getUid() != 0) {
|
||||
setUid(other.getUid());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private int uid_ ;
|
||||
/**
|
||||
* <code>uint32 uid = 3;</code>
|
||||
* @return The uid.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getUid() {
|
||||
return uid_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 uid = 3;</code>
|
||||
* @param value The uid to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setUid(int value) {
|
||||
|
||||
uid_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 uid = 3;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearUid() {
|
||||
|
||||
uid_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:GetFriendShowNameCardInfoReq)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:GetFriendShowNameCardInfoReq)
|
||||
private static final emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<GetFriendShowNameCardInfoReq>
|
||||
PARSER = new com.google.protobuf.AbstractParser<GetFriendShowNameCardInfoReq>() {
|
||||
@java.lang.Override
|
||||
public GetFriendShowNameCardInfoReq parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new GetFriendShowNameCardInfoReq(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<GetFriendShowNameCardInfoReq> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<GetFriendShowNameCardInfoReq> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoReqOuterClass.GetFriendShowNameCardInfoReq getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_GetFriendShowNameCardInfoReq_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_GetFriendShowNameCardInfoReq_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\"GetFriendShowNameCardInfoReq.proto\"+\n\034" +
|
||||
"GetFriendShowNameCardInfoReq\022\013\n\003uid\030\003 \001(" +
|
||||
"\rB\033\n\031emu.grasscutter.net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_GetFriendShowNameCardInfoReq_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_GetFriendShowNameCardInfoReq_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_GetFriendShowNameCardInfoReq_descriptor,
|
||||
new java.lang.String[] { "Uid", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,817 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: GetFriendShowNameCardInfoRsp.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class GetFriendShowNameCardInfoRspOuterClass {
|
||||
private GetFriendShowNameCardInfoRspOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface GetFriendShowNameCardInfoRspOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:GetFriendShowNameCardInfoRsp)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>int32 retcode = 15;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
int getRetcode();
|
||||
|
||||
/**
|
||||
* <code>uint32 uid = 7;</code>
|
||||
* @return The uid.
|
||||
*/
|
||||
int getUid();
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @return A list containing the showNameCardIdList.
|
||||
*/
|
||||
java.util.List<java.lang.Integer> getShowNameCardIdListList();
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @return The count of showNameCardIdList.
|
||||
*/
|
||||
int getShowNameCardIdListCount();
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The showNameCardIdList at the given index.
|
||||
*/
|
||||
int getShowNameCardIdList(int index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4029
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code GetFriendShowNameCardInfoRsp}
|
||||
*/
|
||||
public static final class GetFriendShowNameCardInfoRsp extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:GetFriendShowNameCardInfoRsp)
|
||||
GetFriendShowNameCardInfoRspOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use GetFriendShowNameCardInfoRsp.newBuilder() to construct.
|
||||
private GetFriendShowNameCardInfoRsp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private GetFriendShowNameCardInfoRsp() {
|
||||
showNameCardIdList_ = emptyIntList();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new GetFriendShowNameCardInfoRsp();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private GetFriendShowNameCardInfoRsp(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 56: {
|
||||
|
||||
uid_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
case 80: {
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
showNameCardIdList_.addInt(input.readUInt32());
|
||||
break;
|
||||
}
|
||||
case 82: {
|
||||
int length = input.readRawVarint32();
|
||||
int limit = input.pushLimit(length);
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
|
||||
showNameCardIdList_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
while (input.getBytesUntilLimit() > 0) {
|
||||
showNameCardIdList_.addInt(input.readUInt32());
|
||||
}
|
||||
input.popLimit(limit);
|
||||
break;
|
||||
}
|
||||
case 120: {
|
||||
|
||||
retcode_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
if (((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_.makeImmutable(); // C
|
||||
}
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.class, emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.Builder.class);
|
||||
}
|
||||
|
||||
public static final int RETCODE_FIELD_NUMBER = 15;
|
||||
private int retcode_;
|
||||
/**
|
||||
* <code>int32 retcode = 15;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getRetcode() {
|
||||
return retcode_;
|
||||
}
|
||||
|
||||
public static final int UID_FIELD_NUMBER = 7;
|
||||
private int uid_;
|
||||
/**
|
||||
* <code>uint32 uid = 7;</code>
|
||||
* @return The uid.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getUid() {
|
||||
return uid_;
|
||||
}
|
||||
|
||||
public static final int SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER = 10;
|
||||
private com.google.protobuf.Internal.IntList showNameCardIdList_;
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @return A list containing the showNameCardIdList.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<java.lang.Integer>
|
||||
getShowNameCardIdListList() {
|
||||
return showNameCardIdList_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @return The count of showNameCardIdList.
|
||||
*/
|
||||
public int getShowNameCardIdListCount() {
|
||||
return showNameCardIdList_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The showNameCardIdList at the given index.
|
||||
*/
|
||||
public int getShowNameCardIdList(int index) {
|
||||
return showNameCardIdList_.getInt(index);
|
||||
}
|
||||
private int showNameCardIdListMemoizedSerializedSize = -1;
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
if (uid_ != 0) {
|
||||
output.writeUInt32(7, uid_);
|
||||
}
|
||||
if (getShowNameCardIdListList().size() > 0) {
|
||||
output.writeUInt32NoTag(82);
|
||||
output.writeUInt32NoTag(showNameCardIdListMemoizedSerializedSize);
|
||||
}
|
||||
for (int i = 0; i < showNameCardIdList_.size(); i++) {
|
||||
output.writeUInt32NoTag(showNameCardIdList_.getInt(i));
|
||||
}
|
||||
if (retcode_ != 0) {
|
||||
output.writeInt32(15, retcode_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (uid_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(7, uid_);
|
||||
}
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < showNameCardIdList_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32SizeNoTag(showNameCardIdList_.getInt(i));
|
||||
}
|
||||
size += dataSize;
|
||||
if (!getShowNameCardIdListList().isEmpty()) {
|
||||
size += 1;
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32SizeNoTag(dataSize);
|
||||
}
|
||||
showNameCardIdListMemoizedSerializedSize = dataSize;
|
||||
}
|
||||
if (retcode_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(15, retcode_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp other = (emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp) obj;
|
||||
|
||||
if (getRetcode()
|
||||
!= other.getRetcode()) return false;
|
||||
if (getUid()
|
||||
!= other.getUid()) return false;
|
||||
if (!getShowNameCardIdListList()
|
||||
.equals(other.getShowNameCardIdListList())) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + RETCODE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getRetcode();
|
||||
hash = (37 * hash) + UID_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getUid();
|
||||
if (getShowNameCardIdListCount() > 0) {
|
||||
hash = (37 * hash) + SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getShowNameCardIdListList().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4029
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code GetFriendShowNameCardInfoRsp}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:GetFriendShowNameCardInfoRsp)
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRspOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.class, emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
retcode_ = 0;
|
||||
|
||||
uid_ = 0;
|
||||
|
||||
showNameCardIdList_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.internal_static_GetFriendShowNameCardInfoRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp build() {
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp buildPartial() {
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp result = new emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
result.retcode_ = retcode_;
|
||||
result.uid_ = uid_;
|
||||
if (((bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_.makeImmutable();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
}
|
||||
result.showNameCardIdList_ = showNameCardIdList_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp other) {
|
||||
if (other == emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp.getDefaultInstance()) return this;
|
||||
if (other.getRetcode() != 0) {
|
||||
setRetcode(other.getRetcode());
|
||||
}
|
||||
if (other.getUid() != 0) {
|
||||
setUid(other.getUid());
|
||||
}
|
||||
if (!other.showNameCardIdList_.isEmpty()) {
|
||||
if (showNameCardIdList_.isEmpty()) {
|
||||
showNameCardIdList_ = other.showNameCardIdList_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
showNameCardIdList_.addAll(other.showNameCardIdList_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private int retcode_ ;
|
||||
/**
|
||||
* <code>int32 retcode = 15;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getRetcode() {
|
||||
return retcode_;
|
||||
}
|
||||
/**
|
||||
* <code>int32 retcode = 15;</code>
|
||||
* @param value The retcode to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setRetcode(int value) {
|
||||
|
||||
retcode_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>int32 retcode = 15;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearRetcode() {
|
||||
|
||||
retcode_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int uid_ ;
|
||||
/**
|
||||
* <code>uint32 uid = 7;</code>
|
||||
* @return The uid.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getUid() {
|
||||
return uid_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 uid = 7;</code>
|
||||
* @param value The uid to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setUid(int value) {
|
||||
|
||||
uid_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 uid = 7;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearUid() {
|
||||
|
||||
uid_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private com.google.protobuf.Internal.IntList showNameCardIdList_ = emptyIntList();
|
||||
private void ensureShowNameCardIdListIsMutable() {
|
||||
if (!((bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_ = mutableCopy(showNameCardIdList_);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @return A list containing the showNameCardIdList.
|
||||
*/
|
||||
public java.util.List<java.lang.Integer>
|
||||
getShowNameCardIdListList() {
|
||||
return ((bitField0_ & 0x00000001) != 0) ?
|
||||
java.util.Collections.unmodifiableList(showNameCardIdList_) : showNameCardIdList_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @return The count of showNameCardIdList.
|
||||
*/
|
||||
public int getShowNameCardIdListCount() {
|
||||
return showNameCardIdList_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The showNameCardIdList at the given index.
|
||||
*/
|
||||
public int getShowNameCardIdList(int index) {
|
||||
return showNameCardIdList_.getInt(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @param index The index to set the value at.
|
||||
* @param value The showNameCardIdList to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setShowNameCardIdList(
|
||||
int index, int value) {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
showNameCardIdList_.setInt(index, value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @param value The showNameCardIdList to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addShowNameCardIdList(int value) {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
showNameCardIdList_.addInt(value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @param values The showNameCardIdList to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addAllShowNameCardIdList(
|
||||
java.lang.Iterable<? extends java.lang.Integer> values) {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, showNameCardIdList_);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 10;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearShowNameCardIdList() {
|
||||
showNameCardIdList_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:GetFriendShowNameCardInfoRsp)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:GetFriendShowNameCardInfoRsp)
|
||||
private static final emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<GetFriendShowNameCardInfoRsp>
|
||||
PARSER = new com.google.protobuf.AbstractParser<GetFriendShowNameCardInfoRsp>() {
|
||||
@java.lang.Override
|
||||
public GetFriendShowNameCardInfoRsp parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new GetFriendShowNameCardInfoRsp(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<GetFriendShowNameCardInfoRsp> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<GetFriendShowNameCardInfoRsp> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.GetFriendShowNameCardInfoRspOuterClass.GetFriendShowNameCardInfoRsp getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_GetFriendShowNameCardInfoRsp_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_GetFriendShowNameCardInfoRsp_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\"GetFriendShowNameCardInfoRsp.proto\"\\\n\034" +
|
||||
"GetFriendShowNameCardInfoRsp\022\017\n\007retcode\030" +
|
||||
"\017 \001(\005\022\013\n\003uid\030\007 \001(\r\022\036\n\026show_name_card_id_" +
|
||||
"list\030\n \003(\rB\033\n\031emu.grasscutter.net.protob" +
|
||||
"\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_GetFriendShowNameCardInfoRsp_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_GetFriendShowNameCardInfoRsp_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_GetFriendShowNameCardInfoRsp_descriptor,
|
||||
new java.lang.String[] { "Retcode", "Uid", "ShowNameCardIdList", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,825 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: PlatformStartRouteNotify.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class PlatformStartRouteNotifyOuterClass {
|
||||
private PlatformStartRouteNotifyOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface PlatformStartRouteNotifyOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:PlatformStartRouteNotify)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
* @return Whether the platform field is set.
|
||||
*/
|
||||
boolean hasPlatform();
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
* @return The platform.
|
||||
*/
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo getPlatform();
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
*/
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder getPlatformOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>uint32 scene_time = 12;</code>
|
||||
* @return The sceneTime.
|
||||
*/
|
||||
int getSceneTime();
|
||||
|
||||
/**
|
||||
* <code>uint32 entity_id = 8;</code>
|
||||
* @return The entityId.
|
||||
*/
|
||||
int getEntityId();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 218
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code PlatformStartRouteNotify}
|
||||
*/
|
||||
public static final class PlatformStartRouteNotify extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:PlatformStartRouteNotify)
|
||||
PlatformStartRouteNotifyOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use PlatformStartRouteNotify.newBuilder() to construct.
|
||||
private PlatformStartRouteNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private PlatformStartRouteNotify() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new PlatformStartRouteNotify();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private PlatformStartRouteNotify(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 64: {
|
||||
|
||||
entityId_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
case 96: {
|
||||
|
||||
sceneTime_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
case 122: {
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder subBuilder = null;
|
||||
if (platform_ != null) {
|
||||
subBuilder = platform_.toBuilder();
|
||||
}
|
||||
platform_ = input.readMessage(emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(platform_);
|
||||
platform_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.internal_static_PlatformStartRouteNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.internal_static_PlatformStartRouteNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify.class, emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify.Builder.class);
|
||||
}
|
||||
|
||||
public static final int PLATFORM_FIELD_NUMBER = 15;
|
||||
private emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo platform_;
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
* @return Whether the platform field is set.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean hasPlatform() {
|
||||
return platform_ != null;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
* @return The platform.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo getPlatform() {
|
||||
return platform_ == null ? emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.getDefaultInstance() : platform_;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder getPlatformOrBuilder() {
|
||||
return getPlatform();
|
||||
}
|
||||
|
||||
public static final int SCENE_TIME_FIELD_NUMBER = 12;
|
||||
private int sceneTime_;
|
||||
/**
|
||||
* <code>uint32 scene_time = 12;</code>
|
||||
* @return The sceneTime.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getSceneTime() {
|
||||
return sceneTime_;
|
||||
}
|
||||
|
||||
public static final int ENTITY_ID_FIELD_NUMBER = 8;
|
||||
private int entityId_;
|
||||
/**
|
||||
* <code>uint32 entity_id = 8;</code>
|
||||
* @return The entityId.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getEntityId() {
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (entityId_ != 0) {
|
||||
output.writeUInt32(8, entityId_);
|
||||
}
|
||||
if (sceneTime_ != 0) {
|
||||
output.writeUInt32(12, sceneTime_);
|
||||
}
|
||||
if (platform_ != null) {
|
||||
output.writeMessage(15, getPlatform());
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (entityId_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(8, entityId_);
|
||||
}
|
||||
if (sceneTime_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(12, sceneTime_);
|
||||
}
|
||||
if (platform_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(15, getPlatform());
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify other = (emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify) obj;
|
||||
|
||||
if (hasPlatform() != other.hasPlatform()) return false;
|
||||
if (hasPlatform()) {
|
||||
if (!getPlatform()
|
||||
.equals(other.getPlatform())) return false;
|
||||
}
|
||||
if (getSceneTime()
|
||||
!= other.getSceneTime()) return false;
|
||||
if (getEntityId()
|
||||
!= other.getEntityId()) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
if (hasPlatform()) {
|
||||
hash = (37 * hash) + PLATFORM_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getPlatform().hashCode();
|
||||
}
|
||||
hash = (37 * hash) + SCENE_TIME_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getSceneTime();
|
||||
hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getEntityId();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 218
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code PlatformStartRouteNotify}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:PlatformStartRouteNotify)
|
||||
emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotifyOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.internal_static_PlatformStartRouteNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.internal_static_PlatformStartRouteNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify.class, emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
if (platformBuilder_ == null) {
|
||||
platform_ = null;
|
||||
} else {
|
||||
platform_ = null;
|
||||
platformBuilder_ = null;
|
||||
}
|
||||
sceneTime_ = 0;
|
||||
|
||||
entityId_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.internal_static_PlatformStartRouteNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify build() {
|
||||
emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify buildPartial() {
|
||||
emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify result = new emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify(this);
|
||||
if (platformBuilder_ == null) {
|
||||
result.platform_ = platform_;
|
||||
} else {
|
||||
result.platform_ = platformBuilder_.build();
|
||||
}
|
||||
result.sceneTime_ = sceneTime_;
|
||||
result.entityId_ = entityId_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify other) {
|
||||
if (other == emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify.getDefaultInstance()) return this;
|
||||
if (other.hasPlatform()) {
|
||||
mergePlatform(other.getPlatform());
|
||||
}
|
||||
if (other.getSceneTime() != 0) {
|
||||
setSceneTime(other.getSceneTime());
|
||||
}
|
||||
if (other.getEntityId() != 0) {
|
||||
setEntityId(other.getEntityId());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo platform_;
|
||||
private com.google.protobuf.SingleFieldBuilderV3<
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder> platformBuilder_;
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
* @return Whether the platform field is set.
|
||||
*/
|
||||
public boolean hasPlatform() {
|
||||
return platformBuilder_ != null || platform_ != null;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
* @return The platform.
|
||||
*/
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo getPlatform() {
|
||||
if (platformBuilder_ == null) {
|
||||
return platform_ == null ? emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.getDefaultInstance() : platform_;
|
||||
} else {
|
||||
return platformBuilder_.getMessage();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
*/
|
||||
public Builder setPlatform(emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo value) {
|
||||
if (platformBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
platform_ = value;
|
||||
onChanged();
|
||||
} else {
|
||||
platformBuilder_.setMessage(value);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
*/
|
||||
public Builder setPlatform(
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder builderForValue) {
|
||||
if (platformBuilder_ == null) {
|
||||
platform_ = builderForValue.build();
|
||||
onChanged();
|
||||
} else {
|
||||
platformBuilder_.setMessage(builderForValue.build());
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
*/
|
||||
public Builder mergePlatform(emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo value) {
|
||||
if (platformBuilder_ == null) {
|
||||
if (platform_ != null) {
|
||||
platform_ =
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.newBuilder(platform_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
platform_ = value;
|
||||
}
|
||||
onChanged();
|
||||
} else {
|
||||
platformBuilder_.mergeFrom(value);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
*/
|
||||
public Builder clearPlatform() {
|
||||
if (platformBuilder_ == null) {
|
||||
platform_ = null;
|
||||
onChanged();
|
||||
} else {
|
||||
platform_ = null;
|
||||
platformBuilder_ = null;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
*/
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder getPlatformBuilder() {
|
||||
|
||||
onChanged();
|
||||
return getPlatformFieldBuilder().getBuilder();
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
*/
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder getPlatformOrBuilder() {
|
||||
if (platformBuilder_ != null) {
|
||||
return platformBuilder_.getMessageOrBuilder();
|
||||
} else {
|
||||
return platform_ == null ?
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.getDefaultInstance() : platform_;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 15;</code>
|
||||
*/
|
||||
private com.google.protobuf.SingleFieldBuilderV3<
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder>
|
||||
getPlatformFieldBuilder() {
|
||||
if (platformBuilder_ == null) {
|
||||
platformBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder>(
|
||||
getPlatform(),
|
||||
getParentForChildren(),
|
||||
isClean());
|
||||
platform_ = null;
|
||||
}
|
||||
return platformBuilder_;
|
||||
}
|
||||
|
||||
private int sceneTime_ ;
|
||||
/**
|
||||
* <code>uint32 scene_time = 12;</code>
|
||||
* @return The sceneTime.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getSceneTime() {
|
||||
return sceneTime_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 scene_time = 12;</code>
|
||||
* @param value The sceneTime to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setSceneTime(int value) {
|
||||
|
||||
sceneTime_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 scene_time = 12;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearSceneTime() {
|
||||
|
||||
sceneTime_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int entityId_ ;
|
||||
/**
|
||||
* <code>uint32 entity_id = 8;</code>
|
||||
* @return The entityId.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getEntityId() {
|
||||
return entityId_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 entity_id = 8;</code>
|
||||
* @param value The entityId to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setEntityId(int value) {
|
||||
|
||||
entityId_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 entity_id = 8;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearEntityId() {
|
||||
|
||||
entityId_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:PlatformStartRouteNotify)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:PlatformStartRouteNotify)
|
||||
private static final emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<PlatformStartRouteNotify>
|
||||
PARSER = new com.google.protobuf.AbstractParser<PlatformStartRouteNotify>() {
|
||||
@java.lang.Override
|
||||
public PlatformStartRouteNotify parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new PlatformStartRouteNotify(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<PlatformStartRouteNotify> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<PlatformStartRouteNotify> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformStartRouteNotifyOuterClass.PlatformStartRouteNotify getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_PlatformStartRouteNotify_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_PlatformStartRouteNotify_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\036PlatformStartRouteNotify.proto\032\022Platfo" +
|
||||
"rmInfo.proto\"b\n\030PlatformStartRouteNotify" +
|
||||
"\022\037\n\010platform\030\017 \001(\0132\r.PlatformInfo\022\022\n\nsce" +
|
||||
"ne_time\030\014 \001(\r\022\021\n\tentity_id\030\010 \001(\rB\033\n\031emu." +
|
||||
"grasscutter.net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.getDescriptor(),
|
||||
});
|
||||
internal_static_PlatformStartRouteNotify_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_PlatformStartRouteNotify_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_PlatformStartRouteNotify_descriptor,
|
||||
new java.lang.String[] { "Platform", "SceneTime", "EntityId", });
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.getDescriptor();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,825 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: PlatformStopRouteNotify.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class PlatformStopRouteNotifyOuterClass {
|
||||
private PlatformStopRouteNotifyOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface PlatformStopRouteNotifyOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:PlatformStopRouteNotify)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>uint32 scene_time = 9;</code>
|
||||
* @return The sceneTime.
|
||||
*/
|
||||
int getSceneTime();
|
||||
|
||||
/**
|
||||
* <code>uint32 entity_id = 12;</code>
|
||||
* @return The entityId.
|
||||
*/
|
||||
int getEntityId();
|
||||
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
* @return Whether the platform field is set.
|
||||
*/
|
||||
boolean hasPlatform();
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
* @return The platform.
|
||||
*/
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo getPlatform();
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
*/
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder getPlatformOrBuilder();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 266
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code PlatformStopRouteNotify}
|
||||
*/
|
||||
public static final class PlatformStopRouteNotify extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:PlatformStopRouteNotify)
|
||||
PlatformStopRouteNotifyOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use PlatformStopRouteNotify.newBuilder() to construct.
|
||||
private PlatformStopRouteNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private PlatformStopRouteNotify() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new PlatformStopRouteNotify();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private PlatformStopRouteNotify(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 66: {
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder subBuilder = null;
|
||||
if (platform_ != null) {
|
||||
subBuilder = platform_.toBuilder();
|
||||
}
|
||||
platform_ = input.readMessage(emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(platform_);
|
||||
platform_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 72: {
|
||||
|
||||
sceneTime_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
case 96: {
|
||||
|
||||
entityId_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.internal_static_PlatformStopRouteNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.internal_static_PlatformStopRouteNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify.class, emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify.Builder.class);
|
||||
}
|
||||
|
||||
public static final int SCENE_TIME_FIELD_NUMBER = 9;
|
||||
private int sceneTime_;
|
||||
/**
|
||||
* <code>uint32 scene_time = 9;</code>
|
||||
* @return The sceneTime.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getSceneTime() {
|
||||
return sceneTime_;
|
||||
}
|
||||
|
||||
public static final int ENTITY_ID_FIELD_NUMBER = 12;
|
||||
private int entityId_;
|
||||
/**
|
||||
* <code>uint32 entity_id = 12;</code>
|
||||
* @return The entityId.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getEntityId() {
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
public static final int PLATFORM_FIELD_NUMBER = 8;
|
||||
private emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo platform_;
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
* @return Whether the platform field is set.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public boolean hasPlatform() {
|
||||
return platform_ != null;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
* @return The platform.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo getPlatform() {
|
||||
return platform_ == null ? emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.getDefaultInstance() : platform_;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder getPlatformOrBuilder() {
|
||||
return getPlatform();
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (platform_ != null) {
|
||||
output.writeMessage(8, getPlatform());
|
||||
}
|
||||
if (sceneTime_ != 0) {
|
||||
output.writeUInt32(9, sceneTime_);
|
||||
}
|
||||
if (entityId_ != 0) {
|
||||
output.writeUInt32(12, entityId_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (platform_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(8, getPlatform());
|
||||
}
|
||||
if (sceneTime_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(9, sceneTime_);
|
||||
}
|
||||
if (entityId_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(12, entityId_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify other = (emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify) obj;
|
||||
|
||||
if (getSceneTime()
|
||||
!= other.getSceneTime()) return false;
|
||||
if (getEntityId()
|
||||
!= other.getEntityId()) return false;
|
||||
if (hasPlatform() != other.hasPlatform()) return false;
|
||||
if (hasPlatform()) {
|
||||
if (!getPlatform()
|
||||
.equals(other.getPlatform())) return false;
|
||||
}
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + SCENE_TIME_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getSceneTime();
|
||||
hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getEntityId();
|
||||
if (hasPlatform()) {
|
||||
hash = (37 * hash) + PLATFORM_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getPlatform().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 266
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code PlatformStopRouteNotify}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:PlatformStopRouteNotify)
|
||||
emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotifyOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.internal_static_PlatformStopRouteNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.internal_static_PlatformStopRouteNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify.class, emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
sceneTime_ = 0;
|
||||
|
||||
entityId_ = 0;
|
||||
|
||||
if (platformBuilder_ == null) {
|
||||
platform_ = null;
|
||||
} else {
|
||||
platform_ = null;
|
||||
platformBuilder_ = null;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.internal_static_PlatformStopRouteNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify build() {
|
||||
emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify buildPartial() {
|
||||
emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify result = new emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify(this);
|
||||
result.sceneTime_ = sceneTime_;
|
||||
result.entityId_ = entityId_;
|
||||
if (platformBuilder_ == null) {
|
||||
result.platform_ = platform_;
|
||||
} else {
|
||||
result.platform_ = platformBuilder_.build();
|
||||
}
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify other) {
|
||||
if (other == emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify.getDefaultInstance()) return this;
|
||||
if (other.getSceneTime() != 0) {
|
||||
setSceneTime(other.getSceneTime());
|
||||
}
|
||||
if (other.getEntityId() != 0) {
|
||||
setEntityId(other.getEntityId());
|
||||
}
|
||||
if (other.hasPlatform()) {
|
||||
mergePlatform(other.getPlatform());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private int sceneTime_ ;
|
||||
/**
|
||||
* <code>uint32 scene_time = 9;</code>
|
||||
* @return The sceneTime.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getSceneTime() {
|
||||
return sceneTime_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 scene_time = 9;</code>
|
||||
* @param value The sceneTime to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setSceneTime(int value) {
|
||||
|
||||
sceneTime_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 scene_time = 9;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearSceneTime() {
|
||||
|
||||
sceneTime_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int entityId_ ;
|
||||
/**
|
||||
* <code>uint32 entity_id = 12;</code>
|
||||
* @return The entityId.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getEntityId() {
|
||||
return entityId_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 entity_id = 12;</code>
|
||||
* @param value The entityId to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setEntityId(int value) {
|
||||
|
||||
entityId_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 entity_id = 12;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearEntityId() {
|
||||
|
||||
entityId_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo platform_;
|
||||
private com.google.protobuf.SingleFieldBuilderV3<
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder> platformBuilder_;
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
* @return Whether the platform field is set.
|
||||
*/
|
||||
public boolean hasPlatform() {
|
||||
return platformBuilder_ != null || platform_ != null;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
* @return The platform.
|
||||
*/
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo getPlatform() {
|
||||
if (platformBuilder_ == null) {
|
||||
return platform_ == null ? emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.getDefaultInstance() : platform_;
|
||||
} else {
|
||||
return platformBuilder_.getMessage();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
*/
|
||||
public Builder setPlatform(emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo value) {
|
||||
if (platformBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
platform_ = value;
|
||||
onChanged();
|
||||
} else {
|
||||
platformBuilder_.setMessage(value);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
*/
|
||||
public Builder setPlatform(
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder builderForValue) {
|
||||
if (platformBuilder_ == null) {
|
||||
platform_ = builderForValue.build();
|
||||
onChanged();
|
||||
} else {
|
||||
platformBuilder_.setMessage(builderForValue.build());
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
*/
|
||||
public Builder mergePlatform(emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo value) {
|
||||
if (platformBuilder_ == null) {
|
||||
if (platform_ != null) {
|
||||
platform_ =
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.newBuilder(platform_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
platform_ = value;
|
||||
}
|
||||
onChanged();
|
||||
} else {
|
||||
platformBuilder_.mergeFrom(value);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
*/
|
||||
public Builder clearPlatform() {
|
||||
if (platformBuilder_ == null) {
|
||||
platform_ = null;
|
||||
onChanged();
|
||||
} else {
|
||||
platform_ = null;
|
||||
platformBuilder_ = null;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
*/
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder getPlatformBuilder() {
|
||||
|
||||
onChanged();
|
||||
return getPlatformFieldBuilder().getBuilder();
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
*/
|
||||
public emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder getPlatformOrBuilder() {
|
||||
if (platformBuilder_ != null) {
|
||||
return platformBuilder_.getMessageOrBuilder();
|
||||
} else {
|
||||
return platform_ == null ?
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.getDefaultInstance() : platform_;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>.PlatformInfo platform = 8;</code>
|
||||
*/
|
||||
private com.google.protobuf.SingleFieldBuilderV3<
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder>
|
||||
getPlatformFieldBuilder() {
|
||||
if (platformBuilder_ == null) {
|
||||
platformBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfo.Builder, emu.grasscutter.net.proto.PlatformInfoOuterClass.PlatformInfoOrBuilder>(
|
||||
getPlatform(),
|
||||
getParentForChildren(),
|
||||
isClean());
|
||||
platform_ = null;
|
||||
}
|
||||
return platformBuilder_;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:PlatformStopRouteNotify)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:PlatformStopRouteNotify)
|
||||
private static final emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<PlatformStopRouteNotify>
|
||||
PARSER = new com.google.protobuf.AbstractParser<PlatformStopRouteNotify>() {
|
||||
@java.lang.Override
|
||||
public PlatformStopRouteNotify parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new PlatformStopRouteNotify(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<PlatformStopRouteNotify> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<PlatformStopRouteNotify> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.PlatformStopRouteNotifyOuterClass.PlatformStopRouteNotify getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_PlatformStopRouteNotify_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_PlatformStopRouteNotify_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\035PlatformStopRouteNotify.proto\032\022Platfor" +
|
||||
"mInfo.proto\"a\n\027PlatformStopRouteNotify\022\022" +
|
||||
"\n\nscene_time\030\t \001(\r\022\021\n\tentity_id\030\014 \001(\r\022\037\n" +
|
||||
"\010platform\030\010 \001(\0132\r.PlatformInfoB\033\n\031emu.gr" +
|
||||
"asscutter.net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.getDescriptor(),
|
||||
});
|
||||
internal_static_PlatformStopRouteNotify_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_PlatformStopRouteNotify_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_PlatformStopRouteNotify_descriptor,
|
||||
new java.lang.String[] { "SceneTime", "EntityId", "Platform", });
|
||||
emu.grasscutter.net.proto.PlatformInfoOuterClass.getDescriptor();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,551 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: Unk2700_BEDLIGJANCJ_ClientReq.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class Unk2700BEDLIGJANCJClientReq {
|
||||
private Unk2700BEDLIGJANCJClientReq() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface Unk2700_BEDLIGJANCJ_ClientReqOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:Unk2700_BEDLIGJANCJ_ClientReq)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 14;</code>
|
||||
* @return The unk2700BJHAMKKECEI.
|
||||
*/
|
||||
int getUnk2700BJHAMKKECEI();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4558
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* IsAllowClient: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_BEDLIGJANCJ_ClientReq}
|
||||
*/
|
||||
public static final class Unk2700_BEDLIGJANCJ_ClientReq extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:Unk2700_BEDLIGJANCJ_ClientReq)
|
||||
Unk2700_BEDLIGJANCJ_ClientReqOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use Unk2700_BEDLIGJANCJ_ClientReq.newBuilder() to construct.
|
||||
private Unk2700_BEDLIGJANCJ_ClientReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private Unk2700_BEDLIGJANCJ_ClientReq() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new Unk2700_BEDLIGJANCJ_ClientReq();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private Unk2700_BEDLIGJANCJ_ClientReq(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 112: {
|
||||
|
||||
unk2700BJHAMKKECEI_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.internal_static_Unk2700_BEDLIGJANCJ_ClientReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.internal_static_Unk2700_BEDLIGJANCJ_ClientReq_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq.class, emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq.Builder.class);
|
||||
}
|
||||
|
||||
public static final int UNK2700_BJHAMKKECEI_FIELD_NUMBER = 14;
|
||||
private int unk2700BJHAMKKECEI_;
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 14;</code>
|
||||
* @return The unk2700BJHAMKKECEI.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getUnk2700BJHAMKKECEI() {
|
||||
return unk2700BJHAMKKECEI_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (unk2700BJHAMKKECEI_ != 0) {
|
||||
output.writeUInt32(14, unk2700BJHAMKKECEI_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (unk2700BJHAMKKECEI_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(14, unk2700BJHAMKKECEI_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq other = (emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq) obj;
|
||||
|
||||
if (getUnk2700BJHAMKKECEI()
|
||||
!= other.getUnk2700BJHAMKKECEI()) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + UNK2700_BJHAMKKECEI_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getUnk2700BJHAMKKECEI();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4558
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* IsAllowClient: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_BEDLIGJANCJ_ClientReq}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:Unk2700_BEDLIGJANCJ_ClientReq)
|
||||
emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReqOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.internal_static_Unk2700_BEDLIGJANCJ_ClientReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.internal_static_Unk2700_BEDLIGJANCJ_ClientReq_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq.class, emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
unk2700BJHAMKKECEI_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.internal_static_Unk2700_BEDLIGJANCJ_ClientReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq build() {
|
||||
emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq buildPartial() {
|
||||
emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq result = new emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq(this);
|
||||
result.unk2700BJHAMKKECEI_ = unk2700BJHAMKKECEI_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq other) {
|
||||
if (other == emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq.getDefaultInstance()) return this;
|
||||
if (other.getUnk2700BJHAMKKECEI() != 0) {
|
||||
setUnk2700BJHAMKKECEI(other.getUnk2700BJHAMKKECEI());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private int unk2700BJHAMKKECEI_ ;
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 14;</code>
|
||||
* @return The unk2700BJHAMKKECEI.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getUnk2700BJHAMKKECEI() {
|
||||
return unk2700BJHAMKKECEI_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 14;</code>
|
||||
* @param value The unk2700BJHAMKKECEI to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setUnk2700BJHAMKKECEI(int value) {
|
||||
|
||||
unk2700BJHAMKKECEI_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 14;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearUnk2700BJHAMKKECEI() {
|
||||
|
||||
unk2700BJHAMKKECEI_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:Unk2700_BEDLIGJANCJ_ClientReq)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:Unk2700_BEDLIGJANCJ_ClientReq)
|
||||
private static final emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<Unk2700_BEDLIGJANCJ_ClientReq>
|
||||
PARSER = new com.google.protobuf.AbstractParser<Unk2700_BEDLIGJANCJ_ClientReq>() {
|
||||
@java.lang.Override
|
||||
public Unk2700_BEDLIGJANCJ_ClientReq parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new Unk2700_BEDLIGJANCJ_ClientReq(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<Unk2700_BEDLIGJANCJ_ClientReq> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<Unk2700_BEDLIGJANCJ_ClientReq> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700BEDLIGJANCJClientReq.Unk2700_BEDLIGJANCJ_ClientReq getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_Unk2700_BEDLIGJANCJ_ClientReq_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_Unk2700_BEDLIGJANCJ_ClientReq_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n#Unk2700_BEDLIGJANCJ_ClientReq.proto\"<\n" +
|
||||
"\035Unk2700_BEDLIGJANCJ_ClientReq\022\033\n\023Unk270" +
|
||||
"0_BJHAMKKECEI\030\016 \001(\rB\033\n\031emu.grasscutter.n" +
|
||||
"et.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_Unk2700_BEDLIGJANCJ_ClientReq_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_Unk2700_BEDLIGJANCJ_ClientReq_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_Unk2700_BEDLIGJANCJ_ClientReq_descriptor,
|
||||
new java.lang.String[] { "Unk2700BJHAMKKECEI", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,549 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: Unk2700_FJEHHCPCBLG_ServerNotify.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class Unk2700FJEHHCPCBLGServerNotify {
|
||||
private Unk2700FJEHHCPCBLGServerNotify() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface Unk2700_FJEHHCPCBLG_ServerNotifyOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:Unk2700_FJEHHCPCBLG_ServerNotify)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 12;</code>
|
||||
* @return The unk2700BJHAMKKECEI.
|
||||
*/
|
||||
int getUnk2700BJHAMKKECEI();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4872
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_FJEHHCPCBLG_ServerNotify}
|
||||
*/
|
||||
public static final class Unk2700_FJEHHCPCBLG_ServerNotify extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:Unk2700_FJEHHCPCBLG_ServerNotify)
|
||||
Unk2700_FJEHHCPCBLG_ServerNotifyOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use Unk2700_FJEHHCPCBLG_ServerNotify.newBuilder() to construct.
|
||||
private Unk2700_FJEHHCPCBLG_ServerNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private Unk2700_FJEHHCPCBLG_ServerNotify() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new Unk2700_FJEHHCPCBLG_ServerNotify();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private Unk2700_FJEHHCPCBLG_ServerNotify(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 96: {
|
||||
|
||||
unk2700BJHAMKKECEI_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify.class, emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify.Builder.class);
|
||||
}
|
||||
|
||||
public static final int UNK2700_BJHAMKKECEI_FIELD_NUMBER = 12;
|
||||
private int unk2700BJHAMKKECEI_;
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 12;</code>
|
||||
* @return The unk2700BJHAMKKECEI.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getUnk2700BJHAMKKECEI() {
|
||||
return unk2700BJHAMKKECEI_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (unk2700BJHAMKKECEI_ != 0) {
|
||||
output.writeUInt32(12, unk2700BJHAMKKECEI_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (unk2700BJHAMKKECEI_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(12, unk2700BJHAMKKECEI_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify other = (emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify) obj;
|
||||
|
||||
if (getUnk2700BJHAMKKECEI()
|
||||
!= other.getUnk2700BJHAMKKECEI()) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + UNK2700_BJHAMKKECEI_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getUnk2700BJHAMKKECEI();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4872
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_FJEHHCPCBLG_ServerNotify}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:Unk2700_FJEHHCPCBLG_ServerNotify)
|
||||
emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotifyOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify.class, emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
unk2700BJHAMKKECEI_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify build() {
|
||||
emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify buildPartial() {
|
||||
emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify result = new emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify(this);
|
||||
result.unk2700BJHAMKKECEI_ = unk2700BJHAMKKECEI_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify other) {
|
||||
if (other == emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify.getDefaultInstance()) return this;
|
||||
if (other.getUnk2700BJHAMKKECEI() != 0) {
|
||||
setUnk2700BJHAMKKECEI(other.getUnk2700BJHAMKKECEI());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private int unk2700BJHAMKKECEI_ ;
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 12;</code>
|
||||
* @return The unk2700BJHAMKKECEI.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getUnk2700BJHAMKKECEI() {
|
||||
return unk2700BJHAMKKECEI_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 12;</code>
|
||||
* @param value The unk2700BJHAMKKECEI to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setUnk2700BJHAMKKECEI(int value) {
|
||||
|
||||
unk2700BJHAMKKECEI_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 Unk2700_BJHAMKKECEI = 12;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearUnk2700BJHAMKKECEI() {
|
||||
|
||||
unk2700BJHAMKKECEI_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:Unk2700_FJEHHCPCBLG_ServerNotify)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:Unk2700_FJEHHCPCBLG_ServerNotify)
|
||||
private static final emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<Unk2700_FJEHHCPCBLG_ServerNotify>
|
||||
PARSER = new com.google.protobuf.AbstractParser<Unk2700_FJEHHCPCBLG_ServerNotify>() {
|
||||
@java.lang.Override
|
||||
public Unk2700_FJEHHCPCBLG_ServerNotify parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new Unk2700_FJEHHCPCBLG_ServerNotify(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<Unk2700_FJEHHCPCBLG_ServerNotify> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<Unk2700_FJEHHCPCBLG_ServerNotify> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700FJEHHCPCBLGServerNotify.Unk2700_FJEHHCPCBLG_ServerNotify getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n&Unk2700_FJEHHCPCBLG_ServerNotify.proto" +
|
||||
"\"?\n Unk2700_FJEHHCPCBLG_ServerNotify\022\033\n\023" +
|
||||
"Unk2700_BJHAMKKECEI\030\014 \001(\rB\033\n\031emu.grasscu" +
|
||||
"tter.net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_Unk2700_FJEHHCPCBLG_ServerNotify_descriptor,
|
||||
new java.lang.String[] { "Unk2700BJHAMKKECEI", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,676 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: Unk2700_LOHBMOKOPLH_ServerNotify.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class Unk2700LOHBMOKOPLHServerNotify {
|
||||
private Unk2700LOHBMOKOPLHServerNotify() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface Unk2700_LOHBMOKOPLH_ServerNotifyOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:Unk2700_LOHBMOKOPLH_ServerNotify)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @return A list containing the unk2700KMEKMNONMGE.
|
||||
*/
|
||||
java.util.List<java.lang.Integer> getUnk2700KMEKMNONMGEList();
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @return The count of unk2700KMEKMNONMGE.
|
||||
*/
|
||||
int getUnk2700KMEKMNONMGECount();
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The unk2700KMEKMNONMGE at the given index.
|
||||
*/
|
||||
int getUnk2700KMEKMNONMGE(int index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4608
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_LOHBMOKOPLH_ServerNotify}
|
||||
*/
|
||||
public static final class Unk2700_LOHBMOKOPLH_ServerNotify extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:Unk2700_LOHBMOKOPLH_ServerNotify)
|
||||
Unk2700_LOHBMOKOPLH_ServerNotifyOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use Unk2700_LOHBMOKOPLH_ServerNotify.newBuilder() to construct.
|
||||
private Unk2700_LOHBMOKOPLH_ServerNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private Unk2700_LOHBMOKOPLH_ServerNotify() {
|
||||
unk2700KMEKMNONMGE_ = emptyIntList();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new Unk2700_LOHBMOKOPLH_ServerNotify();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private Unk2700_LOHBMOKOPLH_ServerNotify(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 88: {
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
unk2700KMEKMNONMGE_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
unk2700KMEKMNONMGE_.addInt(input.readUInt32());
|
||||
break;
|
||||
}
|
||||
case 90: {
|
||||
int length = input.readRawVarint32();
|
||||
int limit = input.pushLimit(length);
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
|
||||
unk2700KMEKMNONMGE_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
while (input.getBytesUntilLimit() > 0) {
|
||||
unk2700KMEKMNONMGE_.addInt(input.readUInt32());
|
||||
}
|
||||
input.popLimit(limit);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
if (((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
unk2700KMEKMNONMGE_.makeImmutable(); // C
|
||||
}
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify.class, emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify.Builder.class);
|
||||
}
|
||||
|
||||
public static final int UNK2700_KMEKMNONMGE_FIELD_NUMBER = 11;
|
||||
private com.google.protobuf.Internal.IntList unk2700KMEKMNONMGE_;
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @return A list containing the unk2700KMEKMNONMGE.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<java.lang.Integer>
|
||||
getUnk2700KMEKMNONMGEList() {
|
||||
return unk2700KMEKMNONMGE_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @return The count of unk2700KMEKMNONMGE.
|
||||
*/
|
||||
public int getUnk2700KMEKMNONMGECount() {
|
||||
return unk2700KMEKMNONMGE_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The unk2700KMEKMNONMGE at the given index.
|
||||
*/
|
||||
public int getUnk2700KMEKMNONMGE(int index) {
|
||||
return unk2700KMEKMNONMGE_.getInt(index);
|
||||
}
|
||||
private int unk2700KMEKMNONMGEMemoizedSerializedSize = -1;
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
if (getUnk2700KMEKMNONMGEList().size() > 0) {
|
||||
output.writeUInt32NoTag(90);
|
||||
output.writeUInt32NoTag(unk2700KMEKMNONMGEMemoizedSerializedSize);
|
||||
}
|
||||
for (int i = 0; i < unk2700KMEKMNONMGE_.size(); i++) {
|
||||
output.writeUInt32NoTag(unk2700KMEKMNONMGE_.getInt(i));
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < unk2700KMEKMNONMGE_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32SizeNoTag(unk2700KMEKMNONMGE_.getInt(i));
|
||||
}
|
||||
size += dataSize;
|
||||
if (!getUnk2700KMEKMNONMGEList().isEmpty()) {
|
||||
size += 1;
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32SizeNoTag(dataSize);
|
||||
}
|
||||
unk2700KMEKMNONMGEMemoizedSerializedSize = dataSize;
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify other = (emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify) obj;
|
||||
|
||||
if (!getUnk2700KMEKMNONMGEList()
|
||||
.equals(other.getUnk2700KMEKMNONMGEList())) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
if (getUnk2700KMEKMNONMGECount() > 0) {
|
||||
hash = (37 * hash) + UNK2700_KMEKMNONMGE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getUnk2700KMEKMNONMGEList().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4608
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_LOHBMOKOPLH_ServerNotify}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:Unk2700_LOHBMOKOPLH_ServerNotify)
|
||||
emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotifyOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify.class, emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
unk2700KMEKMNONMGE_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify build() {
|
||||
emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify buildPartial() {
|
||||
emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify result = new emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
if (((bitField0_ & 0x00000001) != 0)) {
|
||||
unk2700KMEKMNONMGE_.makeImmutable();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
}
|
||||
result.unk2700KMEKMNONMGE_ = unk2700KMEKMNONMGE_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify other) {
|
||||
if (other == emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify.getDefaultInstance()) return this;
|
||||
if (!other.unk2700KMEKMNONMGE_.isEmpty()) {
|
||||
if (unk2700KMEKMNONMGE_.isEmpty()) {
|
||||
unk2700KMEKMNONMGE_ = other.unk2700KMEKMNONMGE_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
ensureUnk2700KMEKMNONMGEIsMutable();
|
||||
unk2700KMEKMNONMGE_.addAll(other.unk2700KMEKMNONMGE_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private com.google.protobuf.Internal.IntList unk2700KMEKMNONMGE_ = emptyIntList();
|
||||
private void ensureUnk2700KMEKMNONMGEIsMutable() {
|
||||
if (!((bitField0_ & 0x00000001) != 0)) {
|
||||
unk2700KMEKMNONMGE_ = mutableCopy(unk2700KMEKMNONMGE_);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @return A list containing the unk2700KMEKMNONMGE.
|
||||
*/
|
||||
public java.util.List<java.lang.Integer>
|
||||
getUnk2700KMEKMNONMGEList() {
|
||||
return ((bitField0_ & 0x00000001) != 0) ?
|
||||
java.util.Collections.unmodifiableList(unk2700KMEKMNONMGE_) : unk2700KMEKMNONMGE_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @return The count of unk2700KMEKMNONMGE.
|
||||
*/
|
||||
public int getUnk2700KMEKMNONMGECount() {
|
||||
return unk2700KMEKMNONMGE_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The unk2700KMEKMNONMGE at the given index.
|
||||
*/
|
||||
public int getUnk2700KMEKMNONMGE(int index) {
|
||||
return unk2700KMEKMNONMGE_.getInt(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @param index The index to set the value at.
|
||||
* @param value The unk2700KMEKMNONMGE to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setUnk2700KMEKMNONMGE(
|
||||
int index, int value) {
|
||||
ensureUnk2700KMEKMNONMGEIsMutable();
|
||||
unk2700KMEKMNONMGE_.setInt(index, value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @param value The unk2700KMEKMNONMGE to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addUnk2700KMEKMNONMGE(int value) {
|
||||
ensureUnk2700KMEKMNONMGEIsMutable();
|
||||
unk2700KMEKMNONMGE_.addInt(value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @param values The unk2700KMEKMNONMGE to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addAllUnk2700KMEKMNONMGE(
|
||||
java.lang.Iterable<? extends java.lang.Integer> values) {
|
||||
ensureUnk2700KMEKMNONMGEIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, unk2700KMEKMNONMGE_);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_KMEKMNONMGE = 11;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearUnk2700KMEKMNONMGE() {
|
||||
unk2700KMEKMNONMGE_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:Unk2700_LOHBMOKOPLH_ServerNotify)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:Unk2700_LOHBMOKOPLH_ServerNotify)
|
||||
private static final emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<Unk2700_LOHBMOKOPLH_ServerNotify>
|
||||
PARSER = new com.google.protobuf.AbstractParser<Unk2700_LOHBMOKOPLH_ServerNotify>() {
|
||||
@java.lang.Override
|
||||
public Unk2700_LOHBMOKOPLH_ServerNotify parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new Unk2700_LOHBMOKOPLH_ServerNotify(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<Unk2700_LOHBMOKOPLH_ServerNotify> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<Unk2700_LOHBMOKOPLH_ServerNotify> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700LOHBMOKOPLHServerNotify.Unk2700_LOHBMOKOPLH_ServerNotify getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n&Unk2700_LOHBMOKOPLH_ServerNotify.proto" +
|
||||
"\"?\n Unk2700_LOHBMOKOPLH_ServerNotify\022\033\n\023" +
|
||||
"Unk2700_KMEKMNONMGE\030\013 \003(\rB\033\n\031emu.grasscu" +
|
||||
"tter.net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_Unk2700_LOHBMOKOPLH_ServerNotify_descriptor,
|
||||
new java.lang.String[] { "Unk2700KMEKMNONMGE", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,676 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: Unk2700_MEBFPBDNPGO_ServerNotify.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class Unk2700MEBFPBDNPGOServerNotify {
|
||||
private Unk2700MEBFPBDNPGOServerNotify() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface Unk2700_MEBFPBDNPGO_ServerNotifyOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:Unk2700_MEBFPBDNPGO_ServerNotify)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @return A list containing the unk2700ELJPLMIHNIP.
|
||||
*/
|
||||
java.util.List<java.lang.Integer> getUnk2700ELJPLMIHNIPList();
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @return The count of unk2700ELJPLMIHNIP.
|
||||
*/
|
||||
int getUnk2700ELJPLMIHNIPCount();
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The unk2700ELJPLMIHNIP at the given index.
|
||||
*/
|
||||
int getUnk2700ELJPLMIHNIP(int index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4847
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_MEBFPBDNPGO_ServerNotify}
|
||||
*/
|
||||
public static final class Unk2700_MEBFPBDNPGO_ServerNotify extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:Unk2700_MEBFPBDNPGO_ServerNotify)
|
||||
Unk2700_MEBFPBDNPGO_ServerNotifyOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use Unk2700_MEBFPBDNPGO_ServerNotify.newBuilder() to construct.
|
||||
private Unk2700_MEBFPBDNPGO_ServerNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private Unk2700_MEBFPBDNPGO_ServerNotify() {
|
||||
unk2700ELJPLMIHNIP_ = emptyIntList();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new Unk2700_MEBFPBDNPGO_ServerNotify();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private Unk2700_MEBFPBDNPGO_ServerNotify(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 88: {
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
unk2700ELJPLMIHNIP_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
unk2700ELJPLMIHNIP_.addInt(input.readUInt32());
|
||||
break;
|
||||
}
|
||||
case 90: {
|
||||
int length = input.readRawVarint32();
|
||||
int limit = input.pushLimit(length);
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
|
||||
unk2700ELJPLMIHNIP_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
while (input.getBytesUntilLimit() > 0) {
|
||||
unk2700ELJPLMIHNIP_.addInt(input.readUInt32());
|
||||
}
|
||||
input.popLimit(limit);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
if (((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
unk2700ELJPLMIHNIP_.makeImmutable(); // C
|
||||
}
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify.class, emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify.Builder.class);
|
||||
}
|
||||
|
||||
public static final int UNK2700_ELJPLMIHNIP_FIELD_NUMBER = 11;
|
||||
private com.google.protobuf.Internal.IntList unk2700ELJPLMIHNIP_;
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @return A list containing the unk2700ELJPLMIHNIP.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<java.lang.Integer>
|
||||
getUnk2700ELJPLMIHNIPList() {
|
||||
return unk2700ELJPLMIHNIP_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @return The count of unk2700ELJPLMIHNIP.
|
||||
*/
|
||||
public int getUnk2700ELJPLMIHNIPCount() {
|
||||
return unk2700ELJPLMIHNIP_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The unk2700ELJPLMIHNIP at the given index.
|
||||
*/
|
||||
public int getUnk2700ELJPLMIHNIP(int index) {
|
||||
return unk2700ELJPLMIHNIP_.getInt(index);
|
||||
}
|
||||
private int unk2700ELJPLMIHNIPMemoizedSerializedSize = -1;
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
if (getUnk2700ELJPLMIHNIPList().size() > 0) {
|
||||
output.writeUInt32NoTag(90);
|
||||
output.writeUInt32NoTag(unk2700ELJPLMIHNIPMemoizedSerializedSize);
|
||||
}
|
||||
for (int i = 0; i < unk2700ELJPLMIHNIP_.size(); i++) {
|
||||
output.writeUInt32NoTag(unk2700ELJPLMIHNIP_.getInt(i));
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < unk2700ELJPLMIHNIP_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32SizeNoTag(unk2700ELJPLMIHNIP_.getInt(i));
|
||||
}
|
||||
size += dataSize;
|
||||
if (!getUnk2700ELJPLMIHNIPList().isEmpty()) {
|
||||
size += 1;
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32SizeNoTag(dataSize);
|
||||
}
|
||||
unk2700ELJPLMIHNIPMemoizedSerializedSize = dataSize;
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify other = (emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify) obj;
|
||||
|
||||
if (!getUnk2700ELJPLMIHNIPList()
|
||||
.equals(other.getUnk2700ELJPLMIHNIPList())) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
if (getUnk2700ELJPLMIHNIPCount() > 0) {
|
||||
hash = (37 * hash) + UNK2700_ELJPLMIHNIP_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getUnk2700ELJPLMIHNIPList().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4847
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_MEBFPBDNPGO_ServerNotify}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:Unk2700_MEBFPBDNPGO_ServerNotify)
|
||||
emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotifyOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify.class, emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
unk2700ELJPLMIHNIP_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify build() {
|
||||
emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify buildPartial() {
|
||||
emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify result = new emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
if (((bitField0_ & 0x00000001) != 0)) {
|
||||
unk2700ELJPLMIHNIP_.makeImmutable();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
}
|
||||
result.unk2700ELJPLMIHNIP_ = unk2700ELJPLMIHNIP_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify other) {
|
||||
if (other == emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify.getDefaultInstance()) return this;
|
||||
if (!other.unk2700ELJPLMIHNIP_.isEmpty()) {
|
||||
if (unk2700ELJPLMIHNIP_.isEmpty()) {
|
||||
unk2700ELJPLMIHNIP_ = other.unk2700ELJPLMIHNIP_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
ensureUnk2700ELJPLMIHNIPIsMutable();
|
||||
unk2700ELJPLMIHNIP_.addAll(other.unk2700ELJPLMIHNIP_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private com.google.protobuf.Internal.IntList unk2700ELJPLMIHNIP_ = emptyIntList();
|
||||
private void ensureUnk2700ELJPLMIHNIPIsMutable() {
|
||||
if (!((bitField0_ & 0x00000001) != 0)) {
|
||||
unk2700ELJPLMIHNIP_ = mutableCopy(unk2700ELJPLMIHNIP_);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @return A list containing the unk2700ELJPLMIHNIP.
|
||||
*/
|
||||
public java.util.List<java.lang.Integer>
|
||||
getUnk2700ELJPLMIHNIPList() {
|
||||
return ((bitField0_ & 0x00000001) != 0) ?
|
||||
java.util.Collections.unmodifiableList(unk2700ELJPLMIHNIP_) : unk2700ELJPLMIHNIP_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @return The count of unk2700ELJPLMIHNIP.
|
||||
*/
|
||||
public int getUnk2700ELJPLMIHNIPCount() {
|
||||
return unk2700ELJPLMIHNIP_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The unk2700ELJPLMIHNIP at the given index.
|
||||
*/
|
||||
public int getUnk2700ELJPLMIHNIP(int index) {
|
||||
return unk2700ELJPLMIHNIP_.getInt(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @param index The index to set the value at.
|
||||
* @param value The unk2700ELJPLMIHNIP to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setUnk2700ELJPLMIHNIP(
|
||||
int index, int value) {
|
||||
ensureUnk2700ELJPLMIHNIPIsMutable();
|
||||
unk2700ELJPLMIHNIP_.setInt(index, value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @param value The unk2700ELJPLMIHNIP to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addUnk2700ELJPLMIHNIP(int value) {
|
||||
ensureUnk2700ELJPLMIHNIPIsMutable();
|
||||
unk2700ELJPLMIHNIP_.addInt(value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @param values The unk2700ELJPLMIHNIP to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addAllUnk2700ELJPLMIHNIP(
|
||||
java.lang.Iterable<? extends java.lang.Integer> values) {
|
||||
ensureUnk2700ELJPLMIHNIPIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, unk2700ELJPLMIHNIP_);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 Unk2700_ELJPLMIHNIP = 11;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearUnk2700ELJPLMIHNIP() {
|
||||
unk2700ELJPLMIHNIP_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:Unk2700_MEBFPBDNPGO_ServerNotify)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:Unk2700_MEBFPBDNPGO_ServerNotify)
|
||||
private static final emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<Unk2700_MEBFPBDNPGO_ServerNotify>
|
||||
PARSER = new com.google.protobuf.AbstractParser<Unk2700_MEBFPBDNPGO_ServerNotify>() {
|
||||
@java.lang.Override
|
||||
public Unk2700_MEBFPBDNPGO_ServerNotify parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new Unk2700_MEBFPBDNPGO_ServerNotify(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<Unk2700_MEBFPBDNPGO_ServerNotify> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<Unk2700_MEBFPBDNPGO_ServerNotify> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700MEBFPBDNPGOServerNotify.Unk2700_MEBFPBDNPGO_ServerNotify getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n&Unk2700_MEBFPBDNPGO_ServerNotify.proto" +
|
||||
"\"?\n Unk2700_MEBFPBDNPGO_ServerNotify\022\033\n\023" +
|
||||
"Unk2700_ELJPLMIHNIP\030\013 \003(\rB\033\n\031emu.grasscu" +
|
||||
"tter.net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_Unk2700_MEBFPBDNPGO_ServerNotify_descriptor,
|
||||
new java.lang.String[] { "Unk2700ELJPLMIHNIP", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,549 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: Unk2700_OGHMHELMBNN_ServerRsp.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class Unk2700OGHMHELMBNNServerRsp {
|
||||
private Unk2700OGHMHELMBNNServerRsp() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface Unk2700_OGHMHELMBNN_ServerRspOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:Unk2700_OGHMHELMBNN_ServerRsp)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>int32 retcode = 7;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
int getRetcode();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4488
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_OGHMHELMBNN_ServerRsp}
|
||||
*/
|
||||
public static final class Unk2700_OGHMHELMBNN_ServerRsp extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:Unk2700_OGHMHELMBNN_ServerRsp)
|
||||
Unk2700_OGHMHELMBNN_ServerRspOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use Unk2700_OGHMHELMBNN_ServerRsp.newBuilder() to construct.
|
||||
private Unk2700_OGHMHELMBNN_ServerRsp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private Unk2700_OGHMHELMBNN_ServerRsp() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new Unk2700_OGHMHELMBNN_ServerRsp();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private Unk2700_OGHMHELMBNN_ServerRsp(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 56: {
|
||||
|
||||
retcode_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.internal_static_Unk2700_OGHMHELMBNN_ServerRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.internal_static_Unk2700_OGHMHELMBNN_ServerRsp_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp.class, emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp.Builder.class);
|
||||
}
|
||||
|
||||
public static final int RETCODE_FIELD_NUMBER = 7;
|
||||
private int retcode_;
|
||||
/**
|
||||
* <code>int32 retcode = 7;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getRetcode() {
|
||||
return retcode_;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (retcode_ != 0) {
|
||||
output.writeInt32(7, retcode_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (retcode_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(7, retcode_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp other = (emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp) obj;
|
||||
|
||||
if (getRetcode()
|
||||
!= other.getRetcode()) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + RETCODE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getRetcode();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4488
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code Unk2700_OGHMHELMBNN_ServerRsp}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:Unk2700_OGHMHELMBNN_ServerRsp)
|
||||
emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRspOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.internal_static_Unk2700_OGHMHELMBNN_ServerRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.internal_static_Unk2700_OGHMHELMBNN_ServerRsp_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp.class, emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
retcode_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.internal_static_Unk2700_OGHMHELMBNN_ServerRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp build() {
|
||||
emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp buildPartial() {
|
||||
emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp result = new emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp(this);
|
||||
result.retcode_ = retcode_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp other) {
|
||||
if (other == emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp.getDefaultInstance()) return this;
|
||||
if (other.getRetcode() != 0) {
|
||||
setRetcode(other.getRetcode());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private int retcode_ ;
|
||||
/**
|
||||
* <code>int32 retcode = 7;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getRetcode() {
|
||||
return retcode_;
|
||||
}
|
||||
/**
|
||||
* <code>int32 retcode = 7;</code>
|
||||
* @param value The retcode to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setRetcode(int value) {
|
||||
|
||||
retcode_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>int32 retcode = 7;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearRetcode() {
|
||||
|
||||
retcode_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:Unk2700_OGHMHELMBNN_ServerRsp)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:Unk2700_OGHMHELMBNN_ServerRsp)
|
||||
private static final emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<Unk2700_OGHMHELMBNN_ServerRsp>
|
||||
PARSER = new com.google.protobuf.AbstractParser<Unk2700_OGHMHELMBNN_ServerRsp>() {
|
||||
@java.lang.Override
|
||||
public Unk2700_OGHMHELMBNN_ServerRsp parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new Unk2700_OGHMHELMBNN_ServerRsp(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<Unk2700_OGHMHELMBNN_ServerRsp> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<Unk2700_OGHMHELMBNN_ServerRsp> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.Unk2700OGHMHELMBNNServerRsp.Unk2700_OGHMHELMBNN_ServerRsp getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_Unk2700_OGHMHELMBNN_ServerRsp_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_Unk2700_OGHMHELMBNN_ServerRsp_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n#Unk2700_OGHMHELMBNN_ServerRsp.proto\"0\n" +
|
||||
"\035Unk2700_OGHMHELMBNN_ServerRsp\022\017\n\007retcod" +
|
||||
"e\030\007 \001(\005B\033\n\031emu.grasscutter.net.protob\006pr" +
|
||||
"oto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_Unk2700_OGHMHELMBNN_ServerRsp_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_Unk2700_OGHMHELMBNN_ServerRsp_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_Unk2700_OGHMHELMBNN_ServerRsp_descriptor,
|
||||
new java.lang.String[] { "Retcode", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,779 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: UpdateAbilityCreatedMovingPlatformNotify.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class UpdateAbilityCreatedMovingPlatformNotifyOuterClass {
|
||||
private UpdateAbilityCreatedMovingPlatformNotifyOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface UpdateAbilityCreatedMovingPlatformNotifyOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:UpdateAbilityCreatedMovingPlatformNotify)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>uint32 entity_id = 4;</code>
|
||||
* @return The entityId.
|
||||
*/
|
||||
int getEntityId();
|
||||
|
||||
/**
|
||||
* <code>.UpdateAbilityCreatedMovingPlatformNotify.OpType op_type = 3;</code>
|
||||
* @return The enum numeric value on the wire for opType.
|
||||
*/
|
||||
int getOpTypeValue();
|
||||
/**
|
||||
* <code>.UpdateAbilityCreatedMovingPlatformNotify.OpType op_type = 3;</code>
|
||||
* @return The opType.
|
||||
*/
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType getOpType();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 881
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* IsAllowClient: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code UpdateAbilityCreatedMovingPlatformNotify}
|
||||
*/
|
||||
public static final class UpdateAbilityCreatedMovingPlatformNotify extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:UpdateAbilityCreatedMovingPlatformNotify)
|
||||
UpdateAbilityCreatedMovingPlatformNotifyOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use UpdateAbilityCreatedMovingPlatformNotify.newBuilder() to construct.
|
||||
private UpdateAbilityCreatedMovingPlatformNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private UpdateAbilityCreatedMovingPlatformNotify() {
|
||||
opType_ = 0;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new UpdateAbilityCreatedMovingPlatformNotify();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private UpdateAbilityCreatedMovingPlatformNotify(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 24: {
|
||||
int rawValue = input.readEnum();
|
||||
|
||||
opType_ = rawValue;
|
||||
break;
|
||||
}
|
||||
case 32: {
|
||||
|
||||
entityId_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.internal_static_UpdateAbilityCreatedMovingPlatformNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.internal_static_UpdateAbilityCreatedMovingPlatformNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.class, emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.Builder.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf enum {@code UpdateAbilityCreatedMovingPlatformNotify.OpType}
|
||||
*/
|
||||
public enum OpType
|
||||
implements com.google.protobuf.ProtocolMessageEnum {
|
||||
/**
|
||||
* <code>OP_TYPE_NONE = 0;</code>
|
||||
*/
|
||||
OP_TYPE_NONE(0),
|
||||
/**
|
||||
* <code>OP_TYPE_ACTIVATE = 1;</code>
|
||||
*/
|
||||
OP_TYPE_ACTIVATE(1),
|
||||
/**
|
||||
* <code>OP_TYPE_DEACTIVATE = 2;</code>
|
||||
*/
|
||||
OP_TYPE_DEACTIVATE(2),
|
||||
UNRECOGNIZED(-1),
|
||||
;
|
||||
|
||||
/**
|
||||
* <code>OP_TYPE_NONE = 0;</code>
|
||||
*/
|
||||
public static final int OP_TYPE_NONE_VALUE = 0;
|
||||
/**
|
||||
* <code>OP_TYPE_ACTIVATE = 1;</code>
|
||||
*/
|
||||
public static final int OP_TYPE_ACTIVATE_VALUE = 1;
|
||||
/**
|
||||
* <code>OP_TYPE_DEACTIVATE = 2;</code>
|
||||
*/
|
||||
public static final int OP_TYPE_DEACTIVATE_VALUE = 2;
|
||||
|
||||
|
||||
public final int getNumber() {
|
||||
if (this == UNRECOGNIZED) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"Can't get the number of an unknown enum value.");
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value The numeric wire value of the corresponding enum entry.
|
||||
* @return The enum associated with the given numeric wire value.
|
||||
* @deprecated Use {@link #forNumber(int)} instead.
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
public static OpType valueOf(int value) {
|
||||
return forNumber(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param value The numeric wire value of the corresponding enum entry.
|
||||
* @return The enum associated with the given numeric wire value.
|
||||
*/
|
||||
public static OpType forNumber(int value) {
|
||||
switch (value) {
|
||||
case 0: return OP_TYPE_NONE;
|
||||
case 1: return OP_TYPE_ACTIVATE;
|
||||
case 2: return OP_TYPE_DEACTIVATE;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Internal.EnumLiteMap<OpType>
|
||||
internalGetValueMap() {
|
||||
return internalValueMap;
|
||||
}
|
||||
private static final com.google.protobuf.Internal.EnumLiteMap<
|
||||
OpType> internalValueMap =
|
||||
new com.google.protobuf.Internal.EnumLiteMap<OpType>() {
|
||||
public OpType findValueByNumber(int number) {
|
||||
return OpType.forNumber(number);
|
||||
}
|
||||
};
|
||||
|
||||
public final com.google.protobuf.Descriptors.EnumValueDescriptor
|
||||
getValueDescriptor() {
|
||||
if (this == UNRECOGNIZED) {
|
||||
throw new java.lang.IllegalStateException(
|
||||
"Can't get the descriptor of an unrecognized enum value.");
|
||||
}
|
||||
return getDescriptor().getValues().get(ordinal());
|
||||
}
|
||||
public final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptorForType() {
|
||||
return getDescriptor();
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.EnumDescriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.getDescriptor().getEnumTypes().get(0);
|
||||
}
|
||||
|
||||
private static final OpType[] VALUES = values();
|
||||
|
||||
public static OpType valueOf(
|
||||
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
|
||||
if (desc.getType() != getDescriptor()) {
|
||||
throw new java.lang.IllegalArgumentException(
|
||||
"EnumValueDescriptor is not for this type.");
|
||||
}
|
||||
if (desc.getIndex() == -1) {
|
||||
return UNRECOGNIZED;
|
||||
}
|
||||
return VALUES[desc.getIndex()];
|
||||
}
|
||||
|
||||
private final int value;
|
||||
|
||||
private OpType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:UpdateAbilityCreatedMovingPlatformNotify.OpType)
|
||||
}
|
||||
|
||||
public static final int ENTITY_ID_FIELD_NUMBER = 4;
|
||||
private int entityId_;
|
||||
/**
|
||||
* <code>uint32 entity_id = 4;</code>
|
||||
* @return The entityId.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getEntityId() {
|
||||
return entityId_;
|
||||
}
|
||||
|
||||
public static final int OP_TYPE_FIELD_NUMBER = 3;
|
||||
private int opType_;
|
||||
/**
|
||||
* <code>.UpdateAbilityCreatedMovingPlatformNotify.OpType op_type = 3;</code>
|
||||
* @return The enum numeric value on the wire for opType.
|
||||
*/
|
||||
@java.lang.Override public int getOpTypeValue() {
|
||||
return opType_;
|
||||
}
|
||||
/**
|
||||
* <code>.UpdateAbilityCreatedMovingPlatformNotify.OpType op_type = 3;</code>
|
||||
* @return The opType.
|
||||
*/
|
||||
@java.lang.Override public emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType getOpType() {
|
||||
@SuppressWarnings("deprecation")
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType result = emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType.valueOf(opType_);
|
||||
return result == null ? emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType.UNRECOGNIZED : result;
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (opType_ != emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType.OP_TYPE_NONE.getNumber()) {
|
||||
output.writeEnum(3, opType_);
|
||||
}
|
||||
if (entityId_ != 0) {
|
||||
output.writeUInt32(4, entityId_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (opType_ != emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType.OP_TYPE_NONE.getNumber()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeEnumSize(3, opType_);
|
||||
}
|
||||
if (entityId_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32Size(4, entityId_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify other = (emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify) obj;
|
||||
|
||||
if (getEntityId()
|
||||
!= other.getEntityId()) return false;
|
||||
if (opType_ != other.opType_) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getEntityId();
|
||||
hash = (37 * hash) + OP_TYPE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + opType_;
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 881
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* IsAllowClient: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code UpdateAbilityCreatedMovingPlatformNotify}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:UpdateAbilityCreatedMovingPlatformNotify)
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotifyOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.internal_static_UpdateAbilityCreatedMovingPlatformNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.internal_static_UpdateAbilityCreatedMovingPlatformNotify_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.class, emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
entityId_ = 0;
|
||||
|
||||
opType_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.internal_static_UpdateAbilityCreatedMovingPlatformNotify_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify build() {
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify buildPartial() {
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify result = new emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify(this);
|
||||
result.entityId_ = entityId_;
|
||||
result.opType_ = opType_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify other) {
|
||||
if (other == emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.getDefaultInstance()) return this;
|
||||
if (other.getEntityId() != 0) {
|
||||
setEntityId(other.getEntityId());
|
||||
}
|
||||
if (other.opType_ != 0) {
|
||||
setOpTypeValue(other.getOpTypeValue());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private int entityId_ ;
|
||||
/**
|
||||
* <code>uint32 entity_id = 4;</code>
|
||||
* @return The entityId.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getEntityId() {
|
||||
return entityId_;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 entity_id = 4;</code>
|
||||
* @param value The entityId to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setEntityId(int value) {
|
||||
|
||||
entityId_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>uint32 entity_id = 4;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearEntityId() {
|
||||
|
||||
entityId_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private int opType_ = 0;
|
||||
/**
|
||||
* <code>.UpdateAbilityCreatedMovingPlatformNotify.OpType op_type = 3;</code>
|
||||
* @return The enum numeric value on the wire for opType.
|
||||
*/
|
||||
@java.lang.Override public int getOpTypeValue() {
|
||||
return opType_;
|
||||
}
|
||||
/**
|
||||
* <code>.UpdateAbilityCreatedMovingPlatformNotify.OpType op_type = 3;</code>
|
||||
* @param value The enum numeric value on the wire for opType to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setOpTypeValue(int value) {
|
||||
|
||||
opType_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.UpdateAbilityCreatedMovingPlatformNotify.OpType op_type = 3;</code>
|
||||
* @return The opType.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType getOpType() {
|
||||
@SuppressWarnings("deprecation")
|
||||
emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType result = emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType.valueOf(opType_);
|
||||
return result == null ? emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType.UNRECOGNIZED : result;
|
||||
}
|
||||
/**
|
||||
* <code>.UpdateAbilityCreatedMovingPlatformNotify.OpType op_type = 3;</code>
|
||||
* @param value The opType to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setOpType(emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify.OpType value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
opType_ = value.getNumber();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>.UpdateAbilityCreatedMovingPlatformNotify.OpType op_type = 3;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearOpType() {
|
||||
|
||||
opType_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:UpdateAbilityCreatedMovingPlatformNotify)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:UpdateAbilityCreatedMovingPlatformNotify)
|
||||
private static final emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<UpdateAbilityCreatedMovingPlatformNotify>
|
||||
PARSER = new com.google.protobuf.AbstractParser<UpdateAbilityCreatedMovingPlatformNotify>() {
|
||||
@java.lang.Override
|
||||
public UpdateAbilityCreatedMovingPlatformNotify parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new UpdateAbilityCreatedMovingPlatformNotify(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<UpdateAbilityCreatedMovingPlatformNotify> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<UpdateAbilityCreatedMovingPlatformNotify> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdateAbilityCreatedMovingPlatformNotifyOuterClass.UpdateAbilityCreatedMovingPlatformNotify getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_UpdateAbilityCreatedMovingPlatformNotify_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_UpdateAbilityCreatedMovingPlatformNotify_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n.UpdateAbilityCreatedMovingPlatformNoti" +
|
||||
"fy.proto\"\312\001\n(UpdateAbilityCreatedMovingP" +
|
||||
"latformNotify\022\021\n\tentity_id\030\004 \001(\r\022A\n\007op_t" +
|
||||
"ype\030\003 \001(\01620.UpdateAbilityCreatedMovingPl" +
|
||||
"atformNotify.OpType\"H\n\006OpType\022\020\n\014OP_TYPE" +
|
||||
"_NONE\020\000\022\024\n\020OP_TYPE_ACTIVATE\020\001\022\026\n\022OP_TYPE" +
|
||||
"_DEACTIVATE\020\002B\033\n\031emu.grasscutter.net.pro" +
|
||||
"tob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_UpdateAbilityCreatedMovingPlatformNotify_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_UpdateAbilityCreatedMovingPlatformNotify_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_UpdateAbilityCreatedMovingPlatformNotify_descriptor,
|
||||
new java.lang.String[] { "EntityId", "OpType", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,678 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: UpdatePlayerShowNameCardListReq.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class UpdatePlayerShowNameCardListReqOuterClass {
|
||||
private UpdatePlayerShowNameCardListReqOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface UpdatePlayerShowNameCardListReqOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:UpdatePlayerShowNameCardListReq)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @return A list containing the showNameCardIdList.
|
||||
*/
|
||||
java.util.List<java.lang.Integer> getShowNameCardIdListList();
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @return The count of showNameCardIdList.
|
||||
*/
|
||||
int getShowNameCardIdListCount();
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The showNameCardIdList at the given index.
|
||||
*/
|
||||
int getShowNameCardIdList(int index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4002
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* IsAllowClient: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code UpdatePlayerShowNameCardListReq}
|
||||
*/
|
||||
public static final class UpdatePlayerShowNameCardListReq extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:UpdatePlayerShowNameCardListReq)
|
||||
UpdatePlayerShowNameCardListReqOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use UpdatePlayerShowNameCardListReq.newBuilder() to construct.
|
||||
private UpdatePlayerShowNameCardListReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private UpdatePlayerShowNameCardListReq() {
|
||||
showNameCardIdList_ = emptyIntList();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new UpdatePlayerShowNameCardListReq();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private UpdatePlayerShowNameCardListReq(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 120: {
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
showNameCardIdList_.addInt(input.readUInt32());
|
||||
break;
|
||||
}
|
||||
case 122: {
|
||||
int length = input.readRawVarint32();
|
||||
int limit = input.pushLimit(length);
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
|
||||
showNameCardIdList_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
while (input.getBytesUntilLimit() > 0) {
|
||||
showNameCardIdList_.addInt(input.readUInt32());
|
||||
}
|
||||
input.popLimit(limit);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
if (((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_.makeImmutable(); // C
|
||||
}
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.class, emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.Builder.class);
|
||||
}
|
||||
|
||||
public static final int SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER = 15;
|
||||
private com.google.protobuf.Internal.IntList showNameCardIdList_;
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @return A list containing the showNameCardIdList.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<java.lang.Integer>
|
||||
getShowNameCardIdListList() {
|
||||
return showNameCardIdList_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @return The count of showNameCardIdList.
|
||||
*/
|
||||
public int getShowNameCardIdListCount() {
|
||||
return showNameCardIdList_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The showNameCardIdList at the given index.
|
||||
*/
|
||||
public int getShowNameCardIdList(int index) {
|
||||
return showNameCardIdList_.getInt(index);
|
||||
}
|
||||
private int showNameCardIdListMemoizedSerializedSize = -1;
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
if (getShowNameCardIdListList().size() > 0) {
|
||||
output.writeUInt32NoTag(122);
|
||||
output.writeUInt32NoTag(showNameCardIdListMemoizedSerializedSize);
|
||||
}
|
||||
for (int i = 0; i < showNameCardIdList_.size(); i++) {
|
||||
output.writeUInt32NoTag(showNameCardIdList_.getInt(i));
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < showNameCardIdList_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32SizeNoTag(showNameCardIdList_.getInt(i));
|
||||
}
|
||||
size += dataSize;
|
||||
if (!getShowNameCardIdListList().isEmpty()) {
|
||||
size += 1;
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32SizeNoTag(dataSize);
|
||||
}
|
||||
showNameCardIdListMemoizedSerializedSize = dataSize;
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq other = (emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq) obj;
|
||||
|
||||
if (!getShowNameCardIdListList()
|
||||
.equals(other.getShowNameCardIdListList())) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
if (getShowNameCardIdListCount() > 0) {
|
||||
hash = (37 * hash) + SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getShowNameCardIdListList().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4002
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* IsAllowClient: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code UpdatePlayerShowNameCardListReq}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:UpdatePlayerShowNameCardListReq)
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReqOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.class, emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
showNameCardIdList_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.internal_static_UpdatePlayerShowNameCardListReq_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq build() {
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq buildPartial() {
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq result = new emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
if (((bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_.makeImmutable();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
}
|
||||
result.showNameCardIdList_ = showNameCardIdList_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq other) {
|
||||
if (other == emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq.getDefaultInstance()) return this;
|
||||
if (!other.showNameCardIdList_.isEmpty()) {
|
||||
if (showNameCardIdList_.isEmpty()) {
|
||||
showNameCardIdList_ = other.showNameCardIdList_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
showNameCardIdList_.addAll(other.showNameCardIdList_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private com.google.protobuf.Internal.IntList showNameCardIdList_ = emptyIntList();
|
||||
private void ensureShowNameCardIdListIsMutable() {
|
||||
if (!((bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_ = mutableCopy(showNameCardIdList_);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @return A list containing the showNameCardIdList.
|
||||
*/
|
||||
public java.util.List<java.lang.Integer>
|
||||
getShowNameCardIdListList() {
|
||||
return ((bitField0_ & 0x00000001) != 0) ?
|
||||
java.util.Collections.unmodifiableList(showNameCardIdList_) : showNameCardIdList_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @return The count of showNameCardIdList.
|
||||
*/
|
||||
public int getShowNameCardIdListCount() {
|
||||
return showNameCardIdList_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The showNameCardIdList at the given index.
|
||||
*/
|
||||
public int getShowNameCardIdList(int index) {
|
||||
return showNameCardIdList_.getInt(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @param index The index to set the value at.
|
||||
* @param value The showNameCardIdList to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setShowNameCardIdList(
|
||||
int index, int value) {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
showNameCardIdList_.setInt(index, value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @param value The showNameCardIdList to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addShowNameCardIdList(int value) {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
showNameCardIdList_.addInt(value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @param values The showNameCardIdList to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addAllShowNameCardIdList(
|
||||
java.lang.Iterable<? extends java.lang.Integer> values) {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, showNameCardIdList_);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 15;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearShowNameCardIdList() {
|
||||
showNameCardIdList_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:UpdatePlayerShowNameCardListReq)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:UpdatePlayerShowNameCardListReq)
|
||||
private static final emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<UpdatePlayerShowNameCardListReq>
|
||||
PARSER = new com.google.protobuf.AbstractParser<UpdatePlayerShowNameCardListReq>() {
|
||||
@java.lang.Override
|
||||
public UpdatePlayerShowNameCardListReq parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new UpdatePlayerShowNameCardListReq(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<UpdatePlayerShowNameCardListReq> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<UpdatePlayerShowNameCardListReq> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListReqOuterClass.UpdatePlayerShowNameCardListReq getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_UpdatePlayerShowNameCardListReq_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_UpdatePlayerShowNameCardListReq_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n%UpdatePlayerShowNameCardListReq.proto\"" +
|
||||
"A\n\037UpdatePlayerShowNameCardListReq\022\036\n\026sh" +
|
||||
"ow_name_card_id_list\030\017 \003(\rB\033\n\031emu.grassc" +
|
||||
"utter.net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_UpdatePlayerShowNameCardListReq_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_UpdatePlayerShowNameCardListReq_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_UpdatePlayerShowNameCardListReq_descriptor,
|
||||
new java.lang.String[] { "ShowNameCardIdList", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -0,0 +1,746 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: UpdatePlayerShowNameCardListRsp.proto
|
||||
|
||||
package emu.grasscutter.net.proto;
|
||||
|
||||
public final class UpdatePlayerShowNameCardListRspOuterClass {
|
||||
private UpdatePlayerShowNameCardListRspOuterClass() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface UpdatePlayerShowNameCardListRspOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:UpdatePlayerShowNameCardListRsp)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
int getRetcode();
|
||||
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @return A list containing the showNameCardIdList.
|
||||
*/
|
||||
java.util.List<java.lang.Integer> getShowNameCardIdListList();
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @return The count of showNameCardIdList.
|
||||
*/
|
||||
int getShowNameCardIdListCount();
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The showNameCardIdList at the given index.
|
||||
*/
|
||||
int getShowNameCardIdList(int index);
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4019
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code UpdatePlayerShowNameCardListRsp}
|
||||
*/
|
||||
public static final class UpdatePlayerShowNameCardListRsp extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:UpdatePlayerShowNameCardListRsp)
|
||||
UpdatePlayerShowNameCardListRspOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use UpdatePlayerShowNameCardListRsp.newBuilder() to construct.
|
||||
private UpdatePlayerShowNameCardListRsp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private UpdatePlayerShowNameCardListRsp() {
|
||||
showNameCardIdList_ = emptyIntList();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@SuppressWarnings({"unused"})
|
||||
protected java.lang.Object newInstance(
|
||||
UnusedPrivateParameter unused) {
|
||||
return new UpdatePlayerShowNameCardListRsp();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private UpdatePlayerShowNameCardListRsp(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
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;
|
||||
case 96: {
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
showNameCardIdList_.addInt(input.readUInt32());
|
||||
break;
|
||||
}
|
||||
case 98: {
|
||||
int length = input.readRawVarint32();
|
||||
int limit = input.pushLimit(length);
|
||||
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
|
||||
showNameCardIdList_ = newIntList();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
while (input.getBytesUntilLimit() > 0) {
|
||||
showNameCardIdList_.addInt(input.readUInt32());
|
||||
}
|
||||
input.popLimit(limit);
|
||||
break;
|
||||
}
|
||||
case 104: {
|
||||
|
||||
retcode_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (!parseUnknownField(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
if (((mutable_bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_.makeImmutable(); // C
|
||||
}
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.class, emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.Builder.class);
|
||||
}
|
||||
|
||||
public static final int RETCODE_FIELD_NUMBER = 13;
|
||||
private int retcode_;
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getRetcode() {
|
||||
return retcode_;
|
||||
}
|
||||
|
||||
public static final int SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER = 12;
|
||||
private com.google.protobuf.Internal.IntList showNameCardIdList_;
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @return A list containing the showNameCardIdList.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<java.lang.Integer>
|
||||
getShowNameCardIdListList() {
|
||||
return showNameCardIdList_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @return The count of showNameCardIdList.
|
||||
*/
|
||||
public int getShowNameCardIdListCount() {
|
||||
return showNameCardIdList_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The showNameCardIdList at the given index.
|
||||
*/
|
||||
public int getShowNameCardIdList(int index) {
|
||||
return showNameCardIdList_.getInt(index);
|
||||
}
|
||||
private int showNameCardIdListMemoizedSerializedSize = -1;
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
if (getShowNameCardIdListList().size() > 0) {
|
||||
output.writeUInt32NoTag(98);
|
||||
output.writeUInt32NoTag(showNameCardIdListMemoizedSerializedSize);
|
||||
}
|
||||
for (int i = 0; i < showNameCardIdList_.size(); i++) {
|
||||
output.writeUInt32NoTag(showNameCardIdList_.getInt(i));
|
||||
}
|
||||
if (retcode_ != 0) {
|
||||
output.writeInt32(13, retcode_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
{
|
||||
int dataSize = 0;
|
||||
for (int i = 0; i < showNameCardIdList_.size(); i++) {
|
||||
dataSize += com.google.protobuf.CodedOutputStream
|
||||
.computeUInt32SizeNoTag(showNameCardIdList_.getInt(i));
|
||||
}
|
||||
size += dataSize;
|
||||
if (!getShowNameCardIdListList().isEmpty()) {
|
||||
size += 1;
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32SizeNoTag(dataSize);
|
||||
}
|
||||
showNameCardIdListMemoizedSerializedSize = dataSize;
|
||||
}
|
||||
if (retcode_ != 0) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(13, retcode_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp other = (emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp) obj;
|
||||
|
||||
if (getRetcode()
|
||||
!= other.getRetcode()) return false;
|
||||
if (!getShowNameCardIdListList()
|
||||
.equals(other.getShowNameCardIdListList())) return false;
|
||||
if (!unknownFields.equals(other.unknownFields)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + RETCODE_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getRetcode();
|
||||
if (getShowNameCardIdListCount() > 0) {
|
||||
hash = (37 * hash) + SHOW_NAME_CARD_ID_LIST_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getShowNameCardIdListList().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* CmdId: 4019
|
||||
* EnetChannelId: 0
|
||||
* EnetIsReliable: true
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code UpdatePlayerShowNameCardListRsp}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:UpdatePlayerShowNameCardListRsp)
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRspOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.class, emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
retcode_ = 0;
|
||||
|
||||
showNameCardIdList_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.internal_static_UpdatePlayerShowNameCardListRsp_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp getDefaultInstanceForType() {
|
||||
return emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp build() {
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp buildPartial() {
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp result = new emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
result.retcode_ = retcode_;
|
||||
if (((bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_.makeImmutable();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
}
|
||||
result.showNameCardIdList_ = showNameCardIdList_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder clone() {
|
||||
return super.clone();
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.setField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return super.clearField(field);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return super.clearOneof(oneof);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return super.setRepeatedField(field, index, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return super.addRepeatedField(field, value);
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp) {
|
||||
return mergeFrom((emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp other) {
|
||||
if (other == emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp.getDefaultInstance()) return this;
|
||||
if (other.getRetcode() != 0) {
|
||||
setRetcode(other.getRetcode());
|
||||
}
|
||||
if (!other.showNameCardIdList_.isEmpty()) {
|
||||
if (showNameCardIdList_.isEmpty()) {
|
||||
showNameCardIdList_ = other.showNameCardIdList_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
showNameCardIdList_.addAll(other.showNameCardIdList_);
|
||||
}
|
||||
onChanged();
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private int retcode_ ;
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @return The retcode.
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getRetcode() {
|
||||
return retcode_;
|
||||
}
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @param value The retcode to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setRetcode(int value) {
|
||||
|
||||
retcode_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>int32 retcode = 13;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearRetcode() {
|
||||
|
||||
retcode_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private com.google.protobuf.Internal.IntList showNameCardIdList_ = emptyIntList();
|
||||
private void ensureShowNameCardIdListIsMutable() {
|
||||
if (!((bitField0_ & 0x00000001) != 0)) {
|
||||
showNameCardIdList_ = mutableCopy(showNameCardIdList_);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @return A list containing the showNameCardIdList.
|
||||
*/
|
||||
public java.util.List<java.lang.Integer>
|
||||
getShowNameCardIdListList() {
|
||||
return ((bitField0_ & 0x00000001) != 0) ?
|
||||
java.util.Collections.unmodifiableList(showNameCardIdList_) : showNameCardIdList_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @return The count of showNameCardIdList.
|
||||
*/
|
||||
public int getShowNameCardIdListCount() {
|
||||
return showNameCardIdList_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @param index The index of the element to return.
|
||||
* @return The showNameCardIdList at the given index.
|
||||
*/
|
||||
public int getShowNameCardIdList(int index) {
|
||||
return showNameCardIdList_.getInt(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @param index The index to set the value at.
|
||||
* @param value The showNameCardIdList to set.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder setShowNameCardIdList(
|
||||
int index, int value) {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
showNameCardIdList_.setInt(index, value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @param value The showNameCardIdList to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addShowNameCardIdList(int value) {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
showNameCardIdList_.addInt(value);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @param values The showNameCardIdList to add.
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder addAllShowNameCardIdList(
|
||||
java.lang.Iterable<? extends java.lang.Integer> values) {
|
||||
ensureShowNameCardIdListIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, showNameCardIdList_);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated uint32 show_name_card_id_list = 12;</code>
|
||||
* @return This builder for chaining.
|
||||
*/
|
||||
public Builder clearShowNameCardIdList() {
|
||||
showNameCardIdList_ = emptyIntList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
@java.lang.Override
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:UpdatePlayerShowNameCardListRsp)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:UpdatePlayerShowNameCardListRsp)
|
||||
private static final emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp();
|
||||
}
|
||||
|
||||
public static emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<UpdatePlayerShowNameCardListRsp>
|
||||
PARSER = new com.google.protobuf.AbstractParser<UpdatePlayerShowNameCardListRsp>() {
|
||||
@java.lang.Override
|
||||
public UpdatePlayerShowNameCardListRsp parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new UpdatePlayerShowNameCardListRsp(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<UpdatePlayerShowNameCardListRsp> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<UpdatePlayerShowNameCardListRsp> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public emu.grasscutter.net.proto.UpdatePlayerShowNameCardListRspOuterClass.UpdatePlayerShowNameCardListRsp getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_UpdatePlayerShowNameCardListRsp_descriptor;
|
||||
private static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_UpdatePlayerShowNameCardListRsp_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n%UpdatePlayerShowNameCardListRsp.proto\"" +
|
||||
"R\n\037UpdatePlayerShowNameCardListRsp\022\017\n\007re" +
|
||||
"tcode\030\r \001(\005\022\036\n\026show_name_card_id_list\030\014 " +
|
||||
"\003(\rB\033\n\031emu.grasscutter.net.protob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
});
|
||||
internal_static_UpdatePlayerShowNameCardListRsp_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_UpdatePlayerShowNameCardListRsp_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_UpdatePlayerShowNameCardListRsp_descriptor,
|
||||
new java.lang.String[] { "Retcode", "ShowNameCardIdList", });
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
@ -6,7 +6,7 @@ import emu.grasscutter.utils.Position;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
|
||||
public final class GameConstants {
|
||||
public static String VERSION = "3.0.0";
|
||||
public static String VERSION = "3.1.0";
|
||||
|
||||
public static final int DEFAULT_TEAMS = 4;
|
||||
public static final int MAX_TEAMS = 10;
|
||||
@ -14,7 +14,7 @@ public final class GameConstants {
|
||||
public static final int MAIN_CHARACTER_FEMALE = 10000007;
|
||||
public static final Position START_POSITION = new Position(2747, 194, -1719);
|
||||
|
||||
public static final int MAX_FRIENDS = 45;
|
||||
public static final int MAX_FRIENDS = 60;
|
||||
public static final int MAX_FRIEND_REQUESTS = 50;
|
||||
|
||||
public static final int SERVER_CONSOLE_UID = 99; // The UID of the server console's "player".
|
||||
|
@ -45,7 +45,6 @@ import javax.annotation.Nullable;
|
||||
import java.io.*;
|
||||
import java.util.Calendar;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.DATA;
|
||||
import static emu.grasscutter.config.Configuration.SERVER;
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@ -56,6 +55,7 @@ public final class Grasscutter {
|
||||
private static Language language;
|
||||
|
||||
public static final File configFile = new File("./config.json");
|
||||
@Setter private static ServerRunMode runModeOverride = null; // Config override for run mode
|
||||
|
||||
private static int day; // Current day of week.
|
||||
@Getter @Setter private static String preferredLanguage;
|
||||
@ -101,8 +101,6 @@ public final class Grasscutter {
|
||||
|
||||
// Create command map.
|
||||
commandMap = new CommandMap(true);
|
||||
// Generate handbooks.
|
||||
Tools.createGmHandbooks();
|
||||
|
||||
// Initialize server.
|
||||
Grasscutter.getLogger().info(translate("messages.status.starting"));
|
||||
@ -114,6 +112,9 @@ public final class Grasscutter {
|
||||
ResourceLoader.loadAll();
|
||||
ScriptLoader.init();
|
||||
|
||||
// Generate handbooks.
|
||||
Tools.createGmHandbooks();
|
||||
|
||||
// Initialize database.
|
||||
DatabaseManager.initialize();
|
||||
|
||||
@ -141,7 +142,7 @@ public final class Grasscutter {
|
||||
httpServer.addRouter(DocumentationServerHandler.class);
|
||||
|
||||
// Start servers.
|
||||
var runMode = SERVER.runMode;
|
||||
var runMode = Grasscutter.getRunMode();
|
||||
if (runMode == ServerRunMode.HYBRID) {
|
||||
httpServer.start();
|
||||
gameServer.start();
|
||||
@ -202,7 +203,7 @@ public final class Grasscutter {
|
||||
|
||||
// If the file already exists, we attempt to load it.
|
||||
try {
|
||||
config = JsonUtils.loadToClass(configFile.getPath(), ConfigContainer.class);
|
||||
config = JsonUtils.loadToClass(configFile.toPath(), ConfigContainer.class);
|
||||
} catch (Exception exception) {
|
||||
getLogger().error("There was an error while trying to load the configuration from config.json. Please make sure that there are no syntax errors. If you want to start with a default configuration, delete your existing config.json.");
|
||||
System.exit(1);
|
||||
@ -246,6 +247,10 @@ public final class Grasscutter {
|
||||
return Language.getLanguage(langCode);
|
||||
}
|
||||
|
||||
public static ServerRunMode getRunMode() {
|
||||
return Grasscutter.runModeOverride != null ? Grasscutter.runModeOverride : SERVER.runMode;
|
||||
}
|
||||
|
||||
public static Logger getLogger() {
|
||||
return log;
|
||||
}
|
||||
@ -270,11 +275,6 @@ public final class Grasscutter {
|
||||
return consoleLineReader;
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static Gson getGsonFactory() {
|
||||
return JsonUtils.getGsonFactory();
|
||||
}
|
||||
|
||||
public static HttpServer getHttpServer() {
|
||||
return httpServer;
|
||||
}
|
||||
@ -306,6 +306,7 @@ public final class Grasscutter {
|
||||
public static void updateDayOfWeek() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
day = calendar.get(Calendar.DAY_OF_WEEK);
|
||||
Grasscutter.getLogger().debug("Set day of week to "+day);
|
||||
}
|
||||
|
||||
public static void startConsole() {
|
||||
|
52
src/main/java/emu/grasscutter/command/CommandHelpers.java
Normal file
52
src/main/java/emu/grasscutter/command/CommandHelpers.java
Normal file
@ -0,0 +1,52 @@
|
||||
package emu.grasscutter.command;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class CommandHelpers {
|
||||
public static final Pattern lvlRegex = Pattern.compile("l(?:vl?)?(\\d+)"); // Java doesn't have raw string literals :(
|
||||
public static final Pattern amountRegex = Pattern.compile("((?<=x)\\d+|\\d+(?=x)(?!x\\d))");
|
||||
public static final Pattern refineRegex = Pattern.compile("r(\\d+)");
|
||||
public static final Pattern rankRegex = Pattern.compile("(\\d+)\\*");
|
||||
public static final Pattern constellationRegex = Pattern.compile("c(\\d+)");
|
||||
public static final Pattern stateRegex = Pattern.compile("state(\\d+)");
|
||||
public static final Pattern blockRegex = Pattern.compile("blk(\\d+)");
|
||||
public static final Pattern groupRegex = Pattern.compile("grp(\\d+)");
|
||||
public static final Pattern configRegex = Pattern.compile("cfg(\\d+)");
|
||||
public static final Pattern hpRegex = Pattern.compile("hp(\\d+)");
|
||||
public static final Pattern maxHPRegex = Pattern.compile("maxhp(\\d+)");
|
||||
public static final Pattern atkRegex = Pattern.compile("atk(\\d+)");
|
||||
public static final Pattern defRegex = Pattern.compile("def(\\d+)");
|
||||
public static final Pattern aiRegex = Pattern.compile("ai(\\d+)");
|
||||
|
||||
public static int matchIntOrNeg(Pattern pattern, String arg) {
|
||||
Matcher match = pattern.matcher(arg);
|
||||
if (match.find()) {
|
||||
return Integer.parseInt(match.group(1)); // This should be exception-safe as only \d+ can be passed to it (i.e. non-empty string of pure digits)
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static <T> List<String> parseIntParameters(List<String> args, @Nonnull T params, Map<Pattern, BiConsumer<T, Integer>> map) {
|
||||
for (int i = args.size() - 1; i >= 0; i--) {
|
||||
String arg = args.get(i).toLowerCase();
|
||||
boolean deleteArg = false;
|
||||
int argNum;
|
||||
for (var entry : map.entrySet()) {
|
||||
if ((argNum = matchIntOrNeg(entry.getKey(), arg)) != -1) {
|
||||
entry.getValue().accept(params, argNum);
|
||||
deleteArg = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (deleteArg) {
|
||||
args.remove(i);
|
||||
}
|
||||
}
|
||||
return args;
|
||||
}
|
||||
}
|
@ -6,35 +6,34 @@ import emu.grasscutter.game.inventory.GameItem;
|
||||
import emu.grasscutter.game.inventory.Inventory;
|
||||
import emu.grasscutter.game.inventory.ItemType;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static emu.grasscutter.command.CommandHelpers.*;
|
||||
|
||||
@Command(
|
||||
label = "clear",
|
||||
usage = {"(all|wp|art|mat) [lv<max level>] [r<max refinement>] [<max rarity>*]"},
|
||||
permission = "player.clearinv",
|
||||
permissionTargeted = "player.clearinv.others")
|
||||
public final class ClearCommand implements CommandHandler {
|
||||
private static Pattern lvlRegex = Pattern.compile("l(?:vl?)?(\\d+)"); // Java doesn't have raw string literals :(
|
||||
private static Pattern refineRegex = Pattern.compile("r(\\d+)");
|
||||
private static Pattern rankRegex = Pattern.compile("(\\d+)\\*");
|
||||
|
||||
private static int matchIntOrNeg(Pattern pattern, String arg) {
|
||||
Matcher match = pattern.matcher(arg);
|
||||
if (match.find()) {
|
||||
return Integer.parseInt(match.group(1)); // This should be exception-safe as only \d+ can be passed to it (i.e. non-empty string of pure digits)
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
private static final Map<Pattern, BiConsumer<ClearItemParameters, Integer>> intCommandHandlers = Map.ofEntries(
|
||||
Map.entry(lvlRegex, ClearItemParameters::setLvl),
|
||||
Map.entry(refineRegex, ClearItemParameters::setRefinement),
|
||||
Map.entry(rankRegex, ClearItemParameters::setRank)
|
||||
);
|
||||
|
||||
private static class ClearItemParameters {
|
||||
public int lvl = 1;
|
||||
public int refinement = 1;
|
||||
public int rank = 4;
|
||||
};
|
||||
@Setter public int lvl = 1;
|
||||
@Setter public int refinement = 1;
|
||||
@Setter public int rank = 4;
|
||||
}
|
||||
|
||||
private Stream<GameItem> getOther(ItemType type, Inventory playerInventory, ClearItemParameters param) {
|
||||
return playerInventory.getItems().values().stream()
|
||||
@ -59,28 +58,8 @@ public final class ClearCommand implements CommandHandler {
|
||||
Inventory playerInventory = targetPlayer.getInventory();
|
||||
ClearItemParameters param = new ClearItemParameters();
|
||||
|
||||
// Extract any tagged arguments (e.g. "lv90", "x100", "r5")
|
||||
for (int i = args.size() - 1; i >= 0; i--) { // Reverse iteration as we are deleting elements
|
||||
String arg = args.get(i).toLowerCase();
|
||||
boolean deleteArg = false;
|
||||
int argNum;
|
||||
// Note that a single argument can actually match all of these, e.g. "lv90r5*"
|
||||
if ((argNum = matchIntOrNeg(lvlRegex, arg)) != -1) {
|
||||
param.lvl = argNum;
|
||||
deleteArg = true;
|
||||
}
|
||||
if ((argNum = matchIntOrNeg(refineRegex, arg)) != -1) {
|
||||
param.refinement = argNum;
|
||||
deleteArg = true;
|
||||
}
|
||||
if ((argNum = matchIntOrNeg(rankRegex, arg)) != -1) {
|
||||
param.rank = argNum;
|
||||
deleteArg = true;
|
||||
}
|
||||
if (deleteArg) {
|
||||
args.remove(i);
|
||||
}
|
||||
}
|
||||
// Extract any tagged int arguments (e.g. "lv90", "x100", "r5")
|
||||
parseIntParameters(args, param, intCommandHandlers);
|
||||
|
||||
if (args.size() < 1) {
|
||||
sendUsageMessage(sender);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package emu.grasscutter.command.commands;
|
||||
|
||||
import emu.grasscutter.GameConstants;
|
||||
import emu.grasscutter.command.Command;
|
||||
import emu.grasscutter.command.CommandHandler;
|
||||
import emu.grasscutter.data.GameData;
|
||||
@ -16,13 +15,16 @@ import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.ActionReason;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
import emu.grasscutter.utils.SparseSet;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static emu.grasscutter.command.CommandHelpers.*;
|
||||
|
||||
@Command(
|
||||
label = "give",
|
||||
aliases = {"g", "item", "giveitem"},
|
||||
@ -33,20 +35,7 @@ import java.util.regex.Pattern;
|
||||
permissionTargeted = "player.give.others",
|
||||
threading = true)
|
||||
public final class GiveCommand implements CommandHandler {
|
||||
private static Pattern lvlRegex = Pattern.compile("l(?:vl?)?(\\d+)"); // Java doesn't have raw string literals :(
|
||||
private static Pattern refineRegex = Pattern.compile("r(\\d+)");
|
||||
private static Pattern constellationRegex = Pattern.compile("c(\\d+)");
|
||||
private static Pattern amountRegex = Pattern.compile("((?<=x)\\d+|\\d+(?=x)(?!x\\d))");
|
||||
|
||||
private static int matchIntOrNeg(Pattern pattern, String arg) {
|
||||
Matcher match = pattern.matcher(arg);
|
||||
if (match.find()) {
|
||||
return Integer.parseInt(match.group(1)); // This should be exception-safe as only \d+ can be passed to it (i.e. non-empty string of pure digits)
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private static enum GiveAllType {
|
||||
private enum GiveAllType {
|
||||
NONE,
|
||||
ALL,
|
||||
WEAPONS,
|
||||
@ -54,48 +43,31 @@ public final class GiveCommand implements CommandHandler {
|
||||
AVATARS
|
||||
}
|
||||
|
||||
private static final Map<Pattern, BiConsumer<GiveItemParameters, Integer>> intCommandHandlers = Map.ofEntries(
|
||||
Map.entry(lvlRegex, GiveItemParameters::setLvl),
|
||||
Map.entry(refineRegex, GiveItemParameters::setRefinement),
|
||||
Map.entry(amountRegex, GiveItemParameters::setAmount),
|
||||
Map.entry(constellationRegex, GiveItemParameters::setConstellation)
|
||||
);
|
||||
|
||||
private static class GiveItemParameters {
|
||||
public int id;
|
||||
public int lvl = 0;
|
||||
public int amount = 1;
|
||||
public int refinement = 1;
|
||||
public int constellation = -1;
|
||||
@Setter public int lvl = 0;
|
||||
@Setter public int amount = 1;
|
||||
@Setter public int refinement = 1;
|
||||
@Setter public int constellation = -1;
|
||||
public int mainPropId = -1;
|
||||
public List<Integer> appendPropIdList;
|
||||
public ItemData data;
|
||||
public AvatarData avatarData;
|
||||
public GiveAllType giveAllType = GiveAllType.NONE;
|
||||
};
|
||||
}
|
||||
|
||||
private GiveItemParameters parseArgs(Player sender, List<String> args) throws IllegalArgumentException {
|
||||
GiveItemParameters param = new GiveItemParameters();
|
||||
|
||||
// Extract any tagged arguments (e.g. "lv90", "x100", "r5")
|
||||
for (int i = args.size() - 1; i >= 0; i--) { // Reverse iteration as we are deleting elements
|
||||
String arg = args.get(i).toLowerCase();
|
||||
boolean deleteArg = false;
|
||||
int argNum;
|
||||
// Note that a single argument can actually match all of these, e.g. "lv90r5x100"
|
||||
if ((argNum = matchIntOrNeg(lvlRegex, arg)) != -1) {
|
||||
param.lvl = argNum;
|
||||
deleteArg = true;
|
||||
}
|
||||
if ((argNum = matchIntOrNeg(refineRegex, arg)) != -1) {
|
||||
param.refinement = argNum;
|
||||
deleteArg = true;
|
||||
}
|
||||
if ((argNum = matchIntOrNeg(constellationRegex, arg)) != -1) {
|
||||
param.constellation = argNum;
|
||||
deleteArg = true;
|
||||
}
|
||||
if ((argNum = matchIntOrNeg(amountRegex, arg)) != -1) {
|
||||
param.amount = argNum;
|
||||
deleteArg = true;
|
||||
}
|
||||
if (deleteArg) {
|
||||
args.remove(i);
|
||||
}
|
||||
}
|
||||
parseIntParameters(args, param, intCommandHandlers);
|
||||
|
||||
// At this point, first remaining argument MUST be itemId/avatarId
|
||||
if (args.size() < 1) {
|
||||
|
@ -13,7 +13,8 @@ public final class PositionCommand implements CommandHandler {
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
Position pos = targetPlayer.getPosition();
|
||||
Position rot = targetPlayer.getRotation();
|
||||
CommandHandler.sendTranslatedMessage(sender, "commands.position.success",
|
||||
pos.getX(), pos.getY(), pos.getZ(), targetPlayer.getSceneId());
|
||||
pos.getX(), pos.getY(), pos.getZ(), rot.getX(), rot.getY(), rot.getZ(), targetPlayer.getSceneId());
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ public final class SetPropCommand implements CommandHandler {
|
||||
}
|
||||
|
||||
// List of map areas. Unfortunately, there is no readily available source for them in excels or bins.
|
||||
final static private List<Integer> sceneAreas = List.of(1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25,29,100,101,102,103,200,210,300,400,401,402,403);
|
||||
final static private List<Integer> sceneAreas = List.of(1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,21,22,23,24,25,26,27,28,29,100,101,102,103,200,210,300,400,401,402,403);
|
||||
private boolean unlockMap(Player targetPlayer) {
|
||||
// Unlock.
|
||||
GameData.getScenePointsPerScene().forEach((sceneId, scenePoints) -> {
|
||||
|
@ -8,53 +8,70 @@ import emu.grasscutter.data.excels.ItemData;
|
||||
import emu.grasscutter.data.excels.MonsterData;
|
||||
import emu.grasscutter.game.entity.*;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.EntityType;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import emu.grasscutter.game.world.Scene;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.*;
|
||||
import static emu.grasscutter.command.CommandHelpers.*;
|
||||
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(
|
||||
label = "spawn",
|
||||
usage = {"spawn <entityId> [amount] [level(monster only)] [<x> <y> <z>(monster only)]"},
|
||||
aliases = {"drop"},
|
||||
usage = {
|
||||
"<itemId> [x<amount>] [blk<blockId>] [grp<groupId>] [cfg<configId>] <x> <y> <z>",
|
||||
"<gadgetId> [x<amount>] [state<state>] [maxhp<maxhp>] [hp<hp>(0 for infinite)] [atk<atk>] [def<def>] [blk<blockId>] [grp<groupId>] [cfg<configId>] <x> <y> <z>",
|
||||
"<monsterId> [x<amount>] [lv<level>] [ai<aiId>] [maxhp<maxhp>] [hp<hp>(0 for infinite)] [atk<atk>] [def<def>] [blk<blockId>] [grp<groupId>] [cfg<configId>] <x> <y> <z>"},
|
||||
permission = "server.spawn",
|
||||
permissionTargeted = "server.spawn.others")
|
||||
public final class SpawnCommand implements CommandHandler {
|
||||
private static final Map<Pattern, BiConsumer<SpawnParameters, Integer>> intCommandHandlers = Map.ofEntries(
|
||||
Map.entry(lvlRegex, SpawnParameters::setLvl),
|
||||
Map.entry(amountRegex, SpawnParameters::setAmount),
|
||||
Map.entry(stateRegex, SpawnParameters::setState),
|
||||
Map.entry(blockRegex, SpawnParameters::setBlockId),
|
||||
Map.entry(groupRegex, SpawnParameters::setGroupId),
|
||||
Map.entry(configRegex, SpawnParameters::setConfigId),
|
||||
Map.entry(maxHPRegex, SpawnParameters::setMaxHP),
|
||||
Map.entry(hpRegex, SpawnParameters::setHp),
|
||||
Map.entry(defRegex, SpawnParameters::setDef),
|
||||
Map.entry(atkRegex, SpawnParameters::setAtk),
|
||||
Map.entry(aiRegex, SpawnParameters::setAi)
|
||||
);
|
||||
|
||||
@Override
|
||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||
int id = 0; // This is just to shut up the linter, it's not a real default
|
||||
int amount = 1;
|
||||
int level = 1;
|
||||
float x = 0, y = 0, z = 0;
|
||||
SpawnParameters param = new SpawnParameters();
|
||||
|
||||
parseIntParameters(args, param, intCommandHandlers);
|
||||
|
||||
// At this point, first remaining argument MUST be the id and the rest the pos
|
||||
if (args.size() < 1) {
|
||||
sendUsageMessage(sender); // Reachable if someone does `/give lv90` or similar
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
switch (args.size()) {
|
||||
case 6:
|
||||
case 4:
|
||||
try {
|
||||
x = Float.parseFloat(args.get(3));
|
||||
y = Float.parseFloat(args.get(4));
|
||||
z = Float.parseFloat(args.get(5));
|
||||
float x, y, z;
|
||||
x = Float.parseFloat(args.get(1));
|
||||
y = Float.parseFloat(args.get(2));
|
||||
z = Float.parseFloat(args.get(3));
|
||||
param.pos = new Position(x, y, z);
|
||||
} catch (NumberFormatException ignored) {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.execution.argument_error"));
|
||||
} // Fallthrough
|
||||
case 3:
|
||||
try {
|
||||
level = Integer.parseInt(args.get(2));
|
||||
} catch (NumberFormatException ignored) {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.execution.argument_error"));
|
||||
} // Fallthrough
|
||||
case 2:
|
||||
try {
|
||||
amount = Integer.parseInt(args.get(1));
|
||||
} catch (NumberFormatException ignored) {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.generic.invalid.amount"));
|
||||
} // Fallthrough
|
||||
case 1:
|
||||
try {
|
||||
id = Integer.parseInt(args.get(0));
|
||||
param.id = Integer.parseInt(args.get(0));
|
||||
} catch (NumberFormatException ignored) {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.generic.invalid.entityId"));
|
||||
}
|
||||
@ -64,45 +81,102 @@ public final class SpawnCommand implements CommandHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
MonsterData monsterData = GameData.getMonsterDataMap().get(id);
|
||||
GadgetData gadgetData = GameData.getGadgetDataMap().get(id);
|
||||
ItemData itemData = GameData.getItemDataMap().get(id);
|
||||
MonsterData monsterData = GameData.getMonsterDataMap().get(param.id);
|
||||
GadgetData gadgetData = GameData.getGadgetDataMap().get(param.id);
|
||||
ItemData itemData = GameData.getItemDataMap().get(param.id);
|
||||
if (monsterData == null && gadgetData == null && itemData == null) {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.generic.invalid.entityId"));
|
||||
return;
|
||||
}
|
||||
|
||||
Scene scene = targetPlayer.getScene();
|
||||
param.scene = targetPlayer.getScene();
|
||||
|
||||
if (scene.getEntities().size() + amount > GAME_OPTIONS.sceneEntityLimit) {
|
||||
amount = Math.max(Math.min(GAME_OPTIONS.sceneEntityLimit - scene.getEntities().size(), amount), 0);
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.spawn.limit_reached", amount));
|
||||
if (amount <= 0) {
|
||||
if (param.scene.getEntities().size() + param.amount > GAME_OPTIONS.sceneEntityLimit) {
|
||||
param.amount = Math.max(Math.min(GAME_OPTIONS.sceneEntityLimit - param.scene.getEntities().size(), param.amount), 0);
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.spawn.limit_reached", param.amount));
|
||||
if (param.amount <= 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
double maxRadius = Math.sqrt(amount * 0.2 / Math.PI);
|
||||
Position center = (x != 0 && y != 0 && z != 0)
|
||||
? (new Position(x, y, z))
|
||||
: (targetPlayer.getPosition());
|
||||
for (int i = 0; i < amount; i++) {
|
||||
Position pos = GetRandomPositionInCircle(center, maxRadius).addY(3);
|
||||
double maxRadius = Math.sqrt(param.amount * 0.2 / Math.PI);
|
||||
if (param.pos == null) {
|
||||
param.pos = targetPlayer.getPosition();
|
||||
}
|
||||
|
||||
for (int i = 0; i < param.amount; i++) {
|
||||
Position pos = GetRandomPositionInCircle(param.pos, maxRadius).addY(3);
|
||||
GameEntity entity = null;
|
||||
if (itemData != null) {
|
||||
entity = new EntityItem(scene, null, itemData, pos, 1, true);
|
||||
entity = createItem(itemData, param, pos);
|
||||
}
|
||||
if (gadgetData != null) {
|
||||
pos.addY(-3);
|
||||
entity = new EntityVehicle(scene, targetPlayer, id, 0, pos, targetPlayer.getRotation());
|
||||
entity = createGadget(gadgetData, param, pos, targetPlayer);
|
||||
}
|
||||
if (monsterData != null) {
|
||||
entity = new EntityMonster(scene, monsterData, pos, level);
|
||||
entity = createMonster(monsterData, param, pos);
|
||||
}
|
||||
applyCommonParameters(entity, param);
|
||||
|
||||
scene.addEntity(entity);
|
||||
param.scene.addEntity(entity);
|
||||
}
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.spawn.success", param.amount, param.id));
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
private EntityItem createItem(ItemData itemData, SpawnParameters param, Position pos) {
|
||||
return new EntityItem(param.scene, null, itemData, pos, 1, true);
|
||||
}
|
||||
|
||||
private EntityMonster createMonster(MonsterData monsterData, SpawnParameters param, Position pos) {
|
||||
var entity = new EntityMonster(param.scene, monsterData, pos, param.lvl);
|
||||
if (param.ai != -1) {
|
||||
entity.setAiId(param.ai);
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
private EntityBaseGadget createGadget(GadgetData gadgetData, SpawnParameters param, Position pos, Player targetPlayer) {
|
||||
EntityBaseGadget entity;
|
||||
if (gadgetData.getType() == EntityType.Vehicle) {
|
||||
entity = new EntityVehicle(param.scene, targetPlayer, param.id, 0, pos, targetPlayer.getRotation());
|
||||
} else {
|
||||
entity = new EntityGadget(param.scene, param.id, pos, targetPlayer.getRotation());
|
||||
if (param.state != -1) {
|
||||
((EntityGadget) entity).setState(param.state);
|
||||
}
|
||||
}
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
private void applyCommonParameters(GameEntity entity, SpawnParameters param) {
|
||||
if (param.blockId != -1) {
|
||||
entity.setBlockId(param.blockId);
|
||||
}
|
||||
if (param.groupId != -1) {
|
||||
entity.setGroupId(param.groupId);
|
||||
}
|
||||
if (param.configId != -1) {
|
||||
entity.setConfigId(param.configId);
|
||||
}
|
||||
if (param.maxHP != -1) {
|
||||
entity.setFightProperty(FightProperty.FIGHT_PROP_MAX_HP, param.maxHP);
|
||||
entity.setFightProperty(FightProperty.FIGHT_PROP_BASE_HP, param.maxHP);
|
||||
}
|
||||
if (param.hp != -1) {
|
||||
entity.setFightProperty(FightProperty.FIGHT_PROP_CUR_HP, param.hp == 0 ? Float.MAX_VALUE : param.hp);
|
||||
}
|
||||
if (param.atk != -1) {
|
||||
entity.setFightProperty(FightProperty.FIGHT_PROP_ATTACK, param.atk);
|
||||
entity.setFightProperty(FightProperty.FIGHT_PROP_CUR_ATTACK, param.atk);
|
||||
}
|
||||
if (param.def != -1) {
|
||||
entity.setFightProperty(FightProperty.FIGHT_PROP_DEFENSE, param.def);
|
||||
entity.setFightProperty(FightProperty.FIGHT_PROP_CUR_DEFENSE, param.def);
|
||||
}
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.spawn.success", amount, id));
|
||||
}
|
||||
|
||||
private Position GetRandomPositionInCircle(Position origin, double radius) {
|
||||
@ -112,4 +186,21 @@ public final class SpawnCommand implements CommandHandler {
|
||||
target.addX((float) (r * Math.cos(angle))).addZ((float) (r * Math.sin(angle)));
|
||||
return target;
|
||||
}
|
||||
|
||||
private static class SpawnParameters {
|
||||
@Setter public int id;
|
||||
@Setter public int lvl = 1;
|
||||
@Setter public int amount = 1;
|
||||
@Setter public int blockId = -1;
|
||||
@Setter public int groupId = -1;
|
||||
@Setter public int configId = -1;
|
||||
@Setter public int state = -1;
|
||||
@Setter public int hp = -1;
|
||||
@Setter public int maxHP = -1;
|
||||
@Setter public int atk = -1;
|
||||
@Setter public int def = -1;
|
||||
@Setter public int ai = -1;
|
||||
@Setter public Position pos = null;
|
||||
public Scene scene = null;
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
@Command(label = "stop", permission = "server.stop", targetRequirement = Command.TargetRequirement.NONE)
|
||||
@Command(label = "stop", aliases = {"shutdown"}, permission = "server.stop", targetRequirement = Command.TargetRequirement.NONE)
|
||||
public final class StopCommand implements CommandHandler {
|
||||
|
||||
@Override
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
|
||||
@Command(
|
||||
label = "talent",
|
||||
usage = {"set <talentId> <level>", "(n|e|q) <level>", "getid"},
|
||||
usage = {"set <talentId> <level>", "(n|e|q|all) <level>", "getid"},
|
||||
permission = "player.settalent",
|
||||
permissionTargeted = "player.settalent.others")
|
||||
public final class TalentCommand implements CommandHandler {
|
||||
@ -22,7 +22,7 @@ public final class TalentCommand implements CommandHandler {
|
||||
var name = Language.getTextMapKey(nameHash);
|
||||
CommandHandler.sendTranslatedMessage(sender, "commands.talent.set_id", skillId, name, newLevel);
|
||||
} else {
|
||||
CommandHandler.sendTranslatedMessage(sender, "commands.talent.lower_16");
|
||||
CommandHandler.sendTranslatedMessage(sender, "commands.talent.out_of_range");
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,6 +87,27 @@ public final class TalentCommand implements CommandHandler {
|
||||
};
|
||||
setTalentLevel(sender, avatar, skillId, newLevel);
|
||||
}
|
||||
case "all" -> {
|
||||
if (args.size() < 2) {
|
||||
sendUsageMessage(sender);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
newLevel = Integer.parseInt(args.get(1));
|
||||
} catch (NumberFormatException ignored) {
|
||||
CommandHandler.sendTranslatedMessage(sender, "commands.talent.invalid_level");
|
||||
return;
|
||||
}
|
||||
// This stops setTalentLevel from outputting 3 "levels out of range" messages
|
||||
if (newLevel < 1 || newLevel > 15) {
|
||||
CommandHandler.sendTranslatedMessage(sender, "commands.talent.out_of_range");
|
||||
return;
|
||||
}
|
||||
// This is small so array is not needed imo
|
||||
setTalentLevel(sender, avatar, skillDepot.getSkills().get(0), newLevel);
|
||||
setTalentLevel(sender, avatar, skillDepot.getSkills().get(1), newLevel);
|
||||
setTalentLevel(sender, avatar, skillDepot.getEnergySkill(), newLevel);
|
||||
}
|
||||
case "getid" -> {
|
||||
var map = GameData.getAvatarSkillDataMap();
|
||||
skillDepot.getSkillsAndEnergySkill().forEach(id -> {
|
||||
|
@ -26,7 +26,7 @@ public class ConfigContainer {
|
||||
*/
|
||||
public static void updateConfig() {
|
||||
try { // Check if the server is using a legacy config.
|
||||
JsonObject configObject = JsonUtils.loadToClass(Grasscutter.configFile.getPath(), JsonObject.class);
|
||||
JsonObject configObject = JsonUtils.loadToClass(Grasscutter.configFile.toPath(), JsonObject.class);
|
||||
if (!configObject.has("version")) {
|
||||
Grasscutter.getLogger().info("Updating legacy ..");
|
||||
Grasscutter.saveConfig(null);
|
||||
@ -84,7 +84,7 @@ public class ConfigContainer {
|
||||
public String resources = "./resources/";
|
||||
public String data = "./data/";
|
||||
public String packets = "./packets/";
|
||||
public String scripts = "./resources/Scripts/";
|
||||
public String scripts = "resources:Scripts/";
|
||||
public String plugins = "./plugins/";
|
||||
|
||||
// UNUSED (potentially added later?)
|
||||
|
@ -1,8 +1,9 @@
|
||||
package emu.grasscutter.config;
|
||||
|
||||
import java.util.Locale;
|
||||
import emu.grasscutter.utils.FileUtils;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Locale;
|
||||
|
||||
import static emu.grasscutter.Grasscutter.config;
|
||||
|
||||
@ -26,7 +27,6 @@ public final class Configuration extends ConfigContainer {
|
||||
public static final Locale FALLBACK_LANGUAGE = config.language.fallback;
|
||||
public static final String DOCUMENT_LANGUAGE = config.language.document;
|
||||
private static final String DATA_FOLDER = config.folderStructure.data;
|
||||
private static final String RESOURCES_FOLDER = config.folderStructure.resources;
|
||||
private static final String PLUGINS_FOLDER = config.folderStructure.plugins;
|
||||
private static final String SCRIPTS_FOLDER = config.folderStructure.scripts;
|
||||
private static final String PACKETS_FOLDER = config.folderStructure.packets;
|
||||
@ -49,32 +49,43 @@ public final class Configuration extends ConfigContainer {
|
||||
/*
|
||||
* Utilities
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public static String DATA() {
|
||||
return DATA_FOLDER;
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static String DATA(String path) {
|
||||
return Paths.get(DATA_FOLDER, path).toString();
|
||||
return Path.of(DATA_FOLDER, path).toString();
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static Path getResourcePath(String path) {
|
||||
return FileUtils.getResourcePath(path);
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static String RESOURCE(String path) {
|
||||
return Paths.get(RESOURCES_FOLDER, path).toString();
|
||||
return FileUtils.getResourcePath(path).toString();
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static String PLUGIN() {
|
||||
return PLUGINS_FOLDER;
|
||||
}
|
||||
|
||||
public static String PLUGIN(String path) {
|
||||
return Paths.get(PLUGINS_FOLDER, path).toString();
|
||||
return Path.of(PLUGINS_FOLDER, path).toString();
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static String SCRIPT(String path) {
|
||||
return Paths.get(SCRIPTS_FOLDER, path).toString();
|
||||
return Path.of(SCRIPTS_FOLDER, path).toString();
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static String PACKET(String path) {
|
||||
return Paths.get(PACKETS_FOLDER, path).toString();
|
||||
return Path.of(PACKETS_FOLDER, path).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,15 +5,12 @@ import emu.grasscutter.server.http.handlers.GachaHandler;
|
||||
import emu.grasscutter.tools.Tools;
|
||||
import emu.grasscutter.utils.FileUtils;
|
||||
import emu.grasscutter.utils.JsonUtils;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.DATA;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -59,15 +56,17 @@ public class DataLoader {
|
||||
* @throws FileNotFoundException
|
||||
*/
|
||||
public static InputStream load(String resourcePath, boolean useFallback) throws FileNotFoundException {
|
||||
if (Utils.fileExists(DATA(resourcePath))) {
|
||||
Path path = useFallback
|
||||
? FileUtils.getDataPath(resourcePath)
|
||||
: FileUtils.getDataUserPath(resourcePath);
|
||||
if (Files.exists(path)) {
|
||||
// Data is in the resource directory
|
||||
return new FileInputStream(DATA(resourcePath));
|
||||
} else {
|
||||
if (useFallback) {
|
||||
return FileUtils.readResourceAsStream("/defaults/data/" + resourcePath);
|
||||
try {
|
||||
return Files.newInputStream(path);
|
||||
} catch (IOException e) {
|
||||
throw new FileNotFoundException(e.getMessage()); // This is evil but so is changing the function signature at this point
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -95,11 +94,11 @@ public class DataLoader {
|
||||
|
||||
if (filenames == null) {
|
||||
Grasscutter.getLogger().error("We were unable to locate your default data files.");
|
||||
} else for (Path file : filenames) {
|
||||
String relativePath = String.valueOf(file).split("defaults[\\\\\\/]data[\\\\\\/]")[1];
|
||||
} //else for (Path file : filenames) {
|
||||
// String relativePath = String.valueOf(file).split("defaults[\\\\\\/]data[\\\\\\/]")[1];
|
||||
|
||||
checkAndCopyData(relativePath);
|
||||
}
|
||||
// checkAndCopyData(relativePath);
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("An error occurred while trying to check the data folder.", e);
|
||||
}
|
||||
@ -108,36 +107,25 @@ public class DataLoader {
|
||||
}
|
||||
|
||||
private static void checkAndCopyData(String name) {
|
||||
String filePath = Utils.toFilePath(DATA(name));
|
||||
// TODO: Revisit this if default dumping is ever reintroduced
|
||||
Path filePath = FileUtils.getDataPath(name);
|
||||
|
||||
if (!Utils.fileExists(filePath)) {
|
||||
// Check if file is in subdirectory
|
||||
if (name.contains("/")) {
|
||||
String[] path = name.split("/");
|
||||
|
||||
String folder = "";
|
||||
for (int i = 0; i < (path.length - 1); i++) {
|
||||
folder += path[i] + "/";
|
||||
|
||||
// Make sure the current folder exists
|
||||
String folderToCreate = Utils.toFilePath(DATA(folder));
|
||||
if (!Utils.fileExists(folderToCreate)) {
|
||||
Grasscutter.getLogger().info("Creating data folder '" + folder + "'");
|
||||
Utils.createFolder(folderToCreate);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Files.exists(filePath)) {
|
||||
var root = filePath.getParent();
|
||||
if (root.toFile().mkdirs())
|
||||
Grasscutter.getLogger().info("Created data folder '" + root + "'");
|
||||
|
||||
Grasscutter.getLogger().info("Creating default '" + name + "' data");
|
||||
FileUtils.copyResource("/defaults/data/" + name, filePath);
|
||||
FileUtils.copyResource("/defaults/data/" + name, filePath.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private static void generateGachaMappings() {
|
||||
if (!Utils.fileExists(GachaHandler.gachaMappings)) {
|
||||
var path = GachaHandler.getGachaMappingsPath();
|
||||
if (!Files.exists(path)) {
|
||||
try {
|
||||
Grasscutter.getLogger().info("Creating default '" + GachaHandler.gachaMappings + "' data");
|
||||
Tools.createGachaMapping(GachaHandler.gachaMappings);
|
||||
Grasscutter.getLogger().info("Creating default '" + path.toString() + "' data");
|
||||
Tools.createGachaMappings(path);
|
||||
} catch (Exception exception) {
|
||||
Grasscutter.getLogger().warn("Failed to create gacha mappings. \n" + exception);
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.data.binout.*;
|
||||
@ -16,126 +17,171 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
import it.unimi.dsi.fastutil.ints.IntSet;
|
||||
import lombok.Getter;
|
||||
import lombok.experimental.Tolerate;
|
||||
|
||||
public class GameData {
|
||||
// BinOutputs
|
||||
private static final Int2ObjectMap<String> abilityHashes = new Int2ObjectOpenHashMap<>();
|
||||
private static final Map<String, AbilityEmbryoEntry> abilityEmbryos = new HashMap<>();
|
||||
private static final Map<String, AbilityModifierEntry> abilityModifiers = new HashMap<>();
|
||||
private static final Map<String, OpenConfigEntry> openConfigEntries = new HashMap<>();
|
||||
private static final Map<String, ScenePointEntry> scenePointEntries = new HashMap<>();
|
||||
@Getter private static final Int2ObjectMap<HomeworldDefaultSaveData> homeworldDefaultSaveData = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<String> abilityHashes = new Int2ObjectOpenHashMap<>();
|
||||
@Deprecated(forRemoval = true)
|
||||
@Getter private static final Map<String, AbilityModifierEntry> abilityModifiers = new HashMap<>();
|
||||
@Getter private static final Map<String, ConfigGadget> gadgetConfigData = new HashMap<>();
|
||||
@Getter private static final Map<String, OpenConfigEntry> openConfigEntries = new HashMap<>();
|
||||
@Deprecated(forRemoval = true) @Getter private static final Map<String, ScenePointEntry> scenePointEntries = new HashMap<>();
|
||||
protected static final Map<String, AbilityData> abilityDataMap = new HashMap<>();
|
||||
protected static final Int2ObjectMap<ScenePointEntry> scenePointEntryMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<MainQuestData> mainQuestData = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<QuestEncryptionKey> questsKeys = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<HomeworldDefaultSaveData> homeworldDefaultSaveData = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<SceneNpcBornData> npcBornData = new Int2ObjectOpenHashMap<>();
|
||||
private static final Map<String, AbilityEmbryoEntry> abilityEmbryos = new HashMap<>();
|
||||
|
||||
// ExcelConfigs
|
||||
private static final Int2ObjectMap<PlayerLevelData> playerLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
private static final Int2ObjectMap<AvatarData> avatarDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarLevelData> avatarLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarSkillDepotData> avatarSkillDepotDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarSkillData> avatarSkillDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarCurveData> avatarCurveDataMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarFetterLevelData> avatarFetterLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarPromoteData> avatarPromoteDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarTalentData> avatarTalentDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<ProudSkillData> proudSkillDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
private static final Int2ObjectMap<ItemData> itemDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<ReliquaryLevelData> reliquaryLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<ReliquaryAffixData> reliquaryAffixDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<ReliquaryMainPropData> reliquaryMainPropDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<ReliquarySetData> reliquarySetDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<WeaponLevelData> weaponLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<WeaponPromoteData> weaponPromoteDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<WeaponCurveData> weaponCurveDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<EquipAffixData> equipAffixDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
private static final Int2ObjectMap<EnvAnimalGatherConfigData> envAnimalGatherConfigDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<MonsterData> monsterDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<NpcData> npcDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<GadgetData> gadgetDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<MonsterCurveData> monsterCurveDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<MonsterDescribeData> monsterDescribeDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
private static final Int2ObjectMap<AvatarFlycloakData> avatarFlycloakDataMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarCostumeData> avatarCostumeDataMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarCostumeData> avatarCostumeDataItemIdMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
|
||||
private static final Int2ObjectMap<SceneData> sceneDataMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
private static final Int2ObjectMap<FetterData> fetterDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexQuestData> codexQuestDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexQuestData> codexQuestDataIdMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexAnimalData> codexAnimalDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexWeaponData> codexWeaponDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexWeaponData> codexWeaponDataIdMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexMaterialData> codexMaterialDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexMaterialData> codexMaterialDataIdMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexReliquaryData> codexReliquaryDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexReliquaryData> codexReliquaryDataIdMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final ArrayList<CodexReliquaryData> codexReliquaryArrayList = new ArrayList<>();
|
||||
private static final Int2ObjectMap<FetterCharacterCardData> fetterCharacterCardDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<RewardData> rewardDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
private static final Int2ObjectMap<WorldAreaData> worldAreaDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<WorldLevelData> worldLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<DailyDungeonData> dailyDungeonDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<DungeonEntryData> dungeonEntryDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
private static final Int2ObjectMap<DungeonData> dungeonDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<QuestData> questDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<ShopGoodsData> shopGoodsDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CombineData> combineDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<RewardPreviewData> rewardPreviewDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<GatherData> gatherDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<TowerFloorData> towerFloorDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<TowerLevelData> towerLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<TowerScheduleData> towerScheduleDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<BuffData> buffDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<ForgeData> forgeDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<HomeWorldLevelData> homeWorldLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<FurnitureMakeConfigData> furnitureMakeConfigDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<InvestigationMonsterData> investigationMonsterDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CityData> cityDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<WeatherData> weatherDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<BattlePassMissionData> battlePassMissionDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<BattlePassRewardData> battlePassRewardDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CookRecipeData> cookRecipeDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CookBonusData> cookBonusDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
@Getter private static final ArrayList<CodexReliquaryData> codexReliquaryArrayList = new ArrayList<>();
|
||||
@Getter private static final Int2ObjectMap<ActivityData> activityDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ActivityShopData> activityShopDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ActivityWatcherData> activityWatcherDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<MusicGameBasicData> musicGameBasicDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<PersonalLineData> personalLineDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ChapterData> chapterDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<TriggerExcelConfigData> triggerExcelConfigDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Map<String,ScriptSceneData> scriptSceneDataMap = new HashMap<>();
|
||||
@Getter private static final Map<Integer, List<Integer>> scenePointsPerScene = new HashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarCostumeData> avatarCostumeDataItemIdMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarCostumeData> avatarCostumeDataMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarCurveData> avatarCurveDataMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarData> avatarDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarFetterLevelData> avatarFetterLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarFlycloakData> avatarFlycloakDataMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarLevelData> avatarLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarSkillData> avatarSkillDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarSkillDepotData> avatarSkillDepotDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<AvatarTalentData> avatarTalentDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<BattlePassMissionData> battlePassMissionDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<BattlePassRewardData> battlePassRewardDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<BlossomRefreshExcelConfigData> blossomRefreshExcelConfigDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
@Getter private static final Int2ObjectMap<BuffData> buffDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ChapterData> chapterDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<CityData> cityDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<CodexAnimalData> codexAnimalDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<CodexMaterialData> codexMaterialDataIdMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<CodexQuestData> codexQuestDataIdMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<CodexReliquaryData> codexReliquaryDataIdMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<CodexWeaponData> codexWeaponDataIdMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<CombineData> combineDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<CookBonusData> cookBonusDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<CookRecipeData> cookRecipeDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<DailyDungeonData> dailyDungeonDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<DungeonData> dungeonDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<DungeonEntryData> dungeonEntryDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<EnvAnimalGatherConfigData> envAnimalGatherConfigDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<EquipAffixData> equipAffixDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<FetterCharacterCardData> fetterCharacterCardDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ForgeData> forgeDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<FurnitureMakeConfigData> furnitureMakeConfigDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<GadgetData> gadgetDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<GatherData> gatherDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<HomeWorldBgmData> homeWorldBgmDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<HomeWorldLevelData> homeWorldLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<InvestigationMonsterData> investigationMonsterDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ItemData> itemDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<MonsterCurveData> monsterCurveDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<MonsterData> monsterDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<MonsterDescribeData> monsterDescribeDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<MusicGameBasicData> musicGameBasicDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<NpcData> npcDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<OpenStateData> openStateDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<PersonalLineData> personalLineDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<PlayerLevelData> playerLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ProudSkillData> proudSkillDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<QuestData> questDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ReliquaryAffixData> reliquaryAffixDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ReliquaryMainPropData> reliquaryMainPropDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<ReliquarySetData> reliquarySetDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<RewardData> rewardDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<RewardPreviewData> rewardPreviewDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<SceneData> sceneDataMap = new Int2ObjectLinkedOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<TowerFloorData> towerFloorDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<TowerLevelData> towerLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<TowerScheduleData> towerScheduleDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<TriggerExcelConfigData> triggerExcelConfigDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<WeaponCurveData> weaponCurveDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<WeaponLevelData> weaponLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<WeaponPromoteData> weaponPromoteDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<WeatherData> weatherDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<WorldAreaData> worldAreaDataMap = new Int2ObjectOpenHashMap<>();
|
||||
@Getter private static final Int2ObjectMap<WorldLevelData> worldLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<AvatarPromoteData> avatarPromoteDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<FetterData> fetterDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<ReliquaryLevelData> reliquaryLevelDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<ShopGoodsData> shopGoodsDataMap = new Int2ObjectOpenHashMap<>();
|
||||
// The following are accessed via getMapByResourceDef, and will show as unused
|
||||
private static final Int2ObjectMap<CodexMaterialData> codexMaterialDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexQuestData> codexQuestDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexReliquaryData> codexReliquaryDataMap = new Int2ObjectOpenHashMap<>();
|
||||
private static final Int2ObjectMap<CodexWeaponData> codexWeaponDataMap = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
// Cache
|
||||
@Getter private static final IntList scenePointIdList = new IntArrayList();
|
||||
@Getter private static final List<OpenStateData> openStateList = new ArrayList<>();
|
||||
@Getter private static final Map<Integer, List<Integer>> scenePointsPerScene = new HashMap<>();
|
||||
@Getter private static final Map<String, ScriptSceneData> scriptSceneDataMap = new HashMap<>();
|
||||
private static Map<Integer, List<Integer>> fetters = new HashMap<>();
|
||||
private static Map<Integer, List<ShopGoodsData>> shopGoods = new HashMap<>();
|
||||
private static final IntList scenePointIdList = new IntArrayList();
|
||||
|
||||
|
||||
|
||||
@Getter private static final List<OpenStateData> openStateList = new ArrayList<>();
|
||||
protected static Int2ObjectMap<IntSet> proudSkillGroupLevels = new Int2ObjectOpenHashMap<>();
|
||||
protected static Int2ObjectMap<IntSet> avatarSkillLevels = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
// Getters with wrong names, remove later
|
||||
@Deprecated(forRemoval = true) public static Int2ObjectMap<CodexReliquaryData> getcodexReliquaryIdMap() {return codexReliquaryDataIdMap;}
|
||||
@Deprecated(forRemoval = true) public static Int2ObjectMap<DungeonEntryData> getDungeonEntryDatatMap() {return dungeonEntryDataMap;}
|
||||
@Deprecated(forRemoval = true) @Tolerate public static ArrayList<CodexReliquaryData> getcodexReliquaryArrayList() {return codexReliquaryArrayList;}
|
||||
|
||||
// Getters with different names that stay for now
|
||||
public static Int2ObjectMap<MainQuestData> getMainQuestDataMap() {return mainQuestData;}
|
||||
public static Int2ObjectMap<QuestEncryptionKey> getMainQuestEncryptionMap() {return questsKeys;}
|
||||
public static Int2ObjectMap<SceneNpcBornData> getSceneNpcBornData() {return npcBornData;}
|
||||
public static Map<String, AbilityEmbryoEntry> getAbilityEmbryoInfo() {return abilityEmbryos;}
|
||||
|
||||
// Getters that get values rather than containers. If Lombok ever gets syntactic sugar for this, we should adopt that.
|
||||
public static AbilityData getAbilityData(String abilityName) {return abilityDataMap.get(abilityName);}
|
||||
public static IntSet getAvatarSkillLevels(int avatarSkillId) {return avatarSkillLevels.get(avatarSkillId);}
|
||||
public static IntSet getProudSkillGroupLevels(int proudSkillGroupId) {return proudSkillGroupLevels.get(proudSkillGroupId);}
|
||||
|
||||
// Multi-keyed getters
|
||||
public static AvatarPromoteData getAvatarPromoteData(int promoteId, int promoteLevel) {
|
||||
return avatarPromoteDataMap.get((promoteId << 8) + promoteLevel);
|
||||
}
|
||||
|
||||
public static WeaponPromoteData getWeaponPromoteData(int promoteId, int promoteLevel) {
|
||||
return weaponPromoteDataMap.get((promoteId << 8) + promoteLevel);
|
||||
}
|
||||
|
||||
public static ReliquaryLevelData getRelicLevelData(int rankLevel, int level) {
|
||||
return reliquaryLevelDataMap.get((rankLevel << 8) + level);
|
||||
}
|
||||
|
||||
public static ScenePointEntry getScenePointEntryById(int sceneId, int pointId) {
|
||||
return scenePointEntryMap.get((sceneId << 16) + pointId);
|
||||
}
|
||||
|
||||
// Non-nullable value getters
|
||||
public static int getAvatarLevelExpRequired(int level) {
|
||||
return Optional.ofNullable(avatarLevelDataMap.get(level)).map(d -> d.getExp()).orElse(0);
|
||||
}
|
||||
|
||||
public static int getAvatarFetterLevelExpRequired(int level) {
|
||||
return Optional.ofNullable(avatarFetterLevelDataMap.get(level)).map(d -> d.getExp()).orElse(0);
|
||||
}
|
||||
|
||||
public static int getRelicExpRequired(int rankLevel, int level) {
|
||||
return Optional.ofNullable(getRelicLevelData(rankLevel, level)).map(d -> d.getExp()).orElse(0);
|
||||
}
|
||||
|
||||
|
||||
// Generic getter
|
||||
public static Int2ObjectMap<?> getMapByResourceDef(Class<?> resourceDefinition) {
|
||||
Int2ObjectMap<?> map = null;
|
||||
|
||||
try {
|
||||
Field field = GameData.class.getDeclaredField(Utils.lowerCaseFirstChar(resourceDefinition.getSimpleName()) + "Map");
|
||||
|
||||
field.setAccessible(true);
|
||||
|
||||
map = (Int2ObjectMap<?>) field.get(null);
|
||||
|
||||
field.setAccessible(false);
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("Error fetching resource map for " + resourceDefinition.getSimpleName(), e);
|
||||
@ -144,115 +190,7 @@ public class GameData {
|
||||
return map;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<String> getAbilityHashes() {
|
||||
return abilityHashes;
|
||||
}
|
||||
|
||||
public static Map<String, AbilityEmbryoEntry> getAbilityEmbryoInfo() {
|
||||
return abilityEmbryos;
|
||||
}
|
||||
|
||||
public static Map<String, AbilityModifierEntry> getAbilityModifiers() {
|
||||
return abilityModifiers;
|
||||
}
|
||||
|
||||
public static Map<String, OpenConfigEntry> getOpenConfigEntries() {
|
||||
return openConfigEntries;
|
||||
}
|
||||
|
||||
public static Map<String, ScenePointEntry> getScenePointEntries() {
|
||||
return scenePointEntries;
|
||||
}
|
||||
|
||||
// TODO optimize
|
||||
public static ScenePointEntry getScenePointEntryById(int sceneId, int pointId) {
|
||||
return getScenePointEntries().get(sceneId + "_" + pointId);
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<MainQuestData> getMainQuestDataMap() {
|
||||
return mainQuestData;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<QuestEncryptionKey> getMainQuestEncryptionMap() {
|
||||
return questsKeys;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<HomeworldDefaultSaveData> getHomeworldDefaultSaveData() {
|
||||
return homeworldDefaultSaveData;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<SceneNpcBornData> getSceneNpcBornData() {
|
||||
return npcBornData;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarData> getAvatarDataMap() {
|
||||
return avatarDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<ItemData> getItemDataMap() {
|
||||
return itemDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarSkillDepotData> getAvatarSkillDepotDataMap() {
|
||||
return avatarSkillDepotDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarSkillData> getAvatarSkillDataMap() {
|
||||
return avatarSkillDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<PlayerLevelData> getPlayerLevelDataMap() {
|
||||
return playerLevelDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarFetterLevelData> getAvatarFetterLevelDataMap() {
|
||||
return avatarFetterLevelDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<FetterCharacterCardData> getFetterCharacterCardDataMap() {
|
||||
return fetterCharacterCardDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarLevelData> getAvatarLevelDataMap() {
|
||||
return avatarLevelDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<WeaponLevelData> getWeaponLevelDataMap() {
|
||||
return weaponLevelDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<ReliquaryAffixData> getReliquaryAffixDataMap() {
|
||||
return reliquaryAffixDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<ReliquaryMainPropData> getReliquaryMainPropDataMap() {
|
||||
return reliquaryMainPropDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<WeaponPromoteData> getWeaponPromoteDataMap() {
|
||||
return weaponPromoteDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<WeaponCurveData> getWeaponCurveDataMap() {
|
||||
return weaponCurveDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarCurveData> getAvatarCurveDataMap() {
|
||||
return avatarCurveDataMap;
|
||||
}
|
||||
|
||||
public static int getRelicExpRequired(int rankLevel, int level) {
|
||||
ReliquaryLevelData levelData = reliquaryLevelDataMap.get((rankLevel << 8) + level);
|
||||
return levelData != null ? levelData.getExp() : 0;
|
||||
}
|
||||
|
||||
public static ReliquaryLevelData getRelicLevelData(int rankLevel, int level) {
|
||||
return reliquaryLevelDataMap.get((rankLevel << 8) + level);
|
||||
}
|
||||
|
||||
public static WeaponPromoteData getWeaponPromoteData(int promoteId, int promoteLevel) {
|
||||
return weaponPromoteDataMap.get((promoteId << 8) + promoteLevel);
|
||||
}
|
||||
|
||||
public static int getWeaponExpRequired(int rankLevel, int level) {
|
||||
WeaponLevelData levelData = weaponLevelDataMap.get(level);
|
||||
@ -266,79 +204,6 @@ public class GameData {
|
||||
}
|
||||
}
|
||||
|
||||
public static AvatarPromoteData getAvatarPromoteData(int promoteId, int promoteLevel) {
|
||||
return avatarPromoteDataMap.get((promoteId << 8) + promoteLevel);
|
||||
}
|
||||
|
||||
public static int getAvatarLevelExpRequired(int level) {
|
||||
AvatarLevelData levelData = avatarLevelDataMap.get(level);
|
||||
return levelData != null ? levelData.getExp() : 0;
|
||||
}
|
||||
|
||||
public static int getAvatarFetterLevelExpRequired(int level) {
|
||||
AvatarFetterLevelData levelData = avatarFetterLevelDataMap.get(level);
|
||||
return levelData != null ? levelData.getExp() : 0;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<ProudSkillData> getProudSkillDataMap() {
|
||||
return proudSkillDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<MonsterData> getMonsterDataMap() {
|
||||
return monsterDataMap;
|
||||
}
|
||||
public static Int2ObjectMap<EnvAnimalGatherConfigData> getEnvAnimalGatherConfigDataMap() {
|
||||
return envAnimalGatherConfigDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<NpcData> getNpcDataMap() {
|
||||
return npcDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<GadgetData> getGadgetDataMap() {
|
||||
return gadgetDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<ReliquarySetData> getReliquarySetDataMap() {
|
||||
return reliquarySetDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<EquipAffixData> getEquipAffixDataMap() {
|
||||
return equipAffixDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<MonsterCurveData> getMonsterCurveDataMap() {
|
||||
return monsterCurveDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<MonsterDescribeData> getMonsterDescribeDataMap() {
|
||||
return monsterDescribeDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarTalentData> getAvatarTalentDataMap() {
|
||||
return avatarTalentDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarFlycloakData> getAvatarFlycloakDataMap() {
|
||||
return avatarFlycloakDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarCostumeData> getAvatarCostumeDataMap() {
|
||||
return avatarCostumeDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<AvatarCostumeData> getAvatarCostumeDataItemIdMap() {
|
||||
return avatarCostumeDataItemIdMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<SceneData> getSceneDataMap() {
|
||||
return sceneDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<RewardData> getRewardDataMap() {
|
||||
return rewardDataMap;
|
||||
}
|
||||
|
||||
public static Map<Integer, List<Integer>> getFetterDataEntries() {
|
||||
if (fetters.isEmpty()) {
|
||||
fetterDataMap.forEach((k, v) -> {
|
||||
@ -352,38 +217,6 @@ public class GameData {
|
||||
return fetters;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<CodexQuestData> getCodexQuestDataIdMap() {return codexQuestDataIdMap;}
|
||||
|
||||
public static Int2ObjectMap<CodexAnimalData> getCodexAnimalDataMap() {return codexAnimalDataMap;}
|
||||
|
||||
public static Int2ObjectMap<CodexWeaponData> getCodexWeaponDataIdMap() {return codexWeaponDataIdMap;}
|
||||
|
||||
public static Int2ObjectMap<CodexMaterialData> getCodexMaterialDataIdMap() {return codexMaterialDataIdMap;}
|
||||
|
||||
public static Int2ObjectMap<CodexReliquaryData> getcodexReliquaryIdMap() {return codexReliquaryDataIdMap;}
|
||||
|
||||
public static ArrayList<CodexReliquaryData> getcodexReliquaryArrayList() {return codexReliquaryArrayList;}
|
||||
|
||||
public static Int2ObjectMap<WorldAreaData> getWorldAreaDataMap() {
|
||||
return worldAreaDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<WorldLevelData> getWorldLevelDataMap() {
|
||||
return worldLevelDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<DungeonData> getDungeonDataMap() {
|
||||
return dungeonDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<DailyDungeonData> getDailyDungeonDataMap() {
|
||||
return dailyDungeonDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<DungeonEntryData> getDungeonEntryDatatMap() {
|
||||
return dungeonEntryDataMap;
|
||||
}
|
||||
|
||||
public static Map<Integer, List<ShopGoodsData>> getShopGoodsDataEntries() {
|
||||
if (shopGoods.isEmpty()) {
|
||||
shopGoodsDataMap.forEach((k, v) -> {
|
||||
@ -395,80 +228,4 @@ public class GameData {
|
||||
|
||||
return shopGoods;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<RewardPreviewData> getRewardPreviewDataMap() {
|
||||
return rewardPreviewDataMap;
|
||||
}
|
||||
|
||||
public static IntList getScenePointIdList() {
|
||||
return scenePointIdList;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<CombineData> getCombineDataMap() {
|
||||
return combineDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<TowerFloorData> getTowerFloorDataMap() {
|
||||
return towerFloorDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<TowerLevelData> getTowerLevelDataMap() {
|
||||
return towerLevelDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<TowerScheduleData> getTowerScheduleDataMap() {
|
||||
return towerScheduleDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<QuestData> getQuestDataMap() {
|
||||
return questDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<ForgeData> getForgeDataMap() {
|
||||
return forgeDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<HomeWorldLevelData> getHomeWorldLevelDataMap() {
|
||||
return homeWorldLevelDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<FurnitureMakeConfigData> getFurnitureMakeConfigDataMap() {
|
||||
return furnitureMakeConfigDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<GatherData> getGatherDataMap() {
|
||||
return gatherDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<InvestigationMonsterData> getInvestigationMonsterDataMap() {
|
||||
return investigationMonsterDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<CityData> getCityDataMap() {
|
||||
return cityDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<WeatherData> getWeatherDataMap() {
|
||||
return weatherDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<BattlePassMissionData> getBattlePassMissionDataMap() {
|
||||
return battlePassMissionDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<BattlePassRewardData> getBattlePassRewardDataMap() {
|
||||
return battlePassRewardDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<CookRecipeData> getCookRecipeDataMap() {
|
||||
return cookRecipeDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<CookBonusData> getCookBonusDataMap() {
|
||||
return cookBonusDataMap;
|
||||
}
|
||||
|
||||
public static Int2ObjectMap<BuffData> getBuffDataMap() {
|
||||
return buffDataMap;
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,10 @@
|
||||
package emu.grasscutter.data;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.data.binout.*;
|
||||
import emu.grasscutter.data.binout.AbilityModifier.AbilityConfigData;
|
||||
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
|
||||
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierActionType;
|
||||
import emu.grasscutter.data.common.PointData;
|
||||
import emu.grasscutter.data.common.ScenePointConfig;
|
||||
import emu.grasscutter.game.managers.blossom.BlossomConfig;
|
||||
import emu.grasscutter.game.quest.QuestEncryptionKey;
|
||||
import emu.grasscutter.game.world.SpawnDataEntry;
|
||||
@ -16,21 +12,22 @@ import emu.grasscutter.game.world.SpawnDataEntry.GridBlockId;
|
||||
import emu.grasscutter.game.world.SpawnDataEntry.SpawnGroupEntry;
|
||||
import emu.grasscutter.scripts.SceneIndexManager;
|
||||
import emu.grasscutter.utils.JsonUtils;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import lombok.SneakyThrows;
|
||||
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||
import it.unimi.dsi.fastutil.ints.IntArraySet;
|
||||
import lombok.val;
|
||||
|
||||
import org.reflections.Reflections;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.DATA;
|
||||
import static emu.grasscutter.config.Configuration.RESOURCE;
|
||||
import static emu.grasscutter.utils.FileUtils.getDataPath;
|
||||
import static emu.grasscutter.utils.FileUtils.getResourcePath;
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
|
||||
public class ResourceLoader {
|
||||
@ -68,6 +65,7 @@ public class ResourceLoader {
|
||||
// Process into depots
|
||||
GameDepot.load();
|
||||
// Load spawn data and quests
|
||||
loadGadgetConfigData();
|
||||
loadSpawnData();
|
||||
loadQuests();
|
||||
loadScriptSceneData();
|
||||
@ -77,6 +75,7 @@ public class ResourceLoader {
|
||||
loadHomeworldDefaultSaveData();
|
||||
loadNpcBornData();
|
||||
loadBlossomResources();
|
||||
cacheTalentLevelSets();
|
||||
|
||||
Grasscutter.getLogger().info(translate("messages.status.resources.finish"));
|
||||
loadedAll = true;
|
||||
@ -104,7 +103,7 @@ public class ResourceLoader {
|
||||
try {
|
||||
loadFromResource(resourceDefinition, type, map, doReload);
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("Error loading resource file: " + Arrays.toString(type.name()), e);
|
||||
Grasscutter.getLogger().error("Error loading resource file: " + Arrays.toString(type.name()), e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -122,7 +121,7 @@ public class ResourceLoader {
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
protected static <T> void loadFromResource(Class<T> c, String fileName, Int2ObjectMap map) throws Exception {
|
||||
List<T> list = JsonUtils.loadToList(RESOURCE("ExcelBinOutput/" + fileName), c);
|
||||
List<T> list = JsonUtils.loadToList(getResourcePath("ExcelBinOutput/" + fileName), c);
|
||||
|
||||
for (T o : list) {
|
||||
GameResource res = (GameResource) o;
|
||||
@ -131,52 +130,54 @@ public class ResourceLoader {
|
||||
}
|
||||
}
|
||||
|
||||
public class ScenePointConfig { // Sadly this doesn't work as a local class in loadScenePoints()
|
||||
public Map<Integer, PointData> points;
|
||||
}
|
||||
private static void loadScenePoints() {
|
||||
Pattern pattern = Pattern.compile("(?<=scene)(.*?)(?=_point.json)");
|
||||
File folder = new File(RESOURCE("BinOutput/Scene/Point"));
|
||||
val pattern = Pattern.compile("scene([0-9]+)_point\\.json");
|
||||
try {
|
||||
Files.newDirectoryStream(getResourcePath("BinOutput/Scene/Point"), "scene*_point.json").forEach(path -> {
|
||||
val matcher = pattern.matcher(path.getFileName().toString());
|
||||
if (!matcher.find()) return;
|
||||
int sceneId = Integer.parseInt(matcher.group(1));
|
||||
|
||||
if (!folder.isDirectory() || !folder.exists() || folder.listFiles() == null) {
|
||||
ScenePointConfig config;
|
||||
try {
|
||||
config = JsonUtils.loadToClass(path, ScenePointConfig.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.points == null) return;
|
||||
|
||||
val scenePoints = new IntArrayList();
|
||||
config.points.forEach((pointId, pointData) -> {
|
||||
val scenePoint = new ScenePointEntry(sceneId, pointData);
|
||||
scenePoints.add(pointId);
|
||||
pointData.setId(pointId);
|
||||
|
||||
GameData.getScenePointIdList().add(pointId);
|
||||
GameData.getScenePointEntries().put(scenePoint.getName(), scenePoint);
|
||||
GameData.scenePointEntryMap.put((sceneId << 16) + pointId, scenePoint);
|
||||
|
||||
pointData.updateDailyDungeon();
|
||||
});
|
||||
GameData.getScenePointsPerScene().put(sceneId, scenePoints);
|
||||
});
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Scene point files cannot be found, you cannot use teleport waypoints!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (File file : Objects.requireNonNull(folder.listFiles())) {
|
||||
ScenePointConfig config;
|
||||
Integer sceneId;
|
||||
|
||||
Matcher matcher = pattern.matcher(file.getName());
|
||||
if (matcher.find()) {
|
||||
sceneId = Integer.parseInt(matcher.group(1));
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
config = JsonUtils.loadToClass(file.getPath(), ScenePointConfig.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (config.points == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
List<Integer> scenePoints = new ArrayList<>();
|
||||
for (Map.Entry<String, JsonElement> entry : config.points.entrySet()) {
|
||||
int id = Integer.parseInt(entry.getKey());
|
||||
String name = sceneId + "_" + entry.getKey();
|
||||
PointData pointData = JsonUtils.decode(entry.getValue(), PointData.class);
|
||||
pointData.setId(id);
|
||||
|
||||
GameData.getScenePointIdList().add(id);
|
||||
GameData.getScenePointEntries().put(name, new ScenePointEntry(name, pointData));
|
||||
scenePoints.add(id);
|
||||
|
||||
pointData.updateDailyDungeon();
|
||||
}
|
||||
GameData.getScenePointsPerScene().put(sceneId, scenePoints);
|
||||
}
|
||||
private static void cacheTalentLevelSets() {
|
||||
GameData.getProudSkillDataMap().forEach((id, data) ->
|
||||
GameData.proudSkillGroupLevels
|
||||
.computeIfAbsent(data.getProudSkillGroupId(), i -> new IntArraySet())
|
||||
.add(data.getLevel()));
|
||||
GameData.getAvatarSkillDataMap().forEach((id, data) ->
|
||||
GameData.avatarSkillLevels.put((int) id, GameData.proudSkillGroupLevels.get(data.getProudSkillGroupId())));
|
||||
}
|
||||
|
||||
private static void loadAbilityEmbryos() {
|
||||
@ -184,52 +185,45 @@ public class ResourceLoader {
|
||||
|
||||
// Read from cached file if exists
|
||||
try {
|
||||
embryoList = JsonUtils.loadToList(DATA("AbilityEmbryos.json"), AbilityEmbryoEntry.class);
|
||||
embryoList = JsonUtils.loadToList(getDataPath("AbilityEmbryos.json"), AbilityEmbryoEntry.class);
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
if (embryoList == null) {
|
||||
// Load from BinOutput
|
||||
Pattern pattern = Pattern.compile("(?<=ConfigAvatar_)(.*?)(?=.json)");
|
||||
val pattern = Pattern.compile("ConfigAvatar_(.+?)\\.json");
|
||||
|
||||
embryoList = new ArrayList<>();
|
||||
File folder = new File(Utils.toFilePath(RESOURCE("BinOutput/Avatar/")));
|
||||
File[] files = folder.listFiles();
|
||||
if (files == null) {
|
||||
Grasscutter.getLogger().error("Error loading ability embryos: no files found in " + folder.getAbsolutePath());
|
||||
val l = new ArrayList<AbilityEmbryoEntry>();
|
||||
try {
|
||||
Files.newDirectoryStream(getResourcePath("BinOutput/Avatar/"), "ConfigAvatar_*.json").forEach(path -> {
|
||||
val matcher = pattern.matcher(path.getFileName().toString());
|
||||
if (!matcher.find()) return;
|
||||
String avatarName = matcher.group(1);
|
||||
AvatarConfig config;
|
||||
|
||||
try {
|
||||
config = JsonUtils.loadToClass(path, AvatarConfig.class);
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("Error loading player ability embryos:", e);
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.abilities == null) return;
|
||||
|
||||
int s = config.abilities.size();
|
||||
AbilityEmbryoEntry al = new AbilityEmbryoEntry(avatarName, config.abilities.stream().map(Object::toString).toArray(size -> new String[s]));
|
||||
l.add(al);
|
||||
});
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Error loading ability embryos: no files found");
|
||||
return;
|
||||
}
|
||||
|
||||
for (File file : files) {
|
||||
AvatarConfig config;
|
||||
String avatarName;
|
||||
|
||||
Matcher matcher = pattern.matcher(file.getName());
|
||||
if (matcher.find()) {
|
||||
avatarName = matcher.group(0);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
config = JsonUtils.loadToClass(file.getPath(), AvatarConfig.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (config.abilities == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int s = config.abilities.size();
|
||||
AbilityEmbryoEntry al = new AbilityEmbryoEntry(avatarName, config.abilities.stream().map(Object::toString).toArray(size -> new String[s]));
|
||||
embryoList.add(al);
|
||||
}
|
||||
embryoList = l;
|
||||
|
||||
try {
|
||||
GameDepot.setPlayerAbilities(JsonUtils.loadToMap(RESOURCE("BinOutput/AbilityGroup/AbilityGroup_Other_PlayerElementAbility.json"), String.class, AvatarConfig.class));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
GameDepot.setPlayerAbilities(JsonUtils.loadToMap(getResourcePath("BinOutput/AbilityGroup/AbilityGroup_Other_PlayerElementAbility.json"), String.class, AvatarConfig.class));
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Error loading player abilities:", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -243,68 +237,55 @@ public class ResourceLoader {
|
||||
}
|
||||
}
|
||||
|
||||
// private static HashSet<String> modifierActionTypes = new HashSet<>();
|
||||
public static class AbilityConfigData {
|
||||
public AbilityData Default;
|
||||
}
|
||||
private static void loadAbilityModifiers() {
|
||||
// Load from BinOutput
|
||||
File folder = new File(Utils.toFilePath(RESOURCE("BinOutput/Ability/Temp/AvatarAbilities/")));
|
||||
File[] files = folder.listFiles();
|
||||
if (files == null) {
|
||||
Grasscutter.getLogger().error("Error loading ability modifiers: no files found in " + folder.getAbsolutePath());
|
||||
try (Stream<Path> paths = Files.walk(getResourcePath("BinOutput/Ability/Temp/"))) {
|
||||
paths.filter(Files::isRegularFile).filter(path -> path.toString().endsWith(".json")).forEach(ResourceLoader::loadAbilityModifiers);
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Error loading ability modifiers: ", e);
|
||||
return;
|
||||
}
|
||||
|
||||
for (File file : files) {
|
||||
List<AbilityConfigData> abilityConfigList;
|
||||
|
||||
try {
|
||||
abilityConfigList = JsonUtils.loadToList(file.getPath(), AbilityConfigData.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
|
||||
for (AbilityConfigData data : abilityConfigList) {
|
||||
if (data.Default.modifiers == null || data.Default.modifiers.size() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
AbilityModifierEntry modifierEntry = new AbilityModifierEntry(data.Default.abilityName);
|
||||
|
||||
for (Entry<String, AbilityModifier> entry : data.Default.modifiers.entrySet()) {
|
||||
AbilityModifier modifier = entry.getValue();
|
||||
|
||||
// Stare.
|
||||
if (modifier.onAdded != null) {
|
||||
for (AbilityModifierAction action : modifier.onAdded) {
|
||||
if (action.$type.contains("HealHP")) {
|
||||
action.type = AbilityModifierActionType.HealHP;
|
||||
modifierEntry.getOnAdded().add(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modifier.onThinkInterval != null) {
|
||||
for (AbilityModifierAction action : modifier.onThinkInterval) {
|
||||
if (action.$type.contains("HealHP")) {
|
||||
action.type = AbilityModifierActionType.HealHP;
|
||||
modifierEntry.getOnThinkInterval().add(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modifier.onRemoved != null) {
|
||||
for (AbilityModifierAction action : modifier.onRemoved) {
|
||||
if (action.$type.contains("HealHP")) {
|
||||
action.type = AbilityModifierActionType.HealHP;
|
||||
modifierEntry.getOnRemoved().add(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GameData.getAbilityModifiers().put(modifierEntry.getName(), modifierEntry);
|
||||
}
|
||||
// System.out.println("Loaded modifiers, found types:");
|
||||
// modifierActionTypes.stream().sorted().forEach(s -> System.out.printf("%s, ", s));
|
||||
// System.out.println("[End]");
|
||||
}
|
||||
private static void loadAbilityModifiers(Path path) {
|
||||
try {
|
||||
JsonUtils.loadToList(path, AbilityConfigData.class).forEach(data -> loadAbilityData(data.Default));
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Error loading ability modifiers from path " + path.toString() + ": ", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
private static void loadAbilityData(AbilityData data) {
|
||||
GameData.abilityDataMap.put(data.abilityName, data);
|
||||
|
||||
val modifiers = data.modifiers;
|
||||
if (modifiers == null || modifiers.size() == 0) return;
|
||||
|
||||
String name = data.abilityName;
|
||||
AbilityModifierEntry modifierEntry = new AbilityModifierEntry(name);
|
||||
modifiers.forEach((key, modifier) -> {
|
||||
Stream.ofNullable(modifier.onAdded).flatMap(Stream::of)
|
||||
// .map(action -> {modifierActionTypes.add(action.$type); return action;})
|
||||
.filter(action -> action.type == AbilityModifierAction.Type.HealHP)
|
||||
.forEach(action -> modifierEntry.getOnAdded().add(action));
|
||||
Stream.ofNullable(modifier.onThinkInterval).flatMap(Stream::of)
|
||||
// .map(action -> {modifierActionTypes.add(action.$type); return action;})
|
||||
.filter(action -> action.type == AbilityModifierAction.Type.HealHP)
|
||||
.forEach(action -> modifierEntry.getOnThinkInterval().add(action));
|
||||
Stream.ofNullable(modifier.onRemoved).flatMap(Stream::of)
|
||||
// .map(action -> {modifierActionTypes.add(action.$type); return action;})
|
||||
.filter(action -> action.type == AbilityModifierAction.Type.HealHP)
|
||||
.forEach(action -> modifierEntry.getOnRemoved().add(action));
|
||||
});
|
||||
|
||||
GameData.getAbilityModifiers().put(name, modifierEntry);
|
||||
}
|
||||
|
||||
private static void loadSpawnData() {
|
||||
String[] spawnDataNames = {"Spawns.json", "GadgetSpawns.json"};
|
||||
@ -345,37 +326,27 @@ public class ResourceLoader {
|
||||
List<OpenConfigEntry> list = null;
|
||||
|
||||
try {
|
||||
list = JsonUtils.loadToList(DATA("OpenConfig.json"), OpenConfigEntry.class);
|
||||
list = JsonUtils.loadToList(getDataPath("OpenConfig.json"), OpenConfigEntry.class);
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
if (list == null) {
|
||||
Map<String, OpenConfigEntry> map = new TreeMap<>();
|
||||
String[] folderNames = {"BinOutput/Talent/EquipTalents/", "BinOutput/Talent/AvatarTalents/"};
|
||||
|
||||
for (String name : folderNames) {
|
||||
File folder = new File(Utils.toFilePath(RESOURCE(name)));
|
||||
File[] files = folder.listFiles();
|
||||
if (files == null) {
|
||||
Grasscutter.getLogger().error("Error loading open config: no files found in " + folder.getAbsolutePath()); return;
|
||||
}
|
||||
|
||||
for (File file : files) {
|
||||
if (!file.getName().endsWith(".json")) {
|
||||
continue;
|
||||
}
|
||||
Map<String, OpenConfigData[]> config;
|
||||
|
||||
try {
|
||||
config = JsonUtils.loadToMap(file.getPath(), String.class, OpenConfigData[].class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
|
||||
for (Entry<String, OpenConfigData[]> e : config.entrySet()) {
|
||||
OpenConfigEntry entry = new OpenConfigEntry(e.getKey(), e.getValue());
|
||||
map.put(entry.getName(), entry);
|
||||
}
|
||||
for (String folderName : folderNames) {
|
||||
try {
|
||||
Files.newDirectoryStream(getResourcePath(folderName), "*.json").forEach(path -> {
|
||||
try {
|
||||
JsonUtils.loadToMap(path, String.class, OpenConfigData[].class)
|
||||
.forEach((name, data) -> map.put(name, new OpenConfigEntry(name, data)));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Error loading open config: no files found in " + folderName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,37 +364,29 @@ public class ResourceLoader {
|
||||
}
|
||||
|
||||
private static void loadQuests() {
|
||||
File folder = new File(RESOURCE("BinOutput/Quest/"));
|
||||
try {
|
||||
Files.list(getResourcePath("BinOutput/Quest/")).forEach(path -> {
|
||||
try {
|
||||
val mainQuest = JsonUtils.loadToClass(path, MainQuestData.class);
|
||||
GameData.getMainQuestDataMap().put(mainQuest.getId(), mainQuest);
|
||||
} catch (IOException e) {
|
||||
|
||||
if (!folder.exists()) {
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Quest data missing");
|
||||
return;
|
||||
}
|
||||
|
||||
for (File file : folder.listFiles()) {
|
||||
MainQuestData mainQuest = null;
|
||||
|
||||
try {
|
||||
mainQuest = JsonUtils.loadToClass(file.getPath(), MainQuestData.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
|
||||
GameData.getMainQuestDataMap().put(mainQuest.getId(), mainQuest);
|
||||
}
|
||||
|
||||
try {
|
||||
List<QuestEncryptionKey> keys;
|
||||
Int2ObjectMap<QuestEncryptionKey> questEncryptionMap = GameData.getMainQuestEncryptionMap();
|
||||
val questEncryptionMap = GameData.getMainQuestEncryptionMap();
|
||||
String path = "QuestEncryptionKeys.json";
|
||||
if (Utils.fileExists(RESOURCE(path))) {
|
||||
keys = JsonUtils.loadToList(RESOURCE(path), QuestEncryptionKey.class);
|
||||
keys.forEach(key -> questEncryptionMap.put(key.getMainQuestId(), key));
|
||||
}
|
||||
if (Utils.fileExists(DATA(path))) {
|
||||
keys = DataLoader.loadList(path, QuestEncryptionKey.class);
|
||||
keys.forEach(key -> questEncryptionMap.put(key.getMainQuestId(), key));
|
||||
}
|
||||
try {
|
||||
JsonUtils.loadToList(getResourcePath(path), QuestEncryptionKey.class).forEach(key -> questEncryptionMap.put(key.getMainQuestId(), key));
|
||||
} catch (IOException | NullPointerException ignored) {}
|
||||
try {
|
||||
DataLoader.loadList(path, QuestEncryptionKey.class).forEach(key -> questEncryptionMap.put(key.getMainQuestId(), key));
|
||||
} catch (IOException | NullPointerException ignored) {}
|
||||
Grasscutter.getLogger().debug("Loaded {} quest keys.", questEncryptionMap.size());
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("Unable to load quest keys.", e);
|
||||
@ -433,70 +396,84 @@ public class ResourceLoader {
|
||||
}
|
||||
|
||||
public static void loadScriptSceneData() {
|
||||
File folder = new File(RESOURCE("ScriptSceneData/"));
|
||||
|
||||
if (!folder.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (File file : folder.listFiles()) {
|
||||
ScriptSceneData sceneData;
|
||||
try {
|
||||
sceneData = JsonUtils.loadToClass(file.getPath(), ScriptSceneData.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
|
||||
GameData.getScriptSceneDataMap().put(file.getName(), sceneData);
|
||||
}
|
||||
|
||||
Grasscutter.getLogger().debug("Loaded " + GameData.getScriptSceneDataMap().size() + " ScriptSceneDatas.");
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
private static void loadHomeworldDefaultSaveData() {
|
||||
var pattern = Pattern.compile("scene(.*)_home_config.json");
|
||||
Files.list(Path.of(RESOURCE("BinOutput/HomeworldDefaultSave"))).forEach(file -> {
|
||||
String filename = file.getFileName().toString();
|
||||
var matcher = pattern.matcher(filename);
|
||||
if (!matcher.find()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
var sceneId = Integer.parseInt(matcher.group(1));
|
||||
var data = JsonUtils.loadToClass(file.toString(), HomeworldDefaultSaveData.class);
|
||||
GameData.getHomeworldDefaultSaveData().put(sceneId, data);
|
||||
} catch (Exception ignored) {}
|
||||
});
|
||||
|
||||
Grasscutter.getLogger().debug("Loaded " + GameData.getHomeworldDefaultSaveData().size() + " HomeworldDefaultSaveDatas.");
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
private static void loadNpcBornData() {
|
||||
Files.list(Path.of(RESOURCE("BinOutput/Scene/SceneNpcBorn"))).forEach(file -> {
|
||||
if (file.toFile().isDirectory()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
var data = JsonUtils.loadToClass(file.toString(), SceneNpcBornData.class);
|
||||
if (data.getBornPosList() == null || data.getBornPosList().size() == 0) {
|
||||
try {
|
||||
Files.list(getResourcePath("ScriptSceneData/")).forEach(path -> {
|
||||
try {
|
||||
GameData.getScriptSceneDataMap().put(path.getFileName().toString(), JsonUtils.loadToClass(path, ScriptSceneData.class));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
data.setIndex(SceneIndexManager.buildIndex(3, data.getBornPosList(), item -> item.getPos().toPoint()));
|
||||
GameData.getSceneNpcBornData().put(data.getSceneId(), data);
|
||||
} catch (Exception ignored) {}
|
||||
});
|
||||
|
||||
Grasscutter.getLogger().debug("Loaded " + GameData.getSceneNpcBornData().size() + " SceneNpcBornDatas.");
|
||||
});
|
||||
Grasscutter.getLogger().debug("Loaded " + GameData.getScriptSceneDataMap().size() + " ScriptSceneDatas.");
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().debug("ScriptSceneData folder missing or empty.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadHomeworldDefaultSaveData() {
|
||||
val pattern = Pattern.compile("scene([0-9]+)_home_config\\.json");
|
||||
try {
|
||||
Files.newDirectoryStream(getResourcePath("BinOutput/HomeworldDefaultSave"), "scene*_home_config.json").forEach(path -> {
|
||||
val matcher = pattern.matcher(path.getFileName().toString());
|
||||
if (!matcher.find()) return;
|
||||
|
||||
try {
|
||||
val sceneId = Integer.parseInt(matcher.group(1));
|
||||
val data = JsonUtils.loadToClass(path, HomeworldDefaultSaveData.class);
|
||||
GameData.getHomeworldDefaultSaveData().put(sceneId, data);
|
||||
} catch (Exception ignored) {}
|
||||
});
|
||||
Grasscutter.getLogger().debug("Loaded " + GameData.getHomeworldDefaultSaveData().size() + " HomeworldDefaultSaveDatas.");
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Failed to load HomeworldDefaultSave folder.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadNpcBornData() {
|
||||
try {
|
||||
Files.newDirectoryStream(getResourcePath("BinOutput/Scene/SceneNpcBorn/"), "*.json").forEach(path -> {
|
||||
try {
|
||||
val data = JsonUtils.loadToClass(path, SceneNpcBornData.class);
|
||||
if (data.getBornPosList() == null || data.getBornPosList().size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
data.setIndex(SceneIndexManager.buildIndex(3, data.getBornPosList(), item -> item.getPos().toPoint()));
|
||||
GameData.getSceneNpcBornData().put(data.getSceneId(), data);
|
||||
} catch (IOException ignored) {}
|
||||
});
|
||||
Grasscutter.getLogger().debug("Loaded " + GameData.getSceneNpcBornData().size() + " SceneNpcBornDatas.");
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Failed to load SceneNpcBorn folder.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadGadgetConfigData() {
|
||||
try {
|
||||
Files.newDirectoryStream(getResourcePath("BinOutput/Gadget/"), "*.json").forEach(path -> {
|
||||
try {
|
||||
GameData.getGadgetConfigData().putAll(JsonUtils.loadToMap(path, String.class, ConfigGadget.class));
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("failed to load ConfigGadget entries for " + path.toString(), e);
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
Grasscutter.getLogger().debug("Loaded {} ConfigGadget entries.", GameData.getGadgetConfigData().size());
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("Failed to load ConfigGadget folder.");
|
||||
}
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
private static void loadBlossomResources() {
|
||||
GameDepot.setBlossomConfig(DataLoader.loadClass("BlossomConfig.json", BlossomConfig.class));
|
||||
Grasscutter.getLogger().debug("Loaded BlossomConfig.");
|
||||
try {
|
||||
GameDepot.setBlossomConfig(DataLoader.loadClass("BlossomConfig.json", BlossomConfig.class));
|
||||
Grasscutter.getLogger().debug("Loaded BlossomConfig.");
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().warn("Failed to load BlossomConfig.");
|
||||
}
|
||||
}
|
||||
|
||||
// BinOutput configs
|
||||
|
13
src/main/java/emu/grasscutter/data/binout/AbilityData.java
Normal file
13
src/main/java/emu/grasscutter/data/binout/AbilityData.java
Normal file
@ -0,0 +1,13 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class AbilityData {
|
||||
public String abilityName;
|
||||
public Map<String, AbilityModifier> modifiers;
|
||||
public boolean isDynamicAbility;
|
||||
public Map<String, Float> abilitySpecials;
|
||||
// abilityMixins
|
||||
// onAbilityStart
|
||||
// onKill
|
||||
}
|
@ -1,44 +1,98 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import java.util.Map;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import emu.grasscutter.data.common.DynamicFloat;
|
||||
|
||||
public class AbilityModifier implements Serializable {
|
||||
private static final long serialVersionUID = -2001232313615923575L;
|
||||
private static final long serialVersionUID = -2001232313615923575L;
|
||||
|
||||
@SerializedName(value="onAdded", alternate={"KCICDEJLIJD"})
|
||||
public AbilityModifierAction[] onAdded;
|
||||
@SerializedName(value="onThinkInterval", alternate={"PBDDACFFPOE"})
|
||||
public AbilityModifierAction[] onThinkInterval;
|
||||
public AbilityModifierAction[] onRemoved;
|
||||
@SerializedName(value="onAdded", alternate={"KCICDEJLIJD"})
|
||||
public AbilityModifierAction[] onAdded;
|
||||
@SerializedName(value="onThinkInterval", alternate={"PBDDACFFPOE"})
|
||||
public AbilityModifierAction[] onThinkInterval;
|
||||
public AbilityModifierAction[] onRemoved;
|
||||
public DynamicFloat duration = DynamicFloat.ZERO;
|
||||
|
||||
public static class AbilityConfigData {
|
||||
public AbilityData Default;
|
||||
}
|
||||
|
||||
public static class AbilityData {
|
||||
public String abilityName;
|
||||
@SerializedName(value="modifiers", alternate={"HNEIEGHMLKH"})
|
||||
public Map<String, AbilityModifier> modifiers;
|
||||
}
|
||||
|
||||
public static class AbilityModifierAction {
|
||||
public String $type;
|
||||
public AbilityModifierActionType type;
|
||||
public String target;
|
||||
public AbilityModifierValue amount;
|
||||
public AbilityModifierValue amountByTargetCurrentHPRatio;
|
||||
}
|
||||
|
||||
public static class AbilityModifierValue {
|
||||
public boolean isFormula;
|
||||
public boolean isDynamic;
|
||||
public String dynamicKey;
|
||||
}
|
||||
|
||||
public enum AbilityModifierActionType {
|
||||
HealHP, ApplyModifier, LoseHP;
|
||||
}
|
||||
public static class AbilityModifierAction {
|
||||
public enum Type {
|
||||
ActCameraRadialBlur, ActCameraShake, AddAvatarSkillInfo, AddChargeBarValue,
|
||||
AddClimateMeter, AddElementDurability, AddGlobalValue, AddGlobalValueToTarget,
|
||||
AddRegionalPlayVarValue, ApplyModifier, AttachAbilityStateResistance, AttachBulletAimPoint,
|
||||
AttachEffect, AttachEffectFirework, AttachElementTypeResistance, AttachModifier,
|
||||
AttachUIEffect, AvatarCameraParam, AvatarEnterCameraShot, AvatarEnterFocus,
|
||||
AvatarEnterViewBias, AvatarExitCameraShot, AvatarExitClimb, AvatarExitFocus,
|
||||
AvatarExitViewBias, AvatarShareCDSkillStart, AvatarSkillStart, BroadcastNeuronStimulate,
|
||||
CalcDvalinS04RebornPoint, CallLuaTask, ChangeEnviroWeather, ChangeFollowDampTime,
|
||||
ChangeGadgetUIInteractHint, ChangePlayMode, ChangeTag, ChangeUGCRayTag,
|
||||
ClearEndura, ClearGlobalPos, ClearGlobalValue, ClearLocalGadgets,
|
||||
ClearLockTarget, ClearPos, ConfigAbilityAction, ControlEmotion,
|
||||
CopyGlobalValue, CreateGadget, CreateMovingPlatform, CreateTile,
|
||||
DamageByAttackValue, DebugLog, DestroyTile, DoBlink,
|
||||
DoTileAction, DoWatcherSystemAction, DoWidgetSystemAction, DropSubfield,
|
||||
DummyAction, DungeonFogEffects, ElementAttachForActivityGacha, EnableAIStealthy,
|
||||
EnableAfterImage, EnableAvatarFlyStateTrail, EnableAvatarMoveOnWater, EnableBulletCollisionPluginTrigger,
|
||||
EnableGadgetIntee, EnableHeadControl, EnableHitBoxByName, EnableMainInterface,
|
||||
EnablePartControl, EnablePositionSynchronization, EnablePushColliderName, EnableRocketJump,
|
||||
EnableSceneTransformByName, EnterCameraLock, EntityDoSkill, EquipAffixStart,
|
||||
ExecuteGadgetLua, FireAISoundEvent, FireChargeBarEffect, FireEffect,
|
||||
FireEffectFirework, FireEffectForStorm, FireFishingEvent, FireHitEffect,
|
||||
FireSubEmitterEffect, FireUIEffect, FixedMonsterRushMove, ForceAirStateFly,
|
||||
ForceEnableShakeOffButton, GenerateElemBall, GetFightProperty, GetInteractIdToGlobalValue,
|
||||
GetPos, HealHP, HideUIBillBoard, IgnoreMoveColToRockCol,
|
||||
KillGadget, KillPlayEntity, KillSelf, KillServerGadget,
|
||||
LoseHP, ModifyAvatarSkillCD, ModifyVehicleSkillCD, PlayEmoSync,
|
||||
Predicated, PushDvalinS01Process, PushInterActionByConfigPath, PushPos,
|
||||
Randomed, ReTriggerAISkillInitialCD, RefreshUICombatBarLayout, RegisterAIActionPoint,
|
||||
ReleaseAIActionPoint, RemoveAvatarSkillInfo, RemoveModifier, RemoveModifierByAbilityStateResistanceID,
|
||||
RemoveServerBuff, RemoveUniqueModifier, RemoveVelocityForce, Repeated,
|
||||
ResetAIAttackTarget, ResetAIResistTauntLevel, ResetAIThreatBroadcastRange, ResetAnimatorTrigger,
|
||||
ReviveDeadAvatar, ReviveElemEnergy, ReviveStamina, SectorCityManeuver,
|
||||
SendEffectTrigger, SendEffectTriggerToLineEffect, SendEvtElectricCoreMoveEnterP1, SendEvtElectricCoreMoveInterrupt,
|
||||
ServerLuaCall, ServerLuaTriggerEvent, ServerMonsterLog, SetAIHitFeeling,
|
||||
SetAISkillCDAvailableNow, SetAISkillCDMultiplier, SetAISkillGCD, SetAnimatorBool,
|
||||
SetAnimatorFloat, SetAnimatorInt, SetAnimatorTrigger, SetAvatarCanShakeOff,
|
||||
SetAvatarHitBuckets, SetCanDieImmediately, SetChargeBarValue, SetDvalinS01FlyState,
|
||||
SetEmissionScaler, SetEntityScale, SetExtraAbilityEnable, SetExtraAbilityState,
|
||||
SetGlobalDir, SetGlobalPos, SetGlobalValue, SetGlobalValueByTargetDistance,
|
||||
SetGlobalValueToOverrideMap, SetKeepInAirVelocityForce, SetMaterialParamFloatByTransform, SetNeuronEnable,
|
||||
SetOverrideMapValue, SetPartControlTarget, SetPoseBool, SetPoseFloat,
|
||||
SetPoseInt, SetRandomOverrideMapValue, SetRegionalPlayVarValue, SetSelfAttackTarget,
|
||||
SetSkillAnchor, SetSpecialCamera, SetSurroundAnchor, SetSystemValueToOverrideMap,
|
||||
SetTargetNumToGlobalValue, SetUICombatBarAsh, SetUICombatBarSpark, SetVelocityIgnoreAirGY,
|
||||
SetWeaponAttachPointRealName, SetWeaponBindState, ShowExtraAbility, ShowProgressBarAction,
|
||||
ShowReminder, ShowScreenEffect, ShowTextMap, ShowUICombatBar,
|
||||
StartDither, SumTargetWeightToSelfGlobalValue, Summon, SyncToStageScript,
|
||||
TriggerAbility, TriggerAttackEvent, TriggerAttackTargetMapEvent, TriggerAudio,
|
||||
TriggerAuxWeaponTrans, TriggerBullet, TriggerCreateGadgetToEquipPart, TriggerDropEquipParts,
|
||||
TriggerFaceAnimation, TriggerGadgetInteractive, TriggerHideWeapon, TriggerSetCastShadow,
|
||||
TriggerSetPassThrough, TriggerSetRenderersEnable, TriggerSetShadowRamp, TriggerSetVisible,
|
||||
TriggerTaunt, TriggerThrowEquipPart, TriggerUGCGadgetMove, TryFindBlinkPoint,
|
||||
TryFindBlinkPointByBorn, TryTriggerPlatformStartMove, TurnDirection, TurnDirectionToPos,
|
||||
UpdateReactionDamage, UseSkillEliteSet, WidgetSkillStart;
|
||||
}
|
||||
@SerializedName("$type")
|
||||
public Type type;
|
||||
public String target;
|
||||
@SerializedName(value = "amount", alternate = "PDLLIFICICJ")
|
||||
public DynamicFloat amount = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByCasterAttackRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByCasterCurrentHPRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByCasterMaxHPRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByGetDamage = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByTargetCurrentHPRatio = DynamicFloat.ZERO;
|
||||
public DynamicFloat amountByTargetMaxHPRatio = DynamicFloat.ZERO;
|
||||
@SerializedName(value = "ignoreAbilityProperty", alternate = "HHFGADCJJDI")
|
||||
public boolean ignoreAbilityProperty;
|
||||
public String modifierName;
|
||||
}
|
||||
|
||||
//The following should be implemented into DynamicFloat if older resource formats need to be supported
|
||||
// public static class AbilityModifierValue {
|
||||
// public boolean isFormula;
|
||||
// public boolean isDynamic;
|
||||
// public String dynamicKey;
|
||||
// }
|
||||
}
|
||||
|
15
src/main/java/emu/grasscutter/data/binout/ConfigGadget.java
Normal file
15
src/main/java/emu/grasscutter/data/binout/ConfigGadget.java
Normal file
@ -0,0 +1,15 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class ConfigGadget {
|
||||
// There are more values that can be added that might be useful in the json
|
||||
@Nullable
|
||||
ConfigGadgetCombat combat;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class ConfigGadgetCombat {
|
||||
// There are more values that can be added that might be useful in the json
|
||||
ConfigGadgetCombatProperty property;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class ConfigGadgetCombatProperty {
|
||||
float HP;
|
||||
boolean isLockHP;
|
||||
boolean isInvincible;
|
||||
boolean isGhostToAllied;
|
||||
float attack;
|
||||
float defence;
|
||||
float weight;
|
||||
boolean useCreatorProperty;
|
||||
}
|
@ -1,21 +1,24 @@
|
||||
package emu.grasscutter.data.binout;
|
||||
|
||||
import emu.grasscutter.data.common.PointData;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ScenePointEntry {
|
||||
private String name;
|
||||
private PointData pointData;
|
||||
|
||||
public ScenePointEntry(String name, PointData pointData) {
|
||||
this.name = name;
|
||||
this.pointData = pointData;
|
||||
}
|
||||
@Getter final private int sceneId;
|
||||
@Getter final private PointData pointData;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@Deprecated(forRemoval = true)
|
||||
public ScenePointEntry(String name, PointData pointData) {
|
||||
this.sceneId = Integer.parseInt(name.split("_")[0]);
|
||||
this.pointData = pointData;
|
||||
}
|
||||
|
||||
public PointData getPointData() {
|
||||
return pointData;
|
||||
public ScenePointEntry(int sceneId, PointData pointData) {
|
||||
this.sceneId = sceneId;
|
||||
this.pointData = pointData;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.sceneId + "_" + this.pointData.getId();
|
||||
}
|
||||
}
|
||||
|
76
src/main/java/emu/grasscutter/data/common/DynamicFloat.java
Normal file
76
src/main/java/emu/grasscutter/data/common/DynamicFloat.java
Normal file
@ -0,0 +1,76 @@
|
||||
package emu.grasscutter.data.common;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.unimi.dsi.fastutil.floats.FloatArrayList;
|
||||
import it.unimi.dsi.fastutil.objects.Object2FloatArrayMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2FloatMap;
|
||||
import lombok.val;
|
||||
|
||||
public class DynamicFloat {
|
||||
public static DynamicFloat ZERO = new DynamicFloat(0f);
|
||||
|
||||
public static class StackOp {
|
||||
enum Op {CONSTANT, KEY, ADD, SUB, MUL, DIV};
|
||||
public Op op;
|
||||
public float fValue;
|
||||
public String sValue;
|
||||
|
||||
public StackOp(String s) {
|
||||
switch (s.toUpperCase()) {
|
||||
case "ADD" -> this.op = Op.ADD;
|
||||
case "SUB" -> this.op = Op.SUB;
|
||||
case "MUL" -> this.op = Op.MUL;
|
||||
case "DIV" -> this.op = Op.DIV;
|
||||
default -> {
|
||||
this.op = Op.KEY;
|
||||
this.sValue = s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public StackOp(float f) {
|
||||
this.op = Op.CONSTANT;
|
||||
this.fValue = f;
|
||||
}
|
||||
}
|
||||
private List<StackOp> ops;
|
||||
private boolean dynamic = false;
|
||||
private float constant = 0f;
|
||||
|
||||
public DynamicFloat(float constant) {
|
||||
this.constant = constant;
|
||||
}
|
||||
|
||||
public DynamicFloat(String key) {
|
||||
this.dynamic = true;
|
||||
this.ops = List.of(new StackOp(key));
|
||||
}
|
||||
|
||||
public DynamicFloat(List<StackOp> ops) {
|
||||
this.dynamic = true;
|
||||
this.ops = ops;
|
||||
}
|
||||
|
||||
public float get() {
|
||||
return this.get(new Object2FloatArrayMap<String>());
|
||||
}
|
||||
|
||||
public float get(Object2FloatMap<String> props) {
|
||||
if (!dynamic)
|
||||
return constant;
|
||||
|
||||
val fl = new FloatArrayList();
|
||||
for (var op : this.ops) {
|
||||
switch (op.op) {
|
||||
case CONSTANT -> fl.push(op.fValue);
|
||||
case KEY -> fl.push(props.getOrDefault(op.sValue, 0f));
|
||||
case ADD -> fl.push(fl.popFloat() + fl.popFloat());
|
||||
case SUB -> fl.push(-fl.popFloat() + fl.popFloat()); // [f0, f1, f2] -> [f0, f1-f2] (opposite of RPN order)
|
||||
case MUL -> fl.push(fl.popFloat() * fl.popFloat());
|
||||
case DIV -> fl.push((1f/fl.popFloat()) * fl.popFloat()); // [f0, f1, f2] -> [f0, f1/f2]
|
||||
}
|
||||
}
|
||||
return fl.popFloat(); // well-formed data will always have only one value left at this point
|
||||
}
|
||||
}
|
@ -8,68 +8,40 @@ import emu.grasscutter.data.excels.DailyDungeonData;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
public class PointData {
|
||||
private int id;
|
||||
@Getter @Setter private int id;
|
||||
private String $type;
|
||||
private Position tranPos;
|
||||
@Getter private Position tranPos;
|
||||
|
||||
@SerializedName(value="dungeonIds", alternate={"JHHFPGJNMIN"})
|
||||
private int[] dungeonIds;
|
||||
@Getter private int[] dungeonIds;
|
||||
|
||||
@SerializedName(value="dungeonRandomList", alternate={"OIBKFJNBLHO"})
|
||||
private int[] dungeonRandomList;
|
||||
@Getter private int[] dungeonRandomList;
|
||||
|
||||
@SerializedName(value="tranSceneId", alternate={"JHBICGBAPIH"})
|
||||
private int tranSceneId;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
@Getter @Setter private int tranSceneId;
|
||||
|
||||
public String getType() {
|
||||
return $type;
|
||||
}
|
||||
|
||||
public Position getTranPos() {
|
||||
return tranPos;
|
||||
}
|
||||
|
||||
public int[] getDungeonIds() {
|
||||
return dungeonIds;
|
||||
}
|
||||
|
||||
public int[] getDungeonRandomList() {
|
||||
return dungeonRandomList;
|
||||
}
|
||||
|
||||
public int getTranSceneId() {
|
||||
return tranSceneId;
|
||||
}
|
||||
|
||||
public void setTranSceneId(int tranSceneId) {
|
||||
this.tranSceneId = tranSceneId;
|
||||
}
|
||||
|
||||
public void updateDailyDungeon() {
|
||||
if (getDungeonRandomList() == null || getDungeonRandomList().length == 0) {
|
||||
if (this.dungeonRandomList == null || this.dungeonRandomList.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
IntList newDungeons = new IntArrayList();
|
||||
int day = Grasscutter.getCurrentDayOfWeek();
|
||||
|
||||
for (int randomId : getDungeonRandomList()) {
|
||||
for (int randomId : this.dungeonRandomList) {
|
||||
DailyDungeonData data = GameData.getDailyDungeonDataMap().get(randomId);
|
||||
|
||||
if (data != null) {
|
||||
int[] addDungeons = data.getDungeonsByDay(day);
|
||||
|
||||
for (int d : addDungeons) {
|
||||
for (int d : data.getDungeonsByDay(day)) {
|
||||
newDungeons.add(d);
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
package emu.grasscutter.data.common;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
public class ScenePointConfig {
|
||||
public JsonObject points;
|
||||
|
||||
public JsonObject getPoints() {
|
||||
return points;
|
||||
}
|
||||
|
||||
public void setPoints(JsonObject Points) {
|
||||
points = Points;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package emu.grasscutter.data.excels;
|
||||
|
||||
import emu.grasscutter.data.GameResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
import emu.grasscutter.game.shop.ShopType;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ResourceType(name = "ActivityShopOverallExcelConfigData.json")
|
||||
public class ActivityShopData extends GameResource {
|
||||
@Getter
|
||||
private int scheduleId;
|
||||
@Getter
|
||||
private ShopType shopType;
|
||||
@Getter
|
||||
private List<Integer> sheetList;
|
||||
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return getShopTypeId();
|
||||
}
|
||||
|
||||
public int getShopTypeId() {
|
||||
if (this.shopType == null)
|
||||
this.shopType = ShopType.SHOP_TYPE_NONE;
|
||||
return shopType.shopTypeId;
|
||||
}
|
||||
}
|
@ -1,19 +1,21 @@
|
||||
package emu.grasscutter.data.excels;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.GameResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
|
||||
@ResourceType(name = "AvatarCostumeExcelConfigData.json")
|
||||
public class AvatarCostumeData extends GameResource {
|
||||
private int costumeId;
|
||||
@SerializedName(value = "skinId", alternate = "costumeId")
|
||||
private int skinId;
|
||||
private int itemId;
|
||||
private int characterId;
|
||||
private int quality;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return this.costumeId;
|
||||
return this.skinId;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
|
@ -13,6 +13,8 @@ public class BuffData extends GameResource {
|
||||
private float time;
|
||||
private boolean isPersistent;
|
||||
private ServerBuffType serverBuffType;
|
||||
private String abilityName;
|
||||
private String modifierName;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
|
@ -1,38 +1,26 @@
|
||||
package emu.grasscutter.data.excels;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import emu.grasscutter.data.GameResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
import lombok.Getter;
|
||||
|
||||
@ResourceType(name = {"AnimalCodexExcelConfigData.json"})
|
||||
public class CodexAnimalData extends GameResource {
|
||||
private int Id;
|
||||
private String type;
|
||||
private int describeId;
|
||||
private int sortOrder;
|
||||
private CodexAnimalUnlockCondition OCCLHPBCDGL;
|
||||
@Getter private String type;
|
||||
@Getter private int describeId;
|
||||
@Getter private int sortOrder;
|
||||
@SerializedName(value="countType", alternate={"OCCLHPBCDGL"})
|
||||
@Getter private CountType countType;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public int getDescribeId() {
|
||||
return describeId;
|
||||
}
|
||||
|
||||
public int getSortOrder() {
|
||||
return sortOrder;
|
||||
}
|
||||
|
||||
public CodexAnimalUnlockCondition getUnlockCondition() {
|
||||
return OCCLHPBCDGL;
|
||||
}
|
||||
|
||||
public enum CodexAnimalUnlockCondition {
|
||||
public enum CountType {
|
||||
CODEX_COUNT_TYPE_KILL,
|
||||
CODEX_COUNT_TYPE_CAPTURE
|
||||
}
|
||||
|
@ -3,58 +3,45 @@ package emu.grasscutter.data.excels;
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.GameResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
import it.unimi.dsi.fastutil.ints.IntCollection;
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
import lombok.Getter;
|
||||
|
||||
@ResourceType(name = {"ReliquaryCodexExcelConfigData.json"})
|
||||
public class CodexReliquaryData extends GameResource {
|
||||
private int Id;
|
||||
private int suitId;
|
||||
private int level;
|
||||
private int cupId;
|
||||
private int leatherId;
|
||||
private int capId;
|
||||
private int flowerId;
|
||||
private int sandId;
|
||||
private int sortOrder;
|
||||
@Getter private int Id;
|
||||
@Getter private int suitId;
|
||||
@Getter private int level;
|
||||
@Getter private int cupId;
|
||||
@Getter private int leatherId;
|
||||
@Getter private int capId;
|
||||
@Getter private int flowerId;
|
||||
@Getter private int sandId;
|
||||
@Getter private int sortOrder;
|
||||
private transient IntCollection ids;
|
||||
|
||||
public int getSortOrder() {
|
||||
return sortOrder;
|
||||
public boolean containsId(int id) {
|
||||
return getIds().contains(id);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public int getSuitId() {
|
||||
return suitId;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public int getCupId() {
|
||||
return cupId;
|
||||
}
|
||||
|
||||
public int getLeatherId() {
|
||||
return leatherId;
|
||||
}
|
||||
|
||||
public int getCapId() {
|
||||
return capId;
|
||||
}
|
||||
|
||||
public int getFlowerId() {
|
||||
return flowerId;
|
||||
}
|
||||
|
||||
public int getSandId() {
|
||||
return sandId;
|
||||
public IntCollection getIds() {
|
||||
if (this.ids == null) {
|
||||
int[] idsArr = {cupId, leatherId, capId, flowerId, sandId};
|
||||
this.ids = IntList.of(idsArr);
|
||||
}
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
GameData.getcodexReliquaryArrayList().add(this);
|
||||
GameData.getcodexReliquaryIdMap().put(getSuitId(), this);
|
||||
// Normalize all itemIds to the 0-substat form
|
||||
cupId = (cupId/10) * 10;
|
||||
leatherId = (leatherId/10) * 10;
|
||||
capId = (capId/10) * 10;
|
||||
flowerId = (flowerId/10) * 10;
|
||||
sandId = (sandId/10) * 10;
|
||||
|
||||
GameData.getCodexReliquaryArrayList().add(this);
|
||||
GameData.getCodexReliquaryDataIdMap().put(getSuitId(), this);
|
||||
}
|
||||
}
|
||||
|
@ -2,49 +2,47 @@ package emu.grasscutter.data.excels;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.GameResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
|
||||
import emu.grasscutter.game.props.SceneType;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
|
||||
@ResourceType(name = "DailyDungeonConfigData.json")
|
||||
public class DailyDungeonData extends GameResource {
|
||||
private int id;
|
||||
private int[] monday;
|
||||
private int[] tuesday;
|
||||
private int[] wednesday;
|
||||
private int[] thursday;
|
||||
private int[] friday;
|
||||
private int[] saturday;
|
||||
private int[] sunday;
|
||||
|
||||
private static final int[] empty = new int[0];
|
||||
private final Int2ObjectMap<int[]> map;
|
||||
|
||||
public DailyDungeonData() {
|
||||
this.map = new Int2ObjectOpenHashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public int[] getDungeonsByDay(int day) {
|
||||
return map.getOrDefault(day, empty);
|
||||
}
|
||||
private int id;
|
||||
private int[] monday;
|
||||
private int[] tuesday;
|
||||
private int[] wednesday;
|
||||
private int[] thursday;
|
||||
private int[] friday;
|
||||
private int[] saturday;
|
||||
private int[] sunday;
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
map.put(Calendar.MONDAY, monday);
|
||||
map.put(Calendar.TUESDAY, tuesday);
|
||||
map.put(Calendar.WEDNESDAY, wednesday);
|
||||
map.put(Calendar.THURSDAY, thursday);
|
||||
map.put(Calendar.FRIDAY, friday);
|
||||
map.put(Calendar.SATURDAY, saturday);
|
||||
map.put(Calendar.SUNDAY, sunday);
|
||||
}
|
||||
private static final int[] empty = new int[0];
|
||||
private final Int2ObjectMap<int[]> map;
|
||||
|
||||
public DailyDungeonData() {
|
||||
this.map = new Int2ObjectOpenHashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public int[] getDungeonsByDay(int day) {
|
||||
return map.getOrDefault(day, empty);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
map.put(Calendar.MONDAY, monday);
|
||||
map.put(Calendar.TUESDAY, tuesday);
|
||||
map.put(Calendar.WEDNESDAY, wednesday);
|
||||
map.put(Calendar.THURSDAY, thursday);
|
||||
map.put(Calendar.FRIDAY, friday);
|
||||
map.put(Calendar.SATURDAY, saturday);
|
||||
map.put(Calendar.SUNDAY, sunday);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
package emu.grasscutter.data.excels;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.data.GameResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Getter
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
@ResourceType(name = {"HomeWorldBgmExcelConfigData.json"})
|
||||
public class HomeWorldBgmData extends GameResource {
|
||||
@SerializedName(value = "homeBgmId", alternate = "MJJENLEBKEF")
|
||||
private int homeBgmId;
|
||||
private boolean isDefaultUnlock;
|
||||
private boolean NBIDHGOOCKD;
|
||||
private boolean JJMNJMCCOKP;
|
||||
private int cityId;
|
||||
private int sortOrder;
|
||||
private String GEGHMJBJMGB;
|
||||
@SerializedName(value = "bgmNameTextMapHash", alternate = "LMLNBMJFFML")
|
||||
private long bgmNameTextMapHash;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return this.homeBgmId;
|
||||
}
|
||||
}
|
@ -9,7 +9,9 @@ import emu.grasscutter.data.ResourceType;
|
||||
import emu.grasscutter.data.common.ItemUseData;
|
||||
import emu.grasscutter.game.inventory.*;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
import emu.grasscutter.game.props.ItemUseTarget;
|
||||
import emu.grasscutter.game.props.ItemUseAction.ItemUseAction;
|
||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.ints.IntSet;
|
||||
import lombok.Getter;
|
||||
@ -46,8 +48,10 @@ public class ItemData extends GameResource {
|
||||
private int[] satiationParams;
|
||||
|
||||
// Usable item
|
||||
private ItemUseTarget useTarget;
|
||||
private ItemUseTarget useTarget = ItemUseTarget.ITEM_USE_TARGET_NONE;
|
||||
private List<ItemUseData> itemUse;
|
||||
private List<ItemUseAction> itemUseActions;
|
||||
private boolean useOnGain = false;
|
||||
|
||||
// Relic
|
||||
private int mainPropDepotId;
|
||||
@ -75,7 +79,8 @@ public class ItemData extends GameResource {
|
||||
private int comfort;
|
||||
private List<Integer> furnType;
|
||||
private List<Integer> furnitureGadgetID;
|
||||
@SerializedName(value="OHIANNAEEAK", alternate={"DANFGGLKLNO", "JFDLJGDFIGL"})
|
||||
|
||||
@SerializedName(value="roomSceneId", alternate={"DANFGGLKLNO", "JFDLJGDFIGL", "OHIANNAEEAK"})
|
||||
private int roomSceneId;
|
||||
|
||||
// Custom
|
||||
@ -123,8 +128,16 @@ public class ItemData extends GameResource {
|
||||
|
||||
// Prevent material type from being null
|
||||
this.materialType = this.materialType == null ? MaterialType.MATERIAL_NONE : this.materialType;
|
||||
|
||||
if (this.itemUse != null && !this.itemUse.isEmpty()) {
|
||||
this.itemUseActions = this.itemUse.stream()
|
||||
.filter(x -> x.getUseOp() != ItemUseOp.ITEM_USE_NONE)
|
||||
.map(ItemUseAction::fromItemUseData)
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Getter
|
||||
public static class WeaponProperty {
|
||||
private FightProperty propType;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package emu.grasscutter.data.excels;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import emu.grasscutter.data.GameResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
import emu.grasscutter.data.common.ItemParamData;
|
||||
@ -24,11 +25,12 @@ public class ShopGoodsData extends GameResource {
|
||||
private int maxPlayerLevel;
|
||||
|
||||
private int buyLimit;
|
||||
@SerializedName(value="subTabId", alternate={"secondarySheetId"})
|
||||
private int subTabId;
|
||||
|
||||
private String refreshType;
|
||||
private transient ShopInfo.ShopRefreshType refreshTypeEnum;
|
||||
|
||||
|
||||
private int refreshParam;
|
||||
|
||||
@Override
|
||||
|
@ -10,34 +10,21 @@ import com.mongodb.client.MongoIterable;
|
||||
|
||||
import dev.morphia.Datastore;
|
||||
import dev.morphia.Morphia;
|
||||
import dev.morphia.annotations.Entity;
|
||||
import dev.morphia.mapping.Mapper;
|
||||
import dev.morphia.mapping.MapperOptions;
|
||||
import dev.morphia.query.experimental.filters.Filters;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.Grasscutter.ServerRunMode;
|
||||
import emu.grasscutter.game.Account;
|
||||
import emu.grasscutter.game.activity.PlayerActivityData;
|
||||
import emu.grasscutter.game.activity.musicgame.MusicGameBeatmap;
|
||||
import emu.grasscutter.game.avatar.Avatar;
|
||||
import emu.grasscutter.game.battlepass.BattlePassManager;
|
||||
import emu.grasscutter.game.friends.Friendship;
|
||||
import emu.grasscutter.game.gacha.GachaRecord;
|
||||
import emu.grasscutter.game.home.GameHome;
|
||||
import emu.grasscutter.game.inventory.GameItem;
|
||||
import emu.grasscutter.game.mail.Mail;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.quest.GameMainQuest;
|
||||
import emu.grasscutter.game.quest.GameQuest;
|
||||
|
||||
import org.reflections.Reflections;
|
||||
|
||||
public final class DatabaseManager {
|
||||
private static Datastore gameDatastore;
|
||||
private static Datastore dispatchDatastore;
|
||||
|
||||
private static final Class<?>[] mappedClasses = new Class<?>[] {
|
||||
DatabaseCounter.class, Account.class, Player.class, Avatar.class, GameItem.class, Friendship.class,
|
||||
GachaRecord.class, Mail.class, GameMainQuest.class, GameHome.class, BattlePassManager.class,
|
||||
PlayerActivityData.class, MusicGameBeatmap.class
|
||||
};
|
||||
|
||||
public static Datastore getGameDatastore() {
|
||||
return gameDatastore;
|
||||
}
|
||||
@ -63,47 +50,54 @@ public final class DatabaseManager {
|
||||
// Set mapper options.
|
||||
MapperOptions mapperOptions = MapperOptions.builder()
|
||||
.storeEmpties(true).storeNulls(false).build();
|
||||
|
||||
// Create data store.
|
||||
gameDatastore = Morphia.createDatastore(gameMongoClient, DATABASE.game.collection, mapperOptions);
|
||||
// Map classes.
|
||||
gameDatastore.getMapper().map(mappedClasses);
|
||||
|
||||
// Ensure indexes
|
||||
try {
|
||||
gameDatastore.ensureIndexes();
|
||||
} catch (MongoCommandException exception) {
|
||||
Grasscutter.getLogger().info("Mongo index error: ", exception);
|
||||
// Duplicate index error
|
||||
if (exception.getCode() == 85) {
|
||||
// Drop all indexes and re add them
|
||||
MongoIterable<String> collections = gameDatastore.getDatabase().listCollectionNames();
|
||||
for (String name : collections) {
|
||||
gameDatastore.getDatabase().getCollection(name).dropIndexes();
|
||||
}
|
||||
// Add back indexes
|
||||
gameDatastore.ensureIndexes();
|
||||
}
|
||||
}
|
||||
// Map classes.
|
||||
Class<?>[] entities = new Reflections(Grasscutter.class.getPackageName())
|
||||
.getTypesAnnotatedWith(Entity.class)
|
||||
.stream()
|
||||
.filter(cls -> {
|
||||
Entity e = cls.getAnnotation(Entity.class);
|
||||
return e != null && !e.value().equals(Mapper.IGNORED_FIELDNAME);
|
||||
})
|
||||
.toArray(Class<?>[]::new);
|
||||
|
||||
gameDatastore.getMapper().map(entities);
|
||||
|
||||
// Ensure indexes for the game datastore
|
||||
ensureIndexes(gameDatastore);
|
||||
|
||||
if (SERVER.runMode == ServerRunMode.GAME_ONLY) {
|
||||
MongoClient dispatchMongoClient = MongoClients.create(DATABASE.server.connectionUri);
|
||||
dispatchDatastore = Morphia.createDatastore(dispatchMongoClient, DATABASE.server.collection);
|
||||
|
||||
// Ensure indexes for dispatch server
|
||||
try {
|
||||
dispatchDatastore.ensureIndexes();
|
||||
} catch (MongoCommandException e) {
|
||||
Grasscutter.getLogger().info("Mongo index error: ", e);
|
||||
// Duplicate index error
|
||||
if (e.getCode() == 85) {
|
||||
// Drop all indexes and re add them
|
||||
MongoIterable<String> collections = dispatchDatastore.getDatabase().listCollectionNames();
|
||||
for (String name : collections) {
|
||||
dispatchDatastore.getDatabase().getCollection(name).dropIndexes();
|
||||
}
|
||||
// Add back indexes
|
||||
dispatchDatastore.ensureIndexes();
|
||||
dispatchDatastore = Morphia.createDatastore(dispatchMongoClient, DATABASE.server.collection, mapperOptions);
|
||||
dispatchDatastore.getMapper().map(new Class<?>[] {DatabaseCounter.class, Account.class});
|
||||
|
||||
// Ensure indexes for dispatch datastore
|
||||
ensureIndexes(dispatchDatastore);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures the database indexes exist and rebuilds them if there is an error with them
|
||||
* @param datastore The datastore to ensure indexes on
|
||||
*/
|
||||
private static void ensureIndexes(Datastore datastore) {
|
||||
try {
|
||||
datastore.ensureIndexes();
|
||||
} catch (MongoCommandException e) {
|
||||
Grasscutter.getLogger().info("Mongo index error: ", e);
|
||||
// Duplicate index error
|
||||
if (e.getCode() == 85) {
|
||||
// Drop all indexes and re add them
|
||||
MongoIterable<String> collections = datastore.getDatabase().listCollectionNames();
|
||||
for (String name : collections) {
|
||||
datastore.getDatabase().getCollection(name).dropIndexes();
|
||||
}
|
||||
// Add back indexes
|
||||
datastore.ensureIndexes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -195,23 +195,23 @@ public final class AbilityManager extends BasePlayerManager {
|
||||
|
||||
private void invokeAction(AbilityModifierAction action, GameEntity target, GameEntity sourceEntity) {
|
||||
switch (action.type) {
|
||||
case HealHP -> {
|
||||
}
|
||||
case HealHP -> {}
|
||||
case LoseHP -> {
|
||||
if (action.amountByTargetCurrentHPRatio == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
float damageAmount = 0;
|
||||
float damageAmount = action.amount.get();
|
||||
|
||||
if (action.amount.isDynamic && action.amount.dynamicKey != null) {
|
||||
damageAmount = sourceEntity.getMetaOverrideMap().getOrDefault(action.amount.dynamicKey, 0f);
|
||||
}
|
||||
// if (action.amount.isDynamic && action.amount.dynamicKey != null) {
|
||||
// damageAmount = sourceEntity.getMetaOverrideMap().getOrDefault(action.amount.dynamicKey, 0f);
|
||||
// }
|
||||
|
||||
if (damageAmount > 0) {
|
||||
target.damage(damageAmount);
|
||||
}
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,10 +19,12 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
@Getter
|
||||
public class ActivityManager extends BasePlayerManager {
|
||||
private static final Map<Integer, ActivityConfigItem> activityConfigItemMap;
|
||||
@Getter private static final Map<Integer, ActivityConfigItem> scheduleActivityConfigMap;
|
||||
private final Map<Integer, PlayerActivityData> playerActivityDataMap;
|
||||
|
||||
static {
|
||||
activityConfigItemMap = new HashMap<>();
|
||||
scheduleActivityConfigMap = new HashMap<>();
|
||||
loadActivityConfigData();
|
||||
}
|
||||
|
||||
@ -61,6 +63,7 @@ public class ActivityManager extends BasePlayerManager {
|
||||
item.setActivityHandler(activityHandler);
|
||||
|
||||
activityConfigItemMap.putIfAbsent(item.getActivityId(), item);
|
||||
scheduleActivityConfigMap.putIfAbsent(item.getScheduleId(), item);
|
||||
});
|
||||
|
||||
Grasscutter.getLogger().info("Enable {} activities.", activityConfigItemMap.size());
|
||||
|
@ -67,6 +67,7 @@ import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.ints.IntSet;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.val;
|
||||
|
||||
@Entity(value = "avatars", useDiscriminator = false)
|
||||
public class Avatar {
|
||||
@ -96,7 +97,7 @@ public class Avatar {
|
||||
|
||||
private Map<Integer, Integer> skillLevelMap; // Talent levels
|
||||
private Map<Integer, Integer> skillExtraChargeMap; // Charges
|
||||
@Getter private Map<Integer, Integer> proudSkillBonusMap; // Talent bonus levels (from const)
|
||||
private Map<Integer, Integer> proudSkillBonusMap; // Talent bonus levels (from const)
|
||||
@Getter private int skillDepotId;
|
||||
private Set<Integer> talentIdList; // Constellation id list
|
||||
@Getter private Set<Integer> proudSkillList; // Character passives
|
||||
@ -205,6 +206,12 @@ public class Avatar {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean addSatiation(float value) {
|
||||
if (this.satiation >= 100) return false;
|
||||
this.satiation += value;
|
||||
return true;
|
||||
}
|
||||
|
||||
public GameItem getEquipBySlot(EquipType slot) {
|
||||
return this.getEquips().get(slot.getValue());
|
||||
}
|
||||
@ -301,8 +308,28 @@ public class Avatar {
|
||||
|
||||
public Map<Integer, Integer> getSkillLevelMap() { // Returns a copy of the skill levels for the current skillDepot.
|
||||
var map = new Int2IntOpenHashMap();
|
||||
this.skillDepot.getSkillsAndEnergySkill()
|
||||
.forEach(skillId -> map.put(skillId, this.skillLevelMap.computeIfAbsent(skillId, id -> 1).intValue()));
|
||||
this.skillDepot.getSkillsAndEnergySkill().forEach(skillId ->
|
||||
map.put(skillId, this.skillLevelMap.putIfAbsent(skillId, 1).intValue()));
|
||||
return map;
|
||||
}
|
||||
|
||||
// Returns a copy of the skill bonus levels for the current skillDepot, capped to avoid invalid levels.
|
||||
public Map<Integer, Integer> getProudSkillBonusMap() {
|
||||
var map = new Int2IntOpenHashMap();
|
||||
this.skillDepot.getSkillsAndEnergySkill().forEach(skillId -> {
|
||||
val skillData = GameData.getAvatarSkillDataMap().get(skillId);
|
||||
if (skillData == null) return;
|
||||
int proudSkillGroupId = skillData.getProudSkillGroupId();
|
||||
int bonus = this.proudSkillBonusMap.getOrDefault(proudSkillGroupId, 0);
|
||||
val validLevels = GameData.getProudSkillGroupLevels(proudSkillGroupId);
|
||||
if (validLevels != null && validLevels.size() > 0) {
|
||||
int maxLevel = validLevels.intStream().max().getAsInt();
|
||||
int maxBonus = maxLevel - this.skillLevelMap.getOrDefault(skillId, 0);
|
||||
if (maxBonus < bonus)
|
||||
bonus = maxBonus;
|
||||
}
|
||||
map.put(proudSkillGroupId, bonus);
|
||||
});
|
||||
return map;
|
||||
}
|
||||
|
||||
@ -705,10 +732,14 @@ public class Avatar {
|
||||
}
|
||||
|
||||
// Add to bonus list
|
||||
this.getProudSkillBonusMap().put(skillData.getProudSkillGroupId(), 3);
|
||||
this.addProudSkillLevelBonus(skillId, 3);
|
||||
return true;
|
||||
}
|
||||
|
||||
private int addProudSkillLevelBonus(int proudSkillGroupId, int bonus) {
|
||||
return this.proudSkillBonusMap.compute(proudSkillGroupId, (k,v) -> (v==null) ? bonus : v + bonus);
|
||||
}
|
||||
|
||||
public boolean upgradeSkill(int skillId) {
|
||||
AvatarSkillData skillData = GameData.getAvatarSkillDataMap().get(skillId);
|
||||
if (skillData == null) return false;
|
||||
@ -735,6 +766,9 @@ public class Avatar {
|
||||
|
||||
public boolean setSkillLevel(int skillId, int level) {
|
||||
if (level < 0 || level > 15) return false;
|
||||
var validLevels = GameData.getAvatarSkillLevels(skillId);
|
||||
if (validLevels != null && !validLevels.contains(level)) return false;
|
||||
|
||||
int oldLevel = this.skillLevelMap.getOrDefault(skillId, 0); // just taking the return value of put would have null concerns
|
||||
this.skillLevelMap.put(skillId, level);
|
||||
this.save();
|
||||
@ -899,7 +933,7 @@ public class Avatar {
|
||||
showAvatarInfo.putPropMap(PlayerProperty.PROP_EXP.getId(), ProtoHelper.newPropValue(PlayerProperty.PROP_EXP, this.getExp()));
|
||||
showAvatarInfo.putPropMap(PlayerProperty.PROP_BREAK_LEVEL.getId(), ProtoHelper.newPropValue(PlayerProperty.PROP_BREAK_LEVEL, this.getPromoteLevel()));
|
||||
showAvatarInfo.putPropMap(PlayerProperty.PROP_SATIATION_VAL.getId(), ProtoHelper.newPropValue(PlayerProperty.PROP_SATIATION_VAL, this.getSatiation()));
|
||||
showAvatarInfo.putPropMap(PlayerProperty.PROP_SATIATION_PENALTY_TIME.getId(), ProtoHelper.newPropValue(PlayerProperty.PROP_SATIATION_VAL, this.getSatiationPenalty()));
|
||||
showAvatarInfo.putPropMap(PlayerProperty.PROP_SATIATION_PENALTY_TIME.getId(), ProtoHelper.newPropValue(PlayerProperty.PROP_SATIATION_PENALTY_TIME, this.getSatiationPenalty()));
|
||||
int maxStamina = this.getPlayer().getProperty(PlayerProperty.PROP_MAX_STAMINA);
|
||||
showAvatarInfo.putPropMap(PlayerProperty.PROP_MAX_STAMINA.getId(), ProtoHelper.newPropValue(PlayerProperty.PROP_MAX_STAMINA, maxStamina));
|
||||
|
||||
|
@ -8,7 +8,6 @@ import emu.grasscutter.data.excels.CombineData;
|
||||
import emu.grasscutter.game.inventory.GameItem;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.ActionReason;
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
import emu.grasscutter.net.proto.RetcodeOuterClass;
|
||||
import emu.grasscutter.net.proto.RetcodeOuterClass.Retcode;
|
||||
import emu.grasscutter.server.game.BaseGameSystem;
|
||||
@ -43,24 +42,12 @@ public class CombineManger extends BaseGameSystem {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean unlockCombineDiagram(Player player, GameItem diagramItem) {
|
||||
// Make sure this is actually a diagram.
|
||||
if (diagramItem.getItemData().getItemUse().get(0).getUseOp() != ItemUseOp.ITEM_USE_UNLOCK_COMBINE) {
|
||||
return false;
|
||||
public boolean unlockCombineDiagram(Player player, int combineId) {
|
||||
if (!player.getUnlockedCombines().add(combineId)) {
|
||||
return false; // Already unlocked
|
||||
}
|
||||
|
||||
// Determine the combine item we should unlock.
|
||||
int combineId = Integer.parseInt(diagramItem.getItemData().getItemUse().get(0).getUseParam()[0]);
|
||||
|
||||
// Remove the diagram from the player's inventory.
|
||||
// We need to do this here, before sending CombineFormulaDataNotify, or the the combine UI won't correctly
|
||||
// update when unlocking the diagram.
|
||||
player.getInventory().removeItem(diagramItem, 1);
|
||||
|
||||
// Tell the client that this diagram is now unlocked and add the unlocked item to the player.
|
||||
player.getUnlockedCombines().add(combineId);
|
||||
player.sendPacket(new PacketCombineFormulaDataNotify(combineId));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -107,8 +107,6 @@ public class DungeonSystem extends BaseGameSystem {
|
||||
}
|
||||
|
||||
public void updateDailyDungeons() {
|
||||
for (ScenePointEntry entry : GameData.getScenePointEntries().values()) {
|
||||
entry.getPointData().updateDailyDungeon();
|
||||
}
|
||||
GameData.getScenePointEntries().forEach((id, entry) -> entry.getPointData().updateDailyDungeon());
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package emu.grasscutter.game.entity;
|
||||
|
||||
import emu.grasscutter.data.binout.ConfigGadget;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
import emu.grasscutter.game.world.Scene;
|
||||
|
||||
public abstract class EntityBaseGadget extends GameEntity {
|
||||
@ -14,4 +16,30 @@ public abstract class EntityBaseGadget extends GameEntity {
|
||||
public void onDeath(int killerId) {
|
||||
super.onDeath(killerId); // Invoke super class's onDeath() method.
|
||||
}
|
||||
|
||||
protected void fillFightProps(ConfigGadget configGadget) {
|
||||
if (configGadget == null || configGadget.getCombat() == null) {
|
||||
return;
|
||||
}
|
||||
var combatData = configGadget.getCombat();
|
||||
var combatProperties = combatData.getProperty();
|
||||
|
||||
var targetHp = combatProperties.getHP();
|
||||
setFightProperty(FightProperty.FIGHT_PROP_MAX_HP, targetHp);
|
||||
setFightProperty(FightProperty.FIGHT_PROP_BASE_HP, targetHp);
|
||||
if (combatProperties.isInvincible()) {
|
||||
targetHp = Float.POSITIVE_INFINITY;
|
||||
}
|
||||
setFightProperty(FightProperty.FIGHT_PROP_CUR_HP, targetHp);
|
||||
|
||||
var atk = combatProperties.getAttack();
|
||||
setFightProperty(FightProperty.FIGHT_PROP_BASE_ATTACK, atk);
|
||||
setFightProperty(FightProperty.FIGHT_PROP_CUR_ATTACK, atk);
|
||||
|
||||
var def = combatProperties.getDefence();
|
||||
setFightProperty(FightProperty.FIGHT_PROP_BASE_DEFENSE, def);
|
||||
setFightProperty(FightProperty.FIGHT_PROP_CUR_DEFENSE, def);
|
||||
|
||||
setLockHP(combatProperties.isLockHP());
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +1,20 @@
|
||||
package emu.grasscutter.game.entity;
|
||||
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.binout.ConfigGadget;
|
||||
import emu.grasscutter.data.excels.GadgetData;
|
||||
import emu.grasscutter.game.entity.gadget.*;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.EntityIdType;
|
||||
import emu.grasscutter.game.props.EntityType;
|
||||
import emu.grasscutter.game.props.LifeState;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
import emu.grasscutter.game.props.PlayerProperty;
|
||||
import emu.grasscutter.game.world.Scene;
|
||||
import emu.grasscutter.game.world.SpawnDataEntry;
|
||||
import emu.grasscutter.net.proto.AbilitySyncStateInfoOuterClass.AbilitySyncStateInfo;
|
||||
import emu.grasscutter.net.proto.AnimatorParameterValueInfoPairOuterClass.AnimatorParameterValueInfoPair;
|
||||
import emu.grasscutter.net.proto.EntityAuthorityInfoOuterClass.EntityAuthorityInfo;
|
||||
import emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData;
|
||||
import emu.grasscutter.net.proto.EntityRendererChangedInfoOuterClass.EntityRendererChangedInfo;
|
||||
import emu.grasscutter.net.proto.FightPropPairOuterClass.FightPropPair;
|
||||
import emu.grasscutter.net.proto.GadgetInteractReqOuterClass.GadgetInteractReq;
|
||||
import emu.grasscutter.net.proto.MotionInfoOuterClass.MotionInfo;
|
||||
import emu.grasscutter.net.proto.PropPairOuterClass.PropPair;
|
||||
@ -24,18 +23,18 @@ import emu.grasscutter.net.proto.SceneEntityAiInfoOuterClass.SceneEntityAiInfo;
|
||||
import emu.grasscutter.net.proto.SceneEntityInfoOuterClass.SceneEntityInfo;
|
||||
import emu.grasscutter.net.proto.SceneGadgetInfoOuterClass.SceneGadgetInfo;
|
||||
import emu.grasscutter.net.proto.VectorOuterClass.Vector;
|
||||
import emu.grasscutter.net.proto.VisionTypeOuterClass.VisionType;
|
||||
import emu.grasscutter.scripts.constants.EventType;
|
||||
import emu.grasscutter.scripts.data.SceneGadget;
|
||||
import emu.grasscutter.scripts.data.ScriptArgs;
|
||||
import emu.grasscutter.server.packet.send.PacketGadgetStateNotify;
|
||||
import emu.grasscutter.server.packet.send.PacketLifeStateChangeNotify;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import emu.grasscutter.utils.ProtoHelper;
|
||||
import it.unimi.dsi.fastutil.ints.Int2FloatMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ToString(callSuper = true)
|
||||
public class EntityGadget extends EntityBaseGadget {
|
||||
private final GadgetData data;
|
||||
@ -48,14 +47,20 @@ public class EntityGadget extends EntityBaseGadget {
|
||||
private GadgetContent content;
|
||||
private Int2FloatOpenHashMap fightProp;
|
||||
private SceneGadget metaGadget;
|
||||
@Nullable @Getter
|
||||
private ConfigGadget configGadget;
|
||||
|
||||
public EntityGadget(Scene scene, int gadgetId, Position pos, Position rot) {
|
||||
super(scene);
|
||||
this.data = GameData.getGadgetDataMap().get(gadgetId);
|
||||
if (data!=null && data.getJsonName()!=null) {
|
||||
this.configGadget = GameData.getGadgetConfigData().get(data.getJsonName());
|
||||
}
|
||||
this.id = getScene().getWorld().getNextEntityId(EntityIdType.GADGET);
|
||||
this.gadgetId = gadgetId;
|
||||
this.pos = pos.clone();
|
||||
this.rot = rot != null ? rot.clone() : new Position();
|
||||
fillFightProps(configGadget);
|
||||
}
|
||||
|
||||
public EntityGadget(Scene scene, int gadgetId, Position pos) {
|
||||
|
@ -37,6 +37,8 @@ import emu.grasscutter.utils.Position;
|
||||
import emu.grasscutter.utils.ProtoHelper;
|
||||
import it.unimi.dsi.fastutil.ints.Int2FloatMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
public class EntityMonster extends GameEntity {
|
||||
private final MonsterData monsterData;
|
||||
@ -48,6 +50,8 @@ public class EntityMonster extends GameEntity {
|
||||
private final int level;
|
||||
private int weaponEntityId;
|
||||
private int poseId;
|
||||
@Getter @Setter
|
||||
private int aiId=-1;
|
||||
|
||||
public EntityMonster(Scene scene, MonsterData monsterData, Position pos, int level) {
|
||||
super(scene);
|
||||
@ -289,6 +293,9 @@ public class EntityMonster extends GameEntity {
|
||||
|
||||
monsterInfo.addWeaponList(weaponInfo);
|
||||
}
|
||||
if (this.aiId!=-1) {
|
||||
monsterInfo.setAiConfigId(aiId);
|
||||
}
|
||||
|
||||
entityInfo.setMonster(monsterInfo);
|
||||
|
||||
|
@ -0,0 +1,31 @@
|
||||
package emu.grasscutter.game.entity;
|
||||
|
||||
import emu.grasscutter.game.entity.platform.EntityPlatform;
|
||||
import emu.grasscutter.game.entity.platform.EntitySolarIsotomaElevatorPlatform;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.world.Scene;
|
||||
import emu.grasscutter.net.proto.EvtCreateGadgetNotifyOuterClass;
|
||||
import lombok.Getter;
|
||||
|
||||
public class EntitySolarIsotomaClientGadget extends EntityClientGadget {
|
||||
public static final int GADGET_ID = 41038001;
|
||||
public static final int ELEVATOR_GADGET_ID = 41038002;
|
||||
@Getter private EntityPlatform platformGadget;
|
||||
|
||||
public EntitySolarIsotomaClientGadget(Scene scene, Player player, EvtCreateGadgetNotifyOuterClass.EvtCreateGadgetNotify notify) {
|
||||
super(scene, player, notify);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
//Create solar isotoma elevator and send to all.
|
||||
this.platformGadget = new EntitySolarIsotomaElevatorPlatform(this, getScene(), getOwner(), ELEVATOR_GADGET_ID, getPosition(), getRotation());
|
||||
getScene().addEntity(this.platformGadget);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemoved() {
|
||||
//Remove solar isotoma elevator entity.
|
||||
getScene().removeEntity(this.platformGadget);
|
||||
}
|
||||
}
|
@ -1,16 +1,18 @@
|
||||
package emu.grasscutter.game.entity;
|
||||
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.binout.ConfigGadget;
|
||||
import emu.grasscutter.data.excels.GadgetData;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.EntityIdType;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
import emu.grasscutter.game.props.PlayerProperty;
|
||||
import emu.grasscutter.game.world.Scene;
|
||||
|
||||
import emu.grasscutter.net.proto.AbilitySyncStateInfoOuterClass.AbilitySyncStateInfo;
|
||||
import emu.grasscutter.net.proto.AnimatorParameterValueInfoPairOuterClass.AnimatorParameterValueInfoPair;
|
||||
import emu.grasscutter.net.proto.EntityAuthorityInfoOuterClass.EntityAuthorityInfo;
|
||||
import emu.grasscutter.net.proto.EntityRendererChangedInfoOuterClass.EntityRendererChangedInfo;
|
||||
import emu.grasscutter.net.proto.FightPropPairOuterClass.*;
|
||||
import emu.grasscutter.net.proto.FightPropPairOuterClass.FightPropPair;
|
||||
import emu.grasscutter.net.proto.MotionInfoOuterClass.MotionInfo;
|
||||
import emu.grasscutter.net.proto.PropPairOuterClass.PropPair;
|
||||
import emu.grasscutter.net.proto.ProtEntityTypeOuterClass.ProtEntityType;
|
||||
@ -18,18 +20,18 @@ import emu.grasscutter.net.proto.SceneEntityAiInfoOuterClass.SceneEntityAiInfo;
|
||||
import emu.grasscutter.net.proto.SceneEntityInfoOuterClass.SceneEntityInfo;
|
||||
import emu.grasscutter.net.proto.SceneGadgetInfoOuterClass.SceneGadgetInfo;
|
||||
import emu.grasscutter.net.proto.VectorOuterClass.Vector;
|
||||
import emu.grasscutter.net.proto.VehicleInfoOuterClass.*;
|
||||
import emu.grasscutter.net.proto.VehicleMemberOuterClass.*;
|
||||
import emu.grasscutter.net.proto.VehicleInfoOuterClass.VehicleInfo;
|
||||
import emu.grasscutter.net.proto.VehicleMemberOuterClass.VehicleMember;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import emu.grasscutter.utils.ProtoHelper;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.Int2FloatMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EntityVehicle extends EntityBaseGadget {
|
||||
|
||||
@ -44,6 +46,7 @@ public class EntityVehicle extends EntityBaseGadget {
|
||||
|
||||
@Getter @Setter private float curStamina;
|
||||
@Getter private List<VehicleMember> vehicleMembers;
|
||||
@Nullable @Getter private ConfigGadget configGadget;
|
||||
|
||||
public EntityVehicle(Scene scene, Player player, int gadgetId, int pointId, Position pos, Position rot) {
|
||||
super(scene);
|
||||
@ -54,21 +57,21 @@ public class EntityVehicle extends EntityBaseGadget {
|
||||
this.rot = new Position(rot);
|
||||
this.gadgetId = gadgetId;
|
||||
this.pointId = pointId;
|
||||
this.curStamina = 240;
|
||||
this.vehicleMembers = new ArrayList<VehicleMember>();
|
||||
|
||||
switch (gadgetId) {
|
||||
case 45001001,45001002 -> { // TODO: Not hardcode this. Waverider (skiff)
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_BASE_HP, 10000);
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_BASE_ATTACK, 100);
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_CUR_ATTACK, 100);
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_CUR_HP, 10000);
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_CUR_DEFENSE, 0);
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_CUR_SPEED, 0);
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_CHARGE_EFFICIENCY, 0);
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_MAX_HP, 10000);
|
||||
}
|
||||
this.curStamina = 240; // might be in configGadget.GCALKECLLLP.JBAKBEFIMBN.ANBMPHPOALP
|
||||
this.vehicleMembers = new ArrayList<>();
|
||||
GadgetData data = GameData.getGadgetDataMap().get(gadgetId);
|
||||
if (data != null && data.getJsonName() != null) {
|
||||
this.configGadget = GameData.getGadgetConfigData().get(data.getJsonName());
|
||||
}
|
||||
|
||||
fillFightProps(configGadget);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillFightProps(ConfigGadget configGadget) {
|
||||
super.fillFightProps(configGadget);
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_CUR_SPEED, 0);
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_CHARGE_EFFICIENCY, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,6 +37,8 @@ public abstract class GameEntity {
|
||||
@Getter @Setter private int lastMoveSceneTimeMs;
|
||||
@Getter @Setter private int lastMoveReliableSeq;
|
||||
|
||||
@Getter @Setter private boolean lockHP;
|
||||
|
||||
// Abilities
|
||||
private Object2FloatMap<String> metaOverrideMap;
|
||||
private Int2ObjectMap<String> metaModifiers;
|
||||
@ -106,6 +108,10 @@ public abstract class GameEntity {
|
||||
return this.getFightProperties().getOrDefault(prop.getId(), 0f);
|
||||
}
|
||||
|
||||
public boolean hasFightProperty(FightProperty prop) {
|
||||
return this.getFightProperties().containsKey(prop.getId());
|
||||
}
|
||||
|
||||
public void addAllFightPropsToEntityInfo(SceneEntityInfo.Builder entityInfo) {
|
||||
for (Int2FloatMap.Entry entry : this.getFightProperties().int2FloatEntrySet()) {
|
||||
if (entry.getIntKey() == 0) {
|
||||
@ -153,7 +159,7 @@ public abstract class GameEntity {
|
||||
|
||||
public void damage(float amount, int killerId) {
|
||||
// Check if the entity has properties.
|
||||
if (this.getFightProperties() == null) {
|
||||
if (this.getFightProperties() == null || !hasFightProperty(FightProperty.FIGHT_PROP_CUR_HP)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -164,9 +170,10 @@ public abstract class GameEntity {
|
||||
return; // If the event is canceled, do not damage the entity.
|
||||
}
|
||||
|
||||
if (getFightProperty(FightProperty.FIGHT_PROP_CUR_HP) != Float.POSITIVE_INFINITY) {
|
||||
// Add negative HP to the current HP property.
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_CUR_HP, -(event.getDamage()));
|
||||
float curHp = getFightProperty(FightProperty.FIGHT_PROP_CUR_HP);
|
||||
if (curHp != Float.POSITIVE_INFINITY && !lockHP || lockHP && curHp <= event.getDamage()) {
|
||||
// Add negative HP to the current HP property.
|
||||
this.addFightProperty(FightProperty.FIGHT_PROP_CUR_HP, -(event.getDamage()));
|
||||
}
|
||||
|
||||
// Check if dead
|
||||
@ -212,6 +219,10 @@ public abstract class GameEntity {
|
||||
|
||||
}
|
||||
|
||||
public void onRemoved() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when this entity dies
|
||||
* @param killerId Entity id of the entity that killed this entity
|
||||
|
@ -0,0 +1,126 @@
|
||||
package emu.grasscutter.game.entity.platform;
|
||||
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.binout.ConfigGadget;
|
||||
import emu.grasscutter.data.excels.GadgetData;
|
||||
import emu.grasscutter.game.entity.EntityBaseGadget;
|
||||
import emu.grasscutter.game.entity.EntityClientGadget;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.EntityIdType;
|
||||
import emu.grasscutter.game.world.Scene;
|
||||
import emu.grasscutter.net.proto.*;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import it.unimi.dsi.fastutil.ints.Int2FloatMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class EntityPlatform extends EntityBaseGadget {
|
||||
@Getter
|
||||
private final Player owner;
|
||||
private final int gadgetId;
|
||||
@Getter
|
||||
private final EntityClientGadget gadget;
|
||||
private final Int2FloatMap fightProp;
|
||||
private final Position pos;
|
||||
private final Position rot;
|
||||
@Nullable
|
||||
@Getter
|
||||
private ConfigGadget configGadget;
|
||||
@Getter
|
||||
private final MovingPlatformTypeOuterClass.MovingPlatformType movingPlatformType;
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean isStarted;
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean isActive;
|
||||
|
||||
public EntityPlatform(EntityClientGadget gadget, Scene scene, Player player, int gadgetId, Position pos, Position rot, MovingPlatformTypeOuterClass.MovingPlatformType movingPlatformType) {
|
||||
super(scene);
|
||||
this.gadget = gadget;
|
||||
this.owner = player;
|
||||
this.id = getScene().getWorld().getNextEntityId(EntityIdType.GADGET);
|
||||
this.fightProp = new Int2FloatOpenHashMap();
|
||||
this.pos = new Position(pos);
|
||||
this.rot = new Position(rot);
|
||||
this.movingPlatformType = movingPlatformType;
|
||||
this.gadgetId = gadgetId;
|
||||
GadgetData data = GameData.getGadgetDataMap().get(gadgetId);
|
||||
if (data != null && data.getJsonName() != null) {
|
||||
this.configGadget = GameData.getGadgetConfigData().get(data.getJsonName());
|
||||
}
|
||||
|
||||
fillFightProps(configGadget);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGadgetId() {
|
||||
return gadgetId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Int2FloatMap getFightProperties() {
|
||||
return fightProp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Position getPosition() {
|
||||
return pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Position getRotation() {
|
||||
return rot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SceneEntityInfoOuterClass.SceneEntityInfo toProto() {
|
||||
var platform = PlatformInfoOuterClass.PlatformInfo.newBuilder()
|
||||
.setMovingPlatformType(movingPlatformType)
|
||||
.build();
|
||||
|
||||
var gadgetInfo = SceneGadgetInfoOuterClass.SceneGadgetInfo.newBuilder()
|
||||
.setGadgetId(getGadgetId())
|
||||
.setAuthorityPeerId(getOwner().getPeerId())
|
||||
.setPlatform(platform);
|
||||
|
||||
var entityInfo = SceneEntityInfoOuterClass.SceneEntityInfo.newBuilder()
|
||||
.setEntityId(getId())
|
||||
.setEntityType(ProtEntityTypeOuterClass.ProtEntityType.PROT_ENTITY_TYPE_GADGET)
|
||||
.setGadget(gadgetInfo)
|
||||
.setLifeState(1);
|
||||
|
||||
for (Int2FloatMap.Entry entry : getFightProperties().int2FloatEntrySet()) {
|
||||
if (entry.getIntKey() == 0) {
|
||||
continue;
|
||||
}
|
||||
FightPropPairOuterClass.FightPropPair fightProp = FightPropPairOuterClass.FightPropPair.newBuilder().setPropType(entry.getIntKey()).setPropValue(entry.getFloatValue()).build();
|
||||
entityInfo.addFightPropList(fightProp);
|
||||
}
|
||||
|
||||
return entityInfo.build();
|
||||
}
|
||||
|
||||
public PlatformInfoOuterClass.PlatformInfo onStartRoute() {
|
||||
return PlatformInfoOuterClass.PlatformInfo.newBuilder()
|
||||
.setStartSceneTime(getScene().getSceneTime())
|
||||
.setIsStarted(true)
|
||||
.setPosOffset(getPosition().toProto())
|
||||
.setMovingPlatformType(getMovingPlatformType())
|
||||
.setIsActive(true)
|
||||
.build();
|
||||
}
|
||||
|
||||
public PlatformInfoOuterClass.PlatformInfo onStopRoute() {
|
||||
var sceneTime = getScene().getSceneTime();
|
||||
return PlatformInfoOuterClass.PlatformInfo.newBuilder()
|
||||
.setStartSceneTime(sceneTime)
|
||||
.setStopSceneTime(sceneTime)
|
||||
.setPosOffset(getPosition().toProto())
|
||||
.setMovingPlatformType(getMovingPlatformType())
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,145 @@
|
||||
package emu.grasscutter.game.entity.platform;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.data.binout.ConfigGadget;
|
||||
import emu.grasscutter.game.entity.EntitySolarIsotomaClientGadget;
|
||||
import emu.grasscutter.game.entity.EntityAvatar;
|
||||
import emu.grasscutter.game.entity.GameEntity;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.PlayerProperty;
|
||||
import emu.grasscutter.game.world.Scene;
|
||||
import emu.grasscutter.net.proto.*;
|
||||
import emu.grasscutter.server.packet.send.PacketSceneTimeNotify;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import emu.grasscutter.utils.ProtoHelper;
|
||||
|
||||
public class EntitySolarIsotomaElevatorPlatform extends EntityPlatform {
|
||||
public EntitySolarIsotomaElevatorPlatform(EntitySolarIsotomaClientGadget isotoma, Scene scene, Player player, int gadgetId, Position pos, Position rot) {
|
||||
super(isotoma, scene, player, gadgetId, pos, rot, MovingPlatformTypeOuterClass.MovingPlatformType.MOVING_PLATFORM_TYPE_ABILITY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillFightProps(ConfigGadget configGadget) {
|
||||
if (configGadget == null || configGadget.getCombat() == null) {
|
||||
return;
|
||||
}
|
||||
var combatData = configGadget.getCombat();
|
||||
var combatProperties = combatData.getProperty();
|
||||
|
||||
if (combatProperties.isUseCreatorProperty()) {
|
||||
//If useCreatorProperty == true, use owner's property;
|
||||
GameEntity ownerAvatar = getScene().getEntityById(getGadget().getOwnerEntityId());
|
||||
if (ownerAvatar != null) {
|
||||
getFightProperties().putAll(ownerAvatar.getFightProperties());
|
||||
return;
|
||||
} else {
|
||||
Grasscutter.getLogger().warn("Why gadget owner is null?");
|
||||
}
|
||||
}
|
||||
|
||||
super.fillFightProps(configGadget);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SceneEntityInfoOuterClass.SceneEntityInfo toProto() {
|
||||
var gadget = SceneGadgetInfoOuterClass.SceneGadgetInfo.newBuilder()
|
||||
.setGadgetId(getGadgetId())
|
||||
.setOwnerEntityId(getGadget().getId())
|
||||
.setAuthorityPeerId(getOwner().getPeerId())
|
||||
.setIsEnableInteract(true)
|
||||
.setAbilityGadget(AbilityGadgetInfoOuterClass.AbilityGadgetInfo.newBuilder()
|
||||
.setCampId(getGadget().getCampId())
|
||||
.setCampTargetType(getGadget().getCampType())
|
||||
.setTargetEntityId(getGadget().getId())
|
||||
.build())
|
||||
.setPlatform(PlatformInfoOuterClass.PlatformInfo.newBuilder()
|
||||
.setStartRot(MathQuaternionOuterClass.MathQuaternion.newBuilder()
|
||||
.setW(1.0F)
|
||||
.build())
|
||||
.setPosOffset(getGadget().getPosition().toProto())
|
||||
.setRotOffset(MathQuaternionOuterClass.MathQuaternion.newBuilder()
|
||||
.setW(1.0F)
|
||||
.build())
|
||||
.setMovingPlatformType(MovingPlatformTypeOuterClass.MovingPlatformType.MOVING_PLATFORM_TYPE_ABILITY)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
var authority = EntityAuthorityInfoOuterClass.EntityAuthorityInfo.newBuilder()
|
||||
.setAiInfo(SceneEntityAiInfoOuterClass.SceneEntityAiInfo.newBuilder()
|
||||
.setIsAiOpen(true)
|
||||
.setBornPos(getGadget().getPosition().toProto()))
|
||||
.setBornPos(getGadget().getPosition().toProto())
|
||||
.build();
|
||||
|
||||
var info = SceneEntityInfoOuterClass.SceneEntityInfo.newBuilder()
|
||||
.setEntityType(ProtEntityTypeOuterClass.ProtEntityType.PROT_ENTITY_TYPE_GADGET)
|
||||
.setEntityId(getId())
|
||||
.setMotionInfo(MotionInfoOuterClass.MotionInfo.newBuilder()
|
||||
.setPos(getGadget().getPosition().toProto())
|
||||
.setRot(getGadget().getRotation().toProto())
|
||||
.build());
|
||||
|
||||
GameEntity entity = getScene().getEntityById(getGadget().getOwnerEntityId());
|
||||
if (entity instanceof EntityAvatar avatar) {
|
||||
info.addPropList(PropPairOuterClass.PropPair.newBuilder()
|
||||
.setType(PlayerProperty.PROP_LEVEL.getId())
|
||||
.setPropValue(ProtoHelper.newPropValue(PlayerProperty.PROP_LEVEL, avatar.getAvatar().getLevel()))
|
||||
.build());
|
||||
} else {
|
||||
Grasscutter.getLogger().warn("Why gadget owner doesn't exist?");
|
||||
}
|
||||
|
||||
for (var entry : getFightProperties().int2FloatEntrySet()) {
|
||||
if (entry.getIntKey() == 0) {
|
||||
continue;
|
||||
}
|
||||
var fightProp = FightPropPairOuterClass.FightPropPair.newBuilder()
|
||||
.setPropType(entry.getIntKey())
|
||||
.setPropValue(entry.getFloatValue())
|
||||
.build();
|
||||
info.addFightPropList(fightProp);
|
||||
}
|
||||
|
||||
info.setLifeState(1)
|
||||
.setGadget(gadget)
|
||||
.setEntityAuthorityInfo(authority);
|
||||
|
||||
return info.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlatformInfoOuterClass.PlatformInfo onStartRoute() {
|
||||
setStarted(true);
|
||||
setActive(true);
|
||||
|
||||
var sceneTime = getScene().getSceneTime();
|
||||
getOwner().sendPacket(new PacketSceneTimeNotify(getOwner()));
|
||||
|
||||
return PlatformInfoOuterClass.PlatformInfo.newBuilder()
|
||||
.setStartSceneTime(sceneTime + 300)
|
||||
.setIsStarted(true)
|
||||
.setPosOffset(getPosition().toProto())
|
||||
.setRotOffset(MathQuaternionOuterClass.MathQuaternion.newBuilder()
|
||||
.setW(1.0F)
|
||||
.build())
|
||||
.setMovingPlatformType(getMovingPlatformType())
|
||||
.setIsActive(true)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlatformInfoOuterClass.PlatformInfo onStopRoute() {
|
||||
setStarted(false);
|
||||
setActive(false);
|
||||
|
||||
return PlatformInfoOuterClass.PlatformInfo.newBuilder()
|
||||
.setStartSceneTime(getScene().getSceneTime())
|
||||
.setStopSceneTime(getScene().getSceneTime())
|
||||
.setPosOffset(getPosition().toProto())
|
||||
.setRotOffset(MathQuaternionOuterClass.MathQuaternion.newBuilder()
|
||||
.setW(1.0F)
|
||||
.build())
|
||||
.setMovingPlatformType(getMovingPlatformType())
|
||||
.build();
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@ public class GachaBanner {
|
||||
@Getter private int gachaType;
|
||||
@Getter private int scheduleId;
|
||||
@Getter private String prefabPath;
|
||||
@Getter private String previewPrefabPath;
|
||||
private String previewPrefabPath;
|
||||
@Getter private String titlePath;
|
||||
private int costItemId = 0;
|
||||
private int costItemAmount = 1;
|
||||
@ -47,6 +47,12 @@ public class GachaBanner {
|
||||
private int costItem = 0;
|
||||
@Getter private int wishMaxProgress = 2;
|
||||
|
||||
public String getPreviewPrefabPath() {
|
||||
if (this.previewPrefabPath != null && !this.previewPrefabPath.isEmpty())
|
||||
return this.previewPrefabPath;
|
||||
return "UI_Tab_" + this.prefabPath;
|
||||
}
|
||||
|
||||
public ItemParamData getCost(int numRolls) {
|
||||
return switch (numRolls) {
|
||||
case 10 -> new ItemParamData((costItemId10 > 0) ? costItemId10 : getCostItem(), costItemAmount10);
|
||||
|
@ -15,14 +15,13 @@ import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.common.ItemParamData;
|
||||
import emu.grasscutter.data.excels.ItemData;
|
||||
import emu.grasscutter.database.DatabaseHelper;
|
||||
import emu.grasscutter.game.avatar.Avatar;
|
||||
import emu.grasscutter.game.gacha.GachaBanner.BannerType;
|
||||
import emu.grasscutter.game.inventory.GameItem;
|
||||
import emu.grasscutter.game.inventory.Inventory;
|
||||
import emu.grasscutter.game.inventory.ItemType;
|
||||
import emu.grasscutter.game.inventory.MaterialType;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.WatcherTriggerType;
|
||||
import emu.grasscutter.game.systems.InventorySystem;
|
||||
import emu.grasscutter.net.proto.GachaItemOuterClass.GachaItem;
|
||||
import emu.grasscutter.net.proto.GachaTransferItemOuterClass.GachaTransferItem;
|
||||
import emu.grasscutter.net.proto.GetGachaInfoRspOuterClass.GetGachaInfoRsp;
|
||||
@ -32,7 +31,7 @@ import emu.grasscutter.server.game.BaseGameSystem;
|
||||
import emu.grasscutter.server.game.GameServer;
|
||||
import emu.grasscutter.server.game.GameServerTickEvent;
|
||||
import emu.grasscutter.server.packet.send.PacketDoGachaRsp;
|
||||
import emu.grasscutter.server.packet.send.PacketGachaWishRsp;
|
||||
import emu.grasscutter.utils.FileUtils;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
@ -120,26 +119,10 @@ public class GachaSystem extends BaseGameSystem {
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized int checkPlayerAvatarConstellationLevel(Player player, int itemId) { // Maybe this would be useful in the Player class?
|
||||
ItemData itemData = GameData.getItemDataMap().get(itemId);
|
||||
if ((itemData == null) || (itemData.getMaterialType() != MaterialType.MATERIAL_AVATAR)) {
|
||||
return -2; // Not an Avatar
|
||||
}
|
||||
Avatar avatar = player.getAvatars().getAvatarById((itemId % 1000) + 10000000);
|
||||
if (avatar == null) {
|
||||
return -1; // Doesn't have
|
||||
}
|
||||
// Constellation
|
||||
int constLevel = avatar.getCoreProudSkillLevel();
|
||||
GameItem constItem = player.getInventory().getInventoryTab(ItemType.ITEM_MATERIAL).getItemById(itemId + 100);
|
||||
constLevel += (constItem == null)? 0 : constItem.getCount();
|
||||
return constLevel;
|
||||
}
|
||||
|
||||
private synchronized int[] removeC6FromPool(int[] itemPool, Player player) {
|
||||
IntList temp = new IntArrayList();
|
||||
for (int itemId : itemPool) {
|
||||
if (checkPlayerAvatarConstellationLevel(player, itemId) < 6) {
|
||||
if (InventorySystem.checkPlayerAvatarConstellationLevel(player, itemId) < 6) {
|
||||
temp.add(itemId);
|
||||
}
|
||||
}
|
||||
@ -313,7 +296,7 @@ public class GachaSystem extends BaseGameSystem {
|
||||
boolean isTransferItem = false;
|
||||
|
||||
// Const check
|
||||
int constellation = checkPlayerAvatarConstellationLevel(player, itemId);
|
||||
int constellation = InventorySystem.checkPlayerAvatarConstellationLevel(player, itemId);
|
||||
switch (constellation) {
|
||||
case -2: // Is weapon
|
||||
switch (itemData.getRankLevel()) {
|
||||
@ -383,8 +366,7 @@ public class GachaSystem extends BaseGameSystem {
|
||||
if (this.watchService == null) {
|
||||
try {
|
||||
this.watchService = FileSystems.getDefault().newWatchService();
|
||||
Path path = new File(DATA()).toPath();
|
||||
path.register(watchService, new WatchEvent.Kind[]{StandardWatchEventKinds.ENTRY_MODIFY}, SensitivityWatchEventModifier.HIGH);
|
||||
FileUtils.getDataUserPath("").register(watchService, new WatchEvent.Kind[]{StandardWatchEventKinds.ENTRY_MODIFY}, SensitivityWatchEventModifier.HIGH);
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("Unable to load the Gacha Manager Watch Service. If ServerOptions.watchGacha is true it will not auto-reload");
|
||||
e.printStackTrace();
|
||||
|
@ -4,6 +4,7 @@ import dev.morphia.annotations.Entity;
|
||||
import dev.morphia.annotations.Id;
|
||||
import dev.morphia.annotations.IndexOptions;
|
||||
import dev.morphia.annotations.Indexed;
|
||||
import dev.morphia.annotations.Transient;
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.excels.HomeWorldLevelData;
|
||||
@ -15,7 +16,9 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@Entity(value = "homes", useDiscriminator = false)
|
||||
@ -23,23 +26,24 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
@Builder(builderMethodName = "of")
|
||||
public class GameHome {
|
||||
|
||||
@Id
|
||||
String id;
|
||||
|
||||
@Indexed(options = @IndexOptions(unique = true))
|
||||
long ownerUid;
|
||||
@Transient Player player;
|
||||
|
||||
int level;
|
||||
int exp;
|
||||
List<FurnitureMakeSlotItem> furnitureMakeSlotItemList;
|
||||
ConcurrentHashMap<Integer, HomeSceneItem> sceneMap;
|
||||
Set<Integer> unlockedHomeBgmList;
|
||||
|
||||
public void save(){
|
||||
public void save() {
|
||||
DatabaseHelper.saveHome(this);
|
||||
}
|
||||
|
||||
public static GameHome getByUid(Integer uid){
|
||||
public static GameHome getByUid(Integer uid) {
|
||||
var home = DatabaseHelper.getHomeByUid(uid);
|
||||
if (home == null) {
|
||||
home = GameHome.create(uid);
|
||||
@ -47,7 +51,7 @@ public class GameHome {
|
||||
return home;
|
||||
}
|
||||
|
||||
public static GameHome create(Integer uid){
|
||||
public static GameHome create(Integer uid) {
|
||||
return GameHome.of()
|
||||
.ownerUid(uid)
|
||||
.level(1)
|
||||
@ -58,7 +62,7 @@ public class GameHome {
|
||||
public HomeSceneItem getHomeSceneItem(int sceneId) {
|
||||
return sceneMap.computeIfAbsent(sceneId, e -> {
|
||||
var defaultItem = GameData.getHomeworldDefaultSaveData().get(sceneId);
|
||||
if (defaultItem != null){
|
||||
if (defaultItem != null) {
|
||||
Grasscutter.getLogger().info("Set player {} home {} to initial setting", ownerUid, sceneId);
|
||||
return HomeSceneItem.parseFrom(defaultItem, sceneId);
|
||||
}
|
||||
@ -67,14 +71,50 @@ public class GameHome {
|
||||
}
|
||||
|
||||
public void onOwnerLogin(Player player) {
|
||||
if (this.player == null)
|
||||
this.player = player;
|
||||
player.getSession().send(new PacketHomeBasicInfoNotify(player, false));
|
||||
player.getSession().send(new PacketPlayerHomeCompInfoNotify(player));
|
||||
player.getSession().send(new PacketHomeComfortInfoNotify(player));
|
||||
player.getSession().send(new PacketFurnitureCurModuleArrangeCountNotify());
|
||||
player.getSession().send(new PacketHomeMarkPointNotify(player));
|
||||
player.getSession().send(new PacketUnlockedHomeBgmNotify(player));
|
||||
}
|
||||
|
||||
public HomeWorldLevelData getLevelData(){
|
||||
public Player getPlayer() {
|
||||
if (this.player == null)
|
||||
this.player = Grasscutter.getGameServer().getPlayerByUid((int) this.ownerUid, true);
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public HomeWorldLevelData getLevelData() {
|
||||
return GameData.getHomeWorldLevelDataMap().get(level);
|
||||
}
|
||||
|
||||
public boolean addUnlockedHomeBgm(int homeBgmId) {
|
||||
if (getUnlockedHomeBgmList().add(homeBgmId)) return false;
|
||||
|
||||
var player = this.getPlayer();
|
||||
player.sendPacket(new PacketUnlockHomeBgmNotify(homeBgmId));
|
||||
player.sendPacket(new PacketUnlockedHomeBgmNotify(player));
|
||||
save();
|
||||
return true;
|
||||
}
|
||||
|
||||
public Set<Integer> getUnlockedHomeBgmListInfo() {
|
||||
if (this.unlockedHomeBgmList == null) {
|
||||
this.unlockedHomeBgmList = new HashSet<>();
|
||||
addAllDefaultUnlockedBgmIds(this.unlockedHomeBgmList);
|
||||
save();
|
||||
}
|
||||
|
||||
return this.unlockedHomeBgmList;
|
||||
}
|
||||
|
||||
private void addAllDefaultUnlockedBgmIds(Set<Integer> list) {
|
||||
GameData.getHomeWorldBgmDataMap().forEach((id, data) -> {
|
||||
if (data.isDefaultUnlock())
|
||||
list.add(id);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ public class HomeSceneItem {
|
||||
Position bornPos;
|
||||
Position bornRot;
|
||||
Position djinnPos;
|
||||
int homeBgmId;
|
||||
HomeFurnitureItem mainHouse;
|
||||
int tmpVersion;
|
||||
public static HomeSceneItem parseFrom(HomeworldDefaultSaveData defaultItem, int sceneId) {
|
||||
@ -41,10 +42,10 @@ public class HomeSceneItem {
|
||||
.build();
|
||||
}
|
||||
|
||||
public void update(HomeSceneArrangementInfo arrangementInfo){
|
||||
for(var blockItem : arrangementInfo.getBlockArrangementInfoListList()){
|
||||
public void update(HomeSceneArrangementInfo arrangementInfo) {
|
||||
for (var blockItem : arrangementInfo.getBlockArrangementInfoListList()) {
|
||||
var block = this.blockItems.get(blockItem.getBlockId());
|
||||
if(block == null){
|
||||
if (block == null) {
|
||||
Grasscutter.getLogger().warn("Could not found the Home Block {}", blockItem.getBlockId());
|
||||
continue;
|
||||
}
|
||||
@ -55,24 +56,25 @@ public class HomeSceneItem {
|
||||
this.bornPos = new Position(arrangementInfo.getBornPos());
|
||||
this.bornRot = new Position(arrangementInfo.getBornRot());
|
||||
this.djinnPos = new Position(arrangementInfo.getDjinnPos());
|
||||
this.homeBgmId = arrangementInfo.getUnk2700BJHAMKKECEI();
|
||||
this.mainHouse = HomeFurnitureItem.parseFrom(arrangementInfo.getMainHouse());
|
||||
this.tmpVersion = arrangementInfo.getTmpVersion();
|
||||
}
|
||||
|
||||
public int getRoomSceneId(){
|
||||
if(mainHouse == null || mainHouse.getAsItem() == null){
|
||||
public int getRoomSceneId() {
|
||||
if (mainHouse == null || mainHouse.getAsItem() == null) {
|
||||
return 0;
|
||||
}
|
||||
return mainHouse.getAsItem().getRoomSceneId();
|
||||
}
|
||||
|
||||
public int calComfort(){
|
||||
public int calComfort() {
|
||||
return this.blockItems.values().stream()
|
||||
.mapToInt(HomeBlockItem::calComfort)
|
||||
.sum();
|
||||
}
|
||||
|
||||
public HomeSceneArrangementInfo toProto(){
|
||||
public HomeSceneArrangementInfo toProto() {
|
||||
var proto = HomeSceneArrangementInfo.newBuilder();
|
||||
blockItems.values().forEach(b -> proto.addBlockArrangementInfoList(b.toProto()));
|
||||
|
||||
@ -82,9 +84,10 @@ public class HomeSceneItem {
|
||||
.setDjinnPos(djinnPos.toProto())
|
||||
.setIsSetBornPos(true)
|
||||
.setSceneId(sceneId)
|
||||
.setUnk2700BJHAMKKECEI(homeBgmId)
|
||||
.setTmpVersion(tmpVersion);
|
||||
|
||||
if(mainHouse != null){
|
||||
if (mainHouse != null) {
|
||||
proto.setMainHouse(mainHouse.toProto());
|
||||
}
|
||||
return proto.build();
|
||||
|
@ -15,6 +15,7 @@ import dev.morphia.annotations.Transient;
|
||||
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.GameDepot;
|
||||
import emu.grasscutter.data.common.ItemParamData;
|
||||
import emu.grasscutter.data.excels.ItemData;
|
||||
import emu.grasscutter.data.excels.ReliquaryAffixData;
|
||||
import emu.grasscutter.data.excels.ReliquaryMainPropData;
|
||||
@ -38,55 +39,59 @@ import lombok.Setter;
|
||||
|
||||
@Entity(value = "items", useDiscriminator = false)
|
||||
public class GameItem {
|
||||
@Id private ObjectId id;
|
||||
@Indexed private int ownerId;
|
||||
@Getter @Setter private int itemId;
|
||||
@Getter @Setter private int count;
|
||||
|
||||
@Transient @Getter private long guid; // Player unique id
|
||||
@Transient @Getter @Setter private ItemData itemData;
|
||||
|
||||
// Equips
|
||||
@Getter @Setter private int level;
|
||||
@Getter @Setter private int exp;
|
||||
@Getter @Setter private int totalExp;
|
||||
@Getter @Setter private int promoteLevel;
|
||||
@Getter @Setter private boolean locked;
|
||||
|
||||
// Weapon
|
||||
@Getter private List<Integer> affixes;
|
||||
@Getter @Setter private int refinement = 0;
|
||||
|
||||
// Relic
|
||||
@Getter @Setter private int mainPropId;
|
||||
@Getter private List<Integer> appendPropIdList;
|
||||
|
||||
@Getter @Setter private int equipCharacter;
|
||||
@Transient @Getter @Setter private int weaponEntityId;
|
||||
|
||||
public GameItem() {
|
||||
// Morphia only
|
||||
}
|
||||
|
||||
public GameItem(int itemId) {
|
||||
this(GameData.getItemDataMap().get(itemId));
|
||||
}
|
||||
|
||||
public GameItem(int itemId, int count) {
|
||||
this(GameData.getItemDataMap().get(itemId), count);
|
||||
}
|
||||
|
||||
public GameItem(ItemData data) {
|
||||
this(data, 1);
|
||||
}
|
||||
|
||||
public GameItem(ItemData data, int count) {
|
||||
this.itemId = data.getId();
|
||||
this.itemData = data;
|
||||
|
||||
@Id private ObjectId id;
|
||||
@Indexed private int ownerId;
|
||||
@Getter @Setter private int itemId;
|
||||
@Getter @Setter private int count;
|
||||
|
||||
@Transient @Getter private long guid; // Player unique id
|
||||
@Transient @Getter @Setter private ItemData itemData;
|
||||
|
||||
// Equips
|
||||
@Getter @Setter private int level;
|
||||
@Getter @Setter private int exp;
|
||||
@Getter @Setter private int totalExp;
|
||||
@Getter @Setter private int promoteLevel;
|
||||
@Getter @Setter private boolean locked;
|
||||
|
||||
// Weapon
|
||||
@Getter private List<Integer> affixes;
|
||||
@Getter @Setter private int refinement = 0;
|
||||
|
||||
// Relic
|
||||
@Getter @Setter private int mainPropId;
|
||||
@Getter private List<Integer> appendPropIdList;
|
||||
|
||||
@Getter @Setter private int equipCharacter;
|
||||
@Transient @Getter @Setter private int weaponEntityId;
|
||||
|
||||
public GameItem() {
|
||||
// Morphia only
|
||||
}
|
||||
|
||||
public GameItem(int itemId) {
|
||||
this(GameData.getItemDataMap().get(itemId));
|
||||
}
|
||||
|
||||
public GameItem(int itemId, int count) {
|
||||
this(GameData.getItemDataMap().get(itemId), count);
|
||||
}
|
||||
|
||||
public GameItem(ItemParamData itemParamData) {
|
||||
this(itemParamData.getId(), itemParamData.getCount());
|
||||
}
|
||||
|
||||
public GameItem(ItemData data) {
|
||||
this(data, 1);
|
||||
}
|
||||
|
||||
public GameItem(ItemData data, int count) {
|
||||
this.itemId = data.getId();
|
||||
this.itemData = data;
|
||||
|
||||
switch (data.getItemType()) {
|
||||
case ITEM_VIRTUAL:
|
||||
this.count = count;
|
||||
this.count = count;
|
||||
break;
|
||||
case ITEM_WEAPON:
|
||||
this.count = 1;
|
||||
@ -109,72 +114,72 @@ public class GameItem {
|
||||
if (mainPropData != null) {
|
||||
this.mainPropId = mainPropData.getId();
|
||||
}
|
||||
// Create extra stats
|
||||
// Create extra stats
|
||||
this.addAppendProps(data.getAppendPropNum());
|
||||
break;
|
||||
default:
|
||||
this.count = Math.min(count, data.getStackLimit());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
public int getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
|
||||
public void setOwner(Player player) {
|
||||
this.ownerId = player.getUid();
|
||||
this.guid = player.getNextGameGuid();
|
||||
}
|
||||
public void setOwner(Player player) {
|
||||
this.ownerId = player.getUid();
|
||||
this.guid = player.getNextGameGuid();
|
||||
}
|
||||
|
||||
public ObjectId getObjectId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public ItemType getItemType() {
|
||||
return this.itemData.getItemType();
|
||||
}
|
||||
public ObjectId getObjectId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public static int getMinPromoteLevel(int level) {
|
||||
if (level > 80) {
|
||||
return 6;
|
||||
} else if (level > 70) {
|
||||
return 5;
|
||||
} else if (level > 60) {
|
||||
return 4;
|
||||
} else if (level > 50) {
|
||||
return 3;
|
||||
} else if (level > 40) {
|
||||
return 2;
|
||||
} else if (level > 20) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
public ItemType getItemType() {
|
||||
return this.itemData.getItemType();
|
||||
}
|
||||
|
||||
public static int getMinPromoteLevel(int level) {
|
||||
if (level > 80) {
|
||||
return 6;
|
||||
} else if (level > 70) {
|
||||
return 5;
|
||||
} else if (level > 60) {
|
||||
return 4;
|
||||
} else if (level > 50) {
|
||||
return 3;
|
||||
} else if (level > 40) {
|
||||
return 2;
|
||||
} else if (level > 20) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getEquipSlot() {
|
||||
return this.getItemData().getEquipType().getValue();
|
||||
}
|
||||
|
||||
public boolean isEquipped() {
|
||||
return this.getEquipCharacter() > 0;
|
||||
}
|
||||
|
||||
public boolean isDestroyable() {
|
||||
return !this.isLocked() && !this.isEquipped();
|
||||
}
|
||||
|
||||
public void addAppendProp() {
|
||||
if (this.appendPropIdList == null) {
|
||||
this.appendPropIdList = new ArrayList<>();
|
||||
}
|
||||
|
||||
if (this.appendPropIdList.size() < 4) {
|
||||
this.addNewAppendProp();
|
||||
} else {
|
||||
this.upgradeRandomAppendProp();
|
||||
}
|
||||
}
|
||||
|
||||
public int getEquipSlot() {
|
||||
return this.getItemData().getEquipType().getValue();
|
||||
}
|
||||
|
||||
public boolean isEquipped() {
|
||||
return this.getEquipCharacter() > 0;
|
||||
}
|
||||
|
||||
public boolean isDestroyable() {
|
||||
return !this.isLocked() && !this.isEquipped();
|
||||
}
|
||||
|
||||
public void addAppendProp() {
|
||||
if (this.appendPropIdList == null) {
|
||||
this.appendPropIdList = new ArrayList<>();
|
||||
}
|
||||
|
||||
if (this.appendPropIdList.size() < 4) {
|
||||
this.addNewAppendProp();
|
||||
} else {
|
||||
this.upgradeRandomAppendProp();
|
||||
}
|
||||
}
|
||||
|
||||
public void addAppendProps(int quantity) {
|
||||
int num = Math.max(quantity, 0);
|
||||
for (int i = 0; i < num; i++) {
|
||||
@ -194,165 +199,165 @@ public class GameItem {
|
||||
return props;
|
||||
}
|
||||
|
||||
private void addNewAppendProp() {
|
||||
private void addNewAppendProp() {
|
||||
List<ReliquaryAffixData> affixList = GameDepot.getRelicAffixList(this.itemData.getAppendPropDepotId());
|
||||
|
||||
if (affixList == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Build blacklist - Dont add same stat as main/sub stat
|
||||
|
||||
if (affixList == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Build blacklist - Dont add same stat as main/sub stat
|
||||
Set<FightProperty> blacklist = this.getAppendFightProperties();
|
||||
ReliquaryMainPropData mainPropData = GameData.getReliquaryMainPropDataMap().get(this.mainPropId);
|
||||
if (mainPropData != null) {
|
||||
blacklist.add(mainPropData.getFightProp());
|
||||
}
|
||||
|
||||
// Build random list
|
||||
WeightedList<ReliquaryAffixData> randomList = new WeightedList<>();
|
||||
for (ReliquaryAffixData affix : affixList) {
|
||||
if (!blacklist.contains(affix.getFightProp())) {
|
||||
randomList.add(affix.getWeight(), affix);
|
||||
}
|
||||
}
|
||||
|
||||
if (randomList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
ReliquaryMainPropData mainPropData = GameData.getReliquaryMainPropDataMap().get(this.mainPropId);
|
||||
if (mainPropData != null) {
|
||||
blacklist.add(mainPropData.getFightProp());
|
||||
}
|
||||
|
||||
// Add random stat
|
||||
ReliquaryAffixData affixData = randomList.next();
|
||||
this.appendPropIdList.add(affixData.getId());
|
||||
}
|
||||
|
||||
private void upgradeRandomAppendProp() {
|
||||
// Build random list
|
||||
WeightedList<ReliquaryAffixData> randomList = new WeightedList<>();
|
||||
for (ReliquaryAffixData affix : affixList) {
|
||||
if (!blacklist.contains(affix.getFightProp())) {
|
||||
randomList.add(affix.getWeight(), affix);
|
||||
}
|
||||
}
|
||||
|
||||
if (randomList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add random stat
|
||||
ReliquaryAffixData affixData = randomList.next();
|
||||
this.appendPropIdList.add(affixData.getId());
|
||||
}
|
||||
|
||||
private void upgradeRandomAppendProp() {
|
||||
List<ReliquaryAffixData> affixList = GameDepot.getRelicAffixList(this.itemData.getAppendPropDepotId());
|
||||
|
||||
if (affixList == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Build whitelist
|
||||
|
||||
if (affixList == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Build whitelist
|
||||
Set<FightProperty> whitelist = this.getAppendFightProperties();
|
||||
|
||||
// Build random list
|
||||
WeightedList<ReliquaryAffixData> randomList = new WeightedList<>();
|
||||
for (ReliquaryAffixData affix : affixList) {
|
||||
if (whitelist.contains(affix.getFightProp())) {
|
||||
randomList.add(affix.getUpgradeWeight(), affix);
|
||||
}
|
||||
}
|
||||
|
||||
// Add random stat
|
||||
ReliquaryAffixData affixData = randomList.next();
|
||||
this.appendPropIdList.add(affixData.getId());
|
||||
}
|
||||
|
||||
@PostLoad
|
||||
public void onLoad() {
|
||||
if (this.itemData == null) {
|
||||
this.itemData = GameData.getItemDataMap().get(getItemId());
|
||||
}
|
||||
}
|
||||
|
||||
public void save() {
|
||||
if (this.count > 0 && this.ownerId > 0) {
|
||||
DatabaseHelper.saveItem(this);
|
||||
} else if (this.getObjectId() != null) {
|
||||
DatabaseHelper.deleteItem(this);
|
||||
}
|
||||
}
|
||||
|
||||
public SceneWeaponInfo createSceneWeaponInfo() {
|
||||
SceneWeaponInfo.Builder weaponInfo = SceneWeaponInfo.newBuilder()
|
||||
.setEntityId(this.getWeaponEntityId())
|
||||
.setItemId(this.getItemId())
|
||||
.setGuid(this.getGuid())
|
||||
.setLevel(this.getLevel())
|
||||
.setGadgetId(this.getItemData().getGadgetId())
|
||||
.setAbilityInfo(AbilitySyncStateInfo.newBuilder().setIsInited(getAffixes().size() > 0));
|
||||
|
||||
if (this.getAffixes() != null && this.getAffixes().size() > 0) {
|
||||
for (int affix : this.getAffixes()) {
|
||||
weaponInfo.putAffixMap(affix, this.getRefinement());
|
||||
}
|
||||
}
|
||||
|
||||
return weaponInfo.build();
|
||||
}
|
||||
|
||||
public SceneReliquaryInfo createSceneReliquaryInfo() {
|
||||
SceneReliquaryInfo relicInfo = SceneReliquaryInfo.newBuilder()
|
||||
.setItemId(this.getItemId())
|
||||
.setGuid(this.getGuid())
|
||||
.setLevel(this.getLevel())
|
||||
.build();
|
||||
|
||||
return relicInfo;
|
||||
}
|
||||
// Build random list
|
||||
WeightedList<ReliquaryAffixData> randomList = new WeightedList<>();
|
||||
for (ReliquaryAffixData affix : affixList) {
|
||||
if (whitelist.contains(affix.getFightProp())) {
|
||||
randomList.add(affix.getUpgradeWeight(), affix);
|
||||
}
|
||||
}
|
||||
|
||||
public Weapon toWeaponProto() {
|
||||
Weapon.Builder weapon = Weapon.newBuilder()
|
||||
.setLevel(this.getLevel())
|
||||
.setExp(this.getExp())
|
||||
.setPromoteLevel(this.getPromoteLevel());
|
||||
// Add random stat
|
||||
ReliquaryAffixData affixData = randomList.next();
|
||||
this.appendPropIdList.add(affixData.getId());
|
||||
}
|
||||
|
||||
if (this.getAffixes() != null && this.getAffixes().size() > 0) {
|
||||
for (int affix : this.getAffixes()) {
|
||||
weapon.putAffixMap(affix, this.getRefinement());
|
||||
}
|
||||
}
|
||||
@PostLoad
|
||||
public void onLoad() {
|
||||
if (this.itemData == null) {
|
||||
this.itemData = GameData.getItemDataMap().get(getItemId());
|
||||
}
|
||||
}
|
||||
|
||||
return weapon.build();
|
||||
}
|
||||
public void save() {
|
||||
if (this.count > 0 && this.ownerId > 0) {
|
||||
DatabaseHelper.saveItem(this);
|
||||
} else if (this.getObjectId() != null) {
|
||||
DatabaseHelper.deleteItem(this);
|
||||
}
|
||||
}
|
||||
|
||||
public Reliquary toReliquaryProto() {
|
||||
Reliquary.Builder relic = Reliquary.newBuilder()
|
||||
.setLevel(this.getLevel())
|
||||
.setExp(this.getExp())
|
||||
.setPromoteLevel(this.getPromoteLevel())
|
||||
.setMainPropId(this.getMainPropId())
|
||||
.addAllAppendPropIdList(this.getAppendPropIdList());
|
||||
public SceneWeaponInfo createSceneWeaponInfo() {
|
||||
SceneWeaponInfo.Builder weaponInfo = SceneWeaponInfo.newBuilder()
|
||||
.setEntityId(this.getWeaponEntityId())
|
||||
.setItemId(this.getItemId())
|
||||
.setGuid(this.getGuid())
|
||||
.setLevel(this.getLevel())
|
||||
.setGadgetId(this.getItemData().getGadgetId())
|
||||
.setAbilityInfo(AbilitySyncStateInfo.newBuilder().setIsInited(getAffixes().size() > 0));
|
||||
|
||||
return relic.build();
|
||||
}
|
||||
if (this.getAffixes() != null && this.getAffixes().size() > 0) {
|
||||
for (int affix : this.getAffixes()) {
|
||||
weaponInfo.putAffixMap(affix, this.getRefinement());
|
||||
}
|
||||
}
|
||||
|
||||
public Item toProto() {
|
||||
Item.Builder proto = Item.newBuilder()
|
||||
.setGuid(this.getGuid())
|
||||
.setItemId(this.getItemId());
|
||||
|
||||
switch (getItemType()) {
|
||||
case ITEM_WEAPON:
|
||||
Weapon weapon = this.toWeaponProto();
|
||||
proto.setEquip(Equip.newBuilder().setWeapon(weapon).setIsLocked(this.isLocked()).build());
|
||||
break;
|
||||
case ITEM_RELIQUARY:
|
||||
Reliquary relic = this.toReliquaryProto();
|
||||
proto.setEquip(Equip.newBuilder().setReliquary(relic).setIsLocked(this.isLocked()).build());
|
||||
break;
|
||||
case ITEM_FURNITURE:
|
||||
Furniture furniture = Furniture.newBuilder()
|
||||
.setCount(getCount())
|
||||
.build();
|
||||
proto.setFurniture(furniture);
|
||||
break;
|
||||
default:
|
||||
Material material = Material.newBuilder()
|
||||
.setCount(getCount())
|
||||
.build();
|
||||
proto.setMaterial(material);
|
||||
break;
|
||||
}
|
||||
|
||||
return proto.build();
|
||||
}
|
||||
return weaponInfo.build();
|
||||
}
|
||||
|
||||
public ItemHint toItemHintProto() {
|
||||
return ItemHint.newBuilder().setItemId(getItemId()).setCount(getCount()).setIsNew(false).build();
|
||||
}
|
||||
public SceneReliquaryInfo createSceneReliquaryInfo() {
|
||||
SceneReliquaryInfo relicInfo = SceneReliquaryInfo.newBuilder()
|
||||
.setItemId(this.getItemId())
|
||||
.setGuid(this.getGuid())
|
||||
.setLevel(this.getLevel())
|
||||
.build();
|
||||
|
||||
public ItemParam toItemParam() {
|
||||
return ItemParam.newBuilder().setItemId(this.getItemId()).setCount(this.getCount()).build();
|
||||
}
|
||||
return relicInfo;
|
||||
}
|
||||
|
||||
public Weapon toWeaponProto() {
|
||||
Weapon.Builder weapon = Weapon.newBuilder()
|
||||
.setLevel(this.getLevel())
|
||||
.setExp(this.getExp())
|
||||
.setPromoteLevel(this.getPromoteLevel());
|
||||
|
||||
if (this.getAffixes() != null && this.getAffixes().size() > 0) {
|
||||
for (int affix : this.getAffixes()) {
|
||||
weapon.putAffixMap(affix, this.getRefinement());
|
||||
}
|
||||
}
|
||||
|
||||
return weapon.build();
|
||||
}
|
||||
|
||||
public Reliquary toReliquaryProto() {
|
||||
Reliquary.Builder relic = Reliquary.newBuilder()
|
||||
.setLevel(this.getLevel())
|
||||
.setExp(this.getExp())
|
||||
.setPromoteLevel(this.getPromoteLevel())
|
||||
.setMainPropId(this.getMainPropId())
|
||||
.addAllAppendPropIdList(this.getAppendPropIdList());
|
||||
|
||||
return relic.build();
|
||||
}
|
||||
|
||||
public Item toProto() {
|
||||
Item.Builder proto = Item.newBuilder()
|
||||
.setGuid(this.getGuid())
|
||||
.setItemId(this.getItemId());
|
||||
|
||||
switch (getItemType()) {
|
||||
case ITEM_WEAPON:
|
||||
Weapon weapon = this.toWeaponProto();
|
||||
proto.setEquip(Equip.newBuilder().setWeapon(weapon).setIsLocked(this.isLocked()).build());
|
||||
break;
|
||||
case ITEM_RELIQUARY:
|
||||
Reliquary relic = this.toReliquaryProto();
|
||||
proto.setEquip(Equip.newBuilder().setReliquary(relic).setIsLocked(this.isLocked()).build());
|
||||
break;
|
||||
case ITEM_FURNITURE:
|
||||
Furniture furniture = Furniture.newBuilder()
|
||||
.setCount(getCount())
|
||||
.build();
|
||||
proto.setFurniture(furniture);
|
||||
break;
|
||||
default:
|
||||
Material material = Material.newBuilder()
|
||||
.setCount(getCount())
|
||||
.build();
|
||||
proto.setMaterial(material);
|
||||
break;
|
||||
}
|
||||
|
||||
return proto.build();
|
||||
}
|
||||
|
||||
public ItemHint toItemHintProto() {
|
||||
return ItemHint.newBuilder().setItemId(getItemId()).setCount(getCount()).setIsNew(false).build();
|
||||
}
|
||||
|
||||
public ItemParam toItemParam() {
|
||||
return ItemParam.newBuilder().setItemId(this.getItemId()).setCount(this.getCount()).build();
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.ActionReason;
|
||||
import emu.grasscutter.game.props.PlayerProperty;
|
||||
import emu.grasscutter.game.props.WatcherTriggerType;
|
||||
import emu.grasscutter.game.props.ItemUseAction.UseItemParams;
|
||||
import emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam;
|
||||
import emu.grasscutter.server.packet.send.PacketAvatarEquipChangeNotify;
|
||||
import emu.grasscutter.server.packet.send.PacketItemAddHintNotify;
|
||||
@ -174,7 +175,12 @@ public class Inventory extends BasePlayerManager implements Iterable<GameItem> {
|
||||
|
||||
private synchronized GameItem putItem(GameItem item) {
|
||||
// Dont add items that dont have a valid item definition.
|
||||
if (item.getItemData() == null) {
|
||||
var data = item.getItemData();
|
||||
if (data == null) return null;
|
||||
|
||||
if (data.isUseOnGain()) {
|
||||
var params = new UseItemParams(this.player, data.getUseTarget());
|
||||
this.player.getServer().getInventorySystem().useItemDirect(data, params);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -202,9 +208,6 @@ public class Inventory extends BasePlayerManager implements Iterable<GameItem> {
|
||||
return item;
|
||||
default:
|
||||
switch (item.getItemData().getMaterialType()) {
|
||||
case MATERIAL_ADSORBATE:
|
||||
this.player.getEnergyManager().handlePickupElemBall(item);
|
||||
return null;
|
||||
case MATERIAL_AVATAR:
|
||||
// Get avatar id
|
||||
int avatarId = (item.getItemId() % 1000) + 10000000;
|
||||
@ -273,11 +276,15 @@ public class Inventory extends BasePlayerManager implements Iterable<GameItem> {
|
||||
private void addVirtualItem(int itemId, int count) {
|
||||
switch (itemId) {
|
||||
case 101 -> // Character exp
|
||||
this.player.getServer().getInventorySystem().upgradeAvatar(this.player, this.player.getTeamManager().getCurrentAvatarEntity().getAvatar(), count);
|
||||
this.player.getTeamManager().getActiveTeam().stream().map(e -> e.getAvatar()).forEach(
|
||||
avatar -> this.player.getServer().getInventorySystem().upgradeAvatar(this.player, avatar, count)
|
||||
);
|
||||
case 102 -> // Adventure exp
|
||||
this.player.addExpDirectly(count);
|
||||
case 105 -> // Companionship exp
|
||||
this.player.getServer().getInventorySystem().upgradeAvatarFetterLevel(this.player, this.player.getTeamManager().getCurrentAvatarEntity().getAvatar(), count);
|
||||
this.player.getTeamManager().getActiveTeam().stream().map(e -> e.getAvatar()).forEach(
|
||||
avatar -> this.player.getServer().getInventorySystem().upgradeAvatarFetterLevel(this.player, avatar, count * (this.player.isInMultiplayer() ? 2 : 1))
|
||||
);
|
||||
case 106 -> // Resin
|
||||
this.player.getResinManager().addResin(count);
|
||||
case 107 -> // Legendary Key
|
||||
|
@ -46,7 +46,9 @@ public enum MaterialType {
|
||||
MATERIAL_SPICE_FOOD (37),
|
||||
MATERIAL_ACTIVITY_ROBOT (38),
|
||||
MATERIAL_ACTIVITY_GEAR (39),
|
||||
MATERIAL_ACTIVITY_JIGSAW (40);
|
||||
MATERIAL_ACTIVITY_JIGSAW (40),
|
||||
MATERIAL_ARANARA (41),
|
||||
MATERIAL_DESHRET_MANUAL (46);
|
||||
|
||||
private final int value;
|
||||
private static final Int2ObjectMap<MaterialType> map = new Int2ObjectOpenHashMap<>();
|
||||
|
@ -1,7 +1,6 @@
|
||||
package emu.grasscutter.game.managers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Dictionary;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -46,22 +45,13 @@ public class CookingManager extends BasePlayerManager {
|
||||
/********************
|
||||
* Unlocking for recipies.
|
||||
********************/
|
||||
public synchronized boolean unlockRecipe(GameItem recipeItem) {
|
||||
// Make sure this is actually a cooking recipe.
|
||||
if (recipeItem.getItemData().getItemUse().get(0).getUseOp() != ItemUseOp.ITEM_USE_UNLOCK_COOK_RECIPE) {
|
||||
return false;
|
||||
public boolean unlockRecipe(int id) {
|
||||
if (this.player.getUnlockedRecipies().containsKey(id)) {
|
||||
return false; // Recipe already unlocked
|
||||
}
|
||||
|
||||
// Determine the recipe we should unlock.
|
||||
int recipeId = Integer.parseInt(recipeItem.getItemData().getItemUse().get(0).getUseParam()[0]);
|
||||
|
||||
// Remove the item from the player's inventory.
|
||||
// We need to do this here, before sending CookRecipeDataNotify, or the the UI won't correctly update.
|
||||
player.getInventory().removeItem(recipeItem, 1);
|
||||
|
||||
// Tell the client that this blueprint is now unlocked and add the unlocked item to the player.
|
||||
this.player.getUnlockedRecipies().put(recipeId, 0);
|
||||
this.player.sendPacket(new PacketCookRecipeDataNotify(recipeId));
|
||||
this.player.getUnlockedRecipies().put(id, 0);
|
||||
this.player.sendPacket(new PacketCookRecipeDataNotify(id));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1,12 +1,9 @@
|
||||
package emu.grasscutter.game.managers;
|
||||
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.common.ItemParamData;
|
||||
import emu.grasscutter.game.home.FurnitureMakeSlotItem;
|
||||
import emu.grasscutter.game.inventory.GameItem;
|
||||
import emu.grasscutter.game.player.BasePlayerManager;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
import emu.grasscutter.net.proto.ItemParamOuterClass;
|
||||
import emu.grasscutter.net.proto.RetcodeOuterClass.Retcode;
|
||||
import emu.grasscutter.server.packet.send.*;
|
||||
@ -34,26 +31,19 @@ public class FurnitureManager extends BasePlayerManager {
|
||||
player.getSession().send(new PacketUnlockedFurnitureSuiteDataNotify(player.getUnlockedFurnitureSuite()));
|
||||
}
|
||||
|
||||
public synchronized boolean unlockFurnitureOrSuite(GameItem useItem) {
|
||||
ItemUseOp itemUseOp = useItem.getItemData().getItemUse().get(0).getUseOp();
|
||||
|
||||
// Check
|
||||
if (itemUseOp != ItemUseOp.ITEM_USE_UNLOCK_FURNITURE_SUITE && itemUseOp != ItemUseOp.ITEM_USE_UNLOCK_FURNITURE_FORMULA) {
|
||||
return false;
|
||||
public boolean unlockFurnitureFormula(int id) {
|
||||
if (!player.getUnlockedFurniture().add(id)) {
|
||||
return false; // Already unlocked!
|
||||
}
|
||||
notifyUnlockFurniture();
|
||||
return true;
|
||||
}
|
||||
|
||||
int furnitureIdOrSuiteId = Integer.parseInt(useItem.getItemData().getItemUse().get(0).getUseParam()[0]);
|
||||
|
||||
// Remove first
|
||||
player.getInventory().removeItem(useItem, 1);
|
||||
|
||||
if (useItem.getItemData().getItemUse().get(0).getUseOp() == ItemUseOp.ITEM_USE_UNLOCK_FURNITURE_FORMULA) {
|
||||
player.getUnlockedFurniture().add(furnitureIdOrSuiteId);
|
||||
notifyUnlockFurniture();
|
||||
}else {
|
||||
player.getUnlockedFurnitureSuite().add(furnitureIdOrSuiteId);
|
||||
notifyUnlockFurnitureSuite();
|
||||
public boolean unlockFurnitureSuite(int id) {
|
||||
if (!player.getUnlockedFurnitureSuite().add(id)) {
|
||||
return false; // Already unlocked!
|
||||
}
|
||||
notifyUnlockFurnitureSuite();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -13,12 +13,17 @@ import emu.grasscutter.game.entity.EntityItem;
|
||||
import emu.grasscutter.game.entity.EntityMonster;
|
||||
import emu.grasscutter.game.entity.GameEntity;
|
||||
import emu.grasscutter.game.inventory.GameItem;
|
||||
import emu.grasscutter.game.inventory.MaterialType;
|
||||
import emu.grasscutter.game.player.BasePlayerManager;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.ElementType;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
import emu.grasscutter.game.props.ItemUseTarget;
|
||||
import emu.grasscutter.game.props.MonsterType;
|
||||
import emu.grasscutter.game.props.WeaponType;
|
||||
import emu.grasscutter.game.props.ItemUseAction.ItemUseAction;
|
||||
import emu.grasscutter.game.props.ItemUseAction.ItemUseAddEnergy;
|
||||
import emu.grasscutter.net.proto.AbilityActionGenerateElemBallOuterClass.AbilityActionGenerateElemBall;
|
||||
import emu.grasscutter.net.proto.AbilityIdentifierOuterClass.AbilityIdentifier;
|
||||
import emu.grasscutter.net.proto.AbilityInvokeEntryOuterClass.AbilityInvokeEntry;
|
||||
@ -30,10 +35,10 @@ import emu.grasscutter.server.game.GameSession;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
@ -42,7 +47,7 @@ import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
|
||||
public class EnergyManager extends BasePlayerManager {
|
||||
private final Map<EntityAvatar, Integer> avatarNormalProbabilities;
|
||||
private final Object2IntMap<EntityAvatar> avatarNormalProbabilities;
|
||||
|
||||
private boolean energyUsage; // Should energy usage be enabled for this player?
|
||||
private final static Int2ObjectMap<List<EnergyDropInfo>> energyDropData = new Int2ObjectOpenHashMap<>();
|
||||
@ -50,7 +55,7 @@ public class EnergyManager extends BasePlayerManager {
|
||||
|
||||
public EnergyManager(Player player) {
|
||||
super(player);
|
||||
this.avatarNormalProbabilities = new HashMap<>();
|
||||
this.avatarNormalProbabilities = new Object2IntOpenHashMap<>();
|
||||
this.energyUsage=GAME_OPTIONS.energyUsage;
|
||||
}
|
||||
|
||||
@ -170,66 +175,9 @@ public class EnergyManager extends BasePlayerManager {
|
||||
}
|
||||
|
||||
// Generate the particles.
|
||||
var pos = new Position(action.getPos());
|
||||
for (int i = 0; i < amount; i++) {
|
||||
this.generateElemBall(itemId, new Position(action.getPos()), 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Pickup of elemental particles and orbs.
|
||||
* @param elemBall The elemental particle or orb.
|
||||
*/
|
||||
public void handlePickupElemBall(GameItem elemBall) {
|
||||
// Check if the item is indeed an energy particle/orb.
|
||||
if (elemBall.getItemId() < 2001 ||elemBall.getItemId() > 2024) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine the base amount of energy given by the particle/orb.
|
||||
// Particles have a base amount of 1.0, and orbs a base amount of 3.0.
|
||||
float baseEnergy = (elemBall.getItemId() <= 2008) ? 3.0f : 1.0f;
|
||||
|
||||
// Add energy to every team member.
|
||||
for (int i = 0; i < this.player.getTeamManager().getActiveTeam().size(); i++) {
|
||||
EntityAvatar entity = this.player.getTeamManager().getActiveTeam().get(i);
|
||||
|
||||
// On-field vs off-field multiplier.
|
||||
// The on-field character gets no penalty.
|
||||
// Off-field characters get a penalty depending on the team size, as follows:
|
||||
// - 2 character team: 0.8
|
||||
// - 3 character team: 0.7
|
||||
// - 4 character team: 0.6
|
||||
// - etc.
|
||||
// We set a lower bound of 0.1 here, to avoid gaining no or negative energy.
|
||||
float offFieldPenalty =
|
||||
(this.player.getTeamManager().getCurrentCharacterIndex() == i)
|
||||
? 1.0f
|
||||
: 1.0f - this.player.getTeamManager().getActiveTeam().size() * 0.1f;
|
||||
offFieldPenalty = Math.max(offFieldPenalty, 0.1f);
|
||||
|
||||
// Same element/neutral bonus.
|
||||
// Same-element characters get a bonus of *3, while different-element characters get no bonus at all.
|
||||
// For neutral particles/orbs, the multiplier is always *2.
|
||||
if (entity.getAvatar().getSkillDepot() == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ElementType avatarElement = entity.getAvatar().getSkillDepot().getElementType();
|
||||
ElementType ballElement = switch (elemBall.getItemId()) {
|
||||
case 2001, 2017 -> ElementType.Fire;
|
||||
case 2002, 2018 -> ElementType.Water;
|
||||
case 2003, 2019 -> ElementType.Grass;
|
||||
case 2004, 2020 -> ElementType.Electric;
|
||||
case 2005, 2021 -> ElementType.Wind;
|
||||
case 2006, 2022 -> ElementType.Ice;
|
||||
case 2007, 2023 -> ElementType.Rock;
|
||||
default -> null;
|
||||
};
|
||||
|
||||
float elementBonus = (ballElement == null) ? 2.0f : (avatarElement == ballElement) ? 3.0f : 1.0f;
|
||||
|
||||
// Add the energy.
|
||||
entity.addEnergy(baseEnergy * elementBonus * offFieldPenalty * elemBall.getCount(), PropChangeReason.PROP_CHANGE_REASON_ENERGY_BALL);
|
||||
this.generateElemBall(itemId, pos, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -256,7 +204,7 @@ public class EnergyManager extends BasePlayerManager {
|
||||
}
|
||||
|
||||
// Roll for energy.
|
||||
int currentProbability = this.avatarNormalProbabilities.get(avatar);
|
||||
int currentProbability = this.avatarNormalProbabilities.getInt(avatar);
|
||||
int roll = ThreadLocalRandom.current().nextInt(0, 100);
|
||||
|
||||
// If the player wins the roll, we increase the avatar's energy and reset the probability.
|
||||
|
@ -5,7 +5,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.common.ItemParamData;
|
||||
import emu.grasscutter.data.excels.ForgeData;
|
||||
@ -14,7 +13,6 @@ import emu.grasscutter.game.inventory.GameItem;
|
||||
import emu.grasscutter.game.player.BasePlayerManager;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.ActionReason;
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
import emu.grasscutter.game.props.WatcherTriggerType;
|
||||
import emu.grasscutter.net.proto.ForgeQueueDataOuterClass.ForgeQueueData;
|
||||
import emu.grasscutter.net.proto.ForgeQueueManipulateReqOuterClass.ForgeQueueManipulateReq;
|
||||
@ -38,24 +36,12 @@ public class ForgingManager extends BasePlayerManager {
|
||||
/**********
|
||||
Blueprint unlocking.
|
||||
**********/
|
||||
public synchronized boolean unlockForgingBlueprint(GameItem blueprintItem) {
|
||||
// Make sure this is actually a forging blueprint.
|
||||
if (blueprintItem.getItemData().getItemUse().get(0).getUseOp() != ItemUseOp.ITEM_USE_UNLOCK_FORGE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Determine the forging item we should unlock.
|
||||
int forgeId = Integer.parseInt(blueprintItem.getItemData().getItemUse().get(0).getUseParam()[0]);
|
||||
|
||||
// Remove the blueprint from the player's inventory.
|
||||
// We need to do this here, before sending ForgeFormulaDataNotify, or the the forging UI won't correctly
|
||||
// update when unlocking the blueprint.
|
||||
player.getInventory().removeItem(blueprintItem, 1);
|
||||
|
||||
public boolean unlockForgingBlueprint(int id) {
|
||||
// Tell the client that this blueprint is now unlocked and add the unlocked item to the player.
|
||||
this.player.getUnlockedForgingBlueprints().add(forgeId);
|
||||
this.player.sendPacket(new PacketForgeFormulaDataNotify(forgeId));
|
||||
|
||||
if (!this.player.getUnlockedForgingBlueprints().add(id)) {
|
||||
return false; // Already unlocked
|
||||
}
|
||||
this.player.sendPacket(new PacketForgeFormulaDataNotify(id));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -29,49 +29,49 @@ import java.util.*;
|
||||
public class StaminaManager extends BasePlayerManager {
|
||||
|
||||
// TODO: Skiff state detection?
|
||||
private static final HashMap<String, HashSet<MotionState>> MotionStatesCategorized = new HashMap<>() {{
|
||||
put("CLIMB", new HashSet<>(List.of(
|
||||
private static final Map<String, Set<MotionState>> MotionStatesCategorized = new HashMap<>() {{
|
||||
put("CLIMB", Set.of(
|
||||
MotionState.MOTION_STATE_CLIMB, // sustained, when not moving no cost no recover
|
||||
MotionState.MOTION_STATE_STANDBY_TO_CLIMB // NOT OBSERVED, see MOTION_JUMP_UP_WALL_FOR_STANDBY
|
||||
)));
|
||||
put("DASH", new HashSet<>(List.of(
|
||||
));
|
||||
put("DASH", Set.of(
|
||||
MotionState.MOTION_STATE_DANGER_DASH, // sustained
|
||||
MotionState.MOTION_STATE_DASH // sustained
|
||||
)));
|
||||
put("FLY", new HashSet<>(List.of(
|
||||
));
|
||||
put("FLY", Set.of(
|
||||
MotionState.MOTION_STATE_FLY, // sustained
|
||||
MotionState.MOTION_STATE_FLY_FAST, // sustained
|
||||
MotionState.MOTION_STATE_FLY_SLOW, // sustained
|
||||
MotionState.MOTION_STATE_POWERED_FLY // sustained, recover
|
||||
)));
|
||||
put("RUN", new HashSet<>(List.of(
|
||||
));
|
||||
put("RUN", Set.of(
|
||||
MotionState.MOTION_STATE_DANGER_RUN, // sustained, recover
|
||||
MotionState.MOTION_STATE_RUN // sustained, recover
|
||||
)));
|
||||
put("SKIFF", new HashSet<>(List.of(
|
||||
));
|
||||
put("SKIFF", Set.of(
|
||||
MotionState.MOTION_STATE_SKIFF_BOARDING, // NOT OBSERVED even when boarding
|
||||
MotionState.MOTION_STATE_SKIFF_DASH, // sustained, observed with waverider entity ID.
|
||||
MotionState.MOTION_STATE_SKIFF_NORMAL, // sustained, OBSERVED when both normal and dashing
|
||||
MotionState.MOTION_STATE_SKIFF_POWERED_DASH // sustained, recover
|
||||
)));
|
||||
put("STANDBY", new HashSet<>(List.of(
|
||||
));
|
||||
put("STANDBY", Set.of(
|
||||
MotionState.MOTION_STATE_DANGER_STANDBY_MOVE, // sustained, recover
|
||||
MotionState.MOTION_STATE_DANGER_STANDBY, // sustained, recover
|
||||
MotionState.MOTION_STATE_LADDER_TO_STANDBY, // NOT OBSERVED
|
||||
MotionState.MOTION_STATE_STANDBY_MOVE, // sustained, recover
|
||||
MotionState.MOTION_STATE_STANDBY // sustained, recover
|
||||
)));
|
||||
put("SWIM", new HashSet<>(List.of(
|
||||
));
|
||||
put("SWIM", Set.of(
|
||||
MotionState.MOTION_STATE_SWIM_IDLE, // sustained
|
||||
MotionState.MOTION_STATE_SWIM_DASH, // immediate and sustained
|
||||
MotionState.MOTION_STATE_SWIM_JUMP, // NOT OBSERVED
|
||||
MotionState.MOTION_STATE_SWIM_MOVE // sustained
|
||||
)));
|
||||
put("WALK", new HashSet<>(List.of(
|
||||
));
|
||||
put("WALK", Set.of(
|
||||
MotionState.MOTION_STATE_DANGER_WALK, // sustained, recover
|
||||
MotionState.MOTION_STATE_WALK // sustained, recover
|
||||
)));
|
||||
put("OTHER", new HashSet<>(List.of(
|
||||
));
|
||||
put("OTHER", Set.of(
|
||||
MotionState.MOTION_STATE_CLIMB_JUMP, // cost only once if repeated without switching state
|
||||
MotionState.MOTION_STATE_DASH_BEFORE_SHAKE, // immediate one time sprint charge.
|
||||
MotionState.MOTION_STATE_FIGHT, // immediate, if sustained then subsequent will be MOTION_NOTIFY
|
||||
@ -79,13 +79,13 @@ public class StaminaManager extends BasePlayerManager {
|
||||
MotionState.MOTION_STATE_NOTIFY, // can be either cost or recover - check previous state and check skill casting
|
||||
MotionState.MOTION_STATE_SIT_IDLE, // sustained, recover
|
||||
MotionState.MOTION_STATE_JUMP // recover
|
||||
)));
|
||||
put("NOCOST_NORECOVER", new HashSet<>(List.of(
|
||||
));
|
||||
put("NOCOST_NORECOVER", Set.of(
|
||||
MotionState.MOTION_STATE_LADDER_SLIP, // NOT OBSERVED
|
||||
MotionState.MOTION_STATE_SLIP, // sustained, no cost no recover
|
||||
MotionState.MOTION_STATE_FLY_IDLE // NOT OBSERVED
|
||||
)));
|
||||
put("IGNORE", new HashSet<>(List.of(
|
||||
));
|
||||
put("IGNORE", Set.of(
|
||||
// these states have no impact on stamina
|
||||
MotionState.MOTION_STATE_CROUCH_IDLE,
|
||||
MotionState.MOTION_STATE_CROUCH_MOVE,
|
||||
@ -106,7 +106,7 @@ public class StaminaManager extends BasePlayerManager {
|
||||
MotionState.MOTION_STATE_RESET,
|
||||
MotionState.MOTION_STATE_STANDBY_TO_LADDER,
|
||||
MotionState.MOTION_STATE_WATERFALL
|
||||
)));
|
||||
));
|
||||
}};
|
||||
|
||||
private final Logger logger = Grasscutter.getLogger();
|
||||
@ -127,9 +127,7 @@ public class StaminaManager extends BasePlayerManager {
|
||||
private boolean lastSkillFirstTick = true;
|
||||
private int vehicleId = -1;
|
||||
private int vehicleStamina = GlobalVehicleMaxStamina;
|
||||
private static final HashSet<Integer> TalentMovements = new HashSet<>(List.of(
|
||||
10013, 10413
|
||||
));
|
||||
private static final Set<Integer> TalentMovements = Set.of(10013, 10413);
|
||||
private static final HashMap<Integer, Float> ClimbFoodReductionMap = new HashMap<>() {{
|
||||
// TODO: get real food id
|
||||
put(0, 0.8f); // Sample food
|
||||
@ -190,6 +188,17 @@ public class StaminaManager extends BasePlayerManager {
|
||||
return vehicleStamina;
|
||||
}
|
||||
|
||||
public boolean addCurrentStamina(int amount) {
|
||||
var cur = this.getCurrentCharacterStamina();
|
||||
var max = this.getMaxCharacterStamina();
|
||||
if (cur >= max) return false;
|
||||
var value = cur + amount;
|
||||
if (value > max)
|
||||
value = max;
|
||||
this.player.setProperty(PlayerProperty.PROP_CUR_PERSIST_STAMINA, value);
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean registerBeforeUpdateStaminaListener(String listenerName, BeforeUpdateStaminaListener listener) {
|
||||
if (beforeUpdateStaminaListeners.containsKey(listenerName)) {
|
||||
return false;
|
||||
@ -405,27 +414,17 @@ public class StaminaManager extends BasePlayerManager {
|
||||
// Internal handler
|
||||
|
||||
private void handleImmediateStamina(GameSession session, @NotNull MotionState motionState) {
|
||||
if (currentState == motionState) return;
|
||||
switch (motionState) {
|
||||
case MOTION_STATE_CLIMB:
|
||||
if (currentState != MotionState.MOTION_STATE_CLIMB) {
|
||||
case MOTION_STATE_CLIMB ->
|
||||
updateStaminaRelative(session, new Consumption(ConsumptionType.CLIMB_START), true);
|
||||
}
|
||||
break;
|
||||
case MOTION_STATE_DASH_BEFORE_SHAKE:
|
||||
if (previousState != MotionState.MOTION_STATE_DASH_BEFORE_SHAKE) {
|
||||
case MOTION_STATE_DASH_BEFORE_SHAKE ->
|
||||
updateStaminaRelative(session, new Consumption(ConsumptionType.SPRINT), true);
|
||||
}
|
||||
break;
|
||||
case MOTION_STATE_CLIMB_JUMP:
|
||||
if (previousState != MotionState.MOTION_STATE_CLIMB_JUMP) {
|
||||
case MOTION_STATE_CLIMB_JUMP ->
|
||||
updateStaminaRelative(session, new Consumption(ConsumptionType.CLIMB_JUMP), true);
|
||||
}
|
||||
break;
|
||||
case MOTION_STATE_SWIM_DASH:
|
||||
if (previousState != MotionState.MOTION_STATE_SWIM_DASH) {
|
||||
case MOTION_STATE_SWIM_DASH ->
|
||||
updateStaminaRelative(session, new Consumption(ConsumptionType.SWIM_DASH_START), true);
|
||||
}
|
||||
break;
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
|
||||
@ -526,20 +525,14 @@ public class StaminaManager extends BasePlayerManager {
|
||||
// Bow avatar charged attack
|
||||
Avatar currentAvatar = player.getTeamManager().getCurrentAvatarEntity().getAvatar();
|
||||
|
||||
switch (currentAvatar.getAvatarData().getWeaponType()) {
|
||||
case WEAPON_BOW:
|
||||
return getBowSustainedCost(skillCasting);
|
||||
case WEAPON_CLAYMORE:
|
||||
return getClaymoreSustainedCost(skillCasting);
|
||||
case WEAPON_CATALYST:
|
||||
return getCatalystCost(skillCasting);
|
||||
case WEAPON_POLE:
|
||||
return getPolearmCost(skillCasting);
|
||||
case WEAPON_SWORD_ONE_HAND:
|
||||
return getSwordCost(skillCasting);
|
||||
}
|
||||
|
||||
return new Consumption();
|
||||
return switch (currentAvatar.getAvatarData().getWeaponType()) {
|
||||
case WEAPON_BOW -> getBowSustainedCost(skillCasting);
|
||||
case WEAPON_CLAYMORE -> getClaymoreSustainedCost(skillCasting);
|
||||
case WEAPON_CATALYST -> getCatalystCost(skillCasting);
|
||||
case WEAPON_POLE -> getPolearmCost(skillCasting);
|
||||
case WEAPON_SWORD_ONE_HAND -> getSwordCost(skillCasting);
|
||||
default -> new Consumption();
|
||||
};
|
||||
}
|
||||
|
||||
private Consumption getClimbConsumption() {
|
||||
|
@ -100,6 +100,7 @@ public class Player {
|
||||
@Getter private PlayerCodex codex;
|
||||
@Getter @Setter private boolean showAvatars;
|
||||
@Getter @Setter private List<Integer> showAvatarList;
|
||||
@Getter @Setter private List<Integer> showNameCardList;
|
||||
@Getter private Map<Integer, Integer> properties;
|
||||
@Getter @Setter private int currentRealmId;
|
||||
@Getter @Setter private int widgetId;
|
||||
@ -652,7 +653,8 @@ public class Player {
|
||||
return (int) ((theLastDay.getTime() - now.getTime()) / (24 * 60 * 60 * 1000)); // By copilot
|
||||
}
|
||||
|
||||
public void rechargeMoonCard() {
|
||||
public boolean rechargeMoonCard() {
|
||||
if (this.moonCardDuration > 150) return false; // Can only stack up to 180 days
|
||||
inventory.addItem(new GameItem(203, 300));
|
||||
if (!moonCard) {
|
||||
moonCard = true;
|
||||
@ -665,6 +667,7 @@ public class Player {
|
||||
if (!moonCardGetTimes.contains(moonCardStartTime)) {
|
||||
moonCardGetTimes.add(moonCardStartTime);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void getTodayMoonCard() {
|
||||
@ -935,6 +938,7 @@ public class Player {
|
||||
.setNameCardId(this.getNameCardId())
|
||||
.setIsShowAvatar(this.isShowAvatars())
|
||||
.addAllShowAvatarInfoList(socialShowAvatarInfoList)
|
||||
.addAllShowNameCardIdList(this.getShowNameCardInfoList())
|
||||
.setFinishAchievementNum(0);
|
||||
return social;
|
||||
}
|
||||
@ -968,6 +972,11 @@ public class Player {
|
||||
return showAvatarInfoList;
|
||||
}
|
||||
|
||||
public List<Integer> getShowNameCardInfoList() {
|
||||
List<Integer> info = this.getShowNameCardList();
|
||||
return info == null ? new ArrayList<>() : info;
|
||||
}
|
||||
|
||||
public PlayerWorldLocationInfoOuterClass.PlayerWorldLocationInfo getWorldPlayerLocationInfo() {
|
||||
return PlayerWorldLocationInfoOuterClass.PlayerWorldLocationInfo.newBuilder()
|
||||
.setSceneId(this.getSceneId())
|
||||
|
@ -2,9 +2,12 @@ package emu.grasscutter.game.player;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.excels.BuffData;
|
||||
import emu.grasscutter.game.avatar.Avatar;
|
||||
import emu.grasscutter.game.props.FightProperty;
|
||||
import emu.grasscutter.net.proto.ServerBuffChangeNotifyOuterClass.ServerBuffChangeNotify.ServerBuffChangeType;
|
||||
import emu.grasscutter.net.proto.ServerBuffOuterClass.ServerBuff;
|
||||
import emu.grasscutter.server.packet.send.PacketServerBuffChangeNotify;
|
||||
@ -14,6 +17,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.val;
|
||||
|
||||
@Getter(AccessLevel.PRIVATE)
|
||||
public class PlayerBuffManager extends BasePlayerManager {
|
||||
@ -74,10 +78,50 @@ public class PlayerBuffManager extends BasePlayerManager {
|
||||
* @return True if a buff was added
|
||||
*/
|
||||
public synchronized boolean addBuff(int buffId, float duration) {
|
||||
return addBuff(buffId, duration, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a server buff to the player.
|
||||
* @param buffId Server buff id
|
||||
* @param duration Duration of the buff in seconds. Set to 0 for an infinite buff.
|
||||
* @param target Target avatar
|
||||
* @return True if a buff was added
|
||||
*/
|
||||
public synchronized boolean addBuff(int buffId, float duration, Avatar target) {
|
||||
// Get buff excel data
|
||||
BuffData buffData = GameData.getBuffDataMap().get(buffId);
|
||||
if (buffData == null) return false;
|
||||
|
||||
boolean success = false;
|
||||
|
||||
// Perform onAdded actions
|
||||
success |= Optional.ofNullable(GameData.getAbilityData(buffData.getAbilityName()))
|
||||
.map(data -> data.modifiers.get(buffData.getModifierName()))
|
||||
.map(modifier -> modifier.onAdded)
|
||||
.map(onAdded -> {
|
||||
System.out.println("onAdded exists");
|
||||
boolean s = false;
|
||||
for (var a: onAdded) {
|
||||
switch (a.type) {
|
||||
case HealHP:
|
||||
System.out.println("Attempting heal");
|
||||
if (target == null) break;
|
||||
float maxHp = target.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP);
|
||||
float amount = a.amount.get() + a.amountByTargetMaxHPRatio.get() * maxHp;
|
||||
target.getAsEntity().heal(amount);
|
||||
s = true;
|
||||
System.out.printf("Healed {}", amount);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return s;
|
||||
})
|
||||
.orElse(false);
|
||||
System.out.println("Oh no");
|
||||
|
||||
// Set duration
|
||||
if (duration < 0f) {
|
||||
duration = buffData.getTime();
|
||||
@ -85,7 +129,7 @@ public class PlayerBuffManager extends BasePlayerManager {
|
||||
|
||||
// Dont add buff if duration is equal or less than 0
|
||||
if (duration <= 0) {
|
||||
return false;
|
||||
return success;
|
||||
}
|
||||
|
||||
// Clear previous buff if it exists
|
||||
|
@ -4,13 +4,12 @@ import dev.morphia.annotations.Entity;
|
||||
import dev.morphia.annotations.Transient;
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.excels.CodexAnimalData;
|
||||
import emu.grasscutter.data.excels.CodexReliquaryData;
|
||||
import emu.grasscutter.game.entity.EntityMonster;
|
||||
import emu.grasscutter.game.entity.GameEntity;
|
||||
import emu.grasscutter.game.inventory.GameItem;
|
||||
import emu.grasscutter.game.inventory.ItemType;
|
||||
import emu.grasscutter.game.inventory.MaterialType;
|
||||
import emu.grasscutter.server.packet.send.PacketCodexDataUpdateNotify;
|
||||
import lombok.Getter;
|
||||
import lombok.val;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -19,16 +18,16 @@ public class PlayerCodex {
|
||||
@Transient private Player player;
|
||||
|
||||
//itemId is not codexId!
|
||||
private Set<Integer> unlockedWeapon;
|
||||
private Map<Integer, Integer> unlockedAnimal;
|
||||
private Set<Integer> unlockedMaterial;
|
||||
private Set<Integer> unlockedBook;
|
||||
private Set<Integer> unlockedTip;
|
||||
private Set<Integer> unlockedView;
|
||||
private Set<Integer> unlockedReliquary;
|
||||
private Set<Integer> unlockedReliquarySuitCodex;
|
||||
@Getter private Set<Integer> unlockedWeapon;
|
||||
@Getter private Map<Integer, Integer> unlockedAnimal;
|
||||
@Getter private Set<Integer> unlockedMaterial;
|
||||
@Getter private Set<Integer> unlockedBook;
|
||||
@Getter private Set<Integer> unlockedTip;
|
||||
@Getter private Set<Integer> unlockedView;
|
||||
@Getter private Set<Integer> unlockedReliquary;
|
||||
@Getter private Set<Integer> unlockedReliquarySuitCodex;
|
||||
|
||||
public PlayerCodex(){
|
||||
public PlayerCodex() {
|
||||
this.unlockedWeapon = new HashSet<>();
|
||||
this.unlockedAnimal = new HashMap<>();
|
||||
this.unlockedMaterial = new HashSet<>();
|
||||
@ -39,127 +38,93 @@ public class PlayerCodex {
|
||||
this.unlockedReliquarySuitCodex = new HashSet<>();
|
||||
}
|
||||
|
||||
public PlayerCodex(Player player){
|
||||
public PlayerCodex(Player player) {
|
||||
this();
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
this.fixReliquaries();
|
||||
}
|
||||
|
||||
public void checkAddedItem(GameItem item){
|
||||
ItemType type = item.getItemData().getItemType();
|
||||
if (type == ItemType.ITEM_WEAPON){
|
||||
if(!getUnlockedWeapon().contains(item.getItemId())){
|
||||
getUnlockedWeapon().add(item.getItemId());
|
||||
var codexItem = GameData.getCodexWeaponDataIdMap().get(item.getItemId());
|
||||
if(codexItem != null){
|
||||
player.save();
|
||||
this.player.sendPacket(new PacketCodexDataUpdateNotify(2, codexItem.getId()));
|
||||
}
|
||||
public void checkAddedItem(GameItem item) {
|
||||
val itemData = item.getItemData();
|
||||
val itemId = item.getItemId();
|
||||
switch (itemData.getItemType()) {
|
||||
case ITEM_WEAPON -> {
|
||||
Optional.ofNullable(GameData.getCodexWeaponDataIdMap().get(itemId))
|
||||
.ifPresent(codexData -> {
|
||||
if (this.getUnlockedWeapon().add(itemId)) {
|
||||
this.player.save();
|
||||
this.player.sendPacket(new PacketCodexDataUpdateNotify(2, codexData.getId()));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else if(type == ItemType.ITEM_MATERIAL){
|
||||
if( item.getItemData().getMaterialType() == MaterialType.MATERIAL_FOOD ||
|
||||
item.getItemData().getMaterialType() == MaterialType.MATERIAL_WIDGET||
|
||||
item.getItemData().getMaterialType() == MaterialType.MATERIAL_EXCHANGE||
|
||||
item.getItemData().getMaterialType() == MaterialType.MATERIAL_AVATAR_MATERIAL||
|
||||
item.getItemData().getMaterialType() == MaterialType.MATERIAL_NOTICE_ADD_HP){
|
||||
if (!getUnlockedMaterial().contains(item.getItemId())) {
|
||||
var codexMaterial = GameData.getCodexMaterialDataIdMap().get(item.getItemId());
|
||||
if (codexMaterial != null) {
|
||||
getUnlockedMaterial().add(item.getItemId());
|
||||
player.save();
|
||||
this.player.sendPacket(new PacketCodexDataUpdateNotify(4, codexMaterial.getId()));
|
||||
case ITEM_MATERIAL -> {
|
||||
switch (itemData.getMaterialType()) {
|
||||
// Is this check even needed?
|
||||
case MATERIAL_FOOD, MATERIAL_WIDGET, MATERIAL_EXCHANGE, MATERIAL_AVATAR_MATERIAL, MATERIAL_NOTICE_ADD_HP -> {
|
||||
Optional.ofNullable(GameData.getCodexMaterialDataIdMap().get(itemId))
|
||||
.ifPresent(codexData -> {
|
||||
if (this.getUnlockedMaterial().add(itemId)) {
|
||||
this.player.save();
|
||||
this.player.sendPacket(new PacketCodexDataUpdateNotify(4, codexData.getId()));
|
||||
}
|
||||
});
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(type == ItemType.ITEM_RELIQUARY) {
|
||||
if(!getUnlockedReliquary().contains(item.getItemId())){
|
||||
getUnlockedReliquary().add(item.getItemId());
|
||||
checkUnlockedSuits(item);
|
||||
case ITEM_RELIQUARY -> {
|
||||
val reliquaryId = (itemId/10) * 10; // Normalize to 0-substat form
|
||||
if (this.getUnlockedReliquary().add(reliquaryId))
|
||||
checkUnlockedSuits(reliquaryId);
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
|
||||
public void checkAnimal(GameEntity target, CodexAnimalData.CodexAnimalUnlockCondition condition){
|
||||
if(target instanceof EntityMonster){
|
||||
var monsterId = ((EntityMonster)target).getMonsterData().getId();
|
||||
var codexAnimal = GameData.getCodexAnimalDataMap().get(monsterId);
|
||||
public void checkAnimal(GameEntity target, CodexAnimalData.CountType countType) {
|
||||
if (target instanceof EntityMonster) {
|
||||
val monsterId = ((EntityMonster) target).getMonsterData().getId();
|
||||
val codexAnimal = GameData.getCodexAnimalDataMap().get(monsterId);
|
||||
if (codexAnimal == null) return;
|
||||
|
||||
val animalCountType = codexAnimal.getCountType();
|
||||
if (animalCountType != countType && animalCountType != null) return;
|
||||
|
||||
this.getUnlockedAnimal().merge(monsterId, 1, (i, j) -> i + 1);
|
||||
|
||||
if(!getUnlockedAnimal().containsKey(monsterId)) {
|
||||
if (codexAnimal != null) {
|
||||
if(codexAnimal.getUnlockCondition() == condition || codexAnimal.getUnlockCondition() == null){
|
||||
getUnlockedAnimal().put(monsterId, 1);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
getUnlockedAnimal().put(monsterId, getUnlockedAnimal().get(monsterId) + 1);
|
||||
}
|
||||
player.save();
|
||||
this.player.sendPacket(new PacketCodexDataUpdateNotify(3, monsterId));
|
||||
}
|
||||
}
|
||||
|
||||
public void checkUnlockedSuits(GameItem item){
|
||||
int reliquaryId = item.getItemId();
|
||||
Optional<CodexReliquaryData> excelReliquarySuitList = GameData.getcodexReliquaryArrayList().stream().filter(
|
||||
x -> x.getCupId() == reliquaryId
|
||||
|| x.getLeatherId() == reliquaryId
|
||||
|| x.getCapId() == reliquaryId
|
||||
|| x.getFlowerId() == reliquaryId
|
||||
|| x.getSandId() == reliquaryId
|
||||
).findFirst();
|
||||
if(excelReliquarySuitList.isPresent()) {
|
||||
var excelReliquarySuit = excelReliquarySuitList.get();
|
||||
if(!getUnlockedReliquarySuitCodex().contains(excelReliquarySuit.getId())){
|
||||
if(
|
||||
getUnlockedReliquary().contains(excelReliquarySuit.getCupId()) &&
|
||||
getUnlockedReliquary().contains(excelReliquarySuit.getLeatherId()) &&
|
||||
getUnlockedReliquary().contains(excelReliquarySuit.getCapId()) &&
|
||||
getUnlockedReliquary().contains(excelReliquarySuit.getFlowerId()) &&
|
||||
getUnlockedReliquary().contains(excelReliquarySuit.getSandId())
|
||||
){
|
||||
getUnlockedReliquarySuitCodex().add(excelReliquarySuit.getId());
|
||||
player.save();
|
||||
this.player.sendPacket(new PacketCodexDataUpdateNotify(8, excelReliquarySuit.getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
public void checkUnlockedSuits(int reliquaryId) {
|
||||
GameData.getCodexReliquaryArrayList().stream()
|
||||
.filter(x -> !this.getUnlockedReliquarySuitCodex().contains(x.getId()))
|
||||
.filter(x -> x.containsId(reliquaryId))
|
||||
.filter(x -> this.getUnlockedReliquary().containsAll(x.getIds()))
|
||||
.forEach(x -> {
|
||||
int id = x.getId();
|
||||
this.getUnlockedReliquarySuitCodex().add(id);
|
||||
this.player.save();
|
||||
this.player.sendPacket(new PacketCodexDataUpdateNotify(8, id));
|
||||
});
|
||||
}
|
||||
|
||||
public Set<Integer> getUnlockedWeapon() {
|
||||
return unlockedWeapon;
|
||||
}
|
||||
@Deprecated // Maybe remove this if we ever stop caring about older dbs
|
||||
private void fixReliquaries() {
|
||||
// Migrate older database entries which were using non-canonical forms of itemIds
|
||||
val newReliquaries = new HashSet<Integer>();
|
||||
this.unlockedReliquary.forEach(i -> newReliquaries.add((i/10)*10));
|
||||
this.unlockedReliquary = newReliquaries;
|
||||
|
||||
public Map<Integer, Integer> getUnlockedAnimal() {
|
||||
return unlockedAnimal;
|
||||
GameData.getCodexReliquaryArrayList().stream()
|
||||
.filter(x -> !this.getUnlockedReliquarySuitCodex().contains(x.getId()))
|
||||
.filter(x -> this.getUnlockedReliquary().containsAll(x.getIds()))
|
||||
.forEach(x -> this.getUnlockedReliquarySuitCodex().add(x.getId()));
|
||||
this.player.save();
|
||||
}
|
||||
|
||||
public Set<Integer> getUnlockedMaterial() {
|
||||
return unlockedMaterial;
|
||||
}
|
||||
|
||||
public Set<Integer> getUnlockedBook() {
|
||||
return unlockedBook;
|
||||
}
|
||||
|
||||
public Set<Integer> getUnlockedTip() {
|
||||
return unlockedTip;
|
||||
}
|
||||
|
||||
public Set<Integer> getUnlockedView() {
|
||||
return unlockedView;
|
||||
}
|
||||
|
||||
public Set<Integer> getUnlockedReliquary() {
|
||||
return unlockedReliquary;
|
||||
}
|
||||
|
||||
public Set<Integer> getUnlockedReliquarySuitCodex() {
|
||||
return unlockedReliquarySuitCodex;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -198,8 +198,7 @@ public class PlayerProgressManager extends BasePlayerDataManager {
|
||||
|
||||
public boolean unlockTransPoint(int sceneId, int pointId, boolean isStatue) {
|
||||
// Check whether the unlocked point exists and whether it is still locked.
|
||||
String key = sceneId + "_" + pointId;
|
||||
ScenePointEntry scenePointEntry = GameData.getScenePointEntries().get(key);
|
||||
ScenePointEntry scenePointEntry = GameData.getScenePointEntryById(sceneId, pointId);
|
||||
|
||||
if (scenePointEntry == null || this.player.getUnlockedScenePoints(sceneId).contains(pointId)) {
|
||||
return false;
|
||||
|
@ -3,10 +3,10 @@ package emu.grasscutter.game.player;
|
||||
import static emu.grasscutter.config.Configuration.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import dev.morphia.annotations.Entity;
|
||||
import dev.morphia.annotations.Transient;
|
||||
import emu.grasscutter.GameConstants;
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.excels.AvatarSkillDepotData;
|
||||
import emu.grasscutter.game.avatar.Avatar;
|
||||
import emu.grasscutter.game.entity.EntityAvatar;
|
||||
@ -37,6 +37,8 @@ import emu.grasscutter.server.packet.send.PacketRemoveCustomTeamRsp;
|
||||
import emu.grasscutter.server.packet.send.PacketSceneTeamUpdateNotify;
|
||||
import emu.grasscutter.server.packet.send.PacketSetUpAvatarTeamRsp;
|
||||
import emu.grasscutter.server.packet.send.PacketWorldPlayerDieNotify;
|
||||
import emu.grasscutter.utils.Position;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||
@ -114,7 +116,7 @@ public class TeamManager extends BasePlayerDataManager {
|
||||
|
||||
public TeamInfo getCurrentTeamInfo() {
|
||||
if (useTemporarilyTeamIndex >= 0 &&
|
||||
useTemporarilyTeamIndex < temporaryTeam.size()) {
|
||||
useTemporarilyTeamIndex < temporaryTeam.size()) {
|
||||
return temporaryTeam.get(useTemporarilyTeamIndex);
|
||||
}
|
||||
if (this.getPlayer().isInMultiplayer()) {
|
||||
@ -275,8 +277,8 @@ public class TeamManager extends BasePlayerDataManager {
|
||||
.map(e -> e.getKey())
|
||||
.filter(elementType -> elementType.getTeamResonanceId() != 0)
|
||||
.forEach(elementType -> {
|
||||
this.teamResonances.add(elementType.getTeamResonanceId());
|
||||
this.teamResonancesConfig.add(elementType.getConfigHash());
|
||||
this.teamResonances.add(elementType.getTeamResonanceId());
|
||||
this.teamResonancesConfig.add(elementType.getConfigHash());
|
||||
});
|
||||
|
||||
// Four element resonance
|
||||
@ -410,30 +412,30 @@ public class TeamManager extends BasePlayerDataManager {
|
||||
|
||||
public void setupTemporaryTeam(List<List<Long>> guidList) {
|
||||
this.temporaryTeam = guidList.stream().map(list -> {
|
||||
// Sanity checks
|
||||
if (list.size() == 0 || list.size() > this.getMaxTeamSize()) {
|
||||
// Sanity checks
|
||||
if (list.size() == 0 || list.size() > this.getMaxTeamSize()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Set team data
|
||||
LinkedHashSet<Avatar> newTeam = new LinkedHashSet<>();
|
||||
for (Long aLong : list) {
|
||||
Avatar avatar = this.getPlayer().getAvatars().getAvatarByGuid(aLong);
|
||||
if (avatar == null || newTeam.contains(avatar)) {
|
||||
// Should never happen
|
||||
return null;
|
||||
}
|
||||
newTeam.add(avatar);
|
||||
}
|
||||
|
||||
// Set team data
|
||||
LinkedHashSet<Avatar> newTeam = new LinkedHashSet<>();
|
||||
for (Long aLong : list) {
|
||||
Avatar avatar = this.getPlayer().getAvatars().getAvatarByGuid(aLong);
|
||||
if (avatar == null || newTeam.contains(avatar)) {
|
||||
// Should never happen
|
||||
return null;
|
||||
}
|
||||
newTeam.add(avatar);
|
||||
}
|
||||
|
||||
// convert to avatar ids
|
||||
return newTeam.stream()
|
||||
.map(Avatar::getAvatarId)
|
||||
.toList();
|
||||
})
|
||||
.filter(Objects::nonNull)
|
||||
.map(TeamInfo::new)
|
||||
.toList();
|
||||
// convert to avatar ids
|
||||
return newTeam.stream()
|
||||
.map(Avatar::getAvatarId)
|
||||
.toList();
|
||||
})
|
||||
.filter(Objects::nonNull)
|
||||
.map(TeamInfo::new)
|
||||
.toList();
|
||||
}
|
||||
|
||||
public void useTemporaryTeam(int index) {
|
||||
@ -566,10 +568,7 @@ public class TeamManager extends BasePlayerDataManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
entity.setFightProperty(
|
||||
FightProperty.FIGHT_PROP_CUR_HP,
|
||||
entity.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP) * .1f
|
||||
);
|
||||
entity.setFightProperty(FightProperty.FIGHT_PROP_CUR_HP, 1f);
|
||||
this.getPlayer().sendPacket(new PacketAvatarFightPropUpdateNotify(entity.getAvatar(), FightProperty.FIGHT_PROP_CUR_HP));
|
||||
this.getPlayer().sendPacket(new PacketAvatarLifeStateChangeNotify(entity.getAvatar()));
|
||||
return true;
|
||||
@ -587,13 +586,13 @@ public class TeamManager extends BasePlayerDataManager {
|
||||
}
|
||||
|
||||
entity.setFightProperty(
|
||||
FightProperty.FIGHT_PROP_CUR_HP,
|
||||
(float) Math.min(
|
||||
(entity.getFightProperty(FightProperty.FIGHT_PROP_CUR_HP) +
|
||||
entity.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP) * (float) healRate / 100.0 +
|
||||
(float) healAmount / 100.0),
|
||||
entity.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP)
|
||||
)
|
||||
FightProperty.FIGHT_PROP_CUR_HP,
|
||||
(float) Math.min(
|
||||
(entity.getFightProperty(FightProperty.FIGHT_PROP_CUR_HP) +
|
||||
entity.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP) * (float) healRate / 100.0 +
|
||||
(float) healAmount / 100.0),
|
||||
entity.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP)
|
||||
)
|
||||
);
|
||||
this.getPlayer().sendPacket(new PacketAvatarFightPropUpdateNotify(entity.getAvatar(), FightProperty.FIGHT_PROP_CUR_HP));
|
||||
this.getPlayer().sendPacket(new PacketAvatarLifeStateChangeNotify(entity.getAvatar()));
|
||||
@ -616,24 +615,37 @@ public class TeamManager extends BasePlayerDataManager {
|
||||
// Revive all team members
|
||||
for (EntityAvatar entity : this.getActiveTeam()) {
|
||||
entity.setFightProperty(
|
||||
FightProperty.FIGHT_PROP_CUR_HP,
|
||||
entity.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP) * .4f
|
||||
FightProperty.FIGHT_PROP_CUR_HP,
|
||||
entity.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP) * .4f
|
||||
);
|
||||
this.getPlayer().sendPacket(new PacketAvatarFightPropUpdateNotify(entity.getAvatar(), FightProperty.FIGHT_PROP_CUR_HP));
|
||||
this.getPlayer().sendPacket(new PacketAvatarLifeStateChangeNotify(entity.getAvatar()));
|
||||
}
|
||||
|
||||
// Teleport player
|
||||
this.getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(this.getPlayer(), EnterType.ENTER_TYPE_SELF, EnterReason.Revival, 3, GameConstants.START_POSITION));
|
||||
|
||||
// Set player position
|
||||
player.setSceneId(3);
|
||||
player.getPosition().set(GameConstants.START_POSITION);
|
||||
// Teleport player and set player position
|
||||
try {
|
||||
this.getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(this.getPlayer(), EnterType.ENTER_TYPE_SELF, EnterReason.Revival, player.getSceneId(), getRespawnPosition()));
|
||||
player.getPosition().set(getRespawnPosition());
|
||||
}catch (Exception e) {
|
||||
this.getPlayer().sendPacket(new PacketPlayerEnterSceneNotify(this.getPlayer(), EnterType.ENTER_TYPE_SELF, EnterReason.Revival, 3, GameConstants.START_POSITION));
|
||||
player.getPosition().set(GameConstants.START_POSITION); // If something goes wrong, the resurrection is here
|
||||
}
|
||||
|
||||
// Packets
|
||||
this.getPlayer().sendPacket(new BasePacket(PacketOpcodes.WorldPlayerReviveRsp));
|
||||
}
|
||||
public Position getRespawnPosition() {
|
||||
var deathPos = this.getPlayer().getPosition();
|
||||
int sceneId = this.getPlayer().getSceneId();
|
||||
|
||||
// Get the closest trans point to where the player died.
|
||||
var respawnPoint = this.getPlayer().getUnlockedScenePoints(sceneId).stream()
|
||||
.map(pointId -> GameData.getScenePointEntryById(sceneId, pointId))
|
||||
.filter(point -> point.getPointData().getType().equals("SceneTransPoint"))
|
||||
.min((Comparator.comparingDouble(pos -> Utils.getDist(pos.getPointData().getTranPos(), deathPos))));
|
||||
|
||||
return respawnPoint.get().getPointData().getTranPos();
|
||||
}
|
||||
public void saveAvatars() {
|
||||
// Save all avatars from active team
|
||||
for (EntityAvatar entity : this.getActiveTeam()) {
|
||||
|
@ -8,86 +8,99 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
|
||||
public enum EntityType {
|
||||
None (0),
|
||||
Avatar (1),
|
||||
Monster (2),
|
||||
Bullet (3),
|
||||
AttackPhyisicalUnit (4),
|
||||
AOE (5),
|
||||
Camera (6),
|
||||
EnviroArea (7),
|
||||
Equip (8),
|
||||
MonsterEquip (9),
|
||||
Grass (10),
|
||||
Level (11),
|
||||
NPC (12),
|
||||
TransPointFirst (13),
|
||||
TransPointFirstGadget (14),
|
||||
TransPointSecond (15),
|
||||
TransPointSecondGadget (16),
|
||||
DropItem (17),
|
||||
Field (18),
|
||||
Gadget (19),
|
||||
Water (20),
|
||||
GatherPoint (21),
|
||||
GatherObject (22),
|
||||
AirflowField (23),
|
||||
SpeedupField (24),
|
||||
Gear (25),
|
||||
Chest (26),
|
||||
EnergyBall (27),
|
||||
ElemCrystal (28),
|
||||
Timeline (29),
|
||||
Worktop (30),
|
||||
Team (31),
|
||||
Platform (32),
|
||||
AmberWind (33),
|
||||
EnvAnimal (34),
|
||||
SealGadget (35),
|
||||
Tree (36),
|
||||
Bush (37),
|
||||
QuestGadget (38),
|
||||
Lightning (39),
|
||||
RewardPoint (40),
|
||||
RewardStatue (41),
|
||||
MPLevel (42),
|
||||
WindSeed (43),
|
||||
MpPlayRewardPoint (44),
|
||||
ViewPoint (45),
|
||||
RemoteAvatar (46),
|
||||
GeneralRewardPoint (47),
|
||||
PlayTeam (48),
|
||||
OfferingGadget (49),
|
||||
EyePoint (50),
|
||||
MiracleRing (51),
|
||||
Foundation (52),
|
||||
WidgetGadget (53),
|
||||
PlaceHolder (99);
|
||||
|
||||
private final int value;
|
||||
private static final Int2ObjectMap<EntityType> map = new Int2ObjectOpenHashMap<>();
|
||||
private static final Map<String, EntityType> stringMap = new HashMap<>();
|
||||
|
||||
static {
|
||||
Stream.of(values()).forEach(e -> {
|
||||
map.put(e.getValue(), e);
|
||||
stringMap.put(e.name(), e);
|
||||
});
|
||||
}
|
||||
|
||||
private EntityType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
None (0),
|
||||
Avatar (1),
|
||||
Monster (2),
|
||||
Bullet (3),
|
||||
AttackPhyisicalUnit (4),
|
||||
AOE (5),
|
||||
Camera (6),
|
||||
EnviroArea (7),
|
||||
Equip (8),
|
||||
MonsterEquip (9),
|
||||
Grass (10),
|
||||
Level (11),
|
||||
NPC (12),
|
||||
TransPointFirst (13),
|
||||
TransPointFirstGadget (14),
|
||||
TransPointSecond (15),
|
||||
TransPointSecondGadget (16),
|
||||
DropItem (17),
|
||||
Field (18),
|
||||
Gadget (19),
|
||||
Water (20),
|
||||
GatherPoint (21),
|
||||
GatherObject (22),
|
||||
AirflowField (23),
|
||||
SpeedupField (24),
|
||||
Gear (25),
|
||||
Chest (26),
|
||||
EnergyBall (27),
|
||||
ElemCrystal (28),
|
||||
Timeline (29),
|
||||
Worktop (30),
|
||||
Team (31),
|
||||
Platform (32),
|
||||
AmberWind (33),
|
||||
EnvAnimal (34),
|
||||
SealGadget (35),
|
||||
Tree (36),
|
||||
Bush (37),
|
||||
QuestGadget (38),
|
||||
Lightning (39),
|
||||
RewardPoint (40),
|
||||
RewardStatue (41),
|
||||
MPLevel (42),
|
||||
WindSeed (43),
|
||||
MpPlayRewardPoint (44),
|
||||
ViewPoint (45),
|
||||
RemoteAvatar (46),
|
||||
GeneralRewardPoint (47),
|
||||
PlayTeam (48),
|
||||
OfferingGadget (49),
|
||||
EyePoint (50),
|
||||
MiracleRing (51),
|
||||
Foundation (52),
|
||||
WidgetGadget (53),
|
||||
Vehicle (54),
|
||||
SubEquip (55),
|
||||
FishRod (56),
|
||||
CustomTile (57),
|
||||
FishPool (58),
|
||||
CustomGadget (59),
|
||||
BlackMud (60),
|
||||
RoguelikeOperatorGadget (61),
|
||||
NightCrowGadget (62),
|
||||
Projector (63),
|
||||
Screen (64),
|
||||
EchoShell (65),
|
||||
UIInteractGadget (66),
|
||||
PlaceHolder (99);
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static EntityType getTypeByValue(int value) {
|
||||
return map.getOrDefault(value, None);
|
||||
}
|
||||
|
||||
public static EntityType getTypeByName(String name) {
|
||||
return stringMap.getOrDefault(name, None);
|
||||
}
|
||||
private final int value;
|
||||
private static final Int2ObjectMap<EntityType> map = new Int2ObjectOpenHashMap<>();
|
||||
private static final Map<String, EntityType> stringMap = new HashMap<>();
|
||||
|
||||
static {
|
||||
Stream.of(values()).forEach(e -> {
|
||||
map.put(e.getValue(), e);
|
||||
stringMap.put(e.name(), e);
|
||||
});
|
||||
}
|
||||
|
||||
private EntityType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static EntityType getTypeByValue(int value) {
|
||||
return map.getOrDefault(value, None);
|
||||
}
|
||||
|
||||
public static EntityType getTypeByName(String name) {
|
||||
return stringMap.getOrDefault(name, None);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAcceptQuest extends ItemUseInt {
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ACCEPT_QUEST;
|
||||
}
|
||||
|
||||
public ItemUseAcceptQuest(String[] useParam) {
|
||||
super(useParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useItem(UseItemParams params) {
|
||||
return (params.player.getQuestManager().addQuest(this.i) != null);
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.data.common.ItemUseData;
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAction {
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_NONE;
|
||||
}
|
||||
|
||||
public static ItemUseAction fromItemUseData(ItemUseData data) {
|
||||
var useParam = data.getUseParam();
|
||||
return switch (data.getUseOp()) {
|
||||
case ITEM_USE_NONE -> null;
|
||||
// Uprade materials - no direct usage
|
||||
case ITEM_USE_ADD_EXP -> new ItemUseAddExp(useParam);
|
||||
case ITEM_USE_ADD_RELIQUARY_EXP -> new ItemUseAddReliquaryExp(useParam);
|
||||
case ITEM_USE_ADD_WEAPON_EXP -> new ItemUseAddWeaponExp(useParam);
|
||||
// Energy pickups
|
||||
case ITEM_USE_ADD_ALL_ENERGY -> new ItemUseAddAllEnergy(useParam);
|
||||
case ITEM_USE_ADD_ELEM_ENERGY -> new ItemUseAddElemEnergy(useParam);
|
||||
// Give items
|
||||
case ITEM_USE_ADD_ITEM -> new ItemUseAddItem(useParam);
|
||||
case ITEM_USE_GAIN_AVATAR -> new ItemUseGainAvatar(useParam);
|
||||
case ITEM_USE_GAIN_COSTUME -> new ItemUseGainCostume(useParam); // TODO - real success/fail
|
||||
case ITEM_USE_GAIN_FLYCLOAK -> new ItemUseGainFlycloak(useParam); // TODO - real success/fail
|
||||
case ITEM_USE_GAIN_NAME_CARD -> new ItemUseGainNameCard(useParam); // TODO
|
||||
case ITEM_USE_CHEST_SELECT_ITEM -> new ItemUseChestSelectItem(useParam);
|
||||
case ITEM_USE_ADD_SELECT_ITEM -> new ItemUseAddSelectItem(useParam);
|
||||
case ITEM_USE_GRANT_SELECT_REWARD -> new ItemUseGrantSelectReward(useParam);
|
||||
case ITEM_USE_COMBINE_ITEM -> new ItemUseCombineItem(useParam);
|
||||
case ITEM_USE_OPEN_RANDOM_CHEST -> new ItemUseOpenRandomChest(useParam);
|
||||
// Food effects
|
||||
case ITEM_USE_RELIVE_AVATAR -> new ItemUseReliveAvatar(useParam); // First action for revival food. Should we worry about race conditions in parallel streams?
|
||||
case ITEM_USE_ADD_CUR_HP -> new ItemUseAddCurHp(useParam);
|
||||
case ITEM_USE_ADD_CUR_STAMINA -> new ItemUseAddCurStamina(useParam);
|
||||
case ITEM_USE_ADD_SERVER_BUFF -> new ItemUseAddServerBuff(useParam);
|
||||
case ITEM_USE_MAKE_GADGET -> new ItemUseMakeGadget(useParam);
|
||||
// Unlock recipes - TODO: allow scheduling packets for after recipe is removed
|
||||
case ITEM_USE_UNLOCK_COMBINE -> new ItemUseUnlockCombine(useParam);
|
||||
case ITEM_USE_UNLOCK_CODEX -> new ItemUseUnlockCodex(useParam); // TODO: No backend for this yet
|
||||
case ITEM_USE_UNLOCK_COOK_RECIPE -> new ItemUseUnlockCookRecipe(useParam);
|
||||
case ITEM_USE_UNLOCK_FORGE -> new ItemUseUnlockForge(useParam);
|
||||
case ITEM_USE_UNLOCK_FURNITURE_FORMULA -> new ItemUseUnlockFurnitureFormula(useParam);
|
||||
case ITEM_USE_UNLOCK_FURNITURE_SUITE -> new ItemUseUnlockFurnitureSuite(useParam);
|
||||
case ITEM_USE_UNLOCK_HOME_MODULE -> new ItemUseUnlockHomeModule(useParam); // No backend for this yet
|
||||
case ITEM_USE_UNLOCK_HOME_BGM -> new ItemUseUnlockHomeBgm(useParam);
|
||||
// Account things
|
||||
case ITEM_USE_ACCEPT_QUEST -> new ItemUseAcceptQuest(useParam);
|
||||
case ITEM_USE_GAIN_CARD_PRODUCT -> new ItemUseGainCardProduct(useParam);
|
||||
case ITEM_USE_UNLOCK_PAID_BATTLE_PASS_NORMAL -> new ItemUseUnlockPaidBattlePassNormal(useParam); // TODO: add paid BP
|
||||
|
||||
// Unused in current resources
|
||||
case ITEM_USE_DEL_SERVER_BUFF -> null;
|
||||
case ITEM_USE_ADD_BIG_TALENT_POINT -> null;
|
||||
case ITEM_USE_GAIN_RESIN_CARD_PRODUCT -> null;
|
||||
case ITEM_USE_TRIGGER_ABILITY -> null;
|
||||
case ITEM_USE_ADD_TREASURE_MAP_BONUS_REGION_FRAGMENT -> null;
|
||||
// Used in current resources but no point yet
|
||||
case ITEM_USE_ADD_PERSIST_STAMINA -> null; // [int amount] one Test item
|
||||
case ITEM_USE_ADD_TEMPORARY_STAMINA -> null; // [int amount] one Test item
|
||||
case ITEM_USE_ADD_DUNGEON_COND_TIME -> null; // [int 1, int 15 or 20] - minigame shards
|
||||
case ITEM_USE_ADD_CHANNELLER_SLAB_BUFF -> null; // [int] minigame buffs
|
||||
case ITEM_USE_ADD_REGIONAL_PLAY_VAR -> null; // [String, int] - coral butterfly effect
|
||||
};
|
||||
}
|
||||
|
||||
public boolean useItem(UseItemParams params) {
|
||||
// An item must return true on at least one of its actions to count as successfully used.
|
||||
// If all of the actions return false, the item will not be consumed from inventory.
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean postUseItem(UseItemParams params) {
|
||||
// This is run after the item has been consumed from inventory.
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ElementType;
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAddAllEnergy extends ItemUseAddEnergy {
|
||||
private float energy = 0f;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_ALL_ENERGY;
|
||||
}
|
||||
|
||||
public ItemUseAddAllEnergy(String[] useParam) {
|
||||
try {
|
||||
this.energy = Float.parseFloat(useParam[0]);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
public float getAddEnergy(ElementType avatarElement) {
|
||||
return this.energy;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAddCurHp extends ItemUseInt {
|
||||
private String icon;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_CUR_HP;
|
||||
}
|
||||
|
||||
public ItemUseAddCurHp(String[] useParam) {
|
||||
super(useParam);
|
||||
this.icon = useParam[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useItem(UseItemParams params) {
|
||||
return (params.targetAvatar.getAsEntity().heal(params.count * this.i) > 0.01);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAddCurStamina extends ItemUseInt {
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_CUR_STAMINA;
|
||||
}
|
||||
|
||||
public ItemUseAddCurStamina(String[] useParam) {
|
||||
super(useParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useItem(UseItemParams params) {
|
||||
return params.player.getStaminaManager().addCurrentStamina(this.i);
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ElementType;
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAddElemEnergy extends ItemUseAddEnergy {
|
||||
private ElementType element = ElementType.None;
|
||||
private float elemEnergy = 0f;
|
||||
private float otherEnergy = 0f;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_ELEM_ENERGY;
|
||||
}
|
||||
|
||||
public ItemUseAddElemEnergy(String[] useParam) {
|
||||
try {
|
||||
this.element = ElementType.getTypeByValue(Integer.parseInt(useParam[0]));
|
||||
} catch (Exception ignored) {}
|
||||
try {
|
||||
this.elemEnergy = Float.parseFloat(useParam[1]);
|
||||
} catch (Exception ignored) {}
|
||||
try {
|
||||
this.otherEnergy = Float.parseFloat(useParam[2]);
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
public float getAddEnergy(ElementType avatarElement) {
|
||||
return (avatarElement == this.element) ? this.elemEnergy : this.otherEnergy;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.data.excels.AvatarSkillDepotData;
|
||||
import emu.grasscutter.game.avatar.Avatar;
|
||||
import emu.grasscutter.game.props.ElementType;
|
||||
import emu.grasscutter.net.proto.PropChangeReasonOuterClass.PropChangeReason;
|
||||
|
||||
public abstract class ItemUseAddEnergy extends ItemUseAction {
|
||||
public abstract float getAddEnergy(ElementType avatarElement);
|
||||
|
||||
public float getAddEnergy(AvatarSkillDepotData depot) {
|
||||
if (depot == null) return 0f;
|
||||
var element = depot.getElementType();
|
||||
if (element == null) return 0f;
|
||||
return this.getAddEnergy(element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useItem(UseItemParams params) {
|
||||
var teamManager = params.player.getTeamManager();
|
||||
return switch (params.itemUseTarget) {
|
||||
case ITEM_USE_TARGET_CUR_AVATAR -> {
|
||||
this.addEnergy(teamManager.getCurrentAvatarEntity().getAvatar(), params.count);
|
||||
yield true; // Always consume elem balls
|
||||
}
|
||||
case ITEM_USE_TARGET_CUR_TEAM -> {
|
||||
var activeTeam = teamManager.getActiveTeam();
|
||||
// On-field vs off-field multiplier.
|
||||
// The on-field character gets full amount, off-field characters get less depending on the team size.
|
||||
final float offFieldRatio = switch (activeTeam.size()) {
|
||||
case 2 -> 0.8f;
|
||||
case 3 -> 0.7f;
|
||||
default -> 0.6f;
|
||||
};
|
||||
final int currentCharacterIndex = teamManager.getCurrentCharacterIndex();
|
||||
|
||||
// Add energy to every team member.
|
||||
for (int i = 0; i < activeTeam.size(); i++) {
|
||||
var avatar = activeTeam.get(i).getAvatar();
|
||||
if (i == currentCharacterIndex)
|
||||
this.addEnergy(avatar, params.count);
|
||||
else
|
||||
this.addEnergy(avatar, params.count * offFieldRatio);
|
||||
}
|
||||
|
||||
yield true; // Always consume elem balls
|
||||
}
|
||||
case ITEM_USE_TARGET_SPECIFY_AVATAR, ITEM_USE_TARGET_SPECIFY_ALIVE_AVATAR, ITEM_USE_TARGET_SPECIFY_DEAD_AVATAR ->
|
||||
this.addEnergy(params.targetAvatar, params.count); // Targeted items might care about this
|
||||
case ITEM_USE_TARGET_NONE -> false;
|
||||
};
|
||||
}
|
||||
|
||||
private boolean addEnergy(Avatar avatar, float multiplier) {
|
||||
float energy = this.getAddEnergy(avatar.getSkillDepot()) * multiplier;
|
||||
if (energy < 0.01f)
|
||||
return false;
|
||||
avatar.getAsEntity().addEnergy(energy, PropChangeReason.PROP_CHANGE_REASON_ENERGY_BALL);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ItemUseAddExp extends ItemUseAction {
|
||||
@Getter private int exp = 0;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_EXP;
|
||||
}
|
||||
|
||||
public ItemUseAddExp(String[] useParam) {
|
||||
try {
|
||||
this.exp = Integer.parseInt(useParam[0]);
|
||||
} catch (NumberFormatException ignored) {}
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAddItem extends ItemUseInt {
|
||||
private int count = 0;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_ITEM;
|
||||
}
|
||||
|
||||
public ItemUseAddItem(String[] useParam) {
|
||||
super(useParam);
|
||||
try {
|
||||
this.count = Integer.parseInt(useParam[1]);
|
||||
} catch (NumberFormatException ignored) {}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useItem(UseItemParams params) {
|
||||
return params.player.getInventory().addItem(this.i, this.count * params.count);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ItemUseAddReliquaryExp extends ItemUseAction {
|
||||
@Getter private int exp = 0;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_RELIQUARY_EXP;
|
||||
}
|
||||
|
||||
public ItemUseAddReliquaryExp(String[] useParam) {
|
||||
try {
|
||||
this.exp = Integer.parseInt(useParam[0]);
|
||||
} catch (NumberFormatException ignored) {}
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAddSelectItem extends ItemUseSelectItems {
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_SELECT_ITEM;
|
||||
}
|
||||
|
||||
public ItemUseAddSelectItem(String[] useParam) {
|
||||
String[] options = useParam[0].split(",");
|
||||
this.optionItemIds = new int[options.length];
|
||||
for (int i = 0; i < options.length; i++) {
|
||||
try {
|
||||
this.optionItemIds[i] = Integer.parseInt(options[i]);
|
||||
} catch (NumberFormatException ignored) {
|
||||
this.optionItemIds[i] = INVALID;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseAddServerBuff extends ItemUseInt {
|
||||
private int duration = 0;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_SERVER_BUFF;
|
||||
}
|
||||
|
||||
public ItemUseAddServerBuff(String[] useParam) {
|
||||
super(useParam);
|
||||
try {
|
||||
this.duration = Integer.parseInt(useParam[1]);
|
||||
} catch (NumberFormatException ignored) {}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useItem(UseItemParams params) {
|
||||
return params.player.getBuffManager().addBuff(this.i, this.duration, params.targetAvatar);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
import lombok.Getter;
|
||||
|
||||
public class ItemUseAddWeaponExp extends ItemUseAction {
|
||||
@Getter private int exp = 0;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_ADD_WEAPON_EXP;
|
||||
}
|
||||
|
||||
public ItemUseAddWeaponExp(String[] useParam) {
|
||||
try {
|
||||
this.exp = Integer.parseInt(useParam[0]);
|
||||
} catch (NumberFormatException ignored) {}
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseChestSelectItem extends ItemUseSelectItems {
|
||||
private int[] optionItemCounts;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_CHEST_SELECT_ITEM;
|
||||
}
|
||||
|
||||
public ItemUseChestSelectItem(String[] useParam) {
|
||||
String[] options = useParam[0].split(",");
|
||||
this.optionItemIds = new int[options.length];
|
||||
this.optionItemCounts = new int[options.length];
|
||||
for (int i = 0; i < options.length; i++) {
|
||||
String[] optionParts = options[i].split(":");
|
||||
try {
|
||||
this.optionItemIds[i] = Integer.parseInt(optionParts[0]);
|
||||
} catch (NumberFormatException ignored) {
|
||||
this.optionItemIds[i] = INVALID;
|
||||
}
|
||||
try {
|
||||
this.optionItemCounts[i] = Integer.parseInt(optionParts[1]);
|
||||
} catch (NumberFormatException ignored) {
|
||||
this.optionItemCounts[i] = INVALID;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getItemCount(int index) {
|
||||
if ((optionItemCounts == null) || (index < 0) || (index > optionItemCounts.length)) return INVALID;
|
||||
return this.optionItemCounts[index];
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
|
||||
public class ItemUseCombineItem extends ItemUseInt {
|
||||
private int resultId = 0;
|
||||
private int resultCount = 1;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_COMBINE_ITEM;
|
||||
}
|
||||
|
||||
public ItemUseCombineItem(String[] useParam) {
|
||||
super(useParam);
|
||||
try {
|
||||
this.resultId = Integer.parseInt(useParam[1]);
|
||||
} catch (NumberFormatException ignored) {}
|
||||
try {
|
||||
this.resultCount = Integer.parseInt(useParam[2]);
|
||||
} catch (NumberFormatException ignored) {}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useItem(UseItemParams params) {
|
||||
if (params.count != this.i) return false; // Wrong amount of fragments supplied!
|
||||
return params.player.getInventory().addItem(this.resultId, this.resultCount);
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package emu.grasscutter.game.props.ItemUseAction;
|
||||
|
||||
import emu.grasscutter.game.avatar.Avatar;
|
||||
import emu.grasscutter.game.props.ItemUseOp;
|
||||
import emu.grasscutter.game.systems.InventorySystem;
|
||||
|
||||
public class ItemUseGainAvatar extends ItemUseInt {
|
||||
private int level = 1;
|
||||
private int constellation = 0;
|
||||
|
||||
@Override
|
||||
public ItemUseOp getItemUseOp() {
|
||||
return ItemUseOp.ITEM_USE_GAIN_AVATAR;
|
||||
}
|
||||
|
||||
public ItemUseGainAvatar(String[] useParam) {
|
||||
super(useParam);
|
||||
try {
|
||||
this.level = Integer.parseInt(useParam[1]);
|
||||
} catch (NumberFormatException ignored) {}
|
||||
try {
|
||||
this.constellation = Integer.parseInt(useParam[2]);
|
||||
} catch (NumberFormatException ignored) {}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useItem(UseItemParams params) {
|
||||
int haveConstellation = InventorySystem.checkPlayerAvatarConstellationLevel(params.player, this.i);
|
||||
if (haveConstellation == -2 || haveConstellation >= 6) {
|
||||
return false;
|
||||
} else if (haveConstellation == -1) {
|
||||
var avatar = new Avatar(this.i);
|
||||
avatar.setLevel(this.level);
|
||||
avatar.forceConstellationLevel(this.constellation);
|
||||
avatar.recalcStats();
|
||||
params.player.addAvatar(avatar);
|
||||
return true;
|
||||
} else {
|
||||
int itemId = (this.i % 1000) + 100;
|
||||
return params.player.getInventory().addItem(itemId);
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user