mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 17:34:39 +01:00
Convert to the far superior config system
This commit is contained in:
@@ -3,7 +3,6 @@ package emu.grasscutter.server.game;
|
||||
import java.io.File;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
@@ -23,9 +22,10 @@ import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
|
||||
import static emu.grasscutter.utils.Language.translate;
|
||||
import static emu.grasscutter.Configuration.*;
|
||||
|
||||
public class GameSession extends KcpChannel {
|
||||
private GameServer server;
|
||||
private final GameServer server;
|
||||
|
||||
private Account account;
|
||||
private Player player;
|
||||
@@ -140,7 +140,7 @@ public class GameSession extends KcpChannel {
|
||||
}
|
||||
|
||||
public void replayPacket(int opcode, String name) {
|
||||
String filePath = Grasscutter.getConfig().PACKETS_FOLDER + name;
|
||||
String filePath = PACKETS_FOLDER + name;
|
||||
File p = new File(filePath);
|
||||
|
||||
if (!p.exists()) return;
|
||||
@@ -172,7 +172,7 @@ public class GameSession extends KcpChannel {
|
||||
}
|
||||
|
||||
// Log
|
||||
if (Grasscutter.getConfig().DebugMode == ServerDebugMode.ALL) {
|
||||
if (SERVER.debugLevel == ServerDebugMode.ALL) {
|
||||
logPacket(packet);
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ public class GameSession extends KcpChannel {
|
||||
}
|
||||
|
||||
// Log packet
|
||||
if (Grasscutter.getConfig().DebugMode == ServerDebugMode.ALL) {
|
||||
if (SERVER.debugLevel == ServerDebugMode.ALL) {
|
||||
if (!loopPacket.contains(opcode)) {
|
||||
Grasscutter.getLogger().info("RECV: " + PacketOpcodesUtil.getOpcodeName(opcode) + " (" + opcode + ")");
|
||||
System.out.println(Utils.bytesToHex(payload));
|
||||
|
||||
Reference in New Issue
Block a user