修复服务器数据写入
This commit is contained in:
parent
3ecbb1be3a
commit
fc2856e69b
@ -277,11 +277,11 @@ public class ConfigContainer {
|
||||
public static class ConsoleAccount {
|
||||
public int avatarId = 10000007;
|
||||
public int nameCardId = 210001;
|
||||
public int adventureRank = 1;
|
||||
public int worldLevel = 0;
|
||||
public int adventureRank = 60;
|
||||
public int worldLevel = 8;
|
||||
|
||||
public String nickName = "Server";
|
||||
public String signature = "Welcome to Grasscutter!";
|
||||
public String signature = "Server Running in "+System.getProperty("os.name");
|
||||
}
|
||||
|
||||
public static class Files {
|
||||
|
@ -2,7 +2,6 @@ package emu.grasscutter.game.gacha;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -29,7 +28,6 @@ import emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam;
|
||||
import emu.grasscutter.net.proto.RetcodeOuterClass.Retcode;
|
||||
import emu.grasscutter.server.game.BaseGameSystem;
|
||||
import emu.grasscutter.server.game.GameServer;
|
||||
import emu.grasscutter.server.game.GameServerTickEvent;
|
||||
import emu.grasscutter.server.packet.send.PacketDoGachaRsp;
|
||||
import emu.grasscutter.utils.FileUtils;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
@ -388,7 +386,7 @@ public class GachaSystem extends BaseGameSystem {
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public synchronized void watchBannerJson(GameServerTickEvent tickEvent) {
|
||||
public synchronized void watchBannerJson() {
|
||||
if (GAME_OPTIONS.watchGachaConfig) {
|
||||
try {
|
||||
WatchKey watchKey = watchService.take();
|
||||
|
@ -1253,7 +1253,6 @@ public class Player {
|
||||
this.save();
|
||||
this.getTeamManager().saveAvatars();
|
||||
this.getFriendsList().save();
|
||||
|
||||
}catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
Grasscutter.getLogger().warn("Player (UID {}) save failure", getUid());
|
||||
|
@ -1,5 +0,0 @@
|
||||
package emu.grasscutter.server.game;
|
||||
|
||||
public class GameServerStartFinishEvent {
|
||||
// Placeholder class for now, probably will get used later
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package emu.grasscutter.server.game;
|
||||
|
||||
public class GameServerStopEvent {
|
||||
// Placeholder class for now, probably will get used later
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package emu.grasscutter.server.game;
|
||||
|
||||
public class GameServerTickEvent {
|
||||
// Placeholder class for now, probably will get used later
|
||||
}
|
@ -139,6 +139,7 @@ public class GameSession implements GameSessionManager.KcpChannel {
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
tunnel.writeData(packet.build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -69,6 +69,7 @@ public class HandlerGetPlayerTokenReq extends PacketHandler {
|
||||
Player player = DatabaseHelper.getPlayerByAccount(account, Player.class);
|
||||
|
||||
if (player == null) {
|
||||
Grasscutter.getLogger().info("P: "+player.getNickname());
|
||||
int nextPlayerUid = DatabaseHelper.getNextPlayerId(session.getAccount().getReservedPlayerUid());
|
||||
|
||||
// Create player instance from event.
|
||||
|
@ -26,7 +26,7 @@ public class PacketGetPlayerFriendListRsp extends BasePacket {
|
||||
.setProfilePicture(ProfilePicture.newBuilder().setAvatarId(serverAccount.avatarId))
|
||||
.setWorldLevel(serverAccount.worldLevel)
|
||||
.setSignature(serverAccount.signature)
|
||||
.setLastActiveTime((int) (System.currentTimeMillis() / 1000f))
|
||||
.setLastActiveTime(0)
|
||||
.setNameCardId(serverAccount.nameCardId)
|
||||
.setOnlineState(FriendOnlineState.FRIEND_ONLINE_STATE_ONLINE)
|
||||
.setParam(1)
|
||||
|
Loading…
Reference in New Issue
Block a user