A RuneTek3 client (377) that is deobfuscated, converted to Kotlin, and includes QoL improvements.
0

Configure Feed

Select the types of activity you want to include in your feed.

added ::items to open the internal jagex itemsearch

+509 -479
+473 -459
src/main/java/com/jagex/runescape/Game.java
··· 25 25 import com.jagex.runescape.cache.def.ItemDefinition; 26 26 import com.jagex.runescape.cache.media.*; 27 27 import com.jagex.runescape.collection.Node; 28 + import com.jagex.runescape.config.MovementType; 28 29 import com.jagex.runescape.media.Animation; 29 30 import com.jagex.runescape.media.ProducingGraphicsBuffer; 30 31 import com.jagex.runescape.media.Rasterizer; ··· 59 60 public class Game extends GameShell { 60 61 61 62 63 + public static final int[][] playerColours = { 64 + {6798, 107, 10283, 16, 4797, 7744, 5799, 4634, 33697, 22433, 2983, 54193}, 65 + {8741, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153, 56621, 4783, 1341, 16578, 35003, 25239}, 66 + {25238, 8742, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153, 56621, 4783, 1341, 16578, 35003}, 67 + {4626, 11146, 6439, 12, 4758, 10270}, {4550, 4537, 5681, 5673, 5790, 6806, 8076, 4574}}; 68 + public static final int[] SKIN_COLOURS = {9104, 10275, 7595, 3610, 7975, 8526, 918, 38802, 24466, 10145, 58654, 69 + 5027, 1457, 16565, 34991, 25486}; 70 + public static Player localPlayer; 71 + public static int[] BITFIELD_MAX_VALUE; 72 + public static int pulseCycle; 73 + private static boolean fps; 74 + private static int anInt895; 75 + private static int[] SKILL_EXPERIENCE; 76 + private static boolean accountFlagged; 77 + private static int anInt978; 78 + private static int anInt1052; 79 + private static int anInt1082; 80 + private static int anInt1100; 81 + private static int anInt1139; 82 + private static int anInt1160; 83 + private static int anInt1165; 84 + private static int anInt1168; 85 + private static int anInt1235; 86 + private static int anInt1237; 87 + private static int drawCycle; 88 + private static String VALID_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"\243$%^&*()-_=+[{]};:'@#~,<.>/?\\| "; 89 + 90 + static { 91 + SKILL_EXPERIENCE = new int[99]; 92 + int value = 0; 93 + for (int level = 0; level < 99; level++) { 94 + int realLevel = level + 1; 95 + int expDiff = (int) ((double) realLevel + 300D * Math.pow(2D, (double) realLevel / 7D)); 96 + value += expDiff; 97 + SKILL_EXPERIENCE[level] = value / 4; 98 + } 99 + 100 + BITFIELD_MAX_VALUE = new int[32]; 101 + value = 2; 102 + for (int k = 0; k < 32; k++) { 103 + BITFIELD_MAX_VALUE[k] = value - 1; 104 + value += value; 105 + } 106 + 107 + } 108 + 62 109 private final int[] soundVolume = new int[50]; 110 + private final int[] objectTypes = {0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3}; 111 + public int opcode; 112 + public int portOffset; 113 + public boolean lowMemory; 114 + public int openChatboxWidgetId = -1; 115 + public int[] widgetSettings = new int[2000]; 116 + public int[] tabWidgetIds = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; 117 + public int[] sound = new int[50]; 118 + public int plane; 119 + public boolean loggedIn = false; 120 + public int openScreenWidgetId = -1; 121 + public boolean redrawTabArea = false; 122 + public Buffer buffer = Buffer.allocate(1); 123 + public Index[] stores = new Index[5]; 124 + public boolean redrawChatbox = false; 125 + public Widget chatboxInterface = new Widget(); 126 + public int currentTabId = 3; 127 + public OnDemandRequester onDemandRequester; 128 + int chatboxScroll; 63 129 private int[] archiveHashes = new int[9]; 64 130 private byte[][] terrainData; 65 131 private String reportedName = ""; 66 - private int[] anIntArray842 = {0xffff00, 0xff0000, 0x00ff00, 0x00ffff, 0xff00ff, 0xffffff}; 132 + private int[] spokenPalette = {0xffff00, 0xff0000, 0x00ff00, 0x00ffff, 0xff00ff, 0xffffff}; 67 133 private int[] skillExperience = new int[SkillConstants.SKILL_COUNT]; 68 134 private int hintIconX; 69 135 private int hintIconY; ··· 71 137 private int markerOffsetX; 72 138 private int markerOffsetY; 73 139 private String[] friendUsernames = new String[200]; 74 - private int anInt850; 75 - public int chatboxScroll; 140 + private int reconnectionAttempts; 76 141 private int[] cameraAmplitude = new int[5]; 77 - private int anInt853; 78 - private int anInt854 = 2; 142 + private int cameraOffsetX; 143 + private int cameraOffsetModifierX = 2; 79 144 private int ignoresCount; 80 145 private int[] mapCoordinates; 81 146 private int[] terrainDataIds; 82 147 private int[] objectDataIds; 83 148 private int friendsCount; 84 149 private int friendListStatus; 85 - private String aString861 = ""; 86 - private int anInt862; 87 - private String[] aStringArray863 = new String[100]; 88 - private int[] anIntArray864 = new int[100]; 89 - private int anInt865; 150 + private String lastItemSearchInput = ""; 151 + private int itemSearchResultCount; 152 + private String[] itemSearchResultNames = new String[100]; 153 + private int[] itemSearchResultIds = new int[100]; 154 + public int itemSearchScroll; 90 155 private boolean messagePromptRaised = false; 91 156 private int playerRights; 92 - private static boolean fps; 93 157 private int packetSize; 94 - public int opcode; 95 - private int packetReadAnticheat; 96 - private int anInt872; 158 + private int netCycle; 159 + private int netAliveCycle; 97 160 private int idleLogout; 98 161 private int anInt874; 99 162 private int anInt875; ··· 114 177 private int chunkY; 115 178 private int[][][] intGroundArray; 116 179 private int anInt893; 117 - private static int anInt895; 118 180 private ImageRGB[] cursorCross = new ImageRGB[8]; 119 181 private ISAACCipher incomingRandom; 120 182 private boolean useJaggrab; ··· 132 194 private ProducingGraphicsBuffer aClass18_913; 133 195 private ProducingGraphicsBuffer aClass18_914; 134 196 private int anInt915; 135 - private int anInt916; 136 - private int anInt917 = 2; 197 + private int cameraYawOffset; 198 + private int cameraYawModifier = 2; 137 199 private int[] anIntArray920 = new int[151]; 138 200 private int world = 1; 139 - public int portOffset; 140 201 private boolean memberServer = true; 141 - public boolean lowMemory; 142 202 private boolean[] customCameraActive = new boolean[5]; 143 203 private Buffer tempBuffer = Buffer.allocate(1); 144 204 private long serverSeed; 145 205 private int drawX = -1; 146 206 private int drawY = -1; 147 - private int anInt935 = -1; 207 + private int lastSoundType = -1; 148 208 private String chatboxInputMessage = ""; 149 209 private int anInt939; 150 210 private int anInt940 = 50; ··· 159 219 private String inputInputMessage = ""; 160 220 private boolean drawTabIcons = false; 161 221 private int tickDelta; 162 - private static int[] SKILL_EXPERIENCE; 163 222 private ImageRGB[] imageHeadIcons = new ImageRGB[32]; 164 223 private int bankInsertMode; 165 224 private String statusLineOne = ""; 166 225 private String statusLineTwo = ""; 167 226 private int fullscreenWidgetChildId = -1; 168 227 private int thisPlayerServerId = -1; 169 - private static boolean accountFlagged; 170 228 private Buffer outBuffer = Buffer.allocate(1); 171 229 private IndexedImage anIndexedImage1052; 172 230 private IndexedImage anIndexedImage1053; ··· 181 239 private Buffer[] cachedAppearances = new Buffer[anInt968]; 182 240 private IndexedImage[] tabIcon = new IndexedImage[13]; 183 241 private int loginScreenFocus; 184 - private static int anInt978; 185 242 private int[] firstMenuOperand = new int[500]; 186 243 private int[] secondMenuOperand = new int[500]; 187 244 private int[] menuActionTypes = new int[500]; ··· 191 248 private IndexedImage aClass50_Sub1_Sub1_Sub3_985; 192 249 private IndexedImage aClass50_Sub1_Sub1_Sub3_986; 193 250 private IndexedImage aClass50_Sub1_Sub1_Sub3_987; 194 - public int openChatboxWidgetId = -1; 195 251 private int placementX; 196 252 private int placementY; 197 253 private int[] cameraFrequency = new int[5]; ··· 205 261 private int[] chatboxLineOffsets; 206 262 private int[] sidebarOffsets; 207 263 private int[] viewportOffsets; 208 - private int[] anIntArray1003; 264 + private int[] fullScreenTextureArray; 209 265 private int anInt1004; 210 266 private int[] anIntArray1005 = new int[2000]; 211 267 private int publicChatMode; 212 - public static final int[][] playerColours = { 213 - {6798, 107, 10283, 16, 4797, 7744, 5799, 4634, 33697, 22433, 2983, 54193}, 214 - {8741, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153, 56621, 4783, 1341, 16578, 35003, 25239}, 215 - {25238, 8742, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153, 56621, 4783, 1341, 16578, 35003}, 216 - {4626, 11146, 6439, 12, 4758, 10270}, {4550, 4537, 5681, 5673, 5790, 6806, 8076, 4574}}; 217 - private int anInt1009; 218 - private int anInt1010 = 2; 268 + private int cameraOffsetY; 269 + private int cameraOffsetModifierY = 2; 219 270 private int lastClickX; 220 271 private int lastClickY; 221 272 private boolean rsAlreadyLoaded = false; ··· 232 283 private int[] skillLevel = new int[SkillConstants.SKILL_COUNT]; 233 284 private int userWeight; 234 285 private ImageRGB[] worldMapHintIcons = new ImageRGB[100]; 235 - private final int[] objectTypes = {0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3}; 236 286 private int recoveryQuestionSetTime; 237 287 private int currentSound; 238 288 private ImageRGB mapFlagMarker; 239 289 private ImageRGB aClass50_Sub1_Sub1_Sub1_1037; 240 290 private boolean aBoolean1038 = true; 241 - public int[] widgetSettings = new int[2000]; 242 291 private int nextTopLeftTileX; 243 292 private int nextTopRightTileY; 244 293 private int topLeftTileX; 245 294 private int topLeftTileY; 246 295 private int anInt1044; 247 - private int anInt1045; 248 - private boolean aBoolean1046 = false; 296 + private int randomCycle2; 297 + private boolean welcomeScreenRaised = false; 249 298 private int anInt1047; 250 299 private int anInt1048; 251 300 private int minimapState; 252 - private static int anInt1052; 253 301 private int fullscreenWidgetId = -1; 254 302 private int[] skillMaxLevel = new int[SkillConstants.SKILL_COUNT]; 255 303 private int anInt1055 = 2; ··· 273 321 private int[] minimapHintY = new int[1000]; 274 322 private ImageRGB[] aClass50_Sub1_Sub1_Sub1Array1079 = new ImageRGB[32]; 275 323 private int anInt1080 = 0x4d4233; 276 - public int[] tabWidgetIds = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; 277 - private static int anInt1082; 278 324 private int lastPasswordChangeTime; 279 325 private int[] anIntArray1084; 280 326 private int[] anIntArray1085; 281 327 private ImageRGB aClass50_Sub1_Sub1_Sub1_1086; 282 328 private CRC32 archiveCrc = new CRC32(); 283 329 private int tabAreaOverlayWidgetId = -1; 284 - public int[] sound = new int[50]; 285 - public int plane; 286 330 private String username; 287 331 private String password; 288 332 private int anInt1094; ··· 291 335 private boolean genericLoadingError = false; 292 336 private boolean reportMutePlayer = false; 293 337 private int[] characterEditColors = new int[5]; 294 - private static int anInt1100; 295 338 private int flameCycle; 296 339 private ImageRGB aClass50_Sub1_Sub1_Sub1_1102; 297 340 private ImageRGB aClass50_Sub1_Sub1_Sub1_1103; ··· 309 352 private int anInt1115; 310 353 private ImageRGB minimapCompass; 311 354 private IndexedImage[] titleFlameEmblem; 312 - private int anInt1118; 355 + private int randomCycle1; 313 356 private int anInt1119 = -30658; 314 357 private int destinationX; 315 358 private int destinationY; ··· 326 369 private Npc[] npcs = new Npc[16384]; 327 370 private int npcCount; 328 371 private int[] npcIds = new int[16384]; 329 - public boolean loggedIn = false; 330 372 private int renderCount; 331 - private static int anInt1139; 332 373 private int anInt1140 = -110; 333 374 private long aLong1141; 334 375 private ImageRGB[] moderatorIcon = new ImageRGB[2]; ··· 347 388 private ProducingGraphicsBuffer aClass18_1157; 348 389 private ProducingGraphicsBuffer gameScreenImageProducer; 349 390 private ProducingGraphicsBuffer chatboxProducingGraphicsBuffer; 350 - private static int anInt1160; 351 391 private byte aByte1161 = 97; 352 392 private boolean loadGeneratedMap = false; 353 393 private Scene currentScene; 354 - private static int anInt1165; 355 394 private int[] anIntArray1166 = new int[256]; 356 - public static Player localPlayer; 357 - private static int anInt1168; 358 - public int openScreenWidgetId = -1; 359 395 private int loginScreenUpdateTime; 360 396 private int widgetSelected; 361 397 private int anInt1172; ··· 363 399 private String selectedWidgetName; 364 400 private int[] anIntArray1176; 365 401 private int[] anIntArray1177; 366 - private int anInt1257; 402 + private int lastSoundPosition; 367 403 private int[] anIntArray1180 = new int[33]; 368 - public boolean redrawTabArea = false; 369 404 private ImageRGB[] aClass50_Sub1_Sub1_Sub1Array1182 = new ImageRGB[20]; 370 405 private int menuActionRow; 371 406 private String[] menuActionTexts = new String[500]; 372 407 private IndexedImage inventoryBackgroundImage; 373 408 private IndexedImage minimapBackgroundImage; 374 409 private IndexedImage chatboxBackgroundImage; 375 - public Buffer buffer = Buffer.allocate(1); 376 410 private int[][] cost = new int[104][104]; 377 411 private int dialogueId = -1; 378 412 private ImageRGB mapdotItem; ··· 395 429 private boolean cutsceneActive = false; 396 430 private boolean redrawChatMode = false; 397 431 private int flashingTabId = -1; 398 - public static int[] BITFIELD_MAX_VALUE; 399 432 private int lastLoginTime; 400 433 private int cameraX; 401 434 private int cameraZ; ··· 408 441 private int loginScreenState; 409 442 private int anInt1226; 410 443 private int tradeMode; 411 - public Index[] stores = new Index[5]; 412 444 private long loadRegionTime; 413 445 private int reportAbuseInterfaceID = -1; 414 446 private byte[][] objectData; 415 - private int anInt1233; 416 - private int anInt1234 = 1; 417 - private static int anInt1235; 418 - private static int anInt1237; 447 + private int mapZoomOffset; 448 + private int mapZoomModifier = 1; 419 449 private int anInt1238; 420 450 private boolean aBoolean1239 = false; 421 - public boolean redrawChatbox = false; 422 451 private int lastLoginAddress; 423 - private static boolean aBoolean1242 = true; 424 452 private volatile boolean currentlyDrawingFlames = false; 425 - private int inputType; 453 + public int inputType; 426 454 private byte[] aByteArray1245 = new byte[16384]; 427 455 private boolean inTutorialIsland; 428 456 private ImageRGB minimapEdge; 429 457 private MouseCapturer mouseCapturer; 430 - public Widget chatboxInterface = new Widget(); 431 - private long aLong1172; 458 + private long lastSoundTime; 432 459 private int cameraVertical = 128; 433 460 private int cameraHorizontal; 434 461 private int cameraVelocityHorizontal; 435 462 private int cameraVelocityVertical; 436 463 private int cameraRandomisationA; 437 - private int anInt1256 = 1; 464 + private int cameraPitchModifier = 1; 438 465 private int[] anIntArray1258 = new int[100]; 439 466 private int[] soundDelay = new int[50]; 440 467 private CollisionMap[] currentCollisionMap = new CollisionMap[4]; ··· 445 472 private boolean cameraMovedWrite = false; 446 473 private boolean musicEnabled = true; 447 474 private int[] friendWorlds = new int[200]; 448 - public static final int[] SKIN_COLOURS = {9104, 10275, 7595, 3610, 7975, 8526, 918, 38802, 24466, 10145, 58654, 449 - 5027, 1457, 16565, 34991, 25486}; 450 475 private int lastItemDragTime; 451 476 private int nextSong; 452 477 private boolean songChanging = true; 453 - private int anInt1272 = -1; 478 + private int lastSound = -1; 454 479 private int unreadWebsiteMessages; 455 480 private boolean windowFocused = true; 456 481 private int lastRegionId = -1; ··· 461 486 private LinkedList projectileQueue = new LinkedList(); 462 487 private boolean loadingError = false; 463 488 private int anInt1284; 464 - public int currentTabId = 3; 465 489 private int[] anIntArray1286 = new int[33]; 466 490 private ImageRGB[] aClass50_Sub1_Sub1_Sub1Array1288 = new ImageRGB[32]; 467 491 private int secondaryCameraVertical; 468 492 private int[] anIntArray1290 = {17, 24, 34, 40}; 469 - public OnDemandRequester onDemandRequester; 470 493 private IndexedImage titleboxImage; 471 494 private IndexedImage titleboxButtonImage; 472 495 private int removePlayerCount; ··· 484 507 private int menuOffsetY; 485 508 private int menuWidth; 486 509 private int menuHeight; 487 - private static int drawCycle; 488 510 private int[] anIntArray1310; 489 511 private int[] anIntArray1311; 490 512 private int[] anIntArray1312; ··· 497 519 private int anInt1322; 498 520 private GroundArray<LinkedList> groundItems = new GroundArray(); 499 521 private int runEnergy; 500 - public static int pulseCycle; 501 522 private int[] characterEditIdentityKits = new int[7]; 502 523 private int currentSong = -1; 503 524 private int atInventoryLoopCycle; 504 525 private int anInt1330; 505 526 private int anInt1331; 506 527 private int atInventoryInterfaceType; 507 - private static String VALID_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"\243$%^&*()-_=+[{]};:'@#~,<.>/?\\| "; 508 - 509 - static { 510 - SKILL_EXPERIENCE = new int[99]; 511 - int value = 0; 512 - for (int level = 0; level < 99; level++) { 513 - int realLevel = level + 1; 514 - int expDiff = (int) ((double) realLevel + 300D * Math.pow(2D, (double) realLevel / 7D)); 515 - value += expDiff; 516 - SKILL_EXPERIENCE[level] = value / 4; 517 - } 518 - 519 - BITFIELD_MAX_VALUE = new int[32]; 520 - value = 2; 521 - for (int k = 0; k < 32; k++) { 522 - BITFIELD_MAX_VALUE[k] = value - 1; 523 - value += value; 524 - } 525 - 526 - } 527 528 528 529 private static String getCombatLevelColour(int user, int opponent) { 529 530 int difference = user - opponent; ··· 563 564 } 564 565 } 565 566 566 - private void setHighMemory() { 567 - Scene.lowMemory = false; 568 - Rasterizer3D.lowMemory = false; 569 - lowMemory = false; 570 - Region.lowMemory = false; 571 - GameObjectDefinition.lowMemory = false; 572 - } 573 - 574 - private void setLowMemory() { 575 - Scene.lowMemory = true; 576 - Rasterizer3D.lowMemory = true; 577 - lowMemory = true; 578 - Region.lowMemory = true; 579 - GameObjectDefinition.lowMemory = true; 580 - } 581 - 582 567 private static String getFullAmountText(int amount) { 583 568 String string = String.valueOf(amount); 584 569 for (int index = string.length() - 3; index > 0; index -= 3) ··· 598 583 return coins / 1000 + "K"; 599 584 else 600 585 return coins / 0xf4240 + "M"; 586 + } 587 + 588 + private void setHighMemory() { 589 + Scene.lowMemory = false; 590 + Rasterizer3D.lowMemory = false; 591 + lowMemory = false; 592 + Region.lowMemory = false; 593 + GameObjectDefinition.lowMemory = false; 594 + } 595 + 596 + private void setLowMemory() { 597 + Scene.lowMemory = true; 598 + Rasterizer3D.lowMemory = true; 599 + lowMemory = true; 600 + Region.lowMemory = true; 601 + GameObjectDefinition.lowMemory = true; 601 602 } 602 603 603 604 private void addChatMessage(String name, String message, int type) { ··· 697 698 SignLink.midi = "voladjust"; 698 699 } 699 700 700 - private void method14(String s) { 701 - if (s == null || s.length() == 0) { 702 - anInt862 = 0; 701 + private void itemSearch(String input) { 702 + if (input == null || input.length() == 0) { 703 + itemSearchResultCount = 0; 703 704 return; 704 705 } 705 - String s1 = s; 706 - String[] as = new String[100]; 706 + String searchTerm = input; 707 + String[] splitString = new String[100]; 707 708 int j = 0; 708 709 do { 709 - int k = s1.indexOf(" "); 710 - if (k == -1) 710 + int spaceIndex = searchTerm.indexOf(" "); 711 + if (spaceIndex == -1) 711 712 break; 712 - String s2 = s1.substring(0, k).trim(); 713 - if (s2.length() > 0) 714 - as[j++] = s2.toLowerCase(); 715 - s1 = s1.substring(k + 1); 713 + String first = searchTerm.substring(0, spaceIndex).trim(); 714 + if (first.length() > 0) 715 + splitString[j++] = first.toLowerCase(); 716 + searchTerm = searchTerm.substring(spaceIndex + 1); 716 717 } while (true); 717 - s1 = s1.trim(); 718 - if (s1.length() > 0) 719 - as[j++] = s1.toLowerCase(); 720 - anInt862 = 0; 718 + searchTerm = searchTerm.trim(); 719 + if (searchTerm.length() > 0) 720 + splitString[j++] = searchTerm.toLowerCase(); 721 + itemSearchResultCount = 0; 721 722 label0: 722 - for (int l = 0; l < ItemDefinition.count; l++) { 723 - ItemDefinition class16 = ItemDefinition.lookup(l); 724 - if (class16.notedTemplateId != -1 || class16.name == null) 723 + for (int itemId = 0; itemId < ItemDefinition.count; itemId++) { 724 + ItemDefinition itemDefinition = ItemDefinition.lookup(itemId); 725 + if (itemDefinition.notedTemplateId != -1 || itemDefinition.name == null) 725 726 continue; 726 - String s3 = class16.name.toLowerCase(); 727 + String itemName = itemDefinition.name.toLowerCase(); 727 728 for (int i1 = 0; i1 < j; i1++) 728 - if (s3.indexOf(as[i1]) == -1) 729 + if (!itemName.contains(splitString[i1])) 729 730 continue label0; 730 731 731 - aStringArray863[anInt862] = s3; 732 - anIntArray864[anInt862] = l; 733 - anInt862++; 734 - if (anInt862 >= aStringArray863.length) 732 + itemSearchResultNames[itemSearchResultCount] = itemDefinition.name; 733 + itemSearchResultIds[itemSearchResultCount] = itemId; 734 + 735 + itemSearchResultCount++; 736 + if (itemSearchResultCount >= itemSearchResultNames.length) 735 737 return; 736 738 } 737 739 ··· 755 757 if (fullscreenWidgetId != -1) { 756 758 method44(fullscreenWidgetId); 757 759 fullscreenWidgetId = -1; 758 - aBoolean1046 = true; 760 + welcomeScreenRaised = true; 759 761 } 760 762 if (fullscreenWidgetChildId != -1) { 761 763 method44(fullscreenWidgetChildId); ··· 848 850 return; 849 851 for (SpawnObjectNode spawnObjectNode = (SpawnObjectNode) spawnObjectList.first(); spawnObjectNode != null; spawnObjectNode = (SpawnObjectNode) spawnObjectList 850 852 .next()) 851 - if (spawnObjectNode.anInt1390 == -1) { 852 - spawnObjectNode.anInt1395 = 0; 853 + if (spawnObjectNode.cycle == -1) { 854 + spawnObjectNode.spawnCycle = 0; 853 855 method140((byte) -61, spawnObjectNode); 854 856 } else { 855 857 spawnObjectNode.remove(); ··· 1103 1105 this.cameraVelocityVertical += (j << 1); 1104 1106 } 1105 1107 1106 - private void checkForGameUsages(int i) { 1107 - i = 61 / i; 1108 + private void calculateCameraPosition() { 1108 1109 try { 1109 - int j = localPlayer.worldX + anInt853; 1110 - int k = localPlayer.worldY + anInt1009; 1111 - if (currentCameraPositionH - j < -500 || currentCameraPositionH - j > 500 || currentCameraPositionV - k < -500 || currentCameraPositionV - k > 500) { 1112 - currentCameraPositionH = j; 1113 - currentCameraPositionV = k; 1110 + int sceneX = localPlayer.worldX + this.cameraOffsetX; 1111 + int sceneY = localPlayer.worldY + this.cameraOffsetY; 1112 + if (currentCameraPositionH - sceneX < -500 || currentCameraPositionH - sceneX > 500 || currentCameraPositionV - sceneY < -500 || currentCameraPositionV - sceneY > 500) { 1113 + currentCameraPositionH = sceneX; 1114 + currentCameraPositionV = sceneY; 1114 1115 } 1115 - if (currentCameraPositionH != j) 1116 - currentCameraPositionH += (j - currentCameraPositionH) / 16; 1117 - if (currentCameraPositionV != k) 1118 - currentCameraPositionV += (k - currentCameraPositionV) / 16; 1116 + if (currentCameraPositionH != sceneX) 1117 + currentCameraPositionH += (sceneX - currentCameraPositionH) / 16; 1118 + if (currentCameraPositionV != sceneY) 1119 + currentCameraPositionV += (sceneY - currentCameraPositionV) / 16; 1119 1120 if (super.keyStatus[1] == 1) 1120 1121 cameraVelocityHorizontal += (-24 - cameraVelocityHorizontal) / 2; 1121 1122 else if (super.keyStatus[2] == 1) ··· 1386 1387 outBuffer.putByte(0); 1387 1388 } 1388 1389 loadingStages(); 1389 - method36(); 1390 - method152(); 1391 - packetReadAnticheat++; 1392 - if (packetReadAnticheat > 750) 1390 + processLocationCreation(); 1391 + processAudio(); 1392 + netCycle++; 1393 + if (netCycle > 750) 1393 1394 dropClient(); 1394 1395 processPlayers(); 1395 1396 processNPCs(); ··· 1505 1506 } else if (anInt893 > 0) 1506 1507 anInt893--; 1507 1508 if (loadingStage == 2) 1508 - checkForGameUsages(409); 1509 + calculateCameraPosition(); 1509 1510 if (loadingStage == 2 && cutsceneActive) 1510 - calculateCameraPosition(); 1511 - for (int k = 0; k < 5; k++) 1512 - quakeTimes[k]++; 1511 + calculateCinematicCameraPosition(); 1512 + for (int i = 0; i < 5; i++) 1513 + quakeTimes[i]++; 1513 1514 1514 1515 manageTextInputs(); 1515 1516 super.idleTime++; ··· 1518 1519 super.idleTime -= 500; 1519 1520 outBuffer.putOpcode(202); 1520 1521 } 1521 - anInt1118++; 1522 - if (anInt1118 > 500) { 1523 - anInt1118 = 0; 1524 - int k1 = (int) (Math.random() * 8D); 1525 - if ((k1 & 1) == 1) 1526 - anInt853 += anInt854; 1527 - if ((k1 & 2) == 2) 1528 - anInt1009 += anInt1010; 1529 - if ((k1 & 4) == 4) 1530 - cameraRandomisationA += anInt1256; 1522 + randomCycle1++; 1523 + if (randomCycle1 > 500) { 1524 + randomCycle1 = 0; 1525 + int random = (int) (Math.random() * 8D); 1526 + if ((random & 1) == 1) 1527 + cameraOffsetX += cameraOffsetModifierX; 1528 + if ((random & 2) == 2) 1529 + cameraOffsetY += cameraOffsetModifierY; 1530 + if ((random & 4) == 4) 1531 + cameraRandomisationA += cameraPitchModifier; 1531 1532 } 1532 - if (anInt853 < -50) 1533 - anInt854 = 2; 1534 - if (anInt853 > 50) 1535 - anInt854 = -2; 1536 - if (anInt1009 < -55) 1537 - anInt1010 = 2; 1538 - if (anInt1009 > 55) 1539 - anInt1010 = -2; 1533 + if (cameraOffsetX < -50) 1534 + cameraOffsetModifierX = 2; 1535 + if (cameraOffsetX > 50) 1536 + cameraOffsetModifierX = -2; 1537 + if (cameraOffsetY < -55) 1538 + cameraOffsetModifierY = 2; 1539 + if (cameraOffsetY > 55) 1540 + cameraOffsetModifierY = -2; 1540 1541 if (cameraRandomisationA < -40) 1541 - anInt1256 = 1; 1542 + cameraPitchModifier = 1; 1542 1543 if (cameraRandomisationA > 40) 1543 - anInt1256 = -1; 1544 - anInt1045++; 1545 - if (anInt1045 > 500) { 1546 - anInt1045 = 0; 1547 - int l1 = (int) (Math.random() * 8D); 1548 - if ((l1 & 1) == 1) 1549 - anInt916 += anInt917; 1550 - if ((l1 & 2) == 2) 1551 - anInt1233 += anInt1234; 1544 + cameraPitchModifier = -1; 1545 + randomCycle2++; 1546 + if (randomCycle2 > 500) { 1547 + randomCycle2 = 0; 1548 + int random = (int) (Math.random() * 8D); 1549 + if ((random & 1) == 1) 1550 + cameraYawOffset += cameraYawModifier; 1551 + if ((random & 2) == 2) 1552 + mapZoomOffset += mapZoomModifier; 1552 1553 } 1553 - if (anInt916 < -60) 1554 - anInt917 = 2; 1555 - if (anInt916 > 60) 1556 - anInt917 = -2; 1557 - if (anInt1233 < -20) 1558 - anInt1234 = 1; 1559 - if (anInt1233 > 10) 1560 - anInt1234 = -1; 1561 - anInt872++; 1562 - if (anInt872 > 50) 1554 + if (cameraYawOffset < -60) 1555 + cameraYawModifier = 2; 1556 + if (cameraYawOffset > 60) 1557 + cameraYawModifier = -2; 1558 + if (mapZoomOffset < -20) 1559 + mapZoomModifier = 1; 1560 + if (mapZoomOffset > 10) 1561 + mapZoomModifier = -1; 1562 + netAliveCycle++; 1563 + if (netAliveCycle > 50) 1563 1564 outBuffer.putOpcode(40); 1564 1565 try { 1565 1566 if (gameConnection != null && outBuffer.currentPosition > 0) { 1566 1567 gameConnection.write(outBuffer.currentPosition, 0, outBuffer.buffer); 1567 1568 outBuffer.currentPosition = 0; 1568 - anInt872 = 0; 1569 + netAliveCycle = 0; 1569 1570 } 1570 1571 } catch (IOException _ex) { 1571 1572 dropClient(); ··· 1574 1575 } 1575 1576 } 1576 1577 1577 - private void calculateCameraPosition() { 1578 + private void calculateCinematicCameraPosition() { 1578 1579 int i = anInt874 * 128 + 64; 1579 1580 int j = anInt875 * 128 + 64; 1580 1581 int k = getFloorDrawHeight(plane, i, j) - anInt876; ··· 1772 1773 redrawChatbox = true; 1773 1774 } 1774 1775 if ((key == 13 || key == 10) && chatboxInput.length() > 0) { 1775 - if (playerRights == 2) { 1776 + if (true) { 1776 1777 if (chatboxInput.equals("::clientdrop")) 1777 1778 dropClient(); 1779 + if (chatboxInput.equals("::items")) { 1780 + this.inputType = 3; 1781 + this.openChatboxWidgetId = -1; 1782 + } 1778 1783 if (chatboxInput.equals("::lag")) 1779 1784 infoDump(); 1780 1785 if (chatboxInput.equals("::prefetchmusic")) { ··· 1965 1970 return false; 1966 1971 buffer.currentPosition = 0; 1967 1972 gameConnection.read(buffer.buffer, 0, packetSize); 1968 - packetReadAnticheat = 0; 1973 + netCycle = 0; 1969 1974 thirdLastOpcode = secondLastOpcode; 1970 1975 secondLastOpcode = lastOpcode; 1971 1976 lastOpcode = opcode; ··· 2069 2074 if (fullscreenWidgetId != -1) { 2070 2075 method44(fullscreenWidgetId); 2071 2076 fullscreenWidgetId = -1; 2072 - aBoolean1046 = true; 2077 + welcomeScreenRaised = true; 2073 2078 } 2074 2079 if (fullscreenWidgetChildId != -1) { 2075 2080 method44(fullscreenWidgetChildId); ··· 2137 2142 int slot = buffer.getUnsignedInvertedByte(); 2138 2143 String option = buffer.getString(); 2139 2144 int alwaysOnTop = buffer.getUnsignedByte(); 2145 + System.out.println(slot); 2146 + System.out.println(option); 2147 + System.out.println(alwaysOnTop); 2140 2148 if (slot >= 1 && slot <= 5) { 2141 2149 if (option.equalsIgnoreCase("null")) 2142 2150 option = null; ··· 2257 2265 if (fullscreenWidgetId != -1) { 2258 2266 method44(fullscreenWidgetId); 2259 2267 fullscreenWidgetId = -1; 2260 - aBoolean1046 = true; 2268 + welcomeScreenRaised = true; 2261 2269 } 2262 2270 if (fullscreenWidgetChildId != -1) { 2263 2271 method44(fullscreenWidgetChildId); ··· 2386 2394 if (fullscreenWidgetId != -1) { 2387 2395 method44(fullscreenWidgetId); 2388 2396 fullscreenWidgetId = -1; 2389 - aBoolean1046 = true; 2397 + welcomeScreenRaised = true; 2390 2398 } 2391 2399 if (fullscreenWidgetChildId != -1) { 2392 2400 method44(fullscreenWidgetChildId); ··· 2520 2528 2521 2529 for (SpawnObjectNode spawnObjectNode = (SpawnObjectNode) spawnObjectList.first(); spawnObjectNode != null; spawnObjectNode = (SpawnObjectNode) spawnObjectList 2522 2530 .next()) 2523 - if (spawnObjectNode.anInt1393 >= placementX && spawnObjectNode.anInt1393 < placementX + 8 2524 - && spawnObjectNode.anInt1394 >= placementY && spawnObjectNode.anInt1394 < placementY + 8 2525 - && spawnObjectNode.anInt1391 == plane) 2526 - spawnObjectNode.anInt1390 = 0; 2531 + if (spawnObjectNode.x >= placementX && spawnObjectNode.x < placementX + 8 2532 + && spawnObjectNode.y >= placementY && spawnObjectNode.y < placementY + 8 2533 + && spawnObjectNode.plane == plane) 2534 + spawnObjectNode.cycle = 0; 2527 2535 2528 2536 opcode = -1; 2529 2537 return true; ··· 2609 2617 if (fullscreenWidgetId != -1) { 2610 2618 method44(fullscreenWidgetId); 2611 2619 fullscreenWidgetId = -1; 2612 - aBoolean1046 = true; 2620 + welcomeScreenRaised = true; 2613 2621 } 2614 2622 if (fullscreenWidgetChildId != -1) { 2615 2623 method44(fullscreenWidgetChildId); ··· 2638 2646 if (fullscreenWidgetId != -1) { 2639 2647 method44(fullscreenWidgetId); 2640 2648 fullscreenWidgetId = -1; 2641 - aBoolean1046 = true; 2649 + welcomeScreenRaised = true; 2642 2650 } 2643 2651 if (fullscreenWidgetChildId != -1) { 2644 2652 method44(fullscreenWidgetChildId); ··· 2889 2897 2890 2898 for (SpawnObjectNode spawnObjectNode_1 = (SpawnObjectNode) spawnObjectList.first(); spawnObjectNode_1 != null; spawnObjectNode_1 = (SpawnObjectNode) spawnObjectList 2891 2899 .next()) { 2892 - spawnObjectNode_1.anInt1393 -= deltaX; 2893 - spawnObjectNode_1.anInt1394 -= deltaY; 2894 - if (spawnObjectNode_1.anInt1393 < 0 || spawnObjectNode_1.anInt1394 < 0 || spawnObjectNode_1.anInt1393 >= 104 2895 - || spawnObjectNode_1.anInt1394 >= 104) 2900 + spawnObjectNode_1.x -= deltaX; 2901 + spawnObjectNode_1.y -= deltaY; 2902 + if (spawnObjectNode_1.x < 0 || spawnObjectNode_1.y < 0 || spawnObjectNode_1.x >= 104 2903 + || spawnObjectNode_1.y >= 104) 2896 2904 spawnObjectNode_1.remove(); 2897 2905 } 2898 2906 ··· 3367 3375 return packetType != 1; 3368 3376 } 3369 3377 3370 - private void method36() { 3378 + private void processLocationCreation() { 3371 3379 if (loadingStage == 2) { 3372 3380 for (SpawnObjectNode spawnObjectNode = (SpawnObjectNode) spawnObjectList.first(); spawnObjectNode != null; spawnObjectNode = (SpawnObjectNode) spawnObjectList 3373 3381 .next()) { 3374 - if (spawnObjectNode.anInt1390 > 0) 3375 - spawnObjectNode.anInt1390--; 3376 - if (spawnObjectNode.anInt1390 == 0) { 3377 - if (spawnObjectNode.anInt1387 < 0 3378 - || Region.method170(spawnObjectNode.anInt1389, spawnObjectNode.anInt1387)) { 3379 - method45(spawnObjectNode.anInt1388, spawnObjectNode.anInt1393, spawnObjectNode.anInt1387, 3380 - spawnObjectNode.anInt1394, spawnObjectNode.anInt1391, spawnObjectNode.anInt1389, 3381 - spawnObjectNode.anInt1392); 3382 + if (spawnObjectNode.cycle > 0) 3383 + spawnObjectNode.cycle--; 3384 + if (spawnObjectNode.cycle == 0) { 3385 + if (spawnObjectNode.index < 0 3386 + || Region.method170(spawnObjectNode.type, spawnObjectNode.index)) { 3387 + addLocation(spawnObjectNode.x, spawnObjectNode.y, spawnObjectNode.plane, spawnObjectNode.index, spawnObjectNode.rotation, 3388 + spawnObjectNode.type, 3389 + spawnObjectNode.classType); 3382 3390 spawnObjectNode.remove(); 3383 3391 } 3384 3392 } else { 3385 - if (spawnObjectNode.anInt1395 > 0) 3386 - spawnObjectNode.anInt1395--; 3387 - if (spawnObjectNode.anInt1395 == 0 3388 - && spawnObjectNode.anInt1393 >= 1 3389 - && spawnObjectNode.anInt1394 >= 1 3390 - && spawnObjectNode.anInt1393 <= 102 3391 - && spawnObjectNode.anInt1394 <= 102 3392 - && (spawnObjectNode.anInt1384 < 0 || Region.method170(spawnObjectNode.anInt1386, 3393 - spawnObjectNode.anInt1384))) { 3394 - method45(spawnObjectNode.anInt1385, spawnObjectNode.anInt1393, spawnObjectNode.anInt1384, 3395 - spawnObjectNode.anInt1394, spawnObjectNode.anInt1391, spawnObjectNode.anInt1386, 3396 - spawnObjectNode.anInt1392); 3397 - spawnObjectNode.anInt1395 = -1; 3398 - if (spawnObjectNode.anInt1384 == spawnObjectNode.anInt1387 && spawnObjectNode.anInt1387 == -1) 3393 + if (spawnObjectNode.spawnCycle > 0) 3394 + spawnObjectNode.spawnCycle--; 3395 + if (spawnObjectNode.spawnCycle == 0 3396 + && spawnObjectNode.x >= 1 3397 + && spawnObjectNode.y >= 1 3398 + && spawnObjectNode.x <= 102 3399 + && spawnObjectNode.y <= 102 3400 + && (spawnObjectNode.locationIndex < 0 || Region.method170(spawnObjectNode.locationType, 3401 + spawnObjectNode.locationIndex))) { 3402 + addLocation(spawnObjectNode.x, spawnObjectNode.y, spawnObjectNode.plane, spawnObjectNode.locationIndex, spawnObjectNode.locationRotation, 3403 + spawnObjectNode.locationType, 3404 + spawnObjectNode.classType); 3405 + spawnObjectNode.spawnCycle = -1; 3406 + if (spawnObjectNode.locationIndex == spawnObjectNode.index && spawnObjectNode.index == -1) 3399 3407 spawnObjectNode.remove(); 3400 - else if (spawnObjectNode.anInt1384 == spawnObjectNode.anInt1387 3401 - && spawnObjectNode.anInt1385 == spawnObjectNode.anInt1388 3402 - && spawnObjectNode.anInt1386 == spawnObjectNode.anInt1389) 3408 + else if (spawnObjectNode.locationIndex == spawnObjectNode.index 3409 + && spawnObjectNode.locationRotation == spawnObjectNode.rotation 3410 + && spawnObjectNode.locationType == spawnObjectNode.type) 3403 3411 spawnObjectNode.remove(); 3404 3412 } 3405 3413 } ··· 3408 3416 } 3409 3417 } 3410 3418 3411 - private void method38(int i, int j, int k, Player player) { 3419 + private void processPLayerMenuOptions(int i, int j, int k, Player player) { 3412 3420 if (player == localPlayer) 3413 3421 return; 3414 3422 if (menuActionRow >= 400) ··· 3510 3518 closeWidgets(); 3511 3519 reportedName = ""; 3512 3520 reportMutePlayer = false; 3513 - reportAbuseInterfaceID = openScreenWidgetId = Widget.anInt246; 3521 + reportAbuseInterfaceID = openScreenWidgetId = Widget.instanceWidgetParent; 3514 3522 } else { 3515 3523 addChatMessage("", "Please close the interface you have open before using 'report abuse'", 0); 3516 3524 } ··· 3544 3552 if (moved == 0) 3545 3553 return; 3546 3554 3547 - int moveType = buffer.getBits(2); 3555 + MovementType moveType = MovementType.values()[buffer.getBits(2)]; 3548 3556 3549 - if (moveType == 0) { 3557 + 3558 + if (moveType == MovementType.NONE) { 3550 3559 updatedPlayers[updatedPlayerCount++] = thisPlayerId; 3551 3560 return; 3552 3561 } 3553 3562 3554 - if (moveType == 1) { 3563 + if (moveType == MovementType.WALK) { 3555 3564 int direction = buffer.getBits(3); 3556 3565 3557 3566 localPlayer.move(direction, false); ··· 3563 3572 return; 3564 3573 } 3565 3574 3566 - if (moveType == 2) { 3575 + if (moveType == MovementType.RUN) { 3567 3576 int direction1 = buffer.getBits(3); 3568 3577 3569 3578 localPlayer.move(direction1, true); ··· 3579 3588 return; 3580 3589 } 3581 3590 3582 - if (moveType == 3) { 3591 + if (moveType == MovementType.TELEPORT) { 3583 3592 int discardWalkingQueue = buffer.getBits(1); 3584 3593 plane = buffer.getBits(2); 3585 3594 int localY = buffer.getBits(7); ··· 3648 3657 int k = Model.anIntArray1709[j]; 3649 3658 int x = k & 0x7f; 3650 3659 int y = k >> 7 & 0x7f; 3651 - int j1 = k >> 29 & 3; 3660 + int type = k >> 29 & 3; 3652 3661 int k1 = k >> 14 & 0x7fff; 3653 3662 if (k == i) 3654 3663 continue; 3655 3664 i = k; 3656 - if (j1 == 2 && currentScene.method271(plane, x, y, k) >= 0) { 3665 + if (type == 2 && currentScene.method271(plane, x, y, k) >= 0) { 3657 3666 GameObjectDefinition gameObject = GameObjectDefinition.getDefinition(k1); 3658 3667 if (gameObject.childrenIds != null) 3659 3668 gameObject = gameObject.getChildDefinition(); ··· 3726 3735 menuActionRow++; 3727 3736 } 3728 3737 } 3729 - if (j1 == 1) { 3738 + if (type == 1) { 3730 3739 Npc npc = npcs[k1]; 3731 3740 if (npc.npcDefinition.boundaryDimension == 1 3732 3741 && (npc.worldX & 0x7f) == 64 3733 3742 && (npc.worldY & 0x7f) == 64) { 3734 - for (int i2 = 0; i2 < npcCount; i2++) { 3743 + for (int i2 = 0; i2 < this.npcCount; i2++) { 3735 3744 Npc npc1 = npcs[npcIds[i2]]; 3736 3745 if (npc1 != null 3737 3746 && npc1 != npc 3738 3747 && npc1.npcDefinition.boundaryDimension == 1 3739 3748 && npc1.worldX == npc.worldX 3740 3749 && npc1.worldY == npc.worldY) 3741 - method82(npc1.npcDefinition, y, x, npcIds[i2]); 3750 + processNpcMenuOptions(npc1.npcDefinition, y, x, npcIds[i2]); 3742 3751 } 3743 3752 3744 - for (int k2 = 0; k2 < localPlayerCount; k2++) { 3745 - Player player = players[playerList[k2]]; 3753 + for (int i2 = 0; i2 < localPlayerCount; i2++) { 3754 + Player player = players[playerList[i2]]; 3746 3755 if (player != null 3747 3756 && player.worldX == npc.worldX 3748 3757 && player.worldY == npc.worldY) 3749 - method38(playerList[k2], y, x, player); 3758 + processPLayerMenuOptions(playerList[i2], y, x, player); 3750 3759 } 3751 3760 3752 3761 } 3753 - method82(npc.npcDefinition, y, x, k1); 3762 + processNpcMenuOptions(npc.npcDefinition, y, x, k1); 3754 3763 } 3755 - if (j1 == 0) { 3764 + if (type == 0) { 3756 3765 Player player1 = players[k1]; 3757 3766 if ((player1.worldX & 0x7f) == 64 3758 3767 && (player1.worldY & 0x7f) == 64) { ··· 3762 3771 && npc.npcDefinition.boundaryDimension == 1 3763 3772 && npc.worldX == player1.worldX 3764 3773 && npc.worldY == player1.worldY) 3765 - method82(npc.npcDefinition, y, x, npcIds[j2]); 3774 + processNpcMenuOptions(npc.npcDefinition, y, x, npcIds[j2]); 3766 3775 } 3767 3776 3768 3777 for (int l2 = 0; l2 < localPlayerCount; l2++) { ··· 3771 3780 && player != player1 3772 3781 && player.worldX == player1.worldX 3773 3782 && player.worldY == player1.worldY) 3774 - method38(playerList[l2], y, x, player); 3783 + processPLayerMenuOptions(playerList[l2], y, x, player); 3775 3784 } 3776 3785 3777 3786 } 3778 - method38(k1, y, x, player1); 3787 + processPLayerMenuOptions(k1, y, x, player1); 3779 3788 } 3780 - if (j1 == 3) { 3789 + if (type == 3) { 3781 3790 LinkedList itemList = groundItems.getTile(plane, x, y); 3782 3791 if (itemList != null) { 3783 3792 for (Item item = (Item) itemList.last(); item != null; item = (Item) itemList ··· 3855 3864 Widget.method200(i); 3856 3865 } 3857 3866 3858 - private void method45(int i, int j, int k, int l, int i1, int j1, int k1) { 3859 - if (j >= 1 && l >= 1 && j <= 102 && l <= 102) { 3860 - if (lowMemory && i1 != plane) 3867 + private void addLocation(int x, int y, int plane, int objectId, int objectFace, int objectType, int classType) { 3868 + if (x >= 1 && y >= 1 && x <= 102 && y <= 102) { 3869 + if (lowMemory && plane != this.plane) 3861 3870 return; 3862 - int l1 = 0; 3863 - if (k1 == 0) 3864 - l1 = currentScene.getWallObjectHash(j, l, i1); 3865 - if (k1 == 1) 3866 - l1 = currentScene.getWallDecorationHash(j, i1, l); 3867 - if (k1 == 2) 3868 - l1 = currentScene.method269(i1, j, l); 3869 - if (k1 == 3) 3870 - l1 = currentScene.getFloorDecorationHash(i1, j, l); 3871 - if (l1 != 0) { 3872 - int l2 = currentScene.method271(i1, j, l, l1); 3873 - int i2 = l1 >> 14 & 0x7fff; 3874 - int j2 = l2 & 0x1f; 3875 - int k2 = l2 >> 6; 3876 - if (k1 == 0) { 3877 - currentScene.removeWallObject(j, l, i1); 3878 - GameObjectDefinition class47 = GameObjectDefinition.getDefinition(i2); 3879 - if (class47.solid) 3880 - currentCollisionMap[i1].unmarkWall(k2, j, l, j2, class47.walkable); 3871 + int locationHash = 0; 3872 + if (classType == 0) 3873 + locationHash = currentScene.getWallObjectHash(x, y, plane); 3874 + if (classType == 1) 3875 + locationHash = currentScene.getWallDecorationHash(x, plane, y); 3876 + if (classType == 2) 3877 + locationHash = currentScene.getLocationHash(plane, x, y); 3878 + if (classType == 3) 3879 + locationHash = currentScene.getFloorDecorationHash(plane, x, y); 3880 + if (locationHash != 0) { 3881 + int locationArrangement = currentScene.method271(plane, x, y, locationHash); 3882 + int locationIndex = locationHash >> 14 & 0x7fff; 3883 + int locationType = locationArrangement & 0x1f; 3884 + int locationRot = locationArrangement >> 6; 3885 + if (classType == 0) { 3886 + currentScene.removeWallObject(x, y, plane); 3887 + GameObjectDefinition lc = GameObjectDefinition.getDefinition(locationIndex); 3888 + if (lc.solid) 3889 + currentCollisionMap[plane].unmarkWall(locationRot, x, y, locationType, lc.walkable); 3881 3890 } 3882 - if (k1 == 1) 3883 - currentScene.removeWallDecoration(j, l, i1); 3884 - if (k1 == 2) { 3885 - currentScene.removeInteractiveObject(j, l, i1); 3886 - GameObjectDefinition class47_1 = GameObjectDefinition.getDefinition(i2); 3887 - if (j + class47_1.sizeX > 103 || l + class47_1.sizeX > 103 || j + class47_1.sizeY > 103 3888 - || l + class47_1.sizeY > 103) 3891 + if (classType == 1) 3892 + currentScene.removeWallDecoration(x, y, plane); 3893 + if (classType == 2) { 3894 + currentScene.removeInteractiveObject(x, y, plane); 3895 + GameObjectDefinition class47_1 = GameObjectDefinition.getDefinition(locationIndex); 3896 + if (x + class47_1.sizeX > 103 || y + class47_1.sizeX > 103 || x + class47_1.sizeY > 103 3897 + || y + class47_1.sizeY > 103) 3889 3898 return; 3890 3899 if (class47_1.solid) 3891 - currentCollisionMap[i1].unmarkSolidOccupant(anInt1055, l, j, k2, class47_1.sizeY, class47_1.walkable, 3900 + currentCollisionMap[plane].unmarkSolidOccupant(anInt1055, y, x, locationRot, class47_1.sizeY, class47_1.walkable, 3892 3901 class47_1.sizeX); 3893 3902 } 3894 - if (k1 == 3) { 3895 - currentScene.method261(j, l, i1); 3896 - GameObjectDefinition class47_2 = GameObjectDefinition.getDefinition(i2); 3903 + if (classType == 3) { 3904 + currentScene.method261(x, y, plane); 3905 + GameObjectDefinition class47_2 = GameObjectDefinition.getDefinition(locationIndex); 3897 3906 if (class47_2.solid && class47_2.hasActions) 3898 - currentCollisionMap[i1].unmarkConcealed(j, l); 3907 + currentCollisionMap[plane].unmarkConcealed(x, y); 3899 3908 } 3900 3909 } 3901 - if (k >= 0) { 3902 - int i3 = i1; 3903 - if (i3 < 3 && (currentSceneTileFlags[1][j][l] & 2) == 2) 3904 - i3++; 3905 - Region.forceRenderObject(j, l, i1, k, j1, i3, i, currentScene, currentCollisionMap[i1], 3910 + if (objectId >= 0) { 3911 + int objectPlane = plane; 3912 + if (objectPlane < 3 && (currentSceneTileFlags[1][x][y] & 2) == 2) 3913 + objectPlane++; 3914 + Region.forceRenderObject(x, y, plane, objectId, objectType, objectPlane, objectFace, currentScene, currentCollisionMap[plane], 3906 3915 intGroundArray); 3907 3916 } 3908 3917 } ··· 3929 3938 npcIds[npcCount++] = i1; 3930 3939 npc.pulseCycle = pulseCycle; 3931 3940 } else { 3932 - int moveType = buffer.getBits(2); 3933 - if (moveType == 0) { 3941 + MovementType moveType = MovementType.values()[buffer.getBits(2)]; 3942 + if (moveType == MovementType.NONE) { 3934 3943 npcIds[npcCount++] = i1; 3935 3944 npc.pulseCycle = pulseCycle; 3936 3945 updatedPlayers[updatedPlayerCount++] = i1; 3937 - } else if (moveType == 1) { 3946 + } else if (moveType == MovementType.WALK) { 3938 3947 npcIds[npcCount++] = i1; 3939 3948 npc.pulseCycle = pulseCycle; 3940 3949 int direction = buffer.getBits(3); ··· 3942 3951 int blockUpdateRequired = buffer.getBits(1); 3943 3952 if (blockUpdateRequired == 1) 3944 3953 updatedPlayers[updatedPlayerCount++] = i1; 3945 - } else if (moveType == 2) { 3954 + } else if (moveType == MovementType.RUN) { 3946 3955 npcIds[npcCount++] = i1; 3947 3956 npc.pulseCycle = pulseCycle; 3948 3957 int direction1 = buffer.getBits(3); ··· 3952 3961 int blockUpdateRequired = buffer.getBits(1); 3953 3962 if (blockUpdateRequired == 1) 3954 3963 updatedPlayers[updatedPlayerCount++] = i1; 3955 - } else if (moveType == 3) 3964 + } else if (moveType == MovementType.TELEPORT) 3956 3965 removePlayers[removePlayerCount++] = i1; 3957 3966 } 3958 3967 } ··· 4244 4253 int r = x * x + y * y; 4245 4254 4246 4255 if (r > 4225 && r < 0x15f90) { 4247 - int theta = cameraHorizontal + anInt916 & 0x7ff; 4256 + int theta = cameraHorizontal + cameraYawOffset & 0x7ff; 4248 4257 int sin = Model.SINE[theta]; 4249 4258 int cos = Model.COSINE[theta]; 4250 - sin = (sin * 256) / (anInt1233 + 256); 4251 - cos = (cos * 256) / (anInt1233 + 256); 4259 + sin = (sin * 256) / (mapZoomOffset + 256); 4260 + cos = (cos * 256) / (mapZoomOffset + 256); 4252 4261 int l1 = y * sin + x * cos >> 16; 4253 4262 int i2 = y * cos - x * sin >> 16; 4254 4263 double d = Math.atan2(l1, i2); ··· 4260 4269 } 4261 4270 } 4262 4271 4263 - private void method56(boolean flag, int i, int j, int k, int l, int i1) { 4272 + private void drawScrollBar(boolean flag, int i, int j, int k, int l, int i1) { 4264 4273 scrollbarUp.drawImage(j, i1); 4265 4274 scrollbarDown.drawImage(j, (i1 + k) - 16); 4266 4275 int anInt931 = 0x23201b; ··· 4309 4318 4310 4319 } 4311 4320 4312 - private void setWaveVolume(int j) { 4313 - SignLink.waveVolume = j; 4321 + private void setWaveVolume(int volume) { 4322 + SignLink.waveVolume = volume; 4314 4323 } 4315 4324 4316 4325 private void dropClient() { ··· 4321 4330 method125("Please wait - attempting to reestablish", "Connection lost"); 4322 4331 minimapState = 0; 4323 4332 destinationX = 0; 4324 - BufferedConnection class17 = gameConnection; 4333 + BufferedConnection connection = gameConnection; 4325 4334 loggedIn = false; 4326 - anInt850 = 0; 4335 + reconnectionAttempts = 0; 4327 4336 login(username, password, true); 4328 4337 if (!loggedIn) 4329 4338 logout(); 4330 4339 try { 4331 - class17.close(); 4340 + connection.close(); 4332 4341 } catch (Exception _ex) { 4333 4342 } 4334 4343 } ··· 4574 4583 } 4575 4584 4576 4585 public void redraw() { 4577 - aBoolean1046 = true; 4586 + welcomeScreenRaised = true; 4578 4587 } 4579 4588 4580 4589 private void parseNpcUpdateMasks(Buffer buffer, int i, int j) { ··· 4878 4887 prepareTitle(); 4879 4888 } 4880 4889 4881 - aBoolean1046 = true; 4890 + welcomeScreenRaised = true; 4882 4891 } 4883 4892 4884 4893 public void startup() { ··· 5303 5312 } 5304 5313 5305 5314 Rasterizer3D.method494(765, 503); 5306 - anIntArray1003 = Rasterizer3D.lineOffsets; 5315 + fullScreenTextureArray = Rasterizer3D.lineOffsets; 5307 5316 5308 5317 Rasterizer3D.method494(479, 96); 5309 5318 chatboxLineOffsets = Rasterizer3D.lineOffsets; ··· 5888 5897 actor.animationDelay--; 5889 5898 } 5890 5899 5891 - private void method74(int i) { 5900 + private void drawGameScreen() { 5892 5901 if (fullscreenWidgetId != -1 && (loadingStage == 2 || super.imageProducer != null)) { 5893 5902 if (loadingStage == 2) { 5894 - method88(tickDelta, fullscreenWidgetId); 5903 + handleSequences(tickDelta, fullscreenWidgetId); 5895 5904 if (fullscreenWidgetChildId != -1) 5896 - method88(tickDelta, fullscreenWidgetChildId); 5905 + handleSequences(tickDelta, fullscreenWidgetChildId); 5897 5906 tickDelta = 0; 5898 - method147(anInt1140); 5907 + resetAllImageProducers(); 5899 5908 super.imageProducer.createRasterizer(); 5900 - Rasterizer3D.lineOffsets = anIntArray1003; 5909 + Rasterizer3D.lineOffsets = fullScreenTextureArray; 5901 5910 Rasterizer.resetPixels(); 5902 - aBoolean1046 = true; 5903 - Widget class13 = Widget.forId(fullscreenWidgetId); 5904 - if (class13.width == 512 && class13.height == 334 && class13.type == 0) { 5905 - class13.width = 765; 5906 - class13.height = 503; 5911 + welcomeScreenRaised = true; 5912 + Widget widget = Widget.forId(fullscreenWidgetId); 5913 + if (widget.width == 512 && widget.height == 334 && widget.type == 0) { 5914 + widget.width = 765; 5915 + widget.height = 503; 5907 5916 } 5908 - drawInterface(0, 0, class13, 0, 8); 5917 + drawInterface(0, 0, widget, 0); 5909 5918 if (fullscreenWidgetChildId != -1) { 5910 - Widget class13_1 = Widget.forId(fullscreenWidgetChildId); 5911 - if (class13_1.width == 512 && class13_1.height == 334 && class13_1.type == 0) { 5912 - class13_1.width = 765; 5913 - class13_1.height = 503; 5919 + Widget widget1 = Widget.forId(fullscreenWidgetChildId); 5920 + if (widget1.width == 512 && widget1.height == 334 && widget1.type == 0) { 5921 + widget1.width = 765; 5922 + widget1.height = 503; 5914 5923 } 5915 - drawInterface(0, 0, class13_1, 0, 8); 5924 + drawInterface(0, 0, widget1, 0); 5916 5925 } 5917 5926 if (!menuOpen) { 5918 5927 processRightClick(-521); ··· 5924 5933 super.imageProducer.drawGraphics(0, 0, super.gameGraphics); 5925 5934 return; 5926 5935 } 5927 - if (aBoolean1046) { 5928 - method122(-906); 5929 - aBoolean1046 = false; 5936 + if (welcomeScreenRaised) { 5937 + method122(); 5938 + welcomeScreenRaised = false; 5930 5939 aClass18_906.drawGraphics(0, 4, super.gameGraphics); 5931 5940 aClass18_907.drawGraphics(0, 357, super.gameGraphics); 5932 5941 aClass18_908.drawGraphics(722, 4, super.gameGraphics); ··· 5955 5964 if (menuOpen && menuScreenArea == 1) 5956 5965 redrawTabArea = true; 5957 5966 if (tabAreaOverlayWidgetId != -1) { 5958 - boolean flag = method88(tickDelta, tabAreaOverlayWidgetId); 5967 + boolean flag = handleSequences(tickDelta, tabAreaOverlayWidgetId); 5959 5968 if (flag) 5960 5969 redrawTabArea = true; 5961 5970 } ··· 5982 5991 } 5983 5992 } 5984 5993 if (openChatboxWidgetId == -1 && inputType == 3) { 5985 - int k = anInt862 * 14 + 7; 5986 - chatboxInterface.scrollPosition = anInt865; 5994 + int scrollMax = itemSearchResultCount * 14 + 7; 5995 + chatboxInterface.scrollPosition = itemSearchScroll; 5987 5996 if (super.mouseX > 448 && super.mouseX < 560 && super.mouseY > 332) 5988 - scrollInterface(k, 0, chatboxInterface, (byte) 102, super.mouseY - 357, -1, super.mouseX - 17, 77, 463); 5989 - int i1 = chatboxInterface.scrollPosition; 5990 - if (i1 < 0) 5991 - i1 = 0; 5992 - if (i1 > k - 77) 5993 - i1 = k - 77; 5994 - if (anInt865 != i1) { 5995 - anInt865 = i1; 5997 + scrollInterface(scrollMax, 0, chatboxInterface, (byte) 102, super.mouseY - 357, -1, super.mouseX - 17, 77, 463); 5998 + int currentScroll = chatboxInterface.scrollPosition; 5999 + if (currentScroll < 0) 6000 + currentScroll = 0; 6001 + if (currentScroll > scrollMax - 77) 6002 + currentScroll = scrollMax - 77; 6003 + if (itemSearchScroll != currentScroll) { 6004 + itemSearchScroll = currentScroll; 5996 6005 redrawChatbox = true; 5997 6006 } 5998 6007 } 5999 6008 if (openChatboxWidgetId != -1) { 6000 - boolean flag1 = method88(tickDelta, openChatboxWidgetId); 6009 + boolean flag1 = handleSequences(tickDelta, openChatboxWidgetId); 6001 6010 if (flag1) 6002 6011 redrawChatbox = true; 6003 6012 } ··· 6130 6139 Rasterizer3D.lineOffsets = viewportOffsets; 6131 6140 } 6132 6141 tickDelta = 0; 6133 - if (i != 7) { 6134 - for (int l = 1; l > 0; l++) ; 6135 - } 6136 6142 } 6137 6143 6138 6144 private void renderSplitPrivateMessages() { ··· 6391 6397 secondLastOpcode = -1; 6392 6398 thirdLastOpcode = -1; 6393 6399 packetSize = 0; 6394 - packetReadAnticheat = 0; 6400 + netCycle = 0; 6395 6401 systemUpdateTime = 0; 6396 6402 idleLogout = 0; 6397 6403 headIconDrawType = 0; ··· 6406 6412 widgetSelected = 0; 6407 6413 loadingStage = 0; 6408 6414 currentSound = 0; 6409 - anInt853 = (int) (Math.random() * 100D) - 50; 6410 - anInt1009 = (int) (Math.random() * 110D) - 55; 6415 + cameraOffsetX = (int) (Math.random() * 100D) - 50; 6416 + cameraOffsetY = (int) (Math.random() * 110D) - 55; 6411 6417 cameraRandomisationA = (int) (Math.random() * 80D) - 40; 6412 - anInt916 = (int) (Math.random() * 120D) - 60; 6413 - anInt1233 = (int) (Math.random() * 30D) - 20; 6418 + cameraYawOffset = (int) (Math.random() * 120D) - 60; 6419 + mapZoomOffset = (int) (Math.random() * 30D) - 20; 6414 6420 cameraHorizontal = (int) (Math.random() * 20D) - 10 & 0x7ff; 6415 6421 minimapState = 0; 6416 6422 lastRegionId = -1; ··· 6490 6496 anInt1052 = 0; 6491 6497 anInt1139 = 0; 6492 6498 6493 - method122(-906); 6499 + method122(); 6494 6500 return; 6495 6501 } 6496 6502 ··· 6569 6575 secondLastOpcode = -1; 6570 6576 thirdLastOpcode = -1; 6571 6577 packetSize = 0; 6572 - packetReadAnticheat = 0; 6578 + netCycle = 0; 6573 6579 systemUpdateTime = 0; 6574 6580 menuActionRow = 0; 6575 6581 menuOpen = false; ··· 6652 6658 6653 6659 if (responseCode == -1) { 6654 6660 if (initialResponseCode == 0) { 6655 - if (anInt850 < 2) { 6661 + if (reconnectionAttempts < 2) { 6656 6662 try { 6657 6663 Thread.sleep(2000L); 6658 6664 } catch (Exception ignored) { 6659 6665 } 6660 6666 6661 - anInt850++; 6667 + reconnectionAttempts++; 6662 6668 6663 6669 login(username, password, reconnecting); 6664 6670 return; ··· 6786 6792 } 6787 6793 } 6788 6794 6789 - private void method82(ActorDefinition actorDefinition, int i, int j, int k) { 6795 + private void processNpcMenuOptions(ActorDefinition actorDefinition, int i, int j, int k) { 6790 6796 if (menuActionRow >= 400) 6791 6797 return; 6792 6798 if (actorDefinition.childrenIds != null) ··· 6940 6946 fontBold.drawStringLeft("Enter name:", 239, 40, 0); 6941 6947 fontBold.drawStringLeft(inputInputMessage + "*", 239, 60, 128); 6942 6948 } else if (inputType == 3) { 6943 - if (!inputInputMessage.equals(aString861)) { 6944 - method14(inputInputMessage); 6945 - aString861 = inputInputMessage; 6949 + if (!inputInputMessage.equals(lastItemSearchInput)) { 6950 + itemSearch(inputInputMessage); 6951 + lastItemSearchInput = inputInputMessage; 6946 6952 } 6947 6953 6948 6954 TypeFace typeFace = fontNormal; 6949 6955 6950 6956 Rasterizer.setCoordinates(0, 0, 77, 463); 6951 6957 6952 - for (int i = 0; i < anInt862; i++) { 6953 - int y = (18 + i * 14) - anInt865; 6958 + for (int index = 0; index < itemSearchResultCount; index++) { 6959 + int y = (18 + index * 14) - itemSearchScroll; 6954 6960 6955 - if (y > 0 && y < 110) 6956 - typeFace.drawStringLeft(aStringArray863[i], 239, y, 0); 6961 + if (y > 0 && y < 110) { 6962 + StringBuilder examineText = new StringBuilder(); 6963 + examineText.append(MessageFormat.format("<col=000000>{0}</col>", itemSearchResultNames[index])); 6964 + if (DEBUG_CONTEXT) { 6965 + examineText.append(" <col=ffffff>[</col>"); 6966 + examineText.append( 6967 + MessageFormat.format("<col=0000ff>{0}</col>", 6968 + Integer.toString(itemSearchResultIds[index]) 6969 + ) 6970 + ); 6971 + examineText.append("<col=ffffff>]</col>"); 6972 + } 6973 + typeFace.drawStringLeft(examineText.toString(), 239, y, 0); 6974 + } 6957 6975 } 6958 6976 6959 6977 Rasterizer.resetCoordinates(); 6960 6978 6961 - if (anInt862 > 5) 6962 - method56(true, anInt865, 463, 77, anInt862 * 14 + 7, 0); 6979 + if (itemSearchResultCount > 5) 6980 + drawScrollBar(true, itemSearchScroll, 463, 77, itemSearchResultCount * 14 + 7, 0); 6963 6981 6964 6982 if (inputInputMessage.length() == 0) 6965 6983 fontBold.drawStringLeft("Enter object name", 239, 40, 255); 6966 - else if (anInt862 == 0) 6984 + else if (itemSearchResultCount == 0) 6967 6985 fontBold.drawStringLeft("No matching objects found, please shorten search", 239, 40, 0); 6968 6986 6969 6987 typeFace.drawStringLeft(inputInputMessage + "*", 239, 90, 0); ··· 6972 6990 fontBold.drawStringLeft(clickToContinueString, 239, 40, 0); 6973 6991 fontBold.drawStringLeft("Click to continue", 239, 60, 128); 6974 6992 } else if (openChatboxWidgetId != -1) { 6975 - drawInterface(0, 0, Widget.forId(openChatboxWidgetId), 0, 8); 6993 + drawInterface(0, 0, Widget.forId(openChatboxWidgetId), 0); 6976 6994 } else if (dialogueId != -1) { 6977 - drawInterface(0, 0, Widget.forId(dialogueId), 0, 8); 6995 + drawInterface(0, 0, Widget.forId(dialogueId), 0); 6978 6996 } else { 6979 6997 TypeFace typeFace = fontNormal; 6980 6998 int line = 0; ··· 7097 7115 if (chatboxScrollMax < 78) 7098 7116 chatboxScrollMax = 78; 7099 7117 7100 - method56(true, chatboxScrollMax - chatboxScroll - 77, 463, 77, chatboxScrollMax, 0); 7118 + drawScrollBar(true, chatboxScrollMax - chatboxScroll - 77, 463, 77, chatboxScrollMax, 0); 7101 7119 7102 7120 String name; 7103 7121 ··· 7239 7257 return; 7240 7258 } 7241 7259 7242 - int angle = cameraHorizontal + anInt916 & 0x7ff; 7260 + int angle = cameraHorizontal + cameraYawOffset & 0x7ff; 7243 7261 int centerX = 48 + localPlayer.worldX / 32; 7244 7262 int centerY = 464 - localPlayer.worldY / 32; 7245 7263 7246 7264 minimapImage.shapeImageToPixels(5, 151, centerX, 146, anIntArray920, 7247 - 25, angle, 256 + anInt1233, anIntArray1019, centerY); 7265 + 25, angle, 256 + mapZoomOffset, anIntArray1019, centerY); 7248 7266 minimapCompass.shapeImageToPixels(0, 33, 25, 33, anIntArray1286, 7249 7267 0, cameraHorizontal, 256, anIntArray1180, 25); 7250 7268 ··· 7370 7388 return null; 7371 7389 } 7372 7390 7373 - private boolean method88(int tickDelta, int interfaceId) { 7391 + private boolean handleSequences(int tickDelta, int interfaceId) { 7374 7392 boolean flag = false; 7375 7393 Widget widget = Widget.forId(interfaceId); 7376 7394 for (int k = 0; k < widget.children.length; k++) { ··· 7378 7396 break; 7379 7397 Widget widgetChild = Widget.forId(widget.children[k]); 7380 7398 if (widgetChild.type == 0) 7381 - flag |= method88(tickDelta, widgetChild.id); 7399 + flag |= handleSequences(tickDelta, widgetChild.id); 7382 7400 if (widgetChild.type == 6 && (widgetChild.disabledAnimation != -1 || widgetChild.enabledAnimation != -1)) { 7383 7401 boolean flag1 = componentEnabled(widgetChild); 7384 7402 int enabledState; ··· 8226 8244 if (config == 4) 8227 8245 Rasterizer3D.method501(0.59999999999999998D); 8228 8246 ItemDefinition.rgbImageCache.removeAll(); 8229 - aBoolean1046 = true; 8247 + welcomeScreenRaised = true; 8230 8248 } 8231 8249 if (action == 3) { 8232 8250 boolean flag = musicEnabled; ··· 8405 8423 cursorCross[4 + crossIndex / 100].drawImage(crossX - 8 - 4, crossY - 8 - 4); 8406 8424 8407 8425 if (walkableWidgetId != -1) { 8408 - method88(tickDelta, walkableWidgetId); 8409 - drawInterface(0, 0, Widget.forId(walkableWidgetId), 0, 8); 8426 + handleSequences(tickDelta, walkableWidgetId); 8427 + drawInterface(0, 0, Widget.forId(walkableWidgetId), 0); 8410 8428 } 8411 8429 8412 8430 if (openScreenWidgetId != -1) { 8413 - method88(tickDelta, openScreenWidgetId); 8414 - drawInterface(0, 0, Widget.forId(openScreenWidgetId), 0, 8); 8431 + handleSequences(tickDelta, openScreenWidgetId); 8432 + drawInterface(0, 0, Widget.forId(openScreenWidgetId), 0); 8415 8433 } 8416 8434 8417 8435 setTutorialIslandFlag(); ··· 8659 8677 playerList[localPlayerCount++] = id; 8660 8678 player.pulseCycle = pulseCycle; 8661 8679 } else { 8662 - int moveType = buffer.getBits(2); 8680 + MovementType moveType = MovementType.values()[buffer.getBits(2)]; 8663 8681 8664 - if (moveType == 0) { 8682 + if (moveType == MovementType.NONE) { 8665 8683 playerList[localPlayerCount++] = id; 8666 8684 player.pulseCycle = pulseCycle; 8667 8685 updatedPlayers[updatedPlayerCount++] = id; 8668 - } else if (moveType == 1) { 8686 + } else if (moveType == MovementType.WALK) { 8669 8687 playerList[localPlayerCount++] = id; 8670 8688 player.pulseCycle = pulseCycle; 8671 8689 int direction = buffer.getBits(3); ··· 8676 8694 8677 8695 if (blockUpdateRequired == 1) 8678 8696 updatedPlayers[updatedPlayerCount++] = id; 8679 - } else if (moveType == 2) { 8697 + } else if (moveType == MovementType.RUN) { 8680 8698 playerList[localPlayerCount++] = id; 8681 8699 player.pulseCycle = pulseCycle; 8682 8700 int direction1 = buffer.getBits(3); ··· 8691 8709 8692 8710 if (updateRequired == 1) 8693 8711 updatedPlayers[updatedPlayerCount++] = id; 8694 - } else if (moveType == 3) { 8712 + } else if (moveType == MovementType.TELEPORT) { 8695 8713 removePlayers[removePlayerCount++] = id; 8696 8714 } 8697 8715 } ··· 9616 9634 } 9617 9635 if (action == 507) { 9618 9636 String string = menuActionTexts[id]; 9619 - int i_389_ = string.indexOf("@whi@"); 9620 - if (i_389_ != -1) 9637 + int whiteIndex = string.indexOf("@whi@"); 9638 + if (whiteIndex != -1) 9621 9639 if (openScreenWidgetId == -1) { 9622 9640 closeWidgets(); 9623 - reportedName = string.substring(i_389_ + 5).trim(); 9641 + reportedName = string.substring(whiteIndex + 5).trim(); 9624 9642 reportMutePlayer = false; 9625 - reportAbuseInterfaceID = openScreenWidgetId = Widget.anInt246; 9643 + reportAbuseInterfaceID = openScreenWidgetId = Widget.instanceWidgetParent; 9626 9644 } else { 9627 9645 addChatMessage("", "Please close the interface you have open before using 'report abuse'", 0); 9628 9646 } ··· 9899 9917 if (anInt998 == 0) { 9900 9918 int k2 = 0xffff00; 9901 9919 if (anIntArray945[j] < 6) 9902 - k2 = anIntArray842[anIntArray945[j]]; 9920 + k2 = spokenPalette[anIntArray945[j]]; 9903 9921 if (anIntArray945[j] == 6) 9904 9922 k2 = renderCount % 20 >= 10 ? 0xffff00 : 0xff0000; 9905 9923 if (anIntArray945[j] == 7) ··· 9982 10000 opcode = -1; 9983 10001 } 9984 10002 9985 - private void method122(int i) { 9986 - while (i >= 0) 9987 - aBoolean1242 = !aBoolean1242; 9988 - if (chatboxProducingGraphicsBuffer != null) { 9989 - } else { 10003 + private void method122() { 10004 + if (chatboxProducingGraphicsBuffer == null) { 9990 10005 method141(); 9991 10006 super.imageProducer = null; 9992 10007 aClass18_1198 = null; ··· 10008 10023 aClass18_1108 = new ProducingGraphicsBuffer(496, 50, getParentComponent()); 10009 10024 aClass18_1109 = new ProducingGraphicsBuffer(269, 37, getParentComponent()); 10010 10025 aClass18_1110 = new ProducingGraphicsBuffer(249, 45, getParentComponent()); 10011 - aBoolean1046 = true; 10026 + welcomeScreenRaised = true; 10012 10027 gameScreenImageProducer.createRasterizer(); 10013 10028 Rasterizer3D.lineOffsets = viewportOffsets; 10014 10029 } ··· 10021 10036 setFrameRate(1); 10022 10037 if (loadingError) { 10023 10038 currentlyDrawingFlames = false; 10024 - g.setFont(new Font("Helvetica", 1, 16)); 10039 + g.setFont(new Font("Helvetica", Font.BOLD, 16)); 10025 10040 g.setColor(Color.yellow); 10026 10041 int currentPositionY = 35; 10027 10042 g.drawString("Sorry, an error has occured whilst loading RuneScape", 30, currentPositionY); ··· 10030 10045 g.drawString("To fix this try the following (in order):", 30, currentPositionY); 10031 10046 currentPositionY += 50; 10032 10047 g.setColor(Color.white); 10033 - g.setFont(new Font("Helvetica", 1, 12)); 10048 + g.setFont(new Font("Helvetica", Font.BOLD, 12)); 10034 10049 g.drawString("1: Try closing ALL open web-browser windows, and reloading", 30, currentPositionY); 10035 10050 currentPositionY += 30; 10036 10051 g.drawString("2: Try clearing your web-browsers cache from tools->internet options", 30, currentPositionY); ··· 10043 10058 } 10044 10059 if (genericLoadingError) { 10045 10060 currentlyDrawingFlames = false; 10046 - g.setFont(new Font("Helvetica", 1, 20)); 10061 + g.setFont(new Font("Helvetica", Font.BOLD, 20)); 10047 10062 g.setColor(Color.white); 10048 10063 g.drawString("Error - unable to load game!", 50, 50); 10049 10064 g.drawString("To play RuneScape make sure you play from", 50, 100); ··· 10059 10074 g.drawString("To fix this try the following (in order):", 30, currentPositionY); 10060 10075 currentPositionY += 50; 10061 10076 g.setColor(Color.white); 10062 - g.setFont(new Font("Helvetica", 1, 12)); 10077 + g.setFont(new Font("Helvetica", Font.BOLD, 12)); 10063 10078 g.drawString("1: Try closing ALL open web-browser windows, and reloading", 30, currentPositionY); 10064 10079 currentPositionY += 30; 10065 10080 g.drawString("2: Try rebooting your computer, and reloading", 30, currentPositionY); ··· 10086 10101 10087 10102 resetModelCaches(); 10088 10103 currentScene.initToNull(); 10089 - for (int plane = 0; plane < 4; plane++) 10104 + for (int plane = 0; plane < 4; plane++) { 10090 10105 currentCollisionMap[plane].reset(); 10106 + } 10091 10107 10092 10108 System.gc(); 10093 10109 ··· 10116 10132 } 10117 10133 if (super.imageProducer != null) { 10118 10134 super.imageProducer.createRasterizer(); 10119 - Rasterizer3D.lineOffsets = anIntArray1003; 10135 + Rasterizer3D.lineOffsets = fullScreenTextureArray; 10120 10136 int k = 251; 10121 10137 char c = '\u012C'; 10122 10138 byte byte0 = 50; ··· 10163 10179 if (!loggedIn) 10164 10180 drawLoginScreen(false); 10165 10181 else 10166 - method74(7); 10182 + drawGameScreen(); 10167 10183 anInt1094 = 0; 10168 10184 } 10169 10185 ··· 10315 10331 private void drawOnMinimap(ImageRGB sprite, int x, int y) { 10316 10332 if (sprite == null) 10317 10333 return; 10318 - int k = cameraHorizontal + anInt916 & 0x7ff; 10334 + int k = cameraHorizontal + cameraYawOffset & 0x7ff; 10319 10335 int l = x * x + y * y; 10320 10336 if (l > 6400) 10321 10337 return; 10322 10338 int i1 = Model.SINE[k]; 10323 10339 int j1 = Model.COSINE[k]; 10324 - i1 = (i1 * 256) / (anInt1233 + 256); 10325 - j1 = (j1 * 256) / (anInt1233 + 256); 10340 + i1 = (i1 * 256) / (mapZoomOffset + 256); 10341 + j1 = (j1 * 256) / (mapZoomOffset + 256); 10326 10342 int k1 = y * i1 + x * j1 >> 16; 10327 10343 int l1 = y * j1 - x * i1 >> 16; 10328 10344 if (l > 2500) { ··· 10403 10419 fontBold.drawStringCenter("Cancel", k1, j2 + 5, 0xffffff, true); 10404 10420 } 10405 10421 aClass18_1200.drawGraphics(202, 171, super.gameGraphics); 10406 - if (aBoolean1046) { 10407 - aBoolean1046 = false; 10422 + if (welcomeScreenRaised) { 10423 + welcomeScreenRaised = false; 10408 10424 aClass18_1198.drawGraphics(128, 0, super.gameGraphics); 10409 10425 aClass18_1199.drawGraphics(202, 371, super.gameGraphics); 10410 10426 aClass18_1203.drawGraphics(0, 265, super.gameGraphics); ··· 10765 10781 Rasterizer3D.lineOffsets = sidebarOffsets; 10766 10782 inventoryBackgroundImage.drawImage(0, 0); 10767 10783 if (tabAreaOverlayWidgetId != -1) 10768 - drawInterface(0, 0, Widget.forId(tabAreaOverlayWidgetId), 0, 8); 10784 + drawInterface(0, 0, Widget.forId(tabAreaOverlayWidgetId), 0); 10769 10785 else if (tabWidgetIds[currentTabId] != -1) 10770 - drawInterface(0, 0, Widget.forId(tabWidgetIds[currentTabId]), 0, 8); 10786 + drawInterface(0, 0, Widget.forId(tabWidgetIds[currentTabId]), 0); 10771 10787 if (menuOpen && menuScreenArea == 1) 10772 10788 drawMenu(); 10773 10789 tabImageProducer.drawGraphics(553, 205, super.gameGraphics); ··· 10851 10867 Rasterizer.drawFilledRectangle((c / 2 - 150) + i * 3, j + 2, 300 - i * 3, 30, 0); 10852 10868 fontBold.drawStringLeft(s, c / 2, (c1 / 2 + 5) - byte0, 0xffffff); 10853 10869 aClass18_1200.drawGraphics(202, 171, super.gameGraphics); 10854 - if (aBoolean1046) { 10855 - aBoolean1046 = false; 10870 + if (welcomeScreenRaised) { 10871 + welcomeScreenRaised = false; 10856 10872 if (!currentlyDrawingFlames) { 10857 10873 flameLeftBackground.drawGraphics(0, 0, super.gameGraphics); 10858 10874 flameRightBackground.drawGraphics(637, 0, super.gameGraphics); ··· 10932 10948 int l = 0; 10933 10949 if (byte0 != -61) 10934 10950 outBuffer.putByte(175); 10935 - if (spawnObjectNode.anInt1392 == 0) 10936 - i = currentScene.getWallObjectHash(spawnObjectNode.anInt1393, spawnObjectNode.anInt1394, spawnObjectNode.anInt1391); 10937 - if (spawnObjectNode.anInt1392 == 1) 10938 - i = currentScene.getWallDecorationHash(spawnObjectNode.anInt1393, spawnObjectNode.anInt1391, 10939 - spawnObjectNode.anInt1394); 10940 - if (spawnObjectNode.anInt1392 == 2) 10941 - i = currentScene.method269(spawnObjectNode.anInt1391, spawnObjectNode.anInt1393, spawnObjectNode.anInt1394); 10942 - if (spawnObjectNode.anInt1392 == 3) 10943 - i = currentScene.getFloorDecorationHash(spawnObjectNode.anInt1391, spawnObjectNode.anInt1393, spawnObjectNode.anInt1394); 10951 + if (spawnObjectNode.classType == 0) 10952 + i = currentScene.getWallObjectHash(spawnObjectNode.x, spawnObjectNode.y, spawnObjectNode.plane); 10953 + if (spawnObjectNode.classType == 1) 10954 + i = currentScene.getWallDecorationHash(spawnObjectNode.x, spawnObjectNode.plane, 10955 + spawnObjectNode.y); 10956 + if (spawnObjectNode.classType == 2) 10957 + i = currentScene.getLocationHash(spawnObjectNode.plane, spawnObjectNode.x, spawnObjectNode.y); 10958 + if (spawnObjectNode.classType == 3) 10959 + i = currentScene.getFloorDecorationHash(spawnObjectNode.plane, spawnObjectNode.x, spawnObjectNode.y); 10944 10960 if (i != 0) { 10945 - int i1 = currentScene.method271(spawnObjectNode.anInt1391, spawnObjectNode.anInt1393, spawnObjectNode.anInt1394, i); 10961 + int i1 = currentScene.method271(spawnObjectNode.plane, spawnObjectNode.x, spawnObjectNode.y, i); 10946 10962 j = i >> 14 & 0x7fff; 10947 10963 k = i1 & 0x1f; 10948 10964 l = i1 >> 6; 10949 10965 } 10950 - spawnObjectNode.anInt1387 = j; 10951 - spawnObjectNode.anInt1389 = k; 10952 - spawnObjectNode.anInt1388 = l; 10966 + spawnObjectNode.index = j; 10967 + spawnObjectNode.type = k; 10968 + spawnObjectNode.rotation = l; 10953 10969 } 10954 10970 10955 10971 private void method141() { ··· 10976 10992 anImageRGB1227 = null; 10977 10993 } 10978 10994 10979 - private void drawInterface(int i, int j, Widget class13, int k, int l) { 10995 + private void drawInterface(int i, int j, Widget class13, int k) { 10980 10996 if (class13.type != 0 || class13.children == null) 10981 10997 return; 10982 10998 if (class13.hiddenUntilHovered && anInt1302 != class13.id && anInt1280 != class13.id ··· 10988 11004 int l1 = Rasterizer.bottomY; 10989 11005 Rasterizer.setCoordinates(i, j, i + class13.height, j + class13.width); 10990 11006 int i2 = class13.children.length; 10991 - if (l != 8) 11007 + if (8 != 8) 10992 11008 opcode = -1; 10993 11009 for (int j2 = 0; j2 < i2; j2++) { 10994 11010 int k2 = class13.childrenX[j2] + j; ··· 11003 11019 child.scrollPosition = child.scrollLimit - child.height; 11004 11020 if (child.scrollPosition < 0) 11005 11021 child.scrollPosition = 0; 11006 - drawInterface(l2, k2, child, child.scrollPosition, 8); 11022 + drawInterface(l2, k2, child, child.scrollPosition); 11007 11023 if (child.scrollLimit > child.height) 11008 - method56(true, child.scrollPosition, k2 + child.width, child.height, child.scrollLimit, 11024 + drawScrollBar(true, child.scrollPosition, k2 + child.width, child.height, child.scrollLimit, 11009 11025 l2); 11010 11026 } else if (child.type != 1) 11011 11027 if (child.type == 2) { ··· 11380 11396 SpawnObjectNode request = null; 11381 11397 for (SpawnObjectNode request2 = (SpawnObjectNode) spawnObjectList.first(); request2 != null; request2 = (SpawnObjectNode) spawnObjectList 11382 11398 .next()) { 11383 - if (request2.anInt1391 != plane || request2.anInt1393 != x || request2.anInt1394 != y 11384 - || request2.anInt1392 != type) 11399 + if (request2.plane != plane || request2.x != x || request2.y != y 11400 + || request2.classType != type) 11385 11401 continue; 11386 11402 request = request2; 11387 11403 break; ··· 11389 11405 11390 11406 if (request == null) { 11391 11407 request = new SpawnObjectNode(); 11392 - request.anInt1391 = plane; 11393 - request.anInt1392 = type; 11394 - request.anInt1393 = x; 11395 - request.anInt1394 = y; 11408 + request.plane = plane; 11409 + request.classType = type; 11410 + request.x = x; 11411 + request.y = y; 11396 11412 method140((byte) -61, request); 11397 11413 spawnObjectList.pushBack(request); 11398 11414 } 11399 - request.anInt1384 = objectId; 11400 - request.anInt1386 = objectType; 11401 - request.anInt1385 = orientation; 11402 - request.anInt1395 = startDelay; 11403 - request.anInt1390 = duration; 11415 + request.locationIndex = objectId; 11416 + request.locationType = objectType; 11417 + request.locationRotation = orientation; 11418 + request.spawnCycle = startDelay; 11419 + request.cycle = duration; 11404 11420 } 11405 11421 11406 11422 private void method146(byte byte0) { ··· 11414 11430 if (i >= 0 && j >= 0 && i < 146 && j < 151) { 11415 11431 i -= 73; 11416 11432 j -= 75; 11417 - int k = cameraHorizontal + anInt916 & 0x7ff; 11433 + int k = cameraHorizontal + cameraYawOffset & 0x7ff; 11418 11434 int l = Rasterizer3D.SINE[k]; 11419 11435 int i1 = Rasterizer3D.COSINE[k]; 11420 - l = l * (anInt1233 + 256) >> 8; 11421 - i1 = i1 * (anInt1233 + 256) >> 8; 11436 + l = l * (mapZoomOffset + 256) >> 8; 11437 + i1 = i1 * (mapZoomOffset + 256) >> 8; 11422 11438 int j1 = j * l + i * i1 >> 11; 11423 11439 int k1 = j * i1 - i * l >> 11; 11424 11440 int l1 = localPlayer.worldX + j1 >> 7; ··· 11430 11446 outBuffer.putByte(j); 11431 11447 outBuffer.putShortBE(cameraHorizontal); 11432 11448 outBuffer.putByte(57); 11433 - outBuffer.putByte(anInt916); 11434 - outBuffer.putByte(anInt1233); 11449 + outBuffer.putByte(cameraYawOffset); 11450 + outBuffer.putByte(mapZoomOffset); 11435 11451 outBuffer.putByte(89); 11436 11452 outBuffer.putShortBE(localPlayer.worldX); 11437 11453 outBuffer.putShortBE(localPlayer.worldY); ··· 11442 11458 } 11443 11459 } 11444 11460 11445 - private void method147(int i) { 11461 + private void resetAllImageProducers() { 11446 11462 if (super.imageProducer != null) 11447 11463 return; 11448 11464 method141(); 11449 11465 aClass18_1198 = null; 11450 11466 aClass18_1199 = null; 11451 11467 aClass18_1200 = null; 11452 - if (i >= 0) 11453 - anInt1004 = -4; 11454 11468 flameLeftBackground = null; 11455 11469 flameRightBackground = null; 11456 11470 aClass18_1203 = null; ··· 11465 11479 aClass18_1109 = null; 11466 11480 aClass18_1110 = null; 11467 11481 super.imageProducer = new ProducingGraphicsBuffer(765, 503, getParentComponent()); 11468 - aBoolean1046 = true; 11482 + welcomeScreenRaised = true; 11469 11483 } 11470 11484 11471 11485 private boolean hasFriend(String s) { ··· 11512 11526 l1 += 20; 11513 11527 if (super.clickType == 1 && super.clickX >= j1 - 75 && super.clickX <= j1 + 75 11514 11528 && super.clickY >= l1 - 20 && super.clickY <= l1 + 20) { 11515 - anInt850 = 0; 11529 + reconnectionAttempts = 0; 11516 11530 login(username, password, false); 11517 11531 if (loggedIn) 11518 11532 return; ··· 11652 11666 } 11653 11667 } 11654 11668 } 11655 - k1 = currentScene.method269(j, k, i); 11669 + k1 = currentScene.getLocationHash(j, k, i); 11656 11670 if (k1 != 0) { 11657 11671 int i2 = currentScene.method271(j, k, i, k1); 11658 11672 int l2 = i2 >> 6 & 3; ··· 11771 11785 cameraHorizontalRotation = i2; 11772 11786 } 11773 11787 11774 - private void method152() { 11788 + private void processAudio() { 11775 11789 for (int index = 0; index < currentSound; index++) { 11776 11790 //if (soundDelay[index] <= 0) { 11777 - boolean flag1 = false; 11791 + boolean played = false; 11778 11792 try { 11779 11793 Buffer stream = SoundTrack.data(sound[index], soundType[index]); 11780 11794 new SoundPlayer(new ByteArrayInputStream(stream.buffer, 0, stream.currentPosition), soundType[index], soundDelay[index]); 11781 - if (System.currentTimeMillis() + (long) (stream.currentPosition / 22) > aLong1172 11782 - + (long) (anInt1257 / 22)) { 11783 - anInt1257 = stream.currentPosition; 11784 - aLong1172 = System.currentTimeMillis(); 11795 + if (System.currentTimeMillis() + (long) (stream.currentPosition / 22) > lastSoundTime 11796 + + (long) (lastSoundPosition / 22)) { 11797 + lastSoundPosition = stream.currentPosition; 11798 + lastSoundTime = System.currentTimeMillis(); 11785 11799 if (method116(stream.currentPosition, stream.buffer)) { 11786 - anInt1272 = sound[index]; 11787 - anInt935 = soundType[index]; 11800 + lastSound = sound[index]; 11801 + lastSoundType = soundType[index]; 11788 11802 } else { 11789 - flag1 = true; 11803 + played = true; 11790 11804 } 11791 11805 11792 11806 } ··· 11799 11813 outBuffer.putShortBE(-1); 11800 11814 } 11801 11815 } 11802 - if (!flag1 || soundDelay[index] == -5) { 11816 + if (!played || soundDelay[index] == -5) { 11803 11817 currentSound--; 11804 11818 for (int j = index; j < currentSound; j++) { 11805 11819 sound[j] = sound[j + 1];
+13 -5
src/main/java/com/jagex/runescape/GameShell.java
··· 50 50 public int mouseWheelY; 51 51 52 52 53 - 54 53 public final void initializeApplication(int _width, int _height) { 55 54 width = _width; 56 55 height = _height; ··· 445 444 public void mouseWheelMoved(MouseWheelEvent event) { 446 445 int rotation = event.getWheelRotation(); 447 446 if (this instanceof Game) { 448 - if(!handleInterfaceScrolling(event, (Game) this)) { 447 + if (!handleInterfaceScrolling(event, (Game) this)) { 449 448 if ((cameraZoom <= 300 && rotation <= 0) 450 449 || (cameraZoom >= 1200 && rotation >= 0)) { 451 450 return; ··· 461 460 if (mouseX > 0 && mouseY > 346 && mouseX < 516 && mouseY < 505 && client.openChatboxWidgetId == -1) { 462 461 if (rotation < 0) { 463 462 if (client.chatboxInterface.scrollPosition >= 1) { 464 - client.chatboxScroll = client.chatboxScroll + 30; 465 - client.redrawChatbox = true; 463 + 464 + if (client.inputType == 3) { 465 + client.itemSearchScroll = client.itemSearchScroll - 30; 466 + client.redrawChatbox = true; 467 + } else { 468 + client.chatboxScroll = client.chatboxScroll + 30; 469 + client.redrawChatbox = true; 470 + } 466 471 } 467 472 } else { 468 - if (client.chatboxScroll < 1) { 473 + if (client.inputType == 3) { 474 + client.itemSearchScroll = client.itemSearchScroll + 30; 475 + client.redrawChatbox = true; 476 + } else if (client.chatboxScroll < 1) { 469 477 client.chatboxScroll = 0; 470 478 client.redrawChatbox = true; 471 479 } else {
+2 -2
src/main/java/com/jagex/runescape/cache/media/Widget.java
··· 47 47 public static int anInt243; 48 48 public int itemSpritePadsY; 49 49 public ImageRGB enabledImage; 50 - public static int anInt246 = -1; 50 + public static int instanceWidgetParent = -1; 51 51 public boolean typeFaceShadowed; 52 52 public int parentId; 53 53 public String enabledText; ··· 161 161 else 162 162 widget.hoveredPopup = -1; 163 163 if (widget.contentType == 600) 164 - anInt246 = parentId; 164 + instanceWidgetParent = parentId; 165 165 if (widget.contentType == 650) 166 166 anInt255 = parentId; 167 167 if (widget.contentType == 655)
+8
src/main/java/com/jagex/runescape/config/MovementType.java
··· 1 + package com.jagex.runescape.config; 2 + 3 + public enum MovementType { 4 + NONE, 5 + WALK, 6 + RUN, 7 + TELEPORT 8 + }
+1 -1
src/main/java/com/jagex/runescape/scene/Scene.java
··· 602 602 } 603 603 } 604 604 605 - public int method269(int z, int x, int y) { 605 + public int getLocationHash(int z, int x, int y) { 606 606 SceneTile sceneTile = groundArray.getTile(z, x, y); 607 607 if (sceneTile == null) { 608 608 return 0;
+12 -12
src/main/java/com/jagex/runescape/scene/SpawnObjectNode.java
··· 4 4 5 5 public class SpawnObjectNode extends Node { 6 6 7 - public int anInt1384; 8 - public int anInt1385; 9 - public int anInt1386; 10 - public int anInt1387; 11 - public int anInt1388; 12 - public int anInt1389; 13 - public int anInt1390 = -1; 14 - public int anInt1391; 15 - public int anInt1392; 16 - public int anInt1393; 17 - public int anInt1394; 18 - public int anInt1395; 7 + public int locationIndex; 8 + public int locationRotation; 9 + public int locationType; 10 + public int index; 11 + public int rotation; 12 + public int type; 13 + public int cycle = -1; 14 + public int plane; 15 + public int classType; 16 + public int x; 17 + public int y; 18 + public int spawnCycle; 19 19 }