Merge pull request #49 from Grasscutters/dev-abilities

Fix character abilities not showing for others in co-op/lasting too long
This commit is contained in:
Melledy 2022-04-20 05:15:32 -07:00 committed by GitHub
commit 337ed4c197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1738 additions and 1 deletions

View File

@ -38,6 +38,7 @@ import emu.grasscutter.server.packet.send.PacketAvatarAddNotify;
import emu.grasscutter.server.packet.send.PacketAvatarDataNotify;
import emu.grasscutter.server.packet.send.PacketAvatarGainCostumeNotify;
import emu.grasscutter.server.packet.send.PacketAvatarGainFlycloakNotify;
import emu.grasscutter.server.packet.send.PacketClientAbilityInitFinishNotify;
import emu.grasscutter.server.packet.send.PacketCombatInvocationsNotify;
import emu.grasscutter.server.packet.send.PacketGadgetInteractRsp;
import emu.grasscutter.server.packet.send.PacketItemAddHintNotify;
@ -104,6 +105,7 @@ public class GenshinPlayer {
@Transient private final Int2ObjectMap<CoopRequest> coopRequests;
@Transient private final InvokeHandler<CombatInvokeEntry> combatInvokeHandler;
@Transient private final InvokeHandler<AbilityInvokeEntry> abilityInvokeHandler;
@Transient private final InvokeHandler<AbilityInvokeEntry> clientAbilityInitFinishHandler;
@Deprecated @SuppressWarnings({ "rawtypes", "unchecked" }) // Morphia only!
public GenshinPlayer() {
@ -126,6 +128,7 @@ public class GenshinPlayer {
this.coopRequests = new Int2ObjectOpenHashMap<>();
this.combatInvokeHandler = new InvokeHandler(PacketCombatInvocationsNotify.class);
this.abilityInvokeHandler = new InvokeHandler(PacketAbilityInvocationsNotify.class);
this.clientAbilityInitFinishHandler = new InvokeHandler(PacketClientAbilityInitFinishNotify.class);
}
// On player creation
@ -389,6 +392,10 @@ public class GenshinPlayer {
return this.abilityInvokeHandler;
}
public InvokeHandler<AbilityInvokeEntry> getClientAbilityInitFinishHandler() {
return clientAbilityInitFinishHandler;
}
public void setMpSetting(MpSettingType mpSetting) {
this.mpSetting = mpSetting;
}

View File

@ -0,0 +1,923 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: EvtDoSkillSuccNotify.proto
package emu.grasscutter.net.proto;
public final class EvtDoSkillSuccNotifyOuterClass {
private EvtDoSkillSuccNotifyOuterClass() {}
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 EvtDoSkillSuccNotifyOrBuilder extends
// @@protoc_insertion_point(interface_extends:EvtDoSkillSuccNotify)
com.google.protobuf.MessageOrBuilder {
/**
* <code>.ForwardType forwardType = 1;</code>
* @return The enum numeric value on the wire for forwardType.
*/
int getForwardTypeValue();
/**
* <code>.ForwardType forwardType = 1;</code>
* @return The forwardType.
*/
emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType getForwardType();
/**
* <code>uint32 casterId = 2;</code>
* @return The casterId.
*/
int getCasterId();
/**
* <code>uint32 skillId = 3;</code>
* @return The skillId.
*/
int getSkillId();
/**
* <code>.Vector forward = 4;</code>
* @return Whether the forward field is set.
*/
boolean hasForward();
/**
* <code>.Vector forward = 4;</code>
* @return The forward.
*/
emu.grasscutter.net.proto.VectorOuterClass.Vector getForward();
/**
* <code>.Vector forward = 4;</code>
*/
emu.grasscutter.net.proto.VectorOuterClass.VectorOrBuilder getForwardOrBuilder();
}
/**
* Protobuf type {@code EvtDoSkillSuccNotify}
*/
public static final class EvtDoSkillSuccNotify extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:EvtDoSkillSuccNotify)
EvtDoSkillSuccNotifyOrBuilder {
private static final long serialVersionUID = 0L;
// Use EvtDoSkillSuccNotify.newBuilder() to construct.
private EvtDoSkillSuccNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private EvtDoSkillSuccNotify() {
forwardType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new EvtDoSkillSuccNotify();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private EvtDoSkillSuccNotify(
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: {
int rawValue = input.readEnum();
forwardType_ = rawValue;
break;
}
case 16: {
casterId_ = input.readUInt32();
break;
}
case 24: {
skillId_ = input.readUInt32();
break;
}
case 34: {
emu.grasscutter.net.proto.VectorOuterClass.Vector.Builder subBuilder = null;
if (forward_ != null) {
subBuilder = forward_.toBuilder();
}
forward_ = input.readMessage(emu.grasscutter.net.proto.VectorOuterClass.Vector.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(forward_);
forward_ = 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.EvtDoSkillSuccNotifyOuterClass.internal_static_EvtDoSkillSuccNotify_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.internal_static_EvtDoSkillSuccNotify_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify.class, emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify.Builder.class);
}
public static final int FORWARDTYPE_FIELD_NUMBER = 1;
private int forwardType_;
/**
* <code>.ForwardType forwardType = 1;</code>
* @return The enum numeric value on the wire for forwardType.
*/
@java.lang.Override public int getForwardTypeValue() {
return forwardType_;
}
/**
* <code>.ForwardType forwardType = 1;</code>
* @return The forwardType.
*/
@java.lang.Override public emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType getForwardType() {
@SuppressWarnings("deprecation")
emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType result = emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType.valueOf(forwardType_);
return result == null ? emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType.UNRECOGNIZED : result;
}
public static final int CASTERID_FIELD_NUMBER = 2;
private int casterId_;
/**
* <code>uint32 casterId = 2;</code>
* @return The casterId.
*/
@java.lang.Override
public int getCasterId() {
return casterId_;
}
public static final int SKILLID_FIELD_NUMBER = 3;
private int skillId_;
/**
* <code>uint32 skillId = 3;</code>
* @return The skillId.
*/
@java.lang.Override
public int getSkillId() {
return skillId_;
}
public static final int FORWARD_FIELD_NUMBER = 4;
private emu.grasscutter.net.proto.VectorOuterClass.Vector forward_;
/**
* <code>.Vector forward = 4;</code>
* @return Whether the forward field is set.
*/
@java.lang.Override
public boolean hasForward() {
return forward_ != null;
}
/**
* <code>.Vector forward = 4;</code>
* @return The forward.
*/
@java.lang.Override
public emu.grasscutter.net.proto.VectorOuterClass.Vector getForward() {
return forward_ == null ? emu.grasscutter.net.proto.VectorOuterClass.Vector.getDefaultInstance() : forward_;
}
/**
* <code>.Vector forward = 4;</code>
*/
@java.lang.Override
public emu.grasscutter.net.proto.VectorOuterClass.VectorOrBuilder getForwardOrBuilder() {
return getForward();
}
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 (forwardType_ != emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType.ForwardLocal.getNumber()) {
output.writeEnum(1, forwardType_);
}
if (casterId_ != 0) {
output.writeUInt32(2, casterId_);
}
if (skillId_ != 0) {
output.writeUInt32(3, skillId_);
}
if (forward_ != null) {
output.writeMessage(4, getForward());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (forwardType_ != emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType.ForwardLocal.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, forwardType_);
}
if (casterId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, casterId_);
}
if (skillId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, skillId_);
}
if (forward_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getForward());
}
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.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify)) {
return super.equals(obj);
}
emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify other = (emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify) obj;
if (forwardType_ != other.forwardType_) return false;
if (getCasterId()
!= other.getCasterId()) return false;
if (getSkillId()
!= other.getSkillId()) return false;
if (hasForward() != other.hasForward()) return false;
if (hasForward()) {
if (!getForward()
.equals(other.getForward())) 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) + FORWARDTYPE_FIELD_NUMBER;
hash = (53 * hash) + forwardType_;
hash = (37 * hash) + CASTERID_FIELD_NUMBER;
hash = (53 * hash) + getCasterId();
hash = (37 * hash) + SKILLID_FIELD_NUMBER;
hash = (53 * hash) + getSkillId();
if (hasForward()) {
hash = (37 * hash) + FORWARD_FIELD_NUMBER;
hash = (53 * hash) + getForward().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify 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.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify 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.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify 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.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify 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.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify 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.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify 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 EvtDoSkillSuccNotify}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:EvtDoSkillSuccNotify)
emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotifyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.internal_static_EvtDoSkillSuccNotify_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.internal_static_EvtDoSkillSuccNotify_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify.class, emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify.Builder.class);
}
// Construct using emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify.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();
forwardType_ = 0;
casterId_ = 0;
skillId_ = 0;
if (forwardBuilder_ == null) {
forward_ = null;
} else {
forward_ = null;
forwardBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.internal_static_EvtDoSkillSuccNotify_descriptor;
}
@java.lang.Override
public emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify getDefaultInstanceForType() {
return emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify.getDefaultInstance();
}
@java.lang.Override
public emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify build() {
emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify buildPartial() {
emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify result = new emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify(this);
result.forwardType_ = forwardType_;
result.casterId_ = casterId_;
result.skillId_ = skillId_;
if (forwardBuilder_ == null) {
result.forward_ = forward_;
} else {
result.forward_ = forwardBuilder_.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.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify) {
return mergeFrom((emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify other) {
if (other == emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify.getDefaultInstance()) return this;
if (other.forwardType_ != 0) {
setForwardTypeValue(other.getForwardTypeValue());
}
if (other.getCasterId() != 0) {
setCasterId(other.getCasterId());
}
if (other.getSkillId() != 0) {
setSkillId(other.getSkillId());
}
if (other.hasForward()) {
mergeForward(other.getForward());
}
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.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int forwardType_ = 0;
/**
* <code>.ForwardType forwardType = 1;</code>
* @return The enum numeric value on the wire for forwardType.
*/
@java.lang.Override public int getForwardTypeValue() {
return forwardType_;
}
/**
* <code>.ForwardType forwardType = 1;</code>
* @param value The enum numeric value on the wire for forwardType to set.
* @return This builder for chaining.
*/
public Builder setForwardTypeValue(int value) {
forwardType_ = value;
onChanged();
return this;
}
/**
* <code>.ForwardType forwardType = 1;</code>
* @return The forwardType.
*/
@java.lang.Override
public emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType getForwardType() {
@SuppressWarnings("deprecation")
emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType result = emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType.valueOf(forwardType_);
return result == null ? emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType.UNRECOGNIZED : result;
}
/**
* <code>.ForwardType forwardType = 1;</code>
* @param value The forwardType to set.
* @return This builder for chaining.
*/
public Builder setForwardType(emu.grasscutter.net.proto.ForwardTypeOuterClass.ForwardType value) {
if (value == null) {
throw new NullPointerException();
}
forwardType_ = value.getNumber();
onChanged();
return this;
}
/**
* <code>.ForwardType forwardType = 1;</code>
* @return This builder for chaining.
*/
public Builder clearForwardType() {
forwardType_ = 0;
onChanged();
return this;
}
private int casterId_ ;
/**
* <code>uint32 casterId = 2;</code>
* @return The casterId.
*/
@java.lang.Override
public int getCasterId() {
return casterId_;
}
/**
* <code>uint32 casterId = 2;</code>
* @param value The casterId to set.
* @return This builder for chaining.
*/
public Builder setCasterId(int value) {
casterId_ = value;
onChanged();
return this;
}
/**
* <code>uint32 casterId = 2;</code>
* @return This builder for chaining.
*/
public Builder clearCasterId() {
casterId_ = 0;
onChanged();
return this;
}
private int skillId_ ;
/**
* <code>uint32 skillId = 3;</code>
* @return The skillId.
*/
@java.lang.Override
public int getSkillId() {
return skillId_;
}
/**
* <code>uint32 skillId = 3;</code>
* @param value The skillId to set.
* @return This builder for chaining.
*/
public Builder setSkillId(int value) {
skillId_ = value;
onChanged();
return this;
}
/**
* <code>uint32 skillId = 3;</code>
* @return This builder for chaining.
*/
public Builder clearSkillId() {
skillId_ = 0;
onChanged();
return this;
}
private emu.grasscutter.net.proto.VectorOuterClass.Vector forward_;
private com.google.protobuf.SingleFieldBuilderV3<
emu.grasscutter.net.proto.VectorOuterClass.Vector, emu.grasscutter.net.proto.VectorOuterClass.Vector.Builder, emu.grasscutter.net.proto.VectorOuterClass.VectorOrBuilder> forwardBuilder_;
/**
* <code>.Vector forward = 4;</code>
* @return Whether the forward field is set.
*/
public boolean hasForward() {
return forwardBuilder_ != null || forward_ != null;
}
/**
* <code>.Vector forward = 4;</code>
* @return The forward.
*/
public emu.grasscutter.net.proto.VectorOuterClass.Vector getForward() {
if (forwardBuilder_ == null) {
return forward_ == null ? emu.grasscutter.net.proto.VectorOuterClass.Vector.getDefaultInstance() : forward_;
} else {
return forwardBuilder_.getMessage();
}
}
/**
* <code>.Vector forward = 4;</code>
*/
public Builder setForward(emu.grasscutter.net.proto.VectorOuterClass.Vector value) {
if (forwardBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
forward_ = value;
onChanged();
} else {
forwardBuilder_.setMessage(value);
}
return this;
}
/**
* <code>.Vector forward = 4;</code>
*/
public Builder setForward(
emu.grasscutter.net.proto.VectorOuterClass.Vector.Builder builderForValue) {
if (forwardBuilder_ == null) {
forward_ = builderForValue.build();
onChanged();
} else {
forwardBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <code>.Vector forward = 4;</code>
*/
public Builder mergeForward(emu.grasscutter.net.proto.VectorOuterClass.Vector value) {
if (forwardBuilder_ == null) {
if (forward_ != null) {
forward_ =
emu.grasscutter.net.proto.VectorOuterClass.Vector.newBuilder(forward_).mergeFrom(value).buildPartial();
} else {
forward_ = value;
}
onChanged();
} else {
forwardBuilder_.mergeFrom(value);
}
return this;
}
/**
* <code>.Vector forward = 4;</code>
*/
public Builder clearForward() {
if (forwardBuilder_ == null) {
forward_ = null;
onChanged();
} else {
forward_ = null;
forwardBuilder_ = null;
}
return this;
}
/**
* <code>.Vector forward = 4;</code>
*/
public emu.grasscutter.net.proto.VectorOuterClass.Vector.Builder getForwardBuilder() {
onChanged();
return getForwardFieldBuilder().getBuilder();
}
/**
* <code>.Vector forward = 4;</code>
*/
public emu.grasscutter.net.proto.VectorOuterClass.VectorOrBuilder getForwardOrBuilder() {
if (forwardBuilder_ != null) {
return forwardBuilder_.getMessageOrBuilder();
} else {
return forward_ == null ?
emu.grasscutter.net.proto.VectorOuterClass.Vector.getDefaultInstance() : forward_;
}
}
/**
* <code>.Vector forward = 4;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
emu.grasscutter.net.proto.VectorOuterClass.Vector, emu.grasscutter.net.proto.VectorOuterClass.Vector.Builder, emu.grasscutter.net.proto.VectorOuterClass.VectorOrBuilder>
getForwardFieldBuilder() {
if (forwardBuilder_ == null) {
forwardBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
emu.grasscutter.net.proto.VectorOuterClass.Vector, emu.grasscutter.net.proto.VectorOuterClass.Vector.Builder, emu.grasscutter.net.proto.VectorOuterClass.VectorOrBuilder>(
getForward(),
getParentForChildren(),
isClean());
forward_ = null;
}
return forwardBuilder_;
}
@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:EvtDoSkillSuccNotify)
}
// @@protoc_insertion_point(class_scope:EvtDoSkillSuccNotify)
private static final emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify();
}
public static emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<EvtDoSkillSuccNotify>
PARSER = new com.google.protobuf.AbstractParser<EvtDoSkillSuccNotify>() {
@java.lang.Override
public EvtDoSkillSuccNotify parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new EvtDoSkillSuccNotify(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<EvtDoSkillSuccNotify> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<EvtDoSkillSuccNotify> getParserForType() {
return PARSER;
}
@java.lang.Override
public emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_EvtDoSkillSuccNotify_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_EvtDoSkillSuccNotify_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\032EvtDoSkillSuccNotify.proto\032\021ForwardTyp" +
"e.proto\032\014Vector.proto\"v\n\024EvtDoSkillSuccN" +
"otify\022!\n\013forwardType\030\001 \001(\0162\014.ForwardType" +
"\022\020\n\010casterId\030\002 \001(\r\022\017\n\007skillId\030\003 \001(\r\022\030\n\007f" +
"orward\030\004 \001(\0132\007.VectorB\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.ForwardTypeOuterClass.getDescriptor(),
emu.grasscutter.net.proto.VectorOuterClass.getDescriptor(),
});
internal_static_EvtDoSkillSuccNotify_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_EvtDoSkillSuccNotify_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_EvtDoSkillSuccNotify_descriptor,
new java.lang.String[] { "ForwardType", "CasterId", "SkillId", "Forward", });
emu.grasscutter.net.proto.ForwardTypeOuterClass.getDescriptor();
emu.grasscutter.net.proto.VectorOuterClass.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,743 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: SetEntityClientDataNotify.proto
package emu.grasscutter.net.proto;
public final class SetEntityClientDataNotifyOuterClass {
private SetEntityClientDataNotifyOuterClass() {}
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 SetEntityClientDataNotifyOrBuilder extends
// @@protoc_insertion_point(interface_extends:SetEntityClientDataNotify)
com.google.protobuf.MessageOrBuilder {
/**
* <code>uint32 entityId = 1;</code>
* @return The entityId.
*/
int getEntityId();
/**
* <code>.EntityClientData entityClientData = 2;</code>
* @return Whether the entityClientData field is set.
*/
boolean hasEntityClientData();
/**
* <code>.EntityClientData entityClientData = 2;</code>
* @return The entityClientData.
*/
emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData getEntityClientData();
/**
* <code>.EntityClientData entityClientData = 2;</code>
*/
emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientDataOrBuilder getEntityClientDataOrBuilder();
}
/**
* Protobuf type {@code SetEntityClientDataNotify}
*/
public static final class SetEntityClientDataNotify extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:SetEntityClientDataNotify)
SetEntityClientDataNotifyOrBuilder {
private static final long serialVersionUID = 0L;
// Use SetEntityClientDataNotify.newBuilder() to construct.
private SetEntityClientDataNotify(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private SetEntityClientDataNotify() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SetEntityClientDataNotify();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SetEntityClientDataNotify(
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: {
entityId_ = input.readUInt32();
break;
}
case 18: {
emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.Builder subBuilder = null;
if (entityClientData_ != null) {
subBuilder = entityClientData_.toBuilder();
}
entityClientData_ = input.readMessage(emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(entityClientData_);
entityClientData_ = 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.SetEntityClientDataNotifyOuterClass.internal_static_SetEntityClientDataNotify_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.internal_static_SetEntityClientDataNotify_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify.class, emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify.Builder.class);
}
public static final int ENTITYID_FIELD_NUMBER = 1;
private int entityId_;
/**
* <code>uint32 entityId = 1;</code>
* @return The entityId.
*/
@java.lang.Override
public int getEntityId() {
return entityId_;
}
public static final int ENTITYCLIENTDATA_FIELD_NUMBER = 2;
private emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData entityClientData_;
/**
* <code>.EntityClientData entityClientData = 2;</code>
* @return Whether the entityClientData field is set.
*/
@java.lang.Override
public boolean hasEntityClientData() {
return entityClientData_ != null;
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
* @return The entityClientData.
*/
@java.lang.Override
public emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData getEntityClientData() {
return entityClientData_ == null ? emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.getDefaultInstance() : entityClientData_;
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
*/
@java.lang.Override
public emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientDataOrBuilder getEntityClientDataOrBuilder() {
return getEntityClientData();
}
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(1, entityId_);
}
if (entityClientData_ != null) {
output.writeMessage(2, getEntityClientData());
}
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(1, entityId_);
}
if (entityClientData_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getEntityClientData());
}
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.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify)) {
return super.equals(obj);
}
emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify other = (emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify) obj;
if (getEntityId()
!= other.getEntityId()) return false;
if (hasEntityClientData() != other.hasEntityClientData()) return false;
if (hasEntityClientData()) {
if (!getEntityClientData()
.equals(other.getEntityClientData())) 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) + ENTITYID_FIELD_NUMBER;
hash = (53 * hash) + getEntityId();
if (hasEntityClientData()) {
hash = (37 * hash) + ENTITYCLIENTDATA_FIELD_NUMBER;
hash = (53 * hash) + getEntityClientData().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify 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.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify 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.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify 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.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify 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.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify 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.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify 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 SetEntityClientDataNotify}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:SetEntityClientDataNotify)
emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotifyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.internal_static_SetEntityClientDataNotify_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.internal_static_SetEntityClientDataNotify_fieldAccessorTable
.ensureFieldAccessorsInitialized(
emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify.class, emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify.Builder.class);
}
// Construct using emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify.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;
if (entityClientDataBuilder_ == null) {
entityClientData_ = null;
} else {
entityClientData_ = null;
entityClientDataBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.internal_static_SetEntityClientDataNotify_descriptor;
}
@java.lang.Override
public emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify getDefaultInstanceForType() {
return emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify.getDefaultInstance();
}
@java.lang.Override
public emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify build() {
emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify buildPartial() {
emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify result = new emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify(this);
result.entityId_ = entityId_;
if (entityClientDataBuilder_ == null) {
result.entityClientData_ = entityClientData_;
} else {
result.entityClientData_ = entityClientDataBuilder_.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.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify) {
return mergeFrom((emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify other) {
if (other == emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify.getDefaultInstance()) return this;
if (other.getEntityId() != 0) {
setEntityId(other.getEntityId());
}
if (other.hasEntityClientData()) {
mergeEntityClientData(other.getEntityClientData());
}
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.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int entityId_ ;
/**
* <code>uint32 entityId = 1;</code>
* @return The entityId.
*/
@java.lang.Override
public int getEntityId() {
return entityId_;
}
/**
* <code>uint32 entityId = 1;</code>
* @param value The entityId to set.
* @return This builder for chaining.
*/
public Builder setEntityId(int value) {
entityId_ = value;
onChanged();
return this;
}
/**
* <code>uint32 entityId = 1;</code>
* @return This builder for chaining.
*/
public Builder clearEntityId() {
entityId_ = 0;
onChanged();
return this;
}
private emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData entityClientData_;
private com.google.protobuf.SingleFieldBuilderV3<
emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData, emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.Builder, emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientDataOrBuilder> entityClientDataBuilder_;
/**
* <code>.EntityClientData entityClientData = 2;</code>
* @return Whether the entityClientData field is set.
*/
public boolean hasEntityClientData() {
return entityClientDataBuilder_ != null || entityClientData_ != null;
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
* @return The entityClientData.
*/
public emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData getEntityClientData() {
if (entityClientDataBuilder_ == null) {
return entityClientData_ == null ? emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.getDefaultInstance() : entityClientData_;
} else {
return entityClientDataBuilder_.getMessage();
}
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
*/
public Builder setEntityClientData(emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData value) {
if (entityClientDataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
entityClientData_ = value;
onChanged();
} else {
entityClientDataBuilder_.setMessage(value);
}
return this;
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
*/
public Builder setEntityClientData(
emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.Builder builderForValue) {
if (entityClientDataBuilder_ == null) {
entityClientData_ = builderForValue.build();
onChanged();
} else {
entityClientDataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
*/
public Builder mergeEntityClientData(emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData value) {
if (entityClientDataBuilder_ == null) {
if (entityClientData_ != null) {
entityClientData_ =
emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.newBuilder(entityClientData_).mergeFrom(value).buildPartial();
} else {
entityClientData_ = value;
}
onChanged();
} else {
entityClientDataBuilder_.mergeFrom(value);
}
return this;
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
*/
public Builder clearEntityClientData() {
if (entityClientDataBuilder_ == null) {
entityClientData_ = null;
onChanged();
} else {
entityClientData_ = null;
entityClientDataBuilder_ = null;
}
return this;
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
*/
public emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.Builder getEntityClientDataBuilder() {
onChanged();
return getEntityClientDataFieldBuilder().getBuilder();
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
*/
public emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientDataOrBuilder getEntityClientDataOrBuilder() {
if (entityClientDataBuilder_ != null) {
return entityClientDataBuilder_.getMessageOrBuilder();
} else {
return entityClientData_ == null ?
emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.getDefaultInstance() : entityClientData_;
}
}
/**
* <code>.EntityClientData entityClientData = 2;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData, emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.Builder, emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientDataOrBuilder>
getEntityClientDataFieldBuilder() {
if (entityClientDataBuilder_ == null) {
entityClientDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData, emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientData.Builder, emu.grasscutter.net.proto.EntityClientDataOuterClass.EntityClientDataOrBuilder>(
getEntityClientData(),
getParentForChildren(),
isClean());
entityClientData_ = null;
}
return entityClientDataBuilder_;
}
@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:SetEntityClientDataNotify)
}
// @@protoc_insertion_point(class_scope:SetEntityClientDataNotify)
private static final emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify();
}
public static emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<SetEntityClientDataNotify>
PARSER = new com.google.protobuf.AbstractParser<SetEntityClientDataNotify>() {
@java.lang.Override
public SetEntityClientDataNotify parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SetEntityClientDataNotify(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<SetEntityClientDataNotify> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<SetEntityClientDataNotify> getParserForType() {
return PARSER;
}
@java.lang.Override
public emu.grasscutter.net.proto.SetEntityClientDataNotifyOuterClass.SetEntityClientDataNotify getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_SetEntityClientDataNotify_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_SetEntityClientDataNotify_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\037SetEntityClientDataNotify.proto\032\026Entit" +
"yClientData.proto\"Z\n\031SetEntityClientData" +
"Notify\022\020\n\010entityId\030\001 \001(\r\022+\n\020entityClient" +
"Data\030\002 \001(\0132\021.EntityClientDataB\033\n\031emu.gra" +
"sscutter.net.protob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
emu.grasscutter.net.proto.EntityClientDataOuterClass.getDescriptor(),
});
internal_static_SetEntityClientDataNotify_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_SetEntityClientDataNotify_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_SetEntityClientDataNotify_descriptor,
new java.lang.String[] { "EntityId", "EntityClientData", });
emu.grasscutter.net.proto.EntityClientDataOuterClass.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,26 @@
package emu.grasscutter.server.packet.recv;
import emu.grasscutter.net.packet.Opcodes;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.AbilityInvokeEntryOuterClass.AbilityInvokeEntry;
import emu.grasscutter.net.proto.ClientAbilityInitFinishNotifyOuterClass.ClientAbilityInitFinishNotify;
import emu.grasscutter.net.packet.PacketHandler;
import emu.grasscutter.server.game.GameSession;
@Opcodes(PacketOpcodes.ClientAbilityInitFinishNotify)
public class HandlerClientAbilityInitFinishNotify extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
ClientAbilityInitFinishNotify notif = ClientAbilityInitFinishNotify.parseFrom(payload);
for (AbilityInvokeEntry entry : notif.getInvokesList()) {
session.getPlayer().getClientAbilityInitFinishHandler().addEntry(entry.getForwardType(), entry);
}
if (notif.getInvokesList().size() > 0) {
session.getPlayer().getClientAbilityInitFinishHandler().update(session.getPlayer());
}
}
}

View File

@ -1,5 +1,6 @@
package emu.grasscutter.server.packet.recv;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.Opcodes;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.packet.PacketHandler;
@ -10,7 +11,15 @@ public class HandlerSetEntityClientDataNotify extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
// Auto template
// Skip if there is no one to broadcast it too
if (session.getPlayer().getScene().getPlayerCount() <= 1) {
return;
}
GenshinPacket packet = new GenshinPacket(PacketOpcodes.SetEntityClientDataNotify, true);
packet.setData(payload);
session.getPlayer().getScene().broadcastPacketToOthers(session.getPlayer(), packet);
}
}

View File

@ -0,0 +1,29 @@
package emu.grasscutter.server.packet.send;
import java.util.List;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.AbilityInvokeEntryOuterClass.AbilityInvokeEntry;
import emu.grasscutter.net.proto.ClientAbilityInitFinishNotifyOuterClass.ClientAbilityInitFinishNotify;
public class PacketClientAbilityInitFinishNotify extends GenshinPacket {
public PacketClientAbilityInitFinishNotify(List<AbilityInvokeEntry> entries) {
super(PacketOpcodes.ClientAbilityInitFinishNotify, true);
int entityId = 0;
if (entries.size() > 0) {
AbilityInvokeEntry entry = entries.get(0);
entityId = entry.getEntityId();
}
ClientAbilityInitFinishNotify proto = ClientAbilityInitFinishNotify.newBuilder()
.setEntityId(entityId)
.addAllInvokes(entries)
.build();
this.setData(proto);
}
}