Compare commits

..

No commits in common. "2bb2da44bcaa5a5594905a36705ad7a22932e227" and "8c53f2b6796fc42a7dbe28677656beac6e26b72d" have entirely different histories.

9 changed files with 15 additions and 28 deletions

View File

@ -8,7 +8,7 @@ import lombok.Getter;
@ResourceType(name = "RewardPreviewExcelConfigData.json", loadPriority = LoadPriority.HIGH) @ResourceType(name = "RewardPreviewExcelConfigData.json", loadPriority = LoadPriority.HIGH)
public class RewardPreviewData extends GameResource { public class RewardPreviewData extends GameResource {
@Getter(onMethod = @__(@Override)) @Getter(onMethod_ = @Override)
private int id; private int id;
private ItemParamStringData[] previewItems; private ItemParamStringData[] previewItems;

View File

@ -13,6 +13,7 @@ import lombok.experimental.FieldDefaults;
@Getter @Getter
@ResourceType(name = "QuestExcelConfigData.json") @ResourceType(name = "QuestExcelConfigData.json")
@Getter
@ToString @ToString
public class QuestData extends GameResource { public class QuestData extends GameResource {
private int subId; private int subId;

View File

@ -8,7 +8,7 @@ import lombok.Getter;
@ResourceType(name = "ReliquaryMainPropExcelConfigData.json") @ResourceType(name = "ReliquaryMainPropExcelConfigData.json")
@Getter @Getter
public class ReliquaryMainPropData extends GameResource { public class ReliquaryMainPropData extends GameResource {
@Getter(onMethod = @__(@Override)) @Getter(onMethod_ = @Override)
private int id; private int id;
private int propDepotId; private int propDepotId;

View File

@ -9,7 +9,7 @@ import lombok.Getter;
@ResourceType(name = "SceneExcelConfigData.json") @ResourceType(name = "SceneExcelConfigData.json")
@Getter @Getter
public final class SceneData extends GameResource { public final class SceneData extends GameResource {
@Getter(onMethod = @__(@Override)) @Getter(onMethod_ = @Override)
private int id; private int id;
@SerializedName("type") @SerializedName("type")

View File

@ -8,7 +8,7 @@ import lombok.Getter;
@ResourceType(name = "SceneTagConfigData.json") @ResourceType(name = "SceneTagConfigData.json")
@Getter @Getter
public final class SceneTagData extends GameResource { public final class SceneTagData extends GameResource {
@Getter(onMethod = @__(@Override)) @Getter(onMethod_ = @Override)
private int id; private int id;
@SerializedName("DJCOAOBDIHP") @SerializedName("DJCOAOBDIHP")

View File

@ -10,7 +10,7 @@ import lombok.experimental.FieldDefaults;
@Data @Data
@FieldDefaults(level = AccessLevel.PRIVATE) @FieldDefaults(level = AccessLevel.PRIVATE)
public class TrialAvatarActivityDataData extends GameResource { public class TrialAvatarActivityDataData extends GameResource {
@Getter(onMethod = @__({@Override})) @Getter(onMethod_ = @Override)
private int id; private int id;
private int trialAvatarIndexId; private int trialAvatarIndexId;

View File

@ -93,8 +93,8 @@ public class FriendsList extends BasePlayerManager {
// Handle // Handle
if (result == DealAddFriendResultType.DEAL_ADD_FRIEND_RESULT_TYPE_ACCEPT) { // Request accepted if (result == DealAddFriendResultType.DEAL_ADD_FRIEND_RESULT_TYPE_ACCEPT) { // Request accepted
myFriendship.setFriend(true); myFriendship.setIsFriend(true);
theirFriendship.setFriend(true); theirFriendship.setIsFriend(true);
this.getPendingFriends().remove(myFriendship.getOwnerId()); this.getPendingFriends().remove(myFriendship.getOwnerId());
this.addFriend(myFriendship); this.addFriend(myFriendship);

View File

@ -7,28 +7,19 @@ import emu.grasscutter.data.GameData;
import emu.grasscutter.data.common.ItemParamData; import emu.grasscutter.data.common.ItemParamData;
import emu.grasscutter.data.excels.ItemData; import emu.grasscutter.data.excels.ItemData;
import emu.grasscutter.database.DatabaseHelper; import emu.grasscutter.database.DatabaseHelper;
import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.avatar.*;
import emu.grasscutter.game.avatar.AvatarStorage;
import emu.grasscutter.game.entity.EntityAvatar; import emu.grasscutter.game.entity.EntityAvatar;
import emu.grasscutter.game.player.BasePlayerManager; import emu.grasscutter.game.player.*;
import emu.grasscutter.game.player.Player; import emu.grasscutter.game.props.*;
import emu.grasscutter.game.props.ActionReason;
import emu.grasscutter.game.props.ItemUseAction.UseItemParams; import emu.grasscutter.game.props.ItemUseAction.UseItemParams;
import emu.grasscutter.game.props.PlayerProperty;
import emu.grasscutter.game.props.WatcherTriggerType;
import emu.grasscutter.game.quest.enums.QuestContent; import emu.grasscutter.game.quest.enums.QuestContent;
import emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam; import emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam;
import emu.grasscutter.server.event.player.PlayerObtainItemEvent; import emu.grasscutter.server.event.player.PlayerObtainItemEvent;
import emu.grasscutter.server.packet.send.*; import emu.grasscutter.server.packet.send.*;
import emu.grasscutter.utils.Utils; import emu.grasscutter.utils.Utils;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.*;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.longs.*;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap; import java.util.*;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import lombok.Getter; import lombok.Getter;
import lombok.val; import lombok.val;
@ -456,7 +447,6 @@ public class Inventory extends BasePlayerManager implements Iterable<GameItem> {
itemId); // What if we ever want to operate on weapons/relics/furniture? :Syield itemId); // What if we ever want to operate on weapons/relics/furniture? :Syield
// (item == null) ? 0 : item.getCount(); // What if we ever want to // (item == null) ? 0 : item.getCount(); // What if we ever want to
// operate on weapons/relics/furniture? :S // operate on weapons/relics/furniture? :S
yield (item == null) ? 0 : item.getCount();
} }
}; };
} }

View File

@ -13,7 +13,7 @@ public class BasePacket {
@Setter @Getter private int opcode; @Setter @Getter private int opcode;
private boolean shouldBuildHeader = false; private boolean shouldBuildHeader = false;
@Setter @Getter private byte[] header; @Setter @Getter private byte[] header;
@Getter private byte[] data; @Setter @Getter private byte[] data;
// Encryption // Encryption
@Setter private boolean useDispatchKey; @Setter private boolean useDispatchKey;
@ -48,10 +48,6 @@ public class BasePacket {
this.data = proto.build().toByteArray(); this.data = proto.build().toByteArray();
} }
public void setData(byte[] packet) {
this.data = packet;
}
public BasePacket buildHeader(int clientSequence) { public BasePacket buildHeader(int clientSequence) {
if (this.getHeader() != null && clientSequence == 0) { if (this.getHeader() != null && clientSequence == 0) {
return this; return this;