mirror of
https://github.com/moparisthebest/MoparClassic
synced 2025-02-28 08:21:52 -05:00
Removed hard-coded client version...
This commit is contained in:
parent
bee6a45477
commit
1d7ded4829
@ -76,7 +76,7 @@ public class Config {
|
|||||||
pmods = props.getProperty("pmods").replaceAll(", +", ",").split(",");
|
pmods = props.getProperty("pmods").replaceAll(", +", ",").split(",");
|
||||||
mods = props.getProperty("mods").replaceAll(", +", ",").split(",");
|
mods = props.getProperty("mods").replaceAll(", +", ",").split(",");
|
||||||
admins = props.getProperty("admins").replaceAll(", +", ",").split(",");
|
admins = props.getProperty("admins").replaceAll(", +", ",").split(",");
|
||||||
|
|
||||||
props.clear();
|
props.clear();
|
||||||
|
|
||||||
Constants.GameServer.MOTD = "@yel@Welcome to @whi@" + Config.SERVER_NAME + "@yel@ - World @whi@" + (Config.SERVER_NUM == 0 ? 2 : Config.SERVER_NUM) + " (" + (Config.members ? "P2P" : "F2P") + ")";
|
Constants.GameServer.MOTD = "@yel@Welcome to @whi@" + Config.SERVER_NAME + "@yel@ - World @whi@" + (Config.SERVER_NUM == 0 ? 2 : Config.SERVER_NUM) + " (" + (Config.members ? "P2P" : "F2P") + ")";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.moparscape.msc.gs.phandler.client;
|
package org.moparscape.msc.gs.phandler.client;
|
||||||
|
|
||||||
import org.apache.mina.common.IoSession;
|
import org.apache.mina.common.IoSession;
|
||||||
|
import org.moparscape.msc.config.Config;
|
||||||
import org.moparscape.msc.gs.builders.RSCPacketBuilder;
|
import org.moparscape.msc.gs.builders.RSCPacketBuilder;
|
||||||
import org.moparscape.msc.gs.connection.Packet;
|
import org.moparscape.msc.gs.connection.Packet;
|
||||||
import org.moparscape.msc.gs.model.Player;
|
import org.moparscape.msc.gs.model.Player;
|
||||||
@ -14,7 +15,7 @@ public class DummyPacket implements PacketHandler {
|
|||||||
if (p.getLength() > 2) { // 1 for byte, 2 for short
|
if (p.getLength() > 2) { // 1 for byte, 2 for short
|
||||||
byte b = p.readByte();
|
byte b = p.readByte();
|
||||||
int clientVersion = p.readShort();
|
int clientVersion = p.readShort();
|
||||||
if (clientVersion > 34 && clientVersion < 40) {
|
if (clientVersion > Config.SERVER_VERSION - 5 && clientVersion < Config.SERVER_VERSION + 1) {
|
||||||
RSCPacketBuilder pb = new RSCPacketBuilder();
|
RSCPacketBuilder pb = new RSCPacketBuilder();
|
||||||
pb.setBare(true);
|
pb.setBare(true);
|
||||||
pb.addByte((byte) 4); // client update
|
pb.addByte((byte) 4); // client update
|
||||||
|
@ -62,7 +62,7 @@ public class PlayerLogin implements PacketHandler {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
player.load(username, password, 0, reconnecting);
|
player.load(username, password, 0, reconnecting);
|
||||||
if (clientVersion < 39) {
|
if (clientVersion < Config.SERVER_VERSION) {
|
||||||
player.clientWarn(true);
|
player.clientWarn(true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user