mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-04 23:32:55 +08:00
Compare commits
2 Commits
8c53f2b679
...
2bb2da44bc
Author | SHA1 | Date | |
---|---|---|---|
|
2bb2da44bc | ||
|
bfc2c7c096 |
@ -8,7 +8,7 @@ import lombok.Getter;
|
||||
|
||||
@ResourceType(name = "RewardPreviewExcelConfigData.json", loadPriority = LoadPriority.HIGH)
|
||||
public class RewardPreviewData extends GameResource {
|
||||
@Getter(onMethod_ = @Override)
|
||||
@Getter(onMethod = @__(@Override))
|
||||
private int id;
|
||||
|
||||
private ItemParamStringData[] previewItems;
|
||||
|
@ -13,7 +13,6 @@ import lombok.experimental.FieldDefaults;
|
||||
|
||||
@Getter
|
||||
@ResourceType(name = "QuestExcelConfigData.json")
|
||||
@Getter
|
||||
@ToString
|
||||
public class QuestData extends GameResource {
|
||||
private int subId;
|
||||
|
@ -8,7 +8,7 @@ import lombok.Getter;
|
||||
@ResourceType(name = "ReliquaryMainPropExcelConfigData.json")
|
||||
@Getter
|
||||
public class ReliquaryMainPropData extends GameResource {
|
||||
@Getter(onMethod_ = @Override)
|
||||
@Getter(onMethod = @__(@Override))
|
||||
private int id;
|
||||
|
||||
private int propDepotId;
|
||||
|
@ -9,7 +9,7 @@ import lombok.Getter;
|
||||
@ResourceType(name = "SceneExcelConfigData.json")
|
||||
@Getter
|
||||
public final class SceneData extends GameResource {
|
||||
@Getter(onMethod_ = @Override)
|
||||
@Getter(onMethod = @__(@Override))
|
||||
private int id;
|
||||
|
||||
@SerializedName("type")
|
||||
|
@ -8,7 +8,7 @@ import lombok.Getter;
|
||||
@ResourceType(name = "SceneTagConfigData.json")
|
||||
@Getter
|
||||
public final class SceneTagData extends GameResource {
|
||||
@Getter(onMethod_ = @Override)
|
||||
@Getter(onMethod = @__(@Override))
|
||||
private int id;
|
||||
|
||||
@SerializedName("DJCOAOBDIHP")
|
||||
|
@ -10,7 +10,7 @@ import lombok.experimental.FieldDefaults;
|
||||
@Data
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class TrialAvatarActivityDataData extends GameResource {
|
||||
@Getter(onMethod_ = @Override)
|
||||
@Getter(onMethod = @__({@Override}))
|
||||
private int id;
|
||||
|
||||
private int trialAvatarIndexId;
|
||||
|
@ -93,8 +93,8 @@ public class FriendsList extends BasePlayerManager {
|
||||
|
||||
// Handle
|
||||
if (result == DealAddFriendResultType.DEAL_ADD_FRIEND_RESULT_TYPE_ACCEPT) { // Request accepted
|
||||
myFriendship.setIsFriend(true);
|
||||
theirFriendship.setIsFriend(true);
|
||||
myFriendship.setFriend(true);
|
||||
theirFriendship.setFriend(true);
|
||||
|
||||
this.getPendingFriends().remove(myFriendship.getOwnerId());
|
||||
this.addFriend(myFriendship);
|
||||
|
@ -7,19 +7,28 @@ 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.*;
|
||||
import emu.grasscutter.game.avatar.Avatar;
|
||||
import emu.grasscutter.game.avatar.AvatarStorage;
|
||||
import emu.grasscutter.game.entity.EntityAvatar;
|
||||
import emu.grasscutter.game.player.*;
|
||||
import emu.grasscutter.game.props.*;
|
||||
import emu.grasscutter.game.player.BasePlayerManager;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.props.ActionReason;
|
||||
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.net.proto.ItemParamOuterClass.ItemParam;
|
||||
import emu.grasscutter.server.event.player.PlayerObtainItemEvent;
|
||||
import emu.grasscutter.server.packet.send.*;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
import it.unimi.dsi.fastutil.ints.*;
|
||||
import it.unimi.dsi.fastutil.longs.*;
|
||||
import java.util.*;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||
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 lombok.Getter;
|
||||
import lombok.val;
|
||||
@ -447,6 +456,7 @@ public class Inventory extends BasePlayerManager implements Iterable<GameItem> {
|
||||
itemId); // What if we ever want to operate on weapons/relics/furniture? :Syield
|
||||
// (item == null) ? 0 : item.getCount(); // What if we ever want to
|
||||
// operate on weapons/relics/furniture? :S
|
||||
yield (item == null) ? 0 : item.getCount();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ public class BasePacket {
|
||||
@Setter @Getter private int opcode;
|
||||
private boolean shouldBuildHeader = false;
|
||||
@Setter @Getter private byte[] header;
|
||||
@Setter @Getter private byte[] data;
|
||||
@Getter private byte[] data;
|
||||
// Encryption
|
||||
@Setter private boolean useDispatchKey;
|
||||
|
||||
@ -48,6 +48,10 @@ public class BasePacket {
|
||||
this.data = proto.build().toByteArray();
|
||||
}
|
||||
|
||||
public void setData(byte[] packet) {
|
||||
this.data = packet;
|
||||
}
|
||||
|
||||
public BasePacket buildHeader(int clientSequence) {
|
||||
if (this.getHeader() != null && clientSequence == 0) {
|
||||
return this;
|
||||
|
Loading…
Reference in New Issue
Block a user