Implement mass limit break

This commit is contained in:
Melledy
2025-11-18 05:32:31 -08:00
parent 9777f4fc3c
commit 2cd276f091
4 changed files with 103 additions and 7 deletions

View File

@@ -7,15 +7,12 @@ import emu.nebula.GameConstants;
import emu.nebula.proto.AnyOuterClass.Any;
import emu.nebula.proto.Public.ChangeInfo;
import lombok.Getter;
import lombok.Setter;
import us.hebi.quickbuf.ProtoMessage;
@Getter
public class PlayerChangeInfo {
private boolean success;
private List<Any> list;
@Setter
private Object extraData;
public PlayerChangeInfo() {
@@ -30,6 +27,11 @@ public class PlayerChangeInfo {
public boolean isEmpty() {
return this.list == null || this.list.isEmpty();
}
public PlayerChangeInfo setExtraData(Object extraData) {
this.extraData = extraData;
return this;
}
public void add(ProtoMessage<?> proto) {
var any = Any.newInstance()
@@ -39,6 +41,10 @@ public class PlayerChangeInfo {
this.list.add(any);
}
public void add(PlayerChangeInfo otherChange) {
this.getList().addAll(otherChange.getList());
}
// Proto
public ChangeInfo toProto() {