[FIX] getType to getLegacyType

This commit is contained in:
Gravit 2019-02-10 15:55:27 +07:00
parent c1711d39d3
commit 40fe55a46d
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
18 changed files with 21 additions and 20 deletions

View file

@ -21,7 +21,7 @@ public CustomRequest(LauncherConfig config) {
public abstract String getName(); public abstract String getName();
@Override @Override
public final Integer getType() { public final Integer getLegacyType() {
return 255; return 255;
} }

View file

@ -21,7 +21,7 @@ public PingRequest(LauncherConfig config) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.PING.getNumber(); return RequestType.PING.getNumber();
} }

View file

@ -44,7 +44,7 @@ protected Request(LauncherConfig config) {
} }
@LauncherAPI @LauncherAPI
public abstract Integer getType(); public abstract Integer getLegacyType();
@LauncherAPI @LauncherAPI
protected final void readError(HInput input) throws IOException { protected final void readError(HInput input) throws IOException {
@ -81,7 +81,7 @@ private void writeHandshake(HInput input, HOutput output) throws IOException {
output.writeInt(Launcher.PROTOCOL_MAGIC); output.writeInt(Launcher.PROTOCOL_MAGIC);
output.writeBigInteger(config.publicKey.getModulus(), SecurityHelper.RSA_KEY_LENGTH + 1); output.writeBigInteger(config.publicKey.getModulus(), SecurityHelper.RSA_KEY_LENGTH + 1);
output.writeLong(session); output.writeLong(session);
output.writeVarInt(getType()); output.writeVarInt(getLegacyType());
output.flush(); output.flush();
// Verify is accepted // Verify is accepted

View file

@ -17,7 +17,7 @@ public ExecCommandRequest(LogHelper.Output output, String cmd) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.EXECCOMMAND.getNumber(); return RequestType.EXECCOMMAND.getNumber();
} }

View file

@ -5,6 +5,7 @@
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launcher.request.Request; import ru.gravit.launcher.request.Request;
import ru.gravit.launcher.request.RequestType; import ru.gravit.launcher.request.RequestType;
import ru.gravit.launcher.request.websockets.RequestInterface;
import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.launcher.serialize.SerializeLimits; import ru.gravit.launcher.serialize.SerializeLimits;
@ -71,7 +72,7 @@ public AuthRequest(String login, byte[] encryptedPassword, HWID hwid, int auth_i
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.AUTH.getNumber(); return RequestType.AUTH.getNumber();
} }
/*public class EchoRequest implements RequestInterface /*public class EchoRequest implements RequestInterface
@ -83,7 +84,7 @@ public EchoRequest(String echo) {
} }
@Override @Override
public String getType() { public String getLegacyType() {
return "echo"; return "echo";
} }
}*/ }*/

View file

@ -71,7 +71,7 @@ public AuthServerRequest(String login, byte[] encryptedPassword, int auth_id) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.SERVERAUTH.getNumber(); return RequestType.SERVERAUTH.getNumber();
} }

View file

@ -10,7 +10,7 @@
public class ChangeServerRequest extends Request<ChangeServerRequest.Result> { public class ChangeServerRequest extends Request<ChangeServerRequest.Result> {
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.CHANGESERVER.getNumber(); return RequestType.CHANGESERVER.getNumber();
} }

View file

@ -32,7 +32,7 @@ public CheckServerRequest(String username, String serverID) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.CHECK_SERVER.getNumber(); return RequestType.CHECK_SERVER.getNumber();
} }

View file

@ -34,7 +34,7 @@ public JoinServerRequest(String username, String accessToken, String serverID) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.JOIN_SERVER.getNumber(); return RequestType.JOIN_SERVER.getNumber();
} }

View file

@ -17,7 +17,7 @@ public SetProfileRequest(LauncherConfig config, ClientProfile profile) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.SETPROFILE.getNumber(); return RequestType.SETPROFILE.getNumber();
} }

View file

@ -77,7 +77,7 @@ public LauncherRequest(LauncherConfig config) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.LAUNCHER.getNumber(); return RequestType.LAUNCHER.getNumber();
} }

View file

@ -88,7 +88,7 @@ public LegacyLauncherRequest(LauncherConfig config) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.LEGACYLAUNCHER.getNumber(); return RequestType.LEGACYLAUNCHER.getNumber();
} }

View file

@ -27,7 +27,7 @@ public ProfilesRequest(LauncherConfig config) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.PROFILES.getNumber(); return RequestType.PROFILES.getNumber();
} }

View file

@ -25,7 +25,7 @@ public UpdateListRequest(LauncherConfig config) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.UPDATE_LIST.getNumber(); return RequestType.UPDATE_LIST.getNumber();
} }

View file

@ -285,7 +285,7 @@ private void downloadFile(Path file, HashedFile hFile, InputStream input) throws
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.UPDATE.getNumber(); return RequestType.UPDATE.getNumber();
} }

View file

@ -32,7 +32,7 @@ public BatchProfileByUsernameRequest(String... usernames) throws IOException {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.BATCH_PROFILE_BY_USERNAME.getNumber(); return RequestType.BATCH_PROFILE_BY_USERNAME.getNumber();
} }

View file

@ -30,7 +30,7 @@ public ProfileByUUIDRequest(UUID uuid) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.PROFILE_BY_UUID.getNumber(); return RequestType.PROFILE_BY_UUID.getNumber();
} }

View file

@ -29,7 +29,7 @@ public ProfileByUsernameRequest(String username) {
} }
@Override @Override
public Integer getType() { public Integer getLegacyType() {
return RequestType.PROFILE_BY_USERNAME.getNumber(); return RequestType.PROFILE_BY_USERNAME.getNumber();
} }