mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-07-03 21:43:32 +00:00
Compare commits
4 Commits
unstable
...
LintRatche
Author | SHA1 | Date | |
---|---|---|---|
beeaad0034 | |||
2be002057e | |||
4213cf6dea | |||
5287882f45 |
@ -43,7 +43,7 @@ sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
group = 'xyz.grasscutters'
|
||||
version = '1.4.5-dev'
|
||||
version = '1.4.6-dev'
|
||||
|
||||
sourceCompatibility = 17
|
||||
targetCompatibility = 17
|
||||
|
@ -8,31 +8,31 @@ import java.util.stream.Stream;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface ResourceType {
|
||||
|
||||
/** Names of the file that this Resource loads from */
|
||||
String[] name();
|
||||
/** Names of the file that this Resource loads from */
|
||||
String[] name();
|
||||
|
||||
/** Load priority - dictates which order to load this resource, with "highest" being loaded first */
|
||||
LoadPriority loadPriority() default LoadPriority.NORMAL;
|
||||
/** Load priority - dictates which order to load this resource, with "highest" being loaded first */
|
||||
LoadPriority loadPriority() default LoadPriority.NORMAL;
|
||||
|
||||
public enum LoadPriority {
|
||||
HIGHEST (4),
|
||||
HIGH (3),
|
||||
NORMAL (2),
|
||||
LOW (1),
|
||||
LOWEST (0);
|
||||
public enum LoadPriority {
|
||||
HIGHEST (4),
|
||||
HIGH (3),
|
||||
NORMAL (2),
|
||||
LOW (1),
|
||||
LOWEST (0);
|
||||
|
||||
private final int value;
|
||||
private final int value;
|
||||
|
||||
LoadPriority(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
LoadPriority(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
public int value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static List<LoadPriority> getInOrder() {
|
||||
return Stream.of(LoadPriority.values()).sorted((x, y) -> y.value() - x.value()).toList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,12 +32,12 @@ public class MusicGameBeatmap {
|
||||
|
||||
List<List<BeatmapNote>> beatmap;
|
||||
|
||||
public static MusicGameBeatmap getByShareId(long musicShareId){
|
||||
public static MusicGameBeatmap getByShareId(long musicShareId) {
|
||||
return DatabaseHelper.getMusicGameBeatmap(musicShareId);
|
||||
}
|
||||
|
||||
public void save(){
|
||||
if(musicShareId == 0){
|
||||
public void save() {
|
||||
if (musicShareId == 0) {
|
||||
musicShareId = new Random().nextLong(100000000000000L,999999999999999L);
|
||||
}
|
||||
DatabaseHelper.saveMusicGameBeatmap(this);
|
||||
@ -51,7 +51,7 @@ public class MusicGameBeatmap {
|
||||
.toList();
|
||||
}
|
||||
|
||||
public UgcMusicRecordOuterClass.UgcMusicRecord toProto(){
|
||||
public UgcMusicRecordOuterClass.UgcMusicRecord toProto() {
|
||||
return UgcMusicRecordOuterClass.UgcMusicRecord.newBuilder()
|
||||
.setMusicId(musicId)
|
||||
.addAllMusicTrackList(beatmap.stream()
|
||||
@ -60,7 +60,7 @@ public class MusicGameBeatmap {
|
||||
.build();
|
||||
}
|
||||
|
||||
public UgcMusicBriefInfoOuterClass.UgcMusicBriefInfo.Builder toBriefProto(){
|
||||
public UgcMusicBriefInfoOuterClass.UgcMusicBriefInfo.Builder toBriefProto() {
|
||||
var player = DatabaseHelper.getPlayerByUid(authorUid);
|
||||
|
||||
return UgcMusicBriefInfoOuterClass.UgcMusicBriefInfo.newBuilder()
|
||||
@ -73,7 +73,7 @@ public class MusicGameBeatmap {
|
||||
.setVersion(1);
|
||||
}
|
||||
|
||||
private UgcMusicTrackOuterClass.UgcMusicTrack musicBeatmapListToProto(List<BeatmapNote> beatmapNoteList){
|
||||
private UgcMusicTrackOuterClass.UgcMusicTrack musicBeatmapListToProto(List<BeatmapNote> beatmapNoteList) {
|
||||
return UgcMusicTrackOuterClass.UgcMusicTrack.newBuilder()
|
||||
.addAllMusicNoteList(beatmapNoteList.stream()
|
||||
.map(BeatmapNote::toProto)
|
||||
@ -89,14 +89,14 @@ public class MusicGameBeatmap {
|
||||
int startTime;
|
||||
int endTime;
|
||||
|
||||
public static BeatmapNote parse(UgcMusicNoteOuterClass.UgcMusicNote note){
|
||||
public static BeatmapNote parse(UgcMusicNoteOuterClass.UgcMusicNote note) {
|
||||
return BeatmapNote.of()
|
||||
.startTime(note.getStartTime())
|
||||
.endTime(note.getEndTime())
|
||||
.build();
|
||||
}
|
||||
|
||||
public UgcMusicNoteOuterClass.UgcMusicNote toProto(){
|
||||
public UgcMusicNoteOuterClass.UgcMusicNote toProto() {
|
||||
return UgcMusicNoteOuterClass.UgcMusicNote.newBuilder()
|
||||
.setStartTime(startTime)
|
||||
.setEndTime(endTime)
|
||||
|
@ -12,98 +12,98 @@ import emu.grasscutter.net.proto.ProfilePictureOuterClass.ProfilePicture;
|
||||
|
||||
@Entity(value = "friendships", useDiscriminator = false)
|
||||
public class Friendship {
|
||||
@Id private ObjectId id;
|
||||
@Id private ObjectId id;
|
||||
|
||||
@Transient private Player owner;
|
||||
@Transient private Player owner;
|
||||
|
||||
@Indexed private int ownerId;
|
||||
@Indexed private int friendId;
|
||||
private boolean isFriend;
|
||||
private int askerId;
|
||||
@Indexed private int ownerId;
|
||||
@Indexed private int friendId;
|
||||
private boolean isFriend;
|
||||
private int askerId;
|
||||
|
||||
private PlayerProfile profile;
|
||||
private PlayerProfile profile;
|
||||
|
||||
@Deprecated // Morphia use only
|
||||
public Friendship() { }
|
||||
@Deprecated // Morphia use only
|
||||
public Friendship() { }
|
||||
|
||||
public Friendship(Player owner, Player friend, Player asker) {
|
||||
this.setOwner(owner);
|
||||
this.ownerId = owner.getUid();
|
||||
this.friendId = friend.getUid();
|
||||
this.profile = friend.getProfile();
|
||||
this.askerId = asker.getUid();
|
||||
}
|
||||
public Friendship(Player owner, Player friend, Player asker) {
|
||||
this.setOwner(owner);
|
||||
this.ownerId = owner.getUid();
|
||||
this.friendId = friend.getUid();
|
||||
this.profile = friend.getProfile();
|
||||
this.askerId = asker.getUid();
|
||||
}
|
||||
|
||||
public Player getOwner() {
|
||||
return owner;
|
||||
}
|
||||
public Player getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(Player owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
public void setOwner(Player owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public boolean isFriend() {
|
||||
return isFriend;
|
||||
}
|
||||
public boolean isFriend() {
|
||||
return isFriend;
|
||||
}
|
||||
|
||||
public void setIsFriend(boolean b) {
|
||||
this.isFriend = b;
|
||||
}
|
||||
public void setIsFriend(boolean b) {
|
||||
this.isFriend = b;
|
||||
}
|
||||
|
||||
public int getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
public int getOwnerId() {
|
||||
return ownerId;
|
||||
}
|
||||
|
||||
public int getFriendId() {
|
||||
return friendId;
|
||||
}
|
||||
public int getFriendId() {
|
||||
return friendId;
|
||||
}
|
||||
|
||||
public int getAskerId() {
|
||||
return askerId;
|
||||
}
|
||||
public int getAskerId() {
|
||||
return askerId;
|
||||
}
|
||||
|
||||
public void setAskerId(int askerId) {
|
||||
this.askerId = askerId;
|
||||
}
|
||||
public void setAskerId(int askerId) {
|
||||
this.askerId = askerId;
|
||||
}
|
||||
|
||||
public PlayerProfile getFriendProfile() {
|
||||
return profile;
|
||||
}
|
||||
public PlayerProfile getFriendProfile() {
|
||||
return profile;
|
||||
}
|
||||
|
||||
public void setFriendProfile(Player character) {
|
||||
if (character == null || this.friendId != character.getUid()) return;
|
||||
this.profile = character.getProfile();
|
||||
}
|
||||
public void setFriendProfile(Player character) {
|
||||
if (character == null || this.friendId != character.getUid()) return;
|
||||
this.profile = character.getProfile();
|
||||
}
|
||||
|
||||
public boolean isOnline() {
|
||||
return getFriendProfile().getPlayer() != null;
|
||||
}
|
||||
public boolean isOnline() {
|
||||
return getFriendProfile().getPlayer() != null;
|
||||
}
|
||||
|
||||
public void save() {
|
||||
DatabaseHelper.saveFriendship(this);
|
||||
}
|
||||
public void save() {
|
||||
DatabaseHelper.saveFriendship(this);
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
DatabaseHelper.deleteFriendship(this);
|
||||
}
|
||||
public void delete() {
|
||||
DatabaseHelper.deleteFriendship(this);
|
||||
}
|
||||
|
||||
public FriendBrief toProto() {
|
||||
FriendBrief proto = FriendBrief.newBuilder()
|
||||
.setUid(getFriendProfile().getUid())
|
||||
.setNickname(getFriendProfile().getName())
|
||||
.setLevel(getFriendProfile().getPlayerLevel())
|
||||
.setProfilePicture(ProfilePicture.newBuilder().setAvatarId(getFriendProfile().getAvatarId()))
|
||||
.setWorldLevel(getFriendProfile().getWorldLevel())
|
||||
.setSignature(getFriendProfile().getSignature())
|
||||
.setOnlineState(getFriendProfile().isOnline() ? FriendOnlineState.FRIEND_ONLINE_STATE_ONLINE : FriendOnlineState.FRIEND_ONLINE_STATE_DISCONNECT)
|
||||
.setIsMpModeAvailable(true)
|
||||
.setLastActiveTime(getFriendProfile().getLastActiveTime())
|
||||
.setNameCardId(getFriendProfile().getNameCard())
|
||||
.setParam(getFriendProfile().getDaysSinceLogin())
|
||||
.setIsGameSource(true)
|
||||
.setPlatformType(PlatformTypeOuterClass.PlatformType.PLATFORM_TYPE_PC)
|
||||
.build();
|
||||
public FriendBrief toProto() {
|
||||
FriendBrief proto = FriendBrief.newBuilder()
|
||||
.setUid(getFriendProfile().getUid())
|
||||
.setNickname(getFriendProfile().getName())
|
||||
.setLevel(getFriendProfile().getPlayerLevel())
|
||||
.setProfilePicture(ProfilePicture.newBuilder().setAvatarId(getFriendProfile().getAvatarId()))
|
||||
.setWorldLevel(getFriendProfile().getWorldLevel())
|
||||
.setSignature(getFriendProfile().getSignature())
|
||||
.setOnlineState(getFriendProfile().isOnline() ? FriendOnlineState.FRIEND_ONLINE_STATE_ONLINE : FriendOnlineState.FRIEND_ONLINE_STATE_DISCONNECT)
|
||||
.setIsMpModeAvailable(true)
|
||||
.setLastActiveTime(getFriendProfile().getLastActiveTime())
|
||||
.setNameCardId(getFriendProfile().getNameCard())
|
||||
.setParam(getFriendProfile().getDaysSinceLogin())
|
||||
.setIsGameSource(true)
|
||||
.setPlatformType(PlatformTypeOuterClass.PlatformType.PLATFORM_TYPE_PC)
|
||||
.build();
|
||||
|
||||
return proto;
|
||||
}
|
||||
return proto;
|
||||
}
|
||||
}
|
||||
|
@ -10,15 +10,15 @@ import emu.grasscutter.server.packet.send.*;
|
||||
@Opcodes(PacketOpcodes.HomeChangeEditModeReq)
|
||||
public class HandlerHomeChangeEditModeReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
var req = HomeChangeEditModeReqOuterClass.HomeChangeEditModeReq.parseFrom(payload);
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
var req = HomeChangeEditModeReqOuterClass.HomeChangeEditModeReq.parseFrom(payload);
|
||||
|
||||
session.send(new PacketHomePreChangeEditModeNotify(req.getIsEnterEditMode()));
|
||||
session.send(new PacketHomeBasicInfoNotify(session.getPlayer(), req.getIsEnterEditMode()));
|
||||
session.send(new PacketHomeComfortInfoNotify(session.getPlayer()));
|
||||
session.send(new PacketHomePreChangeEditModeNotify(req.getIsEnterEditMode()));
|
||||
session.send(new PacketHomeBasicInfoNotify(session.getPlayer(), req.getIsEnterEditMode()));
|
||||
session.send(new PacketHomeComfortInfoNotify(session.getPlayer()));
|
||||
|
||||
session.send(new PacketHomeChangeEditModeRsp(req.getIsEnterEditMode()));
|
||||
}
|
||||
session.send(new PacketHomeChangeEditModeRsp(req.getIsEnterEditMode()));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
// musicGameBeatmap.save();
|
||||
//
|
||||
// var playerData = session.getPlayer().getActivityManager().getPlayerActivityDataByActivityType(ActivityType.NEW_ACTIVITY_MUSIC_GAME);
|
||||
// if(playerData.isEmpty()){
|
||||
// if (playerData.isEmpty()) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
|
@ -17,7 +17,7 @@
|
||||
//
|
||||
// var musicGameBeatmap = MusicGameBeatmap.getByShareId(req.getMusicShareId());
|
||||
//
|
||||
// if(musicGameBeatmap == null){
|
||||
// if (musicGameBeatmap == null) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
|
@ -17,7 +17,7 @@
|
||||
//
|
||||
// var musicGameBeatmap = MusicGameBeatmap.getByShareId(req.getMusicShareId());
|
||||
//
|
||||
// if(musicGameBeatmap == null){
|
||||
// if (musicGameBeatmap == null) {
|
||||
// session.send(new PacketMusicGameSearchBeatmapRsp(11153, req.getUnknownEnum1()));
|
||||
// return;
|
||||
// }
|
||||
|
@ -10,11 +10,11 @@ import emu.grasscutter.server.packet.send.PacketMusicGameStartRsp;
|
||||
@Opcodes(PacketOpcodes.MusicGameStartReq)
|
||||
public class HandlerMusicGameStartReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
var req = MusicGameStartReqOuterClass.MusicGameStartReq.parseFrom(payload);
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
var req = MusicGameStartReqOuterClass.MusicGameStartReq.parseFrom(payload);
|
||||
|
||||
session.send(new PacketMusicGameStartRsp(req.getMusicBasicId(), req.getUgcGuid()));
|
||||
}
|
||||
session.send(new PacketMusicGameStartRsp(req.getMusicBasicId(), req.getUgcGuid()));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public class PacketEntityFightPropChangeReasonNotify extends BasePacket {
|
||||
.setReason(reason)
|
||||
.setChangeHpReason(changeHpReason);
|
||||
|
||||
for(int p : param){
|
||||
for (int p : param) {
|
||||
proto.addParamList(p);
|
||||
}
|
||||
|
||||
|
@ -6,14 +6,14 @@ import emu.grasscutter.net.proto.MusicGameStartRspOuterClass;
|
||||
|
||||
public class PacketMusicGameStartRsp extends BasePacket {
|
||||
|
||||
public PacketMusicGameStartRsp(int musicBasicId, long musicShareId) {
|
||||
super(PacketOpcodes.MusicGameStartRsp);
|
||||
public PacketMusicGameStartRsp(int musicBasicId, long musicShareId) {
|
||||
super(PacketOpcodes.MusicGameStartRsp);
|
||||
|
||||
var proto = MusicGameStartRspOuterClass.MusicGameStartRsp.newBuilder();
|
||||
var proto = MusicGameStartRspOuterClass.MusicGameStartRsp.newBuilder();
|
||||
|
||||
proto.setMusicBasicId(musicBasicId)
|
||||
proto.setMusicBasicId(musicBasicId)
|
||||
.setUgcGuid(musicShareId);
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
this.setData(proto);
|
||||
}
|
||||
}
|
||||
|
@ -8,29 +8,29 @@ import emu.grasscutter.net.proto.PlayerApplyEnterMpResultNotifyOuterClass.Player
|
||||
|
||||
public class PacketPlayerApplyEnterMpResultNotify extends BasePacket {
|
||||
|
||||
public PacketPlayerApplyEnterMpResultNotify(Player target, boolean isAgreed, PlayerApplyEnterMpResultNotifyOuterClass.PlayerApplyEnterMpResultNotify.Reason reason) {
|
||||
super(PacketOpcodes.PlayerApplyEnterMpResultNotify);
|
||||
public PacketPlayerApplyEnterMpResultNotify(Player target, boolean isAgreed, PlayerApplyEnterMpResultNotifyOuterClass.PlayerApplyEnterMpResultNotify.Reason reason) {
|
||||
super(PacketOpcodes.PlayerApplyEnterMpResultNotify);
|
||||
|
||||
PlayerApplyEnterMpResultNotify proto = PlayerApplyEnterMpResultNotify.newBuilder()
|
||||
.setTargetUid(target.getUid())
|
||||
.setTargetNickname(target.getNickname())
|
||||
.setIsAgreed(isAgreed)
|
||||
.setReason(reason)
|
||||
.build();
|
||||
PlayerApplyEnterMpResultNotify proto = PlayerApplyEnterMpResultNotify.newBuilder()
|
||||
.setTargetUid(target.getUid())
|
||||
.setTargetNickname(target.getNickname())
|
||||
.setIsAgreed(isAgreed)
|
||||
.setReason(reason)
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
this.setData(proto);
|
||||
}
|
||||
|
||||
public PacketPlayerApplyEnterMpResultNotify(int targetId, String targetName, boolean isAgreed, PlayerApplyEnterMpResultNotify.Reason reason) {
|
||||
super(PacketOpcodes.PlayerApplyEnterMpResultNotify);
|
||||
public PacketPlayerApplyEnterMpResultNotify(int targetId, String targetName, boolean isAgreed, PlayerApplyEnterMpResultNotify.Reason reason) {
|
||||
super(PacketOpcodes.PlayerApplyEnterMpResultNotify);
|
||||
|
||||
PlayerApplyEnterMpResultNotify proto = PlayerApplyEnterMpResultNotify.newBuilder()
|
||||
.setTargetUid(targetId)
|
||||
.setTargetNickname(targetName)
|
||||
.setIsAgreed(isAgreed)
|
||||
.setReason(reason)
|
||||
.build();
|
||||
PlayerApplyEnterMpResultNotify proto = PlayerApplyEnterMpResultNotify.newBuilder()
|
||||
.setTargetUid(targetId)
|
||||
.setTargetNickname(targetName)
|
||||
.setIsAgreed(isAgreed)
|
||||
.setReason(reason)
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
this.setData(proto);
|
||||
}
|
||||
}
|
||||
|
@ -8,54 +8,54 @@ import emu.grasscutter.net.proto.PlayerChatNotifyOuterClass.PlayerChatNotify;
|
||||
|
||||
public class PacketPlayerChatNotify extends BasePacket {
|
||||
|
||||
public PacketPlayerChatNotify(Player sender, int channelId, String message) {
|
||||
super(PacketOpcodes.PlayerChatNotify);
|
||||
public PacketPlayerChatNotify(Player sender, int channelId, String message) {
|
||||
super(PacketOpcodes.PlayerChatNotify);
|
||||
|
||||
ChatInfo info = ChatInfo.newBuilder()
|
||||
.setTime((int) (System.currentTimeMillis() / 1000))
|
||||
.setUid(sender.getUid())
|
||||
.setText(message)
|
||||
.build();
|
||||
ChatInfo info = ChatInfo.newBuilder()
|
||||
.setTime((int) (System.currentTimeMillis() / 1000))
|
||||
.setUid(sender.getUid())
|
||||
.setText(message)
|
||||
.build();
|
||||
|
||||
PlayerChatNotify proto = PlayerChatNotify.newBuilder()
|
||||
.setChannelId(channelId)
|
||||
.setChatInfo(info)
|
||||
.build();
|
||||
PlayerChatNotify proto = PlayerChatNotify.newBuilder()
|
||||
.setChannelId(channelId)
|
||||
.setChatInfo(info)
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
this.setData(proto);
|
||||
}
|
||||
|
||||
public PacketPlayerChatNotify(Player sender, int channelId, int emote) {
|
||||
super(PacketOpcodes.PlayerChatNotify);
|
||||
public PacketPlayerChatNotify(Player sender, int channelId, int emote) {
|
||||
super(PacketOpcodes.PlayerChatNotify);
|
||||
|
||||
ChatInfo info = ChatInfo.newBuilder()
|
||||
.setTime((int) (System.currentTimeMillis() / 1000))
|
||||
.setUid(sender.getUid())
|
||||
.setIcon(emote)
|
||||
.build();
|
||||
ChatInfo info = ChatInfo.newBuilder()
|
||||
.setTime((int) (System.currentTimeMillis() / 1000))
|
||||
.setUid(sender.getUid())
|
||||
.setIcon(emote)
|
||||
.build();
|
||||
|
||||
PlayerChatNotify proto = PlayerChatNotify.newBuilder()
|
||||
.setChannelId(channelId)
|
||||
.setChatInfo(info)
|
||||
.build();
|
||||
PlayerChatNotify proto = PlayerChatNotify.newBuilder()
|
||||
.setChannelId(channelId)
|
||||
.setChatInfo(info)
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
this.setData(proto);
|
||||
}
|
||||
|
||||
public PacketPlayerChatNotify(Player sender, int channelId, ChatInfo.SystemHint systemHint) {
|
||||
super(PacketOpcodes.PlayerChatNotify);
|
||||
public PacketPlayerChatNotify(Player sender, int channelId, ChatInfo.SystemHint systemHint) {
|
||||
super(PacketOpcodes.PlayerChatNotify);
|
||||
|
||||
ChatInfo info = ChatInfo.newBuilder()
|
||||
.setTime((int) (System.currentTimeMillis() / 1000))
|
||||
.setUid(sender.getUid())
|
||||
.setSystemHint(systemHint)
|
||||
.build();
|
||||
ChatInfo info = ChatInfo.newBuilder()
|
||||
.setTime((int) (System.currentTimeMillis() / 1000))
|
||||
.setUid(sender.getUid())
|
||||
.setSystemHint(systemHint)
|
||||
.build();
|
||||
|
||||
PlayerChatNotify proto = PlayerChatNotify.newBuilder()
|
||||
.setChannelId(channelId)
|
||||
.setChatInfo(info)
|
||||
.build();
|
||||
PlayerChatNotify proto = PlayerChatNotify.newBuilder()
|
||||
.setChannelId(channelId)
|
||||
.setChatInfo(info)
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
this.setData(proto);
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ public class PacketScenePointUnlockNotify extends BasePacket {
|
||||
ScenePointUnlockNotify.Builder p = ScenePointUnlockNotify.newBuilder()
|
||||
.setSceneId(sceneId)
|
||||
.addPointList(pointId)
|
||||
.addUnhidePointList(pointId);
|
||||
.addUnhidePointList(pointId);
|
||||
|
||||
this.setData(p);
|
||||
}
|
||||
@ -22,7 +22,7 @@ public class PacketScenePointUnlockNotify extends BasePacket {
|
||||
ScenePointUnlockNotify.Builder p = ScenePointUnlockNotify.newBuilder()
|
||||
.setSceneId(sceneId)
|
||||
.addAllPointList(pointIds)
|
||||
.addAllUnhidePointList(pointIds);
|
||||
.addAllUnhidePointList(pointIds);
|
||||
|
||||
this.setData(p);
|
||||
}
|
||||
|
@ -7,17 +7,17 @@ import emu.grasscutter.net.proto.TowerCurLevelRecordOuterClass.TowerCurLevelReco
|
||||
|
||||
public class PacketTowerCurLevelRecordChangeNotify extends BasePacket {
|
||||
|
||||
public PacketTowerCurLevelRecordChangeNotify(int curFloorId, int curLevelIndex) {
|
||||
super(PacketOpcodes.TowerCurLevelRecordChangeNotify);
|
||||
public PacketTowerCurLevelRecordChangeNotify(int curFloorId, int curLevelIndex) {
|
||||
super(PacketOpcodes.TowerCurLevelRecordChangeNotify);
|
||||
|
||||
TowerCurLevelRecordChangeNotify proto = TowerCurLevelRecordChangeNotify.newBuilder()
|
||||
.setCurLevelRecord(TowerCurLevelRecord.newBuilder()
|
||||
.setCurFloorId(curFloorId)
|
||||
.setCurLevelIndex(curLevelIndex)
|
||||
// TODO team info
|
||||
.build())
|
||||
.build();
|
||||
TowerCurLevelRecordChangeNotify proto = TowerCurLevelRecordChangeNotify.newBuilder()
|
||||
.setCurLevelRecord(TowerCurLevelRecord.newBuilder()
|
||||
.setCurFloorId(curFloorId)
|
||||
.setCurLevelIndex(curLevelIndex)
|
||||
// TODO team info
|
||||
.build())
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
this.setData(proto);
|
||||
}
|
||||
}
|
||||
|
@ -7,26 +7,26 @@ import emu.grasscutter.net.proto.TowerLevelStarCondNotifyOuterClass.TowerLevelSt
|
||||
|
||||
public class PacketTowerLevelStarCondNotify extends BasePacket {
|
||||
|
||||
public PacketTowerLevelStarCondNotify(int floorId, int levelIndex) {
|
||||
super(PacketOpcodes.TowerLevelStarCondNotify);
|
||||
public PacketTowerLevelStarCondNotify(int floorId, int levelIndex) {
|
||||
super(PacketOpcodes.TowerLevelStarCondNotify);
|
||||
|
||||
TowerLevelStarCondNotify proto = TowerLevelStarCondNotify.newBuilder()
|
||||
.setFloorId(floorId)
|
||||
.setLevelIndex(levelIndex)
|
||||
.addCondDataList(TowerLevelStarCondData.newBuilder()
|
||||
.setCondValue(1)
|
||||
.build()
|
||||
)
|
||||
.addCondDataList(TowerLevelStarCondData.newBuilder()
|
||||
.setCondValue(2)
|
||||
.build()
|
||||
)
|
||||
.addCondDataList(TowerLevelStarCondData.newBuilder()
|
||||
.setCondValue(3)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
TowerLevelStarCondNotify proto = TowerLevelStarCondNotify.newBuilder()
|
||||
.setFloorId(floorId)
|
||||
.setLevelIndex(levelIndex)
|
||||
.addCondDataList(TowerLevelStarCondData.newBuilder()
|
||||
.setCondValue(1)
|
||||
.build()
|
||||
)
|
||||
.addCondDataList(TowerLevelStarCondData.newBuilder()
|
||||
.setCondValue(2)
|
||||
.build()
|
||||
)
|
||||
.addCondDataList(TowerLevelStarCondData.newBuilder()
|
||||
.setCondValue(3)
|
||||
.build()
|
||||
)
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
this.setData(proto);
|
||||
}
|
||||
}
|
||||
|
@ -364,23 +364,23 @@
|
||||
},
|
||||
"documentation": {
|
||||
"handbook": {
|
||||
"title": "GM Handbook",
|
||||
"title": "🇺🇸GM Handbook",
|
||||
"title_commands": "Comandos",
|
||||
"title_avatars": "Avatares",
|
||||
"title_items": "Objetos",
|
||||
"title_scenes": "Escenario",
|
||||
"title_monsters": "Monstruos",
|
||||
"header_id": "Id",
|
||||
"header_id": "🇺🇸Id",
|
||||
"header_command": "Comando",
|
||||
"header_description": "Descripción",
|
||||
"header_avatar": "Avatar",
|
||||
"header_avatar": "🇺🇸Avatar",
|
||||
"header_item": "Objeto",
|
||||
"header_scene": "Escenario",
|
||||
"header_monster": "Monstruo"
|
||||
},
|
||||
"index": {
|
||||
"title": "Documentación",
|
||||
"handbook": "GM Handbook",
|
||||
"handbook": "🇺🇸GM Handbook",
|
||||
"gacha_mapping": "JSON de mapeo del Gacha"
|
||||
}
|
||||
},
|
||||
|
@ -379,9 +379,9 @@
|
||||
"header_monster": "Monstre"
|
||||
},
|
||||
"index": {
|
||||
"title": "Documentation",
|
||||
"title": "🇺🇸Documentation",
|
||||
"handbook": "Manuel GM",
|
||||
"gacha_mapping": "Gacha mapping JSON"
|
||||
"gacha_mapping": "🇺🇸Gacha mapping JSON"
|
||||
}
|
||||
},
|
||||
"plugin": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"messages": {
|
||||
"game": {
|
||||
"address_bind": "Server di gioco avviato su \u001B[1m\u001B[33m%s:%s\u001B[0m",
|
||||
"address_bind": "Server di gioco avviato su \u001b[1m\u001b[33m%s:%s\u001b[0m",
|
||||
"port_bind": "Server di gioco avviato sulla porta %s",
|
||||
"connect": "Client connesso da %s",
|
||||
"disconnect": "Client disconnesso da %s",
|
||||
@ -9,7 +9,7 @@
|
||||
"command_error": "Errore comando:"
|
||||
},
|
||||
"dispatch": {
|
||||
"address_bind": "[Dispatch] Dispatch server avviato su \u001B[1m\u001B[33m%s:%s\u001B[0m",
|
||||
"address_bind": "[Dispatch] Dispatch server avviato su \u001b[1m\u001b[33m%s:%s\u001b[0m",
|
||||
"port_bind": "[Dispatch] Dispatch server avviato sulla porta %s",
|
||||
"request": "[Dispatch] Client %s %s richiesta: %s",
|
||||
"keystore": {
|
||||
@ -80,19 +80,19 @@
|
||||
"set_to": "%s impostato su %s.",
|
||||
"set_for_to": "%s per %s impostato su %s.",
|
||||
"invalid": {
|
||||
"amount": "Importo non valido.",
|
||||
"artifactId": "ID artefatto non valido.",
|
||||
"avatarId": "ID avatar non valido.",
|
||||
"avatarLevel": "Livello avatar non valido.",
|
||||
"entityId": "ID entità non valido.",
|
||||
"itemId": "ID articolo non valido.",
|
||||
"itemLevel": "ItemLevel non valido.",
|
||||
"itemRefinement": "Raffinamento articolo non valido.",
|
||||
"statValue": "Valore statistica non valido.",
|
||||
"value_between": "Valore non valido: %s deve essere compreso tra %s e %s.",
|
||||
"playerId": "ID giocatore non valido.",
|
||||
"uid": "UID non valido.",
|
||||
"id": "ID non valido."
|
||||
"amount": "Importo non valido.",
|
||||
"artifactId": "ID artefatto non valido.",
|
||||
"avatarId": "ID avatar non valido.",
|
||||
"avatarLevel": "Livello avatar non valido.",
|
||||
"entityId": "ID entità non valido.",
|
||||
"itemId": "ID articolo non valido.",
|
||||
"itemLevel": "ItemLevel non valido.",
|
||||
"itemRefinement": "Raffinamento articolo non valido.",
|
||||
"statValue": "Valore statistica non valido.",
|
||||
"value_between": "Valore non valido: %s deve essere compreso tra %s e %s.",
|
||||
"playerId": "ID giocatore non valido.",
|
||||
"uid": "UID non valido.",
|
||||
"id": "ID non valido."
|
||||
}
|
||||
},
|
||||
"execution": {
|
||||
@ -139,7 +139,8 @@
|
||||
"displays": "Display cancellati per %s.",
|
||||
"virtuals": "Virtuali cancellate per %s.",
|
||||
"everything": "Cancellato tutto per %s.",
|
||||
"description": "Elimina gli oggetti sbloccati non equipaggiati dal tuo inventario. Il valore predefinito è 4* livello 1 raffinamento 1 o inferiore, ma può essere impostato su un livello superiore." },
|
||||
"description": "Elimina gli oggetti sbloccati non equipaggiati dal tuo inventario. Il valore predefinito è 4* livello 1 raffinamento 1 o inferiore, ma può essere impostato su un livello superiore."
|
||||
},
|
||||
"coop": {
|
||||
"success": "Convocato %s nel mondo di %s.",
|
||||
"description": "Forza qualcuno a unirsi al mondo degli altri. Se nessuno viene preso di mira, ti manda comunque in modalità cooperativa."
|
||||
@ -159,7 +160,7 @@
|
||||
"given_avatar": "Dato %s con livello da %s a %s.",
|
||||
"giveall_success": "Ha dato tutti gli oggetti con successo.",
|
||||
"description": "Dà un oggetto a te o al giocatore specificato. Può anche dare tutte le armi, avatar e/o materiali, e può costruire artefatti personalizzati."
|
||||
},
|
||||
},
|
||||
"heal": {
|
||||
"success": "Tutti i personaggi sono stati curati.",
|
||||
"description": "Guarisci tutti i personaggi della tua squadra attuale."
|
||||
@ -253,35 +254,35 @@
|
||||
"error": "ERRORE: fase di costruzione %s non valida. Controlla lo stacktrace della console.",
|
||||
"description": "Invia posta all'utente specificato. L'utilizzo di questo comando cambia in base al suo stato di composizione"
|
||||
},
|
||||
"sendMessage": {
|
||||
"success": "Messaggio inviato.",
|
||||
"description": "Invia un messaggio a un giocatore come server. Se usato senza target, invia a tutti i giocatori sul server."
|
||||
},
|
||||
"setConst": {
|
||||
"range_error": "Il livello della costellazione deve essere compreso tra 0 e 6.",
|
||||
"level_error": "Livello costellazione non valido.",
|
||||
"fail": "Impossibile impostare la costellazione.",
|
||||
"failed_success": "Le costellazioni per %s sono state impostate su %s. Ricarica la scena per vedere le modifiche.",
|
||||
"success": "Le costellazioni per %s sono state impostate su %s.",
|
||||
"successall": "Le costellazioni per tutti i personaggi sono state impostate su %s.",
|
||||
"description": "Imposta il livello di costellazione per il tuo attuale personaggio attivo"
|
||||
},
|
||||
"setFetterLevel": {
|
||||
"range_error": "Il livello di restrizione deve essere compreso tra 0 e 10.",
|
||||
"success": "Livello di restrizione impostato su %s.",
|
||||
"level_error": "Livello restrizione non valido.",
|
||||
"description": "Imposta il tuo livello di restrizione per il tuo attuale personaggio attivo"
|
||||
},
|
||||
"setProp": {
|
||||
"description": "Imposta le proprietà dell'intero account. Cose come godmode possono essere abilitate in questo modo, oltre a cambiare cose come il pavimento dell'abisso sbloccato e il progresso del pass battaglia.\n\tValori per <prop> (senza distinzione tra maiuscole e minuscole): GodMode | UnlimitedStamina | UnlimitedEnergy | TowerLevel | WorldLevel | BPLevel | SetOpenState | UnsetOpenState | UnlockMap\n\t(cont.) vedi PlayerProperty enum per altri possibili valori, nella forma PROP_MAX_SPRING_VOLUME -> max_spring_volume"
|
||||
},
|
||||
"setStats": {
|
||||
"description": "Imposta la proprietà di combattimento per il tuo personaggio attivo corrente\n\tValori per <stat>: hp | maxhp | def | atk | em | er | crate | cdmg | cdr | heal | heali | shield | defi\n\t(cont.) Elemental DMG Bonus: epyro | ecryo | ehydro | egeo | edendro | eelectro | ephys\n\t(cont.) Elemental RES: respyro | rescryo | reshydro | resgeo | resdendro | reselectro | resphys",
|
||||
"locked_to": "%s bloccato su %s.",
|
||||
"locked_for_to": "%s per %s bloccato su %s.",
|
||||
"unlocked": "%s sbloccato.",
|
||||
"unlocked_for": "%s per %s sbloccato."
|
||||
},
|
||||
"sendMessage": {
|
||||
"success": "Messaggio inviato.",
|
||||
"description": "Invia un messaggio a un giocatore come server. Se usato senza target, invia a tutti i giocatori sul server."
|
||||
},
|
||||
"setConst": {
|
||||
"range_error": "Il livello della costellazione deve essere compreso tra 0 e 6.",
|
||||
"level_error": "Livello costellazione non valido.",
|
||||
"fail": "Impossibile impostare la costellazione.",
|
||||
"failed_success": "Le costellazioni per %s sono state impostate su %s. Ricarica la scena per vedere le modifiche.",
|
||||
"success": "Le costellazioni per %s sono state impostate su %s.",
|
||||
"successall": "Le costellazioni per tutti i personaggi sono state impostate su %s.",
|
||||
"description": "Imposta il livello di costellazione per il tuo attuale personaggio attivo"
|
||||
},
|
||||
"setFetterLevel": {
|
||||
"range_error": "Il livello di restrizione deve essere compreso tra 0 e 10.",
|
||||
"success": "Livello di restrizione impostato su %s.",
|
||||
"level_error": "Livello restrizione non valido.",
|
||||
"description": "Imposta il tuo livello di restrizione per il tuo attuale personaggio attivo"
|
||||
},
|
||||
"setProp": {
|
||||
"description": "Imposta le proprietà dell'intero account. Cose come godmode possono essere abilitate in questo modo, oltre a cambiare cose come il pavimento dell'abisso sbloccato e il progresso del pass battaglia.\n\tValori per <prop> (senza distinzione tra maiuscole e minuscole): GodMode | UnlimitedStamina | UnlimitedEnergy | TowerLevel | WorldLevel | BPLevel | SetOpenState | UnsetOpenState | UnlockMap\n\t(cont.) vedi PlayerProperty enum per altri possibili valori, nella forma PROP_MAX_SPRING_VOLUME -> max_spring_volume"
|
||||
},
|
||||
"setStats": {
|
||||
"description": "Imposta la proprietà di combattimento per il tuo personaggio attivo corrente\n\tValori per <stat>: hp | maxhp | def | atk | em | er | crate | cdmg | cdr | heal | heali | shield | defi\n\t(cont.) Elemental DMG Bonus: epyro | ecryo | ehydro | egeo | edendro | eelectro | ephys\n\t(cont.) Elemental RES: respyro | rescryo | reshydro | resgeo | resdendro | reselectro | resphys",
|
||||
"locked_to": "%s bloccato su %s.",
|
||||
"locked_for_to": "%s per %s bloccato su %s.",
|
||||
"unlocked": "%s sbloccato.",
|
||||
"unlocked_for": "%s per %s sbloccato."
|
||||
},
|
||||
"spawn": {
|
||||
"success": "Evocati %s di %s.",
|
||||
"limit_reached": "Limite di evocazione della scena raggiunto. Generazione invece di %s entità.",
|
||||
@ -356,7 +357,7 @@
|
||||
"available_three_stars": "Articoli a 3 stelle disponibili"
|
||||
},
|
||||
"records": {
|
||||
"title": "Gacha Records",
|
||||
"title": "🇺🇸Gacha Records",
|
||||
"date": "Data",
|
||||
"item": "oggetto"
|
||||
}
|
||||
@ -372,7 +373,7 @@
|
||||
"header_id": "ID",
|
||||
"header_command": "Comando",
|
||||
"header_description": "Descrizione",
|
||||
"header_avatar": "Avatar",
|
||||
"header_avatar": "🇺🇸Avatar",
|
||||
"header_item": "Articolo",
|
||||
"header_scene": "Scena",
|
||||
"header_monster": "Mostro"
|
||||
@ -384,19 +385,19 @@
|
||||
}
|
||||
},
|
||||
"plugin": {
|
||||
"directory_failed": "Impossibile creare la directory dei plugin: ",
|
||||
"unable_to_load": "Impossibile caricare il plug-in.",
|
||||
"invalid_config": "Il plug-in %s ha un file di configurazione non valido.",
|
||||
"invalid_main_class": "Il plug-in %s ha una classe principale non valida.",
|
||||
"missing_config": "Il plug-in %s non ha un file di configurazione valido.",
|
||||
"failed_to_load_plugin": "Impossibile caricare il plug-in: %s",
|
||||
"failed_to_load": "Impossibile caricare un plug-in.",
|
||||
"failed_to_load_dependencies": "Impossibile caricare i plugin con le dipendenze.",
|
||||
"loading_plugin": "Caricamento plug-in: %s",
|
||||
"failed_add_id": "Impossibile aggiungere l'identificatore del plug-in: %s",
|
||||
"enabling_plugin": "Abilitazione plug-in: %s",
|
||||
"enabling_failed": "Impossibile abilitare il plug-in: %s",
|
||||
"disabling_plugin": "Disabilitazione plug-in: %s",
|
||||
"disabling_failed": "Impossibile disabilitare il plug-in: %s"
|
||||
"directory_failed": "Impossibile creare la directory dei plugin: ",
|
||||
"unable_to_load": "Impossibile caricare il plug-in.",
|
||||
"invalid_config": "Il plug-in %s ha un file di configurazione non valido.",
|
||||
"invalid_main_class": "Il plug-in %s ha una classe principale non valida.",
|
||||
"missing_config": "Il plug-in %s non ha un file di configurazione valido.",
|
||||
"failed_to_load_plugin": "Impossibile caricare il plug-in: %s",
|
||||
"failed_to_load": "Impossibile caricare un plug-in.",
|
||||
"failed_to_load_dependencies": "Impossibile caricare i plugin con le dipendenze.",
|
||||
"loading_plugin": "Caricamento plug-in: %s",
|
||||
"failed_add_id": "Impossibile aggiungere l'identificatore del plug-in: %s",
|
||||
"enabling_plugin": "Abilitazione plug-in: %s",
|
||||
"enabling_failed": "Impossibile abilitare il plug-in: %s",
|
||||
"disabling_plugin": "Disabilitazione plug-in: %s",
|
||||
"disabling_failed": "Impossibile disabilitare il plug-in: %s"
|
||||
}
|
||||
}
|
||||
|
@ -247,10 +247,10 @@
|
||||
"set_message_sender": "메세지 발송자가 '%s'으로 설정되었습니다.\n계속하려면 '/sendmail <itemID|itemName|finish> [amount] [level]'을 사용하십시오.",
|
||||
"send": "%s 의 %s을 (레벨 %s)을 메세지에 첨부했습니다.\n계속 항목을 추가하거나, '/sendmail finish'을 사용해 메세지를 보낼 수 있습니다..",
|
||||
"invalid_arguments_please_use": "잘못된 인수입니다.\n '/sendmail %s'을 사용하십시오",
|
||||
"title": "<title>",
|
||||
"message": "<message>",
|
||||
"sender": "<sender>",
|
||||
"arguments": "<itemID|itemName|finish> [amount] [level]",
|
||||
"title": "🇺🇸<title>",
|
||||
"message": "🇺🇸<message>",
|
||||
"sender": "🇺🇸<sender>",
|
||||
"arguments": "🇺🇸<itemID|itemName|finish> [amount] [level]",
|
||||
"error": "오류: 잘못된 시공 단계 %s. Console에서 스택을 확인하십시오.",
|
||||
"description": "지정된 사용자에게 메세지를 보냅니다. 이 명령어의 사용법은 세부 내용에 따라 달라집니다."
|
||||
},
|
||||
@ -380,8 +380,8 @@
|
||||
},
|
||||
"index": {
|
||||
"title": "문서",
|
||||
"handbook": "GM Handbook",
|
||||
"gacha_mapping": "Gacha mapping JSON"
|
||||
"handbook": "🇺🇸GM Handbook",
|
||||
"gacha_mapping": "🇺🇸Gacha mapping JSON"
|
||||
}
|
||||
},
|
||||
"plugin": {
|
||||
|
Reference in New Issue
Block a user