Clean up Apache Mina, goodbye!
This commit is contained in:
@@ -52,7 +52,6 @@ import net.server.services.task.world.CharacterSaveService;
|
||||
import net.server.services.type.ChannelServices;
|
||||
import net.server.services.type.WorldServices;
|
||||
import net.server.world.*;
|
||||
import org.apache.mina.util.ConcurrentHashSet;
|
||||
import scripting.AbstractPlayerInteraction;
|
||||
import scripting.event.EventInstanceManager;
|
||||
import scripting.item.ItemScriptManager;
|
||||
@@ -85,6 +84,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
@@ -177,7 +177,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
private final Map<Short, MapleQuestStatus> quests;
|
||||
private Set<MapleMonster> controlled = new LinkedHashSet<>();
|
||||
private Map<Integer, String> entered = new LinkedHashMap<>();
|
||||
private Set<MapleMapObject> visibleMapObjects = new ConcurrentHashSet<>();
|
||||
private Set<MapleMapObject> visibleMapObjects = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
private Map<Skill, SkillEntry> skills = new LinkedHashMap<>();
|
||||
private Map<Integer, Integer> activeCoupons = new LinkedHashMap<>();
|
||||
private Map<Integer, Integer> activeCouponRates = new LinkedHashMap<>();
|
||||
|
||||
@@ -45,7 +45,6 @@ import net.server.coordinator.session.MapleSessionCoordinator.AntiMulticlientRes
|
||||
import net.server.guild.MapleGuild;
|
||||
import net.server.guild.MapleGuildCharacter;
|
||||
import net.server.world.*;
|
||||
import org.apache.mina.core.session.IoSession;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import scripting.AbstractPlayerInteraction;
|
||||
@@ -86,10 +85,6 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
||||
public static final int LOGIN_NOTLOGGEDIN = 0;
|
||||
public static final int LOGIN_SERVER_TRANSITION = 1;
|
||||
public static final int LOGIN_LOGGEDIN = 2;
|
||||
public static final String CLIENT_KEY = "CLIENT";
|
||||
public static final String CLIENT_HWID = "HWID";
|
||||
public static final String CLIENT_NIBBLEHWID = "HWID2";
|
||||
public static final String CLIENT_REMOTE_ADDRESS = "REMOTE_IP";
|
||||
|
||||
private final Type type;
|
||||
|
||||
@@ -98,9 +93,6 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
||||
private String remoteAddress;
|
||||
private volatile boolean inTransition;
|
||||
|
||||
private MapleAESOFB send;
|
||||
private MapleAESOFB receive;
|
||||
|
||||
private io.netty.channel.Channel ioChannel;
|
||||
private PacketProcessor packetProcessor;
|
||||
private MapleCharacter player;
|
||||
@@ -158,12 +150,6 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public MapleClient(MapleAESOFB send, MapleAESOFB receive, IoSession session) {
|
||||
this.type = null;
|
||||
this.send = send;
|
||||
this.receive = receive;
|
||||
}
|
||||
|
||||
public static MapleClient createMock() {
|
||||
return new MapleClient(null, null, -123, -123);
|
||||
}
|
||||
@@ -275,14 +261,6 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
||||
ioChannel.disconnect();
|
||||
}
|
||||
|
||||
public MapleAESOFB getReceiveCrypto() {
|
||||
return receive;
|
||||
}
|
||||
|
||||
public MapleAESOFB getSendCrypto() {
|
||||
return send;
|
||||
}
|
||||
|
||||
public Hwid getHwid() {
|
||||
return hwid;
|
||||
}
|
||||
@@ -1097,9 +1075,6 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
||||
this.birthday = null;
|
||||
this.engines = null;
|
||||
this.player = null;
|
||||
this.receive = null;
|
||||
this.send = null;
|
||||
//this.session = null;
|
||||
}
|
||||
|
||||
public void setCharacterOnSessionTransitionState(int cid) {
|
||||
@@ -1171,11 +1146,6 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
|
||||
lastPong = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public void testPing(long timeThen) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public void checkIfIdle(final IdleStateEvent event) {
|
||||
final long pingedAt = System.currentTimeMillis();
|
||||
announce(MaplePacketCreator.getPing());
|
||||
|
||||
Reference in New Issue
Block a user