Reworked Autoassigner & Hero's Will & Trade + Visual NX + New commands
Reworked autoassigner (improved limits between required secondary and surplus primary stats). Hero's will removes most of diseases, tonic removes slow. Added visual info for collected NX cards. Added commands cake (cake boss with customizable HP) and setgmlevel. Reworked Trade system now checking for slots smartly (instead of just checking for empty slots).
This commit is contained in:
@@ -24,7 +24,7 @@ package net;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import net.server.Server;
|
||||
|
||||
@@ -47,6 +47,7 @@ public class MapleServerHandler extends IoHandlerAdapter {
|
||||
private PacketProcessor processor;
|
||||
private int world = -1, channel = -1;
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm");
|
||||
private static AtomicLong sessionId = new AtomicLong(7777);
|
||||
|
||||
public MapleServerHandler() {
|
||||
this.processor = PacketProcessor.getProcessor(-1, -1);
|
||||
@@ -97,8 +98,7 @@ public class MapleServerHandler extends IoHandlerAdapter {
|
||||
MapleClient client = new MapleClient(sendCypher, recvCypher, session);
|
||||
client.setWorld(world);
|
||||
client.setChannel(channel);
|
||||
Random r = new Random();
|
||||
client.setSessionId(r.nextLong()); // Generates a random session id.
|
||||
client.setSessionId(sessionId.getAndIncrement()); // Generates a reasonable session id.
|
||||
session.write(MaplePacketCreator.getHello(ServerConstants.VERSION, ivSend, ivRecv));
|
||||
session.setAttribute(MapleClient.CLIENT_KEY, client);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user