2
2
3
3
import org .runejs .client .frame .ScreenController ;
4
4
import org .runejs .client .frame .ScreenMode ;
5
- import org .runejs .client .language .Native ;
6
- import org .runejs .client .media .renderable .actor .Player ;
7
5
import org .runejs .client .scene .SceneCluster ;
8
6
import org .runejs .client .util .Signlink ;
9
7
import org .runejs .client .util .Timer ;
12
10
13
11
import java .awt .*;
14
12
import java .awt .event .*;
15
- import java .io .IOException ;
16
13
import java .lang .reflect .Method ;
17
14
import java .net .InetAddress ;
18
15
import java .net .URL ;
@@ -140,39 +137,16 @@ public synchronized void closeGameShell() {
140
137
}
141
138
}
142
139
143
- public void stop () {
144
- if (this == currentGameShell && !closedClient )
145
- exitTimeInMillis = System .currentTimeMillis () + 4000L ;
146
- }
147
-
148
- public boolean verifyHost (int arg0 ) {
149
- String string = getDocumentBase ().getHost ().toLowerCase ();
150
- if (arg0 != 31 )
151
- return false ;
152
- if (string .endsWith ("127.0.0.1" ))
153
- return true ;
154
- for (/**/ ; string .length () > 0 && string .charAt (string .length () - 1 ) >= '0' && string .charAt (string .length () + -1 ) <= 57 ; string = string .substring (0 , string .length () - 1 )) {
155
- /* empty */
156
- }
157
- if (string .endsWith ("192.168.1." ))
158
- return true ;
159
- openErrorPage ("invalidhost" );
160
- return false ;
161
- }
162
-
163
140
public void windowOpened (WindowEvent arg0 ) {
164
141
}
165
142
166
143
public void openErrorPage (String gameError ) {
144
+ // Previously opened an error page in a browser
145
+ // getAppletContext().showDocument(new URL(getCodeBase(), ("error_game_" + gameError + ".ws")));
167
146
if (!gameShellError ) {
168
147
gameShellError = true ;
169
148
System .out .println ("error_game_" + gameError );
170
- try {
171
- // getAppletContext().showDocument(new URL(getCodeBase(), ("error_game_" + gameError + ".ws")));
172
- } catch (Exception exception ) {
173
- }
174
149
}
175
-
176
150
}
177
151
178
152
public void start () {
@@ -217,27 +191,6 @@ public URL getDocumentBase() {
217
191
}
218
192
return null ;
219
193
}
220
-
221
- public void displayClientFrame (int clientVersion , int width , int height , int fileStoreId ) {
222
- if (currentGameShell != null ) {
223
- openErrorPage ("alreadyloaded" );
224
- return ;
225
- }
226
- MovedStatics .width = height ;
227
- Game .clientVersion = clientVersion ;
228
- MovedStatics .height = width ;
229
- currentGameShell = this ;
230
- if (Game .signlink == null ) {
231
- try {
232
- MovedStatics .signlink = Game .signlink = new Signlink (false , this , InetAddress .getByName (getCodeBase ().getHost ()), fileStoreId , null , 0 );
233
- } catch (IOException e ) {
234
- e .printStackTrace ();
235
- }
236
- }
237
- Game .signlink .createThreadNode (1 , this );
238
- windowActivated (null );
239
- }
240
-
241
194
public void windowIconified (WindowEvent arg0 ) {
242
195
}
243
196
@@ -277,14 +230,6 @@ public void runAfterGameLoop() {
277
230
this .game .updateStatusText ();
278
231
}
279
232
280
- // public AppletContext getAppletContext() {
281
- // if(Class35.aFrame1732 != null)
282
- // return null;
283
- // if(ISAAC.aClass31_521 != null && ISAAC.aClass31_521.anApplet740 != this)
284
- // return ISAAC.aClass31_521.anApplet740.getAppletContext();
285
- // return super.getAppletContext();
286
- // }
287
-
288
233
public void openClientApplet (String cacheFolder , int cacheIndexes , int fileStoreId , InetAddress inetAddress , int clientVersion ) {
289
234
try {
290
235
int height = 503 ;
@@ -295,7 +240,6 @@ public void openClientApplet(String cacheFolder, int cacheIndexes, int fileStore
295
240
currentGameShell = this ;
296
241
clientFrame = new Frame ();
297
242
clientFrame .setTitle (Configuration .SERVER_DISPLAY_NAME );
298
- // Class35.aFrame1732.setResizable(false);
299
243
ScreenController .frameMode (ScreenMode .FIXED );
300
244
clientFrame .setPreferredSize (new Dimension (width , height ));
301
245
clientFrame .setResizable (ScreenController .frameMode == ScreenMode .RESIZABLE );
@@ -304,7 +248,6 @@ public void openClientApplet(String cacheFolder, int cacheIndexes, int fileStore
304
248
clientFrame .toFront ();
305
249
Insets insets = clientFrame .getInsets ();
306
250
clientFrame .setSize (insets .right + width + insets .left , insets .bottom + insets .top + height );
307
- // Class35.aFrame1732.setLocationRelativeTo(null);
308
251
MovedStatics .signlink = Game .signlink = new Signlink (true , null , inetAddress , fileStoreId , cacheFolder , cacheIndexes );
309
252
Game .signlink .createThreadNode (1 , this );
310
253
} catch (Exception exception ) {
@@ -324,21 +267,11 @@ public void windowClosing(WindowEvent windowEvent) {
324
267
destroy ();
325
268
}
326
269
327
- // public String getParameter(String parameter) {
328
- // if(Class35.aFrame1732 != null)
329
- // return null;
330
- // if(ISAAC.aClass31_521 != null && this != ISAAC.aClass31_521.anApplet740)
331
- // return ISAAC.aClass31_521.anApplet740.getParameter(parameter);
332
- // return super.getParameter(parameter);
333
- // }
334
-
335
270
public void windowDeactivated (WindowEvent windowEvent ) {
336
271
}
337
272
338
273
public synchronized void setCanvas () {
339
274
Container container = clientFrame ;
340
- // else
341
- // container = ISAAC.aClass31_521.anApplet740;
342
275
if (Game .gameCanvas != null ) {
343
276
Game .gameCanvas .removeFocusListener (this );
344
277
container .remove (Game .gameCanvas );
0 commit comments