checkstyle
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
package net.runelite.client.rs;
|
package net.runelite.client.rs;
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.applet.AppletContext;
|
import java.applet.AppletContext;
|
||||||
import java.applet.AppletStub;
|
import java.applet.AppletStub;
|
||||||
import java.awt.*;
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
@@ -15,49 +13,55 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class Launcher implements AppletStub {
|
public class Launcher implements AppletStub
|
||||||
|
{
|
||||||
|
|
||||||
public static final Logger logger = Logger.getLogger(Launcher.class.getSimpleName());
|
public static final Logger logger = Logger.getLogger(Launcher.class.getSimpleName());
|
||||||
|
|
||||||
private static final HashMap<String, String> params = new HashMap<String, String>();
|
private static final HashMap<String, String> params = new HashMap<String, String>();
|
||||||
private static final HashMap<String, String> cfg = new HashMap<String, String>();
|
private static final HashMap<String, String> cfg = new HashMap<String, String>();
|
||||||
|
private static URL codebase;
|
||||||
|
|
||||||
static {
|
static
|
||||||
cfg.put("privacyurl", "http://www.jagex.com/g=oldscape/privacy/privacy.ws");
|
{
|
||||||
cfg.put("window_preferredheight", "600");
|
cfg.put("privacyurl", "http://www.jagex.com/g=oldscape/privacy/privacy.ws");
|
||||||
cfg.put("msg", "new_version_link=http://oldschool.runescape.com/");
|
cfg.put("window_preferredheight", "600");
|
||||||
cfg.put("applet_minwidth", "765");
|
cfg.put("msg", "new_version_link=http://oldschool.runescape.com/");
|
||||||
cfg.put("adverturl", "http://www.runescape.com/g=oldscape/bare_advert.ws");
|
cfg.put("applet_minwidth", "765");
|
||||||
cfg.put("cachedir", "oldschool");
|
cfg.put("adverturl", "http://www.runescape.com/g=oldscape/bare_advert.ws");
|
||||||
cfg.put("window_preferredwidth", "800");
|
cfg.put("cachedir", "oldschool");
|
||||||
cfg.put("applet_maxheight", "2160");
|
cfg.put("window_preferredwidth", "800");
|
||||||
cfg.put("win_sub_version", "1");
|
cfg.put("applet_maxheight", "2160");
|
||||||
cfg.put("browsercontrol_win_x86_jar", "browsercontrol_0_-1928975093.jar");
|
cfg.put("win_sub_version", "1");
|
||||||
cfg.put("other_sub_version", "2");
|
cfg.put("browsercontrol_win_x86_jar", "browsercontrol_0_-1928975093.jar");
|
||||||
cfg.put("initial_jar", "gamepack_4840368.jar");
|
cfg.put("other_sub_version", "2");
|
||||||
cfg.put("advert_height", "96");
|
cfg.put("initial_jar", "gamepack_4840368.jar");
|
||||||
cfg.put("title", "Old School RuneScape");
|
cfg.put("advert_height", "96");
|
||||||
cfg.put("storebase", "0");
|
cfg.put("title", "Old School RuneScape");
|
||||||
cfg.put("initial_class", "client.class");
|
cfg.put("storebase", "0");
|
||||||
cfg.put("applet_maxwidth", "5760");
|
cfg.put("initial_class", "client.class");
|
||||||
cfg.put("download", "1230228");
|
cfg.put("applet_maxwidth", "5760");
|
||||||
cfg.put("termsurl", "http://www.jagex.com/g=oldscape/terms/terms.ws");
|
cfg.put("download", "1230228");
|
||||||
cfg.put("codebase", "http://oldschool1.runescape.com/");
|
cfg.put("termsurl", "http://www.jagex.com/g=oldscape/terms/terms.ws");
|
||||||
cfg.put("mac_sub_version", "2");
|
cfg.put("codebase", "http://oldschool1.runescape.com/");
|
||||||
cfg.put("browsercontrol_win_amd64_jar", "browsercontrol_1_1674545273.jar");
|
cfg.put("mac_sub_version", "2");
|
||||||
cfg.put("applet_minheight", "503");
|
cfg.put("browsercontrol_win_amd64_jar", "browsercontrol_1_1674545273.jar");
|
||||||
cfg.put("viewerversion", "124");
|
cfg.put("applet_minheight", "503");
|
||||||
}
|
cfg.put("viewerversion", "124");
|
||||||
|
}
|
||||||
|
|
||||||
public Launcher() {
|
public Launcher()
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
parseParams(new FileInputStream(new File("./params.txt")));
|
parseParams(new FileInputStream(new File("./params.txt")));
|
||||||
String worldListKey = null;
|
String worldListKey = null;
|
||||||
for (Map.Entry<String, String> paramEntry : params.entrySet()) {
|
for (Map.Entry<String, String> paramEntry : params.entrySet())
|
||||||
|
{
|
||||||
String key = paramEntry.getKey();
|
String key = paramEntry.getKey();
|
||||||
String value = paramEntry.getValue();
|
String value = paramEntry.getValue();
|
||||||
if (value.contains("slr.ws")) {
|
if (value.contains("slr.ws"))
|
||||||
|
{
|
||||||
worldListKey = key;
|
worldListKey = key;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -71,58 +75,69 @@ public class Launcher implements AppletStub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static URL codebase;
|
private static void parseParams(InputStream stream) throws IOException
|
||||||
|
{
|
||||||
|
BufferedReader br = new BufferedReader(new InputStreamReader(stream));
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
int idx = line.indexOf('=');
|
||||||
|
if (idx != -1)
|
||||||
|
{
|
||||||
|
String key = line.substring(0, idx);
|
||||||
|
String val = line.substring(idx + 1);
|
||||||
|
if (key.equals("param"))
|
||||||
|
{
|
||||||
|
idx = val.indexOf('=');
|
||||||
|
key = val.substring(0, idx);
|
||||||
|
val = val.substring(idx + 1);
|
||||||
|
params.put(key, val);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cfg.put(key, val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void parseParams(InputStream stream) throws IOException {
|
public static void log(String format, Object... params)
|
||||||
BufferedReader br = new BufferedReader(new InputStreamReader(stream));
|
{
|
||||||
String line;
|
System.out.printf(format + "\n", params);
|
||||||
while ((line = br.readLine()) != null) {
|
}
|
||||||
int idx = line.indexOf('=');
|
|
||||||
if (idx != -1) {
|
|
||||||
String key = line.substring(0, idx);
|
|
||||||
String val = line.substring(idx + 1);
|
|
||||||
if (key.equals("param")) {
|
|
||||||
idx = val.indexOf('=');
|
|
||||||
key = val.substring(0, idx);
|
|
||||||
val = val.substring(idx + 1);
|
|
||||||
params.put(key, val);
|
|
||||||
} else {
|
|
||||||
cfg.put(key, val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isActive() {
|
public boolean isActive()
|
||||||
return false;
|
{
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public URL getDocumentBase() {
|
public URL getDocumentBase()
|
||||||
return codebase;
|
{
|
||||||
}
|
return codebase;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public URL getCodeBase() {
|
public URL getCodeBase()
|
||||||
return codebase;
|
{
|
||||||
}
|
return codebase;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getParameter(String name) {
|
public String getParameter(String name)
|
||||||
return params.get(name);
|
{
|
||||||
}
|
return params.get(name);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AppletContext getAppletContext() {
|
public AppletContext getAppletContext()
|
||||||
return null;
|
{
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void appletResize(int width, int height) {
|
public void appletResize(int width, int height)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
public static void log(String format, Object... params) {
|
|
||||||
System.out.printf(format + "\n", params);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,10 +41,13 @@ public abstract class RSBufferMixin implements RSBuffer
|
|||||||
private static BigInteger exponent = new BigInteger("db7adc8af6f44b1359c5d1701d6bddc3eb47ce3ff2c690521ec8a9ea27525bf69263cea25648540cb572db8c703eeab85e740d1b44342555ab5733e9884f979fb42929d0a21b79d4a180fe83e48e1abaf08ec41e9dc2c0d8b087dc1a9637df68a64b82dddfdfbc6ae31a3c077434c892c7e8425a0184eed3971fa77b0ec895399d7b683042ee981990d9dd2ce3c436be9b2ec93587fb25d1f17cbb771e0f0bf88b27c47af0fd5417f4d1977e3f5483f787a71f59820d1b29a9af9460c6ad8a713ee2a1bf4021e51ce9776aa4eddae3616a808174493b572218c957c15b06df5aef889dbfd5de3a1326ea2d47dbf68b5bd06201b36d6ca5dedb69a8be84c254bb", 16);
|
private static BigInteger exponent = new BigInteger("db7adc8af6f44b1359c5d1701d6bddc3eb47ce3ff2c690521ec8a9ea27525bf69263cea25648540cb572db8c703eeab85e740d1b44342555ab5733e9884f979fb42929d0a21b79d4a180fe83e48e1abaf08ec41e9dc2c0d8b087dc1a9637df68a64b82dddfdfbc6ae31a3c077434c892c7e8425a0184eed3971fa77b0ec895399d7b683042ee981990d9dd2ce3c436be9b2ec93587fb25d1f17cbb771e0f0bf88b27c47af0fd5417f4d1977e3f5483f787a71f59820d1b29a9af9460c6ad8a713ee2a1bf4021e51ce9776aa4eddae3616a808174493b572218c957c15b06df5aef889dbfd5de3a1326ea2d47dbf68b5bd06201b36d6ca5dedb69a8be84c254bb", 16);
|
||||||
|
|
||||||
@Copy("encryptRsa")
|
@Copy("encryptRsa")
|
||||||
public void rs$encryptRsa(BigInteger var1, BigInteger var2) { }
|
public void rs$encryptRsa(BigInteger var1, BigInteger var2)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
@Replace("encryptRsa")
|
@Replace("encryptRsa")
|
||||||
public void rl$encryptRsa(BigInteger var1, BigInteger var2) {
|
public void rl$encryptRsa(BigInteger var1, BigInteger var2)
|
||||||
|
{
|
||||||
rs$encryptRsa(modulus, exponent);
|
rs$encryptRsa(modulus, exponent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user