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.

Refactoring some variables and changing naming from interfaces to widgets.

+654 -653
+617 -617
src/main/java/com/jagex/runescape/Game.java
··· 166 166 private String statusLineOne = ""; 167 167 private String statusLineTwo = ""; 168 168 private boolean aBoolean959 = true; 169 - private int anInt960 = -1; 169 + private int fullscreenWidgetChildId = -1; 170 170 private int thisPlayerServerId = -1; 171 171 private static boolean accountFlagged; 172 172 private Buffer outBuffer = Buffer.allocate(1); ··· 193 193 private IndexedImage aClass50_Sub1_Sub1_Sub3_985; 194 194 private IndexedImage aClass50_Sub1_Sub1_Sub3_986; 195 195 private IndexedImage aClass50_Sub1_Sub1_Sub3_987; 196 - public int backDialogueId = -1; 196 + public int openChatboxWidgetId = -1; 197 197 private int placementX; 198 198 private int placementY; 199 199 private int[] cameraFrequency = new int[5]; 200 - private int anInt992; 200 + private int membershipCreditRemaining; 201 201 private int anInt993; 202 202 private int anInt994; 203 203 private int anInt995; ··· 235 235 private int userWeight; 236 236 private ImageRGB[] worldMapHintIcons = new ImageRGB[100]; 237 237 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}; 238 - private int anInt1034; 238 + private int recoveryQuestionSetTime; 239 239 private int currentSound; 240 240 private ImageRGB mapFlagMarker; 241 241 private ImageRGB aClass50_Sub1_Sub1_Sub1_1037; ··· 252 252 private int anInt1048; 253 253 private int minimapState; 254 254 private static int anInt1052; 255 - private int anInt1053 = -1; 255 + private int fullscreenWidgetId = -1; 256 256 private int[] skillMaxLevel = new int[SkillConstants.SKILL_COUNT]; 257 257 private int anInt1055 = 2; 258 258 private int anInt1056 = 3; ··· 278 278 private int[] minimapHintY = new int[1000]; 279 279 private ImageRGB[] aClass50_Sub1_Sub1_Sub1Array1079 = new ImageRGB[32]; 280 280 private int anInt1080 = 0x4d4233; 281 - public int[] tabInterfaceIDs = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; 281 + public int[] tabWidgetIds = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; 282 282 private static int anInt1082; 283 - private int anInt1083; 283 + private int lastPasswordChangeTime; 284 284 private int[] anIntArray1084; 285 285 private int[] anIntArray1085; 286 286 private ImageRGB aClass50_Sub1_Sub1_Sub1_1086; 287 287 private CRC32 archiveCrc = new CRC32(); 288 - private int openInvOverLayId = -1; 288 + private int tabAreaOverlayWidgetId = -1; 289 289 public int[] sound = new int[50]; 290 290 public int plane; 291 291 private String username; ··· 362 362 private int[] anIntArray1166 = new int[256]; 363 363 public static Player localPlayer; 364 364 private static int anInt1168; 365 - public int openInterfaceId = -1; 366 - private int anInt1170; 365 + public int openScreenWidgetId = -1; 366 + private int loginScreenUpdateTime; 367 367 private int widgetSelected; 368 368 private int anInt1172; 369 369 private int anInt1173; ··· 405 405 private LinkedList gameAnimableObjectQueue = new LinkedList(); 406 406 private boolean cutsceneActive = false; 407 407 private boolean redrawChatMode = false; 408 - private int flashingSidebarId = -1; 408 + private int flashingTabId = -1; 409 409 public static int[] BITFIELD_MAX_VALUE; 410 - private int anInt1215; 410 + private int lastLoginTime; 411 411 private int cameraX; 412 412 private int cameraZ; 413 413 private int cameraY; ··· 432 432 private int anInt1238; 433 433 private boolean aBoolean1239 = false; 434 434 public boolean redrawChatbox = false; 435 - private int lastAddress; 435 + private int lastLoginAddress; 436 436 private static boolean aBoolean1242 = true; 437 437 private volatile boolean currentlyDrawingFlames = false; 438 438 private int inputType; ··· 464 464 private int nextSong; 465 465 private boolean songChanging = true; 466 466 private int anInt1272 = -1; 467 - private int anInt1273; 467 + private int unreadWebsiteMessages; 468 468 private boolean windowFocused = true; 469 469 private int lastRegionId = -1; 470 470 private boolean characterModelChanged = false; ··· 619 619 clickToContinueString = message; 620 620 super.clickType = 0; 621 621 } 622 - if (backDialogueId == -1) 622 + if (openChatboxWidgetId == -1) 623 623 redrawChatbox = true; 624 624 for (int index = 99; index > 0; index--) { 625 625 chatTypes[index] = chatTypes[index - 1]; ··· 755 755 756 756 private void closeWidgets() { 757 757 outBuffer.putOpcode(110); 758 - if (openInvOverLayId != -1) { 759 - method44(openInvOverLayId); 760 - openInvOverLayId = -1; 758 + if (tabAreaOverlayWidgetId != -1) { 759 + method44(tabAreaOverlayWidgetId); 760 + tabAreaOverlayWidgetId = -1; 761 761 redrawTabArea = true; 762 762 aBoolean1239 = false; 763 763 drawTabIcons = true; 764 764 } 765 - if (backDialogueId != -1) { 766 - method44(backDialogueId); 767 - backDialogueId = -1; 765 + if (openChatboxWidgetId != -1) { 766 + method44(openChatboxWidgetId); 767 + openChatboxWidgetId = -1; 768 768 redrawChatbox = true; 769 769 aBoolean1239 = false; 770 770 } 771 - if (anInt1053 != -1) { 772 - method44(anInt1053); 773 - anInt1053 = -1; 771 + if (fullscreenWidgetId != -1) { 772 + method44(fullscreenWidgetId); 773 + fullscreenWidgetId = -1; 774 774 aBoolean1046 = true; 775 775 } 776 - if (anInt960 != -1) { 777 - method44(anInt960); 778 - anInt960 = -1; 776 + if (fullscreenWidgetChildId != -1) { 777 + method44(fullscreenWidgetChildId); 778 + fullscreenWidgetChildId = -1; 779 779 } 780 - if (openInterfaceId != -1) { 781 - method44(openInterfaceId); 782 - openInterfaceId = -1; 780 + if (openScreenWidgetId != -1) { 781 + method44(openScreenWidgetId); 782 + openScreenWidgetId = -1; 783 783 } 784 784 } 785 785 ··· 1026 1026 return; 1027 1027 if (super.clickType == 1) { 1028 1028 if (super.clickX >= 539 && super.clickX <= 573 && super.clickY >= 169 && super.clickY < 205 1029 - && tabInterfaceIDs[0] != -1) { 1029 + && tabWidgetIds[0] != -1) { 1030 1030 redrawTabArea = true; 1031 1031 currentTabId = 0; 1032 1032 drawTabIcons = true; 1033 1033 } 1034 1034 if (super.clickX >= 569 && super.clickX <= 599 && super.clickY >= 168 && super.clickY < 205 1035 - && tabInterfaceIDs[1] != -1) { 1035 + && tabWidgetIds[1] != -1) { 1036 1036 redrawTabArea = true; 1037 1037 currentTabId = 1; 1038 1038 drawTabIcons = true; 1039 1039 } 1040 1040 if (super.clickX >= 597 && super.clickX <= 627 && super.clickY >= 168 && super.clickY < 205 1041 - && tabInterfaceIDs[2] != -1) { 1041 + && tabWidgetIds[2] != -1) { 1042 1042 redrawTabArea = true; 1043 1043 currentTabId = 2; 1044 1044 drawTabIcons = true; 1045 1045 } 1046 1046 if (super.clickX >= 625 && super.clickX <= 669 && super.clickY >= 168 && super.clickY < 203 1047 - && tabInterfaceIDs[3] != -1) { 1047 + && tabWidgetIds[3] != -1) { 1048 1048 redrawTabArea = true; 1049 1049 currentTabId = 3; 1050 1050 drawTabIcons = true; 1051 1051 } 1052 1052 if (super.clickX >= 666 && super.clickX <= 696 && super.clickY >= 168 && super.clickY < 205 1053 - && tabInterfaceIDs[4] != -1) { 1053 + && tabWidgetIds[4] != -1) { 1054 1054 redrawTabArea = true; 1055 1055 currentTabId = 4; 1056 1056 drawTabIcons = true; 1057 1057 } 1058 1058 if (super.clickX >= 694 && super.clickX <= 724 && super.clickY >= 168 && super.clickY < 205 1059 - && tabInterfaceIDs[5] != -1) { 1059 + && tabWidgetIds[5] != -1) { 1060 1060 redrawTabArea = true; 1061 1061 currentTabId = 5; 1062 1062 drawTabIcons = true; 1063 1063 } 1064 1064 if (super.clickX >= 722 && super.clickX <= 756 && super.clickY >= 169 && super.clickY < 205 1065 - && tabInterfaceIDs[6] != -1) { 1065 + && tabWidgetIds[6] != -1) { 1066 1066 redrawTabArea = true; 1067 1067 currentTabId = 6; 1068 1068 drawTabIcons = true; 1069 1069 } 1070 1070 if (super.clickX >= 540 && super.clickX <= 574 && super.clickY >= 466 && super.clickY < 502 1071 - && tabInterfaceIDs[7] != -1) { 1071 + && tabWidgetIds[7] != -1) { 1072 1072 redrawTabArea = true; 1073 1073 currentTabId = 7; 1074 1074 drawTabIcons = true; 1075 1075 } 1076 1076 if (super.clickX >= 572 && super.clickX <= 602 && super.clickY >= 466 && super.clickY < 503 1077 - && tabInterfaceIDs[8] != -1) { 1077 + && tabWidgetIds[8] != -1) { 1078 1078 redrawTabArea = true; 1079 1079 currentTabId = 8; 1080 1080 drawTabIcons = true; 1081 1081 } 1082 1082 if (super.clickX >= 599 && super.clickX <= 629 && super.clickY >= 466 && super.clickY < 503 1083 - && tabInterfaceIDs[9] != -1) { 1083 + && tabWidgetIds[9] != -1) { 1084 1084 redrawTabArea = true; 1085 1085 currentTabId = 9; 1086 1086 drawTabIcons = true; 1087 1087 } 1088 1088 if (super.clickX >= 627 && super.clickX <= 671 && super.clickY >= 467 && super.clickY < 502 1089 - && tabInterfaceIDs[10] != -1) { 1089 + && tabWidgetIds[10] != -1) { 1090 1090 redrawTabArea = true; 1091 1091 currentTabId = 10; 1092 1092 drawTabIcons = true; 1093 1093 } 1094 1094 if (super.clickX >= 669 && super.clickX <= 699 && super.clickY >= 466 && super.clickY < 503 1095 - && tabInterfaceIDs[11] != -1) { 1095 + && tabWidgetIds[11] != -1) { 1096 1096 redrawTabArea = true; 1097 1097 currentTabId = 11; 1098 1098 drawTabIcons = true; 1099 1099 } 1100 1100 if (super.clickX >= 696 && super.clickX <= 726 && super.clickY >= 466 && super.clickY < 503 1101 - && tabInterfaceIDs[12] != -1) { 1101 + && tabWidgetIds[12] != -1) { 1102 1102 redrawTabArea = true; 1103 1103 currentTabId = 12; 1104 1104 drawTabIcons = true; 1105 1105 } 1106 1106 if (super.clickX >= 724 && super.clickX <= 758 && super.clickY >= 466 && super.clickY < 502 1107 - && tabInterfaceIDs[13] != -1) { 1107 + && tabWidgetIds[13] != -1) { 1108 1108 redrawTabArea = true; 1109 1109 currentTabId = 13; 1110 1110 drawTabIcons = true; ··· 1501 1501 super.clickType = 0; 1502 1502 } 1503 1503 processMenuClick(); 1504 - if (anInt1053 == -1) { 1504 + if (fullscreenWidgetId == -1) { 1505 1505 method146((byte) 4); 1506 1506 method21(false); 1507 1507 method39(); ··· 1674 1674 int key = readCharacter(); 1675 1675 if (key == -1) 1676 1676 break; 1677 - if (openInterfaceId != -1 && openInterfaceId == reportAbuseInterfaceID) { 1677 + if (openScreenWidgetId != -1 && openScreenWidgetId == reportAbuseInterfaceID) { 1678 1678 if (key == 8 && reportedName.length() > 0) 1679 1679 reportedName = reportedName.substring(0, reportedName.length() - 1); 1680 1680 if ((key >= 97 && key <= 122 || key >= 65 && key <= 90 || key >= 48 && key <= 57 || key == 32) ··· 1778 1778 inputInputMessage = inputInputMessage.substring(0, inputInputMessage.length() - 1); 1779 1779 redrawChatbox = true; 1780 1780 } 1781 - } else if (backDialogueId == -1 && anInt1053 == -1) { 1781 + } else if (openChatboxWidgetId == -1 && fullscreenWidgetId == -1) { 1782 1782 if (key >= 32 && key <= 122 && chatboxInput.length() < 80) { 1783 1783 chatboxInput += (char) key; 1784 1784 redrawChatbox = true; ··· 1985 1985 thirdLastOpcode = secondLastOpcode; 1986 1986 secondLastOpcode = lastOpcode; 1987 1987 lastOpcode = opcode; 1988 - if (opcode == UPDATE_INTERFACE_POSITION) { 1988 + if (opcode == UPDATE_WIDGET_POSITION) { 1989 1989 int yOffset = buffer.getShortLE(); 1990 1990 int xOffset = buffer.getShortLE(); 1991 - int interfaceId = buffer.getUnsignedShortBE(); 1992 - Widget widget = Widget.forId(interfaceId); 1991 + int widgetId = buffer.getUnsignedShortBE(); 1992 + Widget widget = Widget.forId(widgetId); 1993 1993 widget.xOffset = xOffset; 1994 1994 widget.yOffset = yOffset; 1995 1995 opcode = -1; 1996 1996 return true; 1997 1997 } 1998 - if (opcode == UPDATE_INTERFACE_MODEL_DISPLAY) { 1998 + if (opcode == UPDATE_WIDGET_MODEL_DISPLAY) { 1999 1999 int rotationX = buffer.getUnsignedNegativeOffsetShortBE(); 2000 - int interfaceId = buffer.getUnsignedNegativeOffsetShortLE(); 2000 + int widgetId = buffer.getUnsignedNegativeOffsetShortLE(); 2001 2001 int zoom = buffer.getUnsignedNegativeOffsetShortBE(); 2002 2002 int rotationY = buffer.getUnsignedShortLE(); 2003 - Widget.forId(interfaceId).rotationX = rotationX; 2004 - Widget.forId(interfaceId).rotationY = rotationY; 2005 - Widget.forId(interfaceId).zoom = zoom; 2003 + Widget.forId(widgetId).rotationX = rotationX; 2004 + Widget.forId(widgetId).rotationY = rotationY; 2005 + Widget.forId(widgetId).zoom = zoom; 2006 2006 opcode = -1; 2007 2007 return true; 2008 2008 } 2009 - if (opcode == SET_INTERFACE_MODEL_1) { 2009 + if (opcode == SET_WIDGET_MODEL_1) { 2010 2010 int j1 = buffer.getUnsignedNegativeOffsetShortLE(); 2011 - int interfaceId = buffer.getUnsignedNegativeOffsetShortLE(); 2012 - Widget.forId(interfaceId).modelType = 1; 2013 - Widget.forId(interfaceId).modelId = j1; 2011 + int widgetId = buffer.getUnsignedNegativeOffsetShortLE(); 2012 + Widget.forId(widgetId).modelType = 1; 2013 + Widget.forId(widgetId).modelId = j1; 2014 2014 opcode = -1; 2015 2015 return true; 2016 2016 } ··· 2034 2034 opcode = -1; 2035 2035 return true; 2036 2036 } 2037 - if (opcode == UPDATE_INTERFACE_SETTING_SMALL) { 2037 + if (opcode == UPDATE_WIDGET_SETTING_SMALL) { 2038 2038 int settingIndex = buffer.getUnsignedNegativeOffsetShortBE(); 2039 2039 byte settingValue = buffer.getPreNegativeOffsetByte(); 2040 2040 anIntArray1005[settingIndex] = settingValue; ··· 2065 2065 opcode = -1; 2066 2066 return true; 2067 2067 } 2068 - if (opcode == SET_INTERFACE_MODEL_2) { 2068 + if (opcode == SET_WIDGET_MODEL_2) { 2069 2069 int modelId = buffer.getUnsignedNegativeOffsetShortBE(); 2070 - int interfaceId = buffer.getUnsignedShortLE(); 2071 - Widget.forId(interfaceId).modelType = 2; 2072 - Widget.forId(interfaceId).modelId = modelId; 2070 + int widgetId = buffer.getUnsignedShortLE(); 2071 + Widget.forId(widgetId).modelType = 2; 2072 + Widget.forId(widgetId).modelId = modelId; 2073 2073 opcode = -1; 2074 2074 return true; 2075 2075 } 2076 - if (opcode == SHOW_CHATBOX_INTERFACE) { 2077 - int interfaceId = buffer.getUnsignedShortBE(); 2078 - method112((byte) 36, interfaceId); 2079 - if (openInvOverLayId != -1) { 2080 - method44(openInvOverLayId); 2081 - openInvOverLayId = -1; 2076 + if (opcode == SHOW_CHATBOX_WIDGET) { 2077 + int chatboxWidgetId = buffer.getUnsignedShortBE(); 2078 + method112((byte) 36, chatboxWidgetId); 2079 + if (tabAreaOverlayWidgetId != -1) { 2080 + method44(tabAreaOverlayWidgetId); 2081 + tabAreaOverlayWidgetId = -1; 2082 2082 redrawTabArea = true; 2083 2083 drawTabIcons = true; 2084 2084 } 2085 - if (anInt1053 != -1) { 2086 - method44(anInt1053); 2087 - anInt1053 = -1; 2085 + if (fullscreenWidgetId != -1) { 2086 + method44(fullscreenWidgetId); 2087 + fullscreenWidgetId = -1; 2088 2088 aBoolean1046 = true; 2089 2089 } 2090 - if (anInt960 != -1) { 2091 - method44(anInt960); 2092 - anInt960 = -1; 2090 + if (fullscreenWidgetChildId != -1) { 2091 + method44(fullscreenWidgetChildId); 2092 + fullscreenWidgetChildId = -1; 2093 2093 } 2094 - if (openInterfaceId != -1) { 2095 - method44(openInterfaceId); 2096 - openInterfaceId = -1; 2094 + if (openScreenWidgetId != -1) { 2095 + method44(openScreenWidgetId); 2096 + openScreenWidgetId = -1; 2097 2097 } 2098 - if (backDialogueId != interfaceId) { 2099 - method44(backDialogueId); 2100 - backDialogueId = interfaceId; 2098 + if (openChatboxWidgetId != chatboxWidgetId) { 2099 + method44(openChatboxWidgetId); 2100 + openChatboxWidgetId = chatboxWidgetId; 2101 2101 } 2102 2102 aBoolean1239 = false; 2103 2103 redrawChatbox = true; ··· 2130 2130 return true; 2131 2131 } 2132 2132 if (opcode == SHOW_DIALOG) { 2133 - int interfaceId = buffer.getShortLE(); 2134 - if (interfaceId != dialogueId) { 2133 + int widgetId = buffer.getShortLE(); 2134 + if (widgetId != dialogueId) { 2135 2135 method44(dialogueId); 2136 - dialogueId = interfaceId; 2136 + dialogueId = widgetId; 2137 2137 } 2138 2138 redrawChatbox = true; 2139 2139 opcode = -1; 2140 2140 return true; 2141 2141 } 2142 - if (opcode == UPDATE_INTERFACE_COLOR) { 2143 - int interfaceId = buffer.getUnsignedShortBE(); 2142 + if (opcode == UPDATE_WIDGET_COLOR) { 2143 + int widgetId = buffer.getUnsignedShortBE(); 2144 2144 int rgb = buffer.getUnsignedNegativeOffsetShortBE(); 2145 2145 int j17 = rgb >> 10 & 0x1f; 2146 2146 int j22 = rgb >> 5 & 0x1f; 2147 2147 int l24 = rgb & 0x1f; 2148 - Widget.forId(interfaceId).disabledColor = (j17 << 19) + (j22 << 11) + (l24 << 3); 2148 + Widget.forId(widgetId).disabledColor = (j17 << 19) + (j22 << 11) + (l24 << 3); 2149 2149 opcode = -1; 2150 2150 return true; 2151 2151 } ··· 2244 2244 opcode = -1; 2245 2245 return false; 2246 2246 } 2247 - if (opcode == UPDATE_INTERFACE_SETTING_LARGE) { 2247 + if (opcode == UPDATE_WIDGET_SETTING_LARGE) { 2248 2248 int settingValue = buffer.getIntME2(); 2249 2249 int settingIndex = buffer.getUnsignedShortLE(); 2250 2250 anIntArray1005[settingIndex] = settingValue; ··· 2258 2258 opcode = -1; 2259 2259 return true; 2260 2260 } 2261 - if (opcode == CLOSE_ALL_INTERFACES) { 2262 - if (openInvOverLayId != -1) { 2263 - method44(openInvOverLayId); 2264 - openInvOverLayId = -1; 2261 + if (opcode == CLOSE_ALL_WIDGETS) { 2262 + if (tabAreaOverlayWidgetId != -1) { 2263 + method44(tabAreaOverlayWidgetId); 2264 + tabAreaOverlayWidgetId = -1; 2265 2265 redrawTabArea = true; 2266 2266 drawTabIcons = true; 2267 2267 } 2268 - if (backDialogueId != -1) { 2269 - method44(backDialogueId); 2270 - backDialogueId = -1; 2268 + if (openChatboxWidgetId != -1) { 2269 + method44(openChatboxWidgetId); 2270 + openChatboxWidgetId = -1; 2271 2271 redrawChatbox = true; 2272 2272 } 2273 - if (anInt1053 != -1) { 2274 - method44(anInt1053); 2275 - anInt1053 = -1; 2273 + if (fullscreenWidgetId != -1) { 2274 + method44(fullscreenWidgetId); 2275 + fullscreenWidgetId = -1; 2276 2276 aBoolean1046 = true; 2277 2277 } 2278 - if (anInt960 != -1) { 2279 - method44(anInt960); 2280 - anInt960 = -1; 2278 + if (fullscreenWidgetChildId != -1) { 2279 + method44(fullscreenWidgetChildId); 2280 + fullscreenWidgetChildId = -1; 2281 2281 } 2282 - if (openInterfaceId != -1) { 2283 - method44(openInterfaceId); 2284 - openInterfaceId = -1; 2282 + if (openScreenWidgetId != -1) { 2283 + method44(openScreenWidgetId); 2284 + openScreenWidgetId = -1; 2285 2285 } 2286 2286 if (inputType != 0) { 2287 2287 inputType = 0; ··· 2291 2291 opcode = -1; 2292 2292 return true; 2293 2293 } 2294 - if (opcode == SHOW_WELCOME_SCREEN) { // @TODO rename all these vars 2295 - anInt1083 = buffer.getUnsignedShortLE(); 2296 - anInt1075 = buffer.getUnsignedNegativeOffsetShortLE(); 2297 - buffer.getUnsignedShortBE(); 2298 - anInt1208 = buffer.getUnsignedShortBE(); 2299 - anInt1170 = buffer.getUnsignedShortLE(); 2300 - anInt1273 = buffer.getUnsignedNegativeOffsetShortBE(); 2301 - anInt1215 = buffer.getUnsignedNegativeOffsetShortBE(); 2302 - anInt992 = buffer.getUnsignedShortBE(); 2303 - lastAddress = buffer.getIntLE(); 2304 - anInt1034 = buffer.getUnsignedNegativeOffsetShortLE(); 2305 - buffer.getUnsignedPostNegativeOffsetByte(); 2306 - SignLink.dnsLookup(TextUtils.decodeAddress(lastAddress)); 2294 + if (opcode == UPDATE_WELCOME_SCREEN) { // @TODO rename all these vars 2295 + lastPasswordChangeTime = buffer.getUnsignedShortLE(); 2296 + anInt1075 = buffer.getUnsignedNegativeOffsetShortLE(); // Never read anywhere... Junk?... 2297 + buffer.getUnsignedShortBE(); // junk... 2298 + anInt1208 = buffer.getUnsignedShortBE(); // Never read anywhere... Junk?... 2299 + loginScreenUpdateTime = buffer.getUnsignedShortLE(); 2300 + unreadWebsiteMessages = buffer.getUnsignedNegativeOffsetShortBE(); 2301 + lastLoginTime = buffer.getUnsignedNegativeOffsetShortBE(); 2302 + membershipCreditRemaining = buffer.getUnsignedShortBE(); 2303 + lastLoginAddress = buffer.getIntLE(); 2304 + recoveryQuestionSetTime = buffer.getUnsignedNegativeOffsetShortLE(); 2305 + buffer.getUnsignedPostNegativeOffsetByte(); // junk... 2306 + SignLink.dnsLookup(TextUtils.decodeAddress(lastLoginAddress)); 2307 2307 opcode = -1; 2308 2308 return true; 2309 2309 } ··· 2356 2356 opcode = -1; 2357 2357 return true; 2358 2358 } 2359 - if (opcode == SHOW_WALKABLE_INTERFACE) { 2360 - int interfaceId = buffer.getShortBE(); 2361 - if (interfaceId >= 0) 2362 - method112((byte) 36, interfaceId); 2363 - if (interfaceId != walkableWidgetId) { 2359 + if (opcode == SHOW_WALKABLE_WIDGET) { 2360 + int widgetId = buffer.getShortBE(); 2361 + if (widgetId >= 0) 2362 + method112((byte) 36, widgetId); 2363 + if (widgetId != walkableWidgetId) { 2364 2364 method44(walkableWidgetId); 2365 - walkableWidgetId = interfaceId; 2365 + walkableWidgetId = widgetId; 2366 2366 } 2367 2367 opcode = -1; 2368 2368 return true; 2369 2369 } 2370 - if (opcode == UPDATE_INTERFACE_HIDDEN_ON_HOVER_STATE) { 2370 + if (opcode == HIDE_WIDGET) { 2371 2371 boolean hiddenUntilHovered = buffer.getUnsignedByte() == 1; 2372 - int interfaceId = buffer.getUnsignedShortBE(); 2373 - Widget.forId(interfaceId).hiddenUntilHovered = hiddenUntilHovered; 2372 + int widgetId = buffer.getUnsignedShortBE(); 2373 + Widget.forId(widgetId).hiddenUntilHovered = hiddenUntilHovered; 2374 2374 opcode = -1; 2375 2375 return true; 2376 2376 } ··· 2391 2391 opcode = -1; 2392 2392 return true; 2393 2393 } 2394 - if (opcode == SHOW_SIDEBAR_AND_GAME_INTERFACE) { 2395 - int gameInterfaceId = buffer.getUnsignedNegativeOffsetShortBE(); 2396 - int sidebarInterfaceId = buffer.getUnsignedNegativeOffsetShortLE(); 2397 - if (backDialogueId != -1) { 2398 - method44(backDialogueId); 2399 - backDialogueId = -1; 2394 + if (opcode == SHOW_SIDEBAR_AND_GAME_WIDGET) { 2395 + int screenWidgetId = buffer.getUnsignedNegativeOffsetShortBE(); 2396 + int tabWidgetId = buffer.getUnsignedNegativeOffsetShortLE(); 2397 + if (openChatboxWidgetId != -1) { 2398 + method44(openChatboxWidgetId); 2399 + openChatboxWidgetId = -1; 2400 2400 redrawChatbox = true; 2401 2401 } 2402 - if (anInt1053 != -1) { 2403 - method44(anInt1053); 2404 - anInt1053 = -1; 2402 + if (fullscreenWidgetId != -1) { 2403 + method44(fullscreenWidgetId); 2404 + fullscreenWidgetId = -1; 2405 2405 aBoolean1046 = true; 2406 2406 } 2407 - if (anInt960 != -1) { 2408 - method44(anInt960); 2409 - anInt960 = -1; 2407 + if (fullscreenWidgetChildId != -1) { 2408 + method44(fullscreenWidgetChildId); 2409 + fullscreenWidgetChildId = -1; 2410 2410 } 2411 - if (openInterfaceId != gameInterfaceId) { 2412 - method44(openInterfaceId); 2413 - openInterfaceId = gameInterfaceId; 2411 + if (openScreenWidgetId != screenWidgetId) { 2412 + method44(openScreenWidgetId); 2413 + openScreenWidgetId = screenWidgetId; 2414 2414 } 2415 - if (openInvOverLayId != sidebarInterfaceId) { 2416 - method44(openInvOverLayId); 2417 - openInvOverLayId = sidebarInterfaceId; 2415 + if (tabAreaOverlayWidgetId != tabWidgetId) { 2416 + method44(tabAreaOverlayWidgetId); 2417 + tabAreaOverlayWidgetId = tabWidgetId; 2418 2418 } 2419 2419 if (inputType != 0) { 2420 2420 inputType = 0; ··· 2439 2439 opcode = -1; 2440 2440 return true; 2441 2441 } 2442 - if (opcode == UPDATE_INTERFACE_ITEMS_BY_SLOT) { 2442 + if (opcode == UPDATE_WIDGET_ITEMS_BY_SLOT) { 2443 2443 redrawTabArea = true; 2444 - int interfaceId = buffer.getUnsignedShortBE(); 2445 - Widget widget = Widget.forId(interfaceId); 2444 + int widgetId = buffer.getUnsignedShortBE(); 2445 + Widget widget = Widget.forId(widgetId); 2446 2446 while (buffer.currentPosition < packetSize) { 2447 2447 int slot = buffer.getSmart(); 2448 2448 int id = buffer.getUnsignedShortBE(); ··· 2515 2515 opcode = -1; 2516 2516 return true; 2517 2517 } 2518 - if (opcode == SET_OPEN_SIDEBAR) { 2518 + if (opcode == SET_ACTIVE_TAB) { 2519 2519 currentTabId = buffer.getUnsignedInvertedByte(); 2520 2520 redrawTabArea = true; 2521 2521 drawTabIcons = true; ··· 2544 2544 opcode = -1; 2545 2545 return true; 2546 2546 } 2547 - if (opcode == SET_INTERFACE_PLAYER_HEAD) { 2548 - int interfaceId = buffer.getUnsignedNegativeOffsetShortLE(); 2549 - Widget.forId(interfaceId).modelType = 3; 2547 + if (opcode == SET_WIDGET_PLAYER_HEAD) { 2548 + int widgetId = buffer.getUnsignedNegativeOffsetShortLE(); 2549 + Widget.forId(widgetId).modelType = 3; 2550 2550 if (localPlayer.npcDefinition == null) // maybe that is the appear as npc thing? 2551 - Widget.forId(interfaceId).modelId = (localPlayer.appearanceColors[0] << 25) + (localPlayer.appearanceColors[4] << 20) 2551 + Widget.forId(widgetId).modelId = (localPlayer.appearanceColors[0] << 25) + (localPlayer.appearanceColors[4] << 20) 2552 2552 + (localPlayer.appearance[0] << 15) + (localPlayer.appearance[8] << 10) 2553 2553 + (localPlayer.appearance[11] << 5) + localPlayer.appearance[1]; 2554 2554 else 2555 - Widget.forId(interfaceId).modelId = (int) (0x12345678L + localPlayer.npcDefinition.id); 2555 + Widget.forId(widgetId).modelId = (int) (0x12345678L + localPlayer.npcDefinition.id); 2556 2556 opcode = -1; 2557 2557 return true; 2558 2558 } ··· 2608 2608 opcode = -1; 2609 2609 return true; 2610 2610 } 2611 - if (opcode == SHOW_GAME_INTERFACE) { 2612 - int interfaceId = buffer.getUnsignedNegativeOffsetShortLE(); 2613 - method112((byte) 36, interfaceId); 2614 - if (openInvOverLayId != -1) { 2615 - method44(openInvOverLayId); 2616 - openInvOverLayId = -1; 2611 + if (opcode == SHOW_GAME_WIDGET) { 2612 + int widgetId = buffer.getUnsignedNegativeOffsetShortLE(); 2613 + method112((byte) 36, widgetId); 2614 + if (tabAreaOverlayWidgetId != -1) { 2615 + method44(tabAreaOverlayWidgetId); 2616 + tabAreaOverlayWidgetId = -1; 2617 2617 redrawTabArea = true; 2618 2618 drawTabIcons = true; 2619 2619 } 2620 - if (backDialogueId != -1) { 2621 - method44(backDialogueId); 2622 - backDialogueId = -1; 2620 + if (openChatboxWidgetId != -1) { 2621 + method44(openChatboxWidgetId); 2622 + openChatboxWidgetId = -1; 2623 2623 redrawChatbox = true; 2624 2624 } 2625 - if (anInt1053 != -1) { 2626 - method44(anInt1053); 2627 - anInt1053 = -1; 2625 + if (fullscreenWidgetId != -1) { 2626 + method44(fullscreenWidgetId); 2627 + fullscreenWidgetId = -1; 2628 2628 aBoolean1046 = true; 2629 2629 } 2630 - if (anInt960 != -1) { 2631 - method44(anInt960); 2632 - anInt960 = -1; 2630 + if (fullscreenWidgetChildId != -1) { 2631 + method44(fullscreenWidgetChildId); 2632 + fullscreenWidgetChildId = -1; 2633 2633 } 2634 - if (openInterfaceId != interfaceId) { 2635 - method44(openInterfaceId); 2636 - openInterfaceId = interfaceId; 2634 + if (openScreenWidgetId != widgetId) { 2635 + method44(openScreenWidgetId); 2636 + openScreenWidgetId = widgetId; 2637 2637 } 2638 2638 if (inputType != 0) { 2639 2639 inputType = 0; ··· 2643 2643 opcode = -1; 2644 2644 return true; 2645 2645 } 2646 - if (opcode == SHOW_SIDEBAR_OVERLAY_INTERFACE) { 2647 - int interfaceId = buffer.getUnsignedNegativeOffsetShortLE(); 2648 - method112((byte) 36, interfaceId); 2649 - if (backDialogueId != -1) { 2650 - method44(backDialogueId); 2651 - backDialogueId = -1; 2646 + if (opcode == SHOW_SIDEBAR_OVERLAY_WIDGET) { 2647 + int widgetId = buffer.getUnsignedNegativeOffsetShortLE(); 2648 + method112((byte) 36, widgetId); 2649 + if (openChatboxWidgetId != -1) { 2650 + method44(openChatboxWidgetId); 2651 + openChatboxWidgetId = -1; 2652 2652 redrawChatbox = true; 2653 2653 } 2654 - if (anInt1053 != -1) { 2655 - method44(anInt1053); 2656 - anInt1053 = -1; 2654 + if (fullscreenWidgetId != -1) { 2655 + method44(fullscreenWidgetId); 2656 + fullscreenWidgetId = -1; 2657 2657 aBoolean1046 = true; 2658 2658 } 2659 - if (anInt960 != -1) { 2660 - method44(anInt960); 2661 - anInt960 = -1; 2659 + if (fullscreenWidgetChildId != -1) { 2660 + method44(fullscreenWidgetChildId); 2661 + fullscreenWidgetChildId = -1; 2662 2662 } 2663 - if (openInterfaceId != -1) { 2664 - method44(openInterfaceId); 2665 - openInterfaceId = -1; 2663 + if (openScreenWidgetId != -1) { 2664 + method44(openScreenWidgetId); 2665 + openScreenWidgetId = -1; 2666 2666 } 2667 - if (openInvOverLayId != interfaceId) { 2668 - method44(openInvOverLayId); 2669 - openInvOverLayId = interfaceId; 2667 + if (tabAreaOverlayWidgetId != widgetId) { 2668 + method44(tabAreaOverlayWidgetId); 2669 + tabAreaOverlayWidgetId = widgetId; 2670 2670 } 2671 2671 if (inputType != 0) { 2672 2672 inputType = 0; ··· 2693 2693 opcode = -1; 2694 2694 return true; 2695 2695 } 2696 - if (opcode == UPDATE_ALL_INTERFACE_ITEMS) { // update all items in interface 2696 + if (opcode == UPDATE_ALL_WIDGET_ITEMS) { // update all items in interface 2697 2697 redrawTabArea = true; 2698 - int interfaceId = buffer.getUnsignedShortBE(); 2699 - Widget widget = Widget.forId(interfaceId); 2698 + int widgetId = buffer.getUnsignedShortBE(); 2699 + Widget widget = Widget.forId(widgetId); 2700 2700 int items = buffer.getUnsignedShortBE(); 2701 2701 for (int item = 0; item < items; item++) { 2702 2702 widget.items[item] = buffer.getUnsignedNegativeOffsetShortLE(); ··· 2939 2939 opcode = -1; 2940 2940 return true; 2941 2941 } 2942 - if (opcode == SET_INTERFACE_ITEM_MODEL) { 2942 + if (opcode == SET_WIDGET_ITEM_MODEL) { 2943 2943 int scale = buffer.getUnsignedShortBE(); 2944 2944 int itemId = buffer.getUnsignedShortLE(); 2945 - int interfaceId = buffer.getUnsignedNegativeOffsetShortLE(); 2945 + int widgetId = buffer.getUnsignedNegativeOffsetShortLE(); 2946 2946 if (itemId == 65535) { 2947 - Widget.forId(interfaceId).modelType = 0; 2947 + Widget.forId(widgetId).modelType = 0; 2948 2948 opcode = -1; 2949 2949 return true; 2950 2950 } else { 2951 2951 ItemDefinition class16 = ItemDefinition.lookup(itemId); 2952 - Widget.forId(interfaceId).modelType = 4; 2953 - Widget.forId(interfaceId).modelId = itemId; 2954 - Widget.forId(interfaceId).rotationX = class16.modelRotationX; 2955 - Widget.forId(interfaceId).rotationY = class16.modelRotationY; 2956 - Widget.forId(interfaceId).zoom = (class16.modelScale * 100) / scale; 2952 + Widget.forId(widgetId).modelType = 4; 2953 + Widget.forId(widgetId).modelId = itemId; 2954 + Widget.forId(widgetId).rotationX = class16.modelRotationX; 2955 + Widget.forId(widgetId).rotationY = class16.modelRotationY; 2956 + Widget.forId(widgetId).zoom = (class16.modelScale * 100) / scale; 2957 2957 opcode = -1; 2958 2958 return true; 2959 2959 } ··· 2973 2973 opcode = -1; 2974 2974 return true; 2975 2975 } 2976 - if (opcode == SET_INTERFACE_ANIMATION) { 2977 - int interfaceId = buffer.getUnsignedNegativeOffsetShortLE(); 2976 + if (opcode == SET_WIDGET_ANIMATION) { 2977 + int widgetId = buffer.getUnsignedNegativeOffsetShortLE(); 2978 2978 int animationId = buffer.getNegativeOffsetShortBE(); 2979 - Widget widget = Widget.forId(interfaceId); 2979 + Widget widget = Widget.forId(widgetId); 2980 2980 if (widget.disabledAnimation != animationId || animationId == -1) { 2981 2981 widget.disabledAnimation = animationId; 2982 2982 widget.animationFrame = 0; ··· 2998 2998 opcode = -1; 2999 2999 return true; 3000 3000 } 3001 - if (opcode == SET_SIDEBAR_INTERFACE) { 3001 + if (opcode == SET_TAB_WIDGET) { 3002 3002 int sidebarIndex = buffer.getUnsignedPreNegativeOffsetByte(); 3003 - int interfaceId = buffer.getUnsignedNegativeOffsetShortBE(); 3004 - if (interfaceId == 65535) 3005 - interfaceId = -1; 3006 - if (tabInterfaceIDs[sidebarIndex] != interfaceId) { 3007 - method44(tabInterfaceIDs[sidebarIndex]); 3008 - tabInterfaceIDs[sidebarIndex] = interfaceId; 3003 + int widgetId = buffer.getUnsignedNegativeOffsetShortBE(); 3004 + if (widgetId == 65535) 3005 + widgetId = -1; 3006 + if (tabWidgetIds[sidebarIndex] != widgetId) { 3007 + method44(tabWidgetIds[sidebarIndex]); 3008 + tabWidgetIds[sidebarIndex] = widgetId; 3009 3009 } 3010 3010 redrawTabArea = true; 3011 3011 drawTabIcons = true; 3012 3012 opcode = -1; 3013 3013 return true; 3014 3014 } 3015 - if (opcode == CLEAR_INTERFACE_ITEMS) { 3016 - int interfaceId = buffer.getUnsignedShortLE(); 3017 - Widget widget = Widget.forId(interfaceId); 3015 + if (opcode == CLEAR_WIDGET_ITEMS) { 3016 + int widgetId = buffer.getUnsignedShortLE(); 3017 + Widget widget = Widget.forId(widgetId); 3018 3018 for (int k21 = 0; k21 < widget.items.length; k21++) { 3019 3019 widget.items[k21] = -1; 3020 3020 widget.items[k21] = 0; ··· 3023 3023 opcode = -1; 3024 3024 return true; 3025 3025 } 3026 - if (opcode == FLASH_SIDEBAR_ICON) { 3027 - flashingSidebarId = buffer.getUnsignedByte(); 3028 - if (flashingSidebarId == currentTabId) { 3029 - if (flashingSidebarId == 3) 3026 + if (opcode == FLASH_TAB_ICON) { 3027 + flashingTabId = buffer.getUnsignedByte(); 3028 + if (flashingTabId == currentTabId) { 3029 + if (flashingTabId == 3) 3030 3030 currentTabId = 1; 3031 3031 else 3032 3032 currentTabId = 3; ··· 3055 3055 opcode = -1; 3056 3056 return true; 3057 3057 } 3058 - if (opcode == 253) { // ??? open some interface 3059 - int k9 = buffer.getUnsignedShortLE(); 3060 - int k15 = buffer.getUnsignedNegativeOffsetShortBE(); 3061 - method112((byte) 36, k15); 3062 - if (k9 != -1) 3063 - method112((byte) 36, k9); 3064 - if (openInterfaceId != -1) { 3065 - method44(openInterfaceId); 3066 - openInterfaceId = -1; 3058 + if (opcode == SHOW_FULLSCREEN_WIDGET) { 3059 + int fullscreenWidgetChildId = buffer.getUnsignedShortLE(); 3060 + int fullscreenWidgetId = buffer.getUnsignedNegativeOffsetShortBE(); 3061 + method112((byte) 36, fullscreenWidgetId); 3062 + if (fullscreenWidgetChildId != -1) 3063 + method112((byte) 36, fullscreenWidgetChildId); 3064 + if (openScreenWidgetId != -1) { 3065 + method44(openScreenWidgetId); 3066 + openScreenWidgetId = -1; 3067 3067 } 3068 - if (openInvOverLayId != -1) { 3069 - method44(openInvOverLayId); 3070 - openInvOverLayId = -1; 3068 + if (tabAreaOverlayWidgetId != -1) { 3069 + method44(tabAreaOverlayWidgetId); 3070 + tabAreaOverlayWidgetId = -1; 3071 3071 } 3072 - if (backDialogueId != -1) { 3073 - method44(backDialogueId); 3074 - backDialogueId = -1; 3072 + if (openChatboxWidgetId != -1) { 3073 + method44(openChatboxWidgetId); 3074 + openChatboxWidgetId = -1; 3075 3075 } 3076 - if (anInt1053 != k15) { 3077 - method44(anInt1053); 3078 - anInt1053 = k15; 3076 + if (this.fullscreenWidgetId != fullscreenWidgetId) { 3077 + method44(this.fullscreenWidgetId); 3078 + this.fullscreenWidgetId = fullscreenWidgetId; 3079 3079 } 3080 - if (anInt960 != k15) { 3081 - method44(anInt960); 3082 - anInt960 = k9; 3080 + if (this.fullscreenWidgetChildId != fullscreenWidgetId) { 3081 + method44(this.fullscreenWidgetChildId); 3082 + this.fullscreenWidgetChildId = fullscreenWidgetChildId; 3083 3083 } 3084 3084 inputType = 0; 3085 3085 aBoolean1239 = false; ··· 3094 3094 } 3095 3095 if (opcode == 18) { // ??? interface setting something 3096 3096 int l9 = buffer.getUnsignedShortBE(); 3097 - int interfaceId = buffer.getUnsignedNegativeOffsetShortBE(); 3097 + int widgetId = buffer.getUnsignedNegativeOffsetShortBE(); 3098 3098 int l21 = buffer.getUnsignedShortLE(); 3099 - Widget.forId(interfaceId).anInt218 = (l9 << 16) + l21; 3099 + Widget.forId(widgetId).anInt218 = (l9 << 16) + l21; 3100 3100 opcode = -1; 3101 3101 return true; 3102 3102 } ··· 3106 3106 opcode = -1; 3107 3107 return true; 3108 3108 } 3109 - if (opcode == RESET_INTERFACE_SETTINGS) { 3109 + if (opcode == RESET_WIDGET_SETTINGS) { 3110 3110 for (int i = 0; i < widgetSettings.length; i++) 3111 3111 if (widgetSettings[i] != anIntArray1005[i]) { 3112 3112 widgetSettings[i] = anIntArray1005[i]; ··· 3117 3117 opcode = -1; 3118 3118 return true; 3119 3119 } 3120 - if (opcode == UPDATE_INTERFACE_STRING) { 3121 - int interfaceId = buffer.getUnsignedNegativeOffsetShortLE(); 3120 + if (opcode == UPDATE_WIDGET_STRING) { 3121 + int widgetId = buffer.getUnsignedNegativeOffsetShortLE(); 3122 3122 String newText = buffer.getString(); 3123 - Widget.forId(interfaceId).disabledText = newText; 3124 - if (Widget.forId(interfaceId).parentId == tabInterfaceIDs[currentTabId]) 3123 + Widget.forId(widgetId).disabledText = newText; 3124 + if (Widget.forId(widgetId).parentId == tabWidgetIds[currentTabId]) 3125 3125 redrawTabArea = true; 3126 3126 opcode = -1; 3127 3127 return true; 3128 3128 } 3129 - if (opcode == UPDATE_INTERFACE_SCROLL_POSITION) { 3130 - int interfaceId = buffer.getUnsignedShortBE(); 3129 + if (opcode == UPDATE_WIDGET_SCROLL_POSITION) { 3130 + int widgetId = buffer.getUnsignedShortBE(); 3131 3131 int scrollPosition = buffer.getUnsignedNegativeOffsetShortLE(); 3132 - Widget widget = Widget.forId(interfaceId); 3132 + Widget widget = Widget.forId(widgetId); 3133 3133 if (widget != null && widget.type == 0) { 3134 3134 if (scrollPosition < 0) 3135 3135 scrollPosition = 0; ··· 3522 3522 outBuffer.putByte(tradeMode); 3523 3523 } 3524 3524 if (super.clickX >= 412 && super.clickX <= 512 && super.clickY >= 467 && super.clickY <= 499) 3525 - if (openInterfaceId == -1) { 3525 + if (openScreenWidgetId == -1) { 3526 3526 closeWidgets(); 3527 3527 reportedName = ""; 3528 3528 reportMutePlayer = false; 3529 - reportAbuseInterfaceID = openInterfaceId = Widget.anInt246; 3529 + reportAbuseInterfaceID = openScreenWidgetId = Widget.anInt246; 3530 3530 } else { 3531 3531 addChatMessage("", "Please close the interface you have open before using 'report abuse'", 0); 3532 3532 } ··· 3670 3670 continue; 3671 3671 i = k; 3672 3672 if (j1 == 2 && currentScene.method271(plane, l, i1, k) >= 0) { 3673 - GameObjectDefinition class47 = GameObjectDefinition.getDefinition(k1); 3674 - if (class47.childrenIds != null) 3675 - class47 = class47.getChildDefinition(); 3676 - if (class47 == null) 3673 + GameObjectDefinition gameObjectDefinition = GameObjectDefinition.getDefinition(k1); 3674 + if (gameObjectDefinition.childrenIds != null) 3675 + gameObjectDefinition = gameObjectDefinition.getChildDefinition(); 3676 + if (gameObjectDefinition == null) 3677 3677 continue; 3678 3678 if (itemSelected == 1) { 3679 - menuActionTexts[menuActionRow] = "Use " + selectedItemName + " with @cya@" + class47.name; 3679 + menuActionTexts[menuActionRow] = "Use " + selectedItemName + " with @cya@" + gameObjectDefinition.name; 3680 3680 menuActionTypes[menuActionRow] = 467; 3681 3681 selectedMenuActions[menuActionRow] = k; 3682 3682 firstMenuOperand[menuActionRow] = l; ··· 3684 3684 menuActionRow++; 3685 3685 } else if (widgetSelected == 1) { 3686 3686 if ((anInt1173 & 4) == 4) { 3687 - menuActionTexts[menuActionRow] = selectedWidgetName + " @cya@" + class47.name; 3687 + menuActionTexts[menuActionRow] = selectedWidgetName + " @cya@" + gameObjectDefinition.name; 3688 3688 menuActionTypes[menuActionRow] = 376; 3689 3689 selectedMenuActions[menuActionRow] = k; 3690 3690 firstMenuOperand[menuActionRow] = l; ··· 3692 3692 menuActionRow++; 3693 3693 } 3694 3694 } else { 3695 - if (class47.options != null) { 3695 + if (gameObjectDefinition.options != null) { 3696 3696 for (int l1 = 4; l1 >= 0; l1--) 3697 - if (class47.options[l1] != null) { 3698 - menuActionTexts[menuActionRow] = class47.options[l1] + " @cya@" 3699 - + class47.name; 3697 + if (gameObjectDefinition.options[l1] != null) { 3698 + menuActionTexts[menuActionRow] = gameObjectDefinition.options[l1] + " @cya@" 3699 + + gameObjectDefinition.name; 3700 3700 if (l1 == 0) 3701 - menuActionTypes[menuActionRow] = 35; 3701 + menuActionTypes[menuActionRow] = 35; // packet 181 3702 3702 if (l1 == 1) 3703 - menuActionTypes[menuActionRow] = 389; 3703 + menuActionTypes[menuActionRow] = 389; // packet 241 3704 3704 if (l1 == 2) 3705 - menuActionTypes[menuActionRow] = 888; 3705 + menuActionTypes[menuActionRow] = 888; // packet 50 3706 3706 if (l1 == 3) 3707 - menuActionTypes[menuActionRow] = 892; 3707 + menuActionTypes[menuActionRow] = 892; // packet 136 3708 3708 if (l1 == 4) 3709 - menuActionTypes[menuActionRow] = 1280; 3709 + menuActionTypes[menuActionRow] = 1280; // packet 55 3710 3710 selectedMenuActions[menuActionRow] = k; 3711 3711 firstMenuOperand[menuActionRow] = l; 3712 3712 secondMenuOperand[menuActionRow] = i1; ··· 3714 3714 } 3715 3715 3716 3716 } 3717 - menuActionTexts[menuActionRow] = "Examine @cya@" + class47.name; 3717 + menuActionTexts[menuActionRow] = "Examine @cya@" + gameObjectDefinition.name; 3718 3718 menuActionTypes[menuActionRow] = 1412; 3719 - selectedMenuActions[menuActionRow] = class47.id << 14; 3719 + selectedMenuActions[menuActionRow] = gameObjectDefinition.id << 14; 3720 3720 firstMenuOperand[menuActionRow] = l; 3721 3721 secondMenuOperand[menuActionRow] = i1; 3722 3722 menuActionRow++; ··· 3985 3985 3986 3986 3987 3987 private void renderProjectiles() { 3988 - Projectile class50_sub1_sub4_sub2 = (Projectile) projectileQueue.first(); 3989 - for (; class50_sub1_sub4_sub2 != null; class50_sub1_sub4_sub2 = (Projectile) projectileQueue 3988 + Projectile projectile = (Projectile) projectileQueue.first(); 3989 + for (; projectile != null; projectile = (Projectile) projectileQueue 3990 3990 .next()) 3991 - if (class50_sub1_sub4_sub2.sceneId != plane || pulseCycle > class50_sub1_sub4_sub2.endCycle) 3992 - class50_sub1_sub4_sub2.remove(); 3993 - else if (pulseCycle >= class50_sub1_sub4_sub2.delay) { 3994 - if (class50_sub1_sub4_sub2.targetedEntityId > 0) { 3995 - Npc class50_sub1_sub4_sub3_sub1 = npcs[class50_sub1_sub4_sub2.targetedEntityId - 1]; 3991 + if (projectile.sceneId != plane || pulseCycle > projectile.endCycle) 3992 + projectile.remove(); 3993 + else if (pulseCycle >= projectile.delay) { 3994 + if (projectile.targetedEntityId > 0) { 3995 + Npc class50_sub1_sub4_sub3_sub1 = npcs[projectile.targetedEntityId - 1]; 3996 3996 if (class50_sub1_sub4_sub3_sub1 != null 3997 3997 && class50_sub1_sub4_sub3_sub1.worldX >= 0 3998 3998 && class50_sub1_sub4_sub3_sub1.worldX < 13312 3999 3999 && class50_sub1_sub4_sub3_sub1.worldY >= 0 4000 4000 && class50_sub1_sub4_sub3_sub1.worldY < 13312) 4001 - class50_sub1_sub4_sub2.trackTarget(class50_sub1_sub4_sub3_sub1.worldX, 4001 + projectile.trackTarget(class50_sub1_sub4_sub3_sub1.worldX, 4002 4002 class50_sub1_sub4_sub3_sub1.worldY, getFloorDrawHeight( 4003 - class50_sub1_sub4_sub2.sceneId, class50_sub1_sub4_sub3_sub1.worldX, class50_sub1_sub4_sub3_sub1.worldY 4003 + projectile.sceneId, class50_sub1_sub4_sub3_sub1.worldX, class50_sub1_sub4_sub3_sub1.worldY 4004 4004 ) 4005 - - class50_sub1_sub4_sub2.endHeight, pulseCycle); 4005 + - projectile.endHeight, pulseCycle); 4006 4006 } 4007 - if (class50_sub1_sub4_sub2.targetedEntityId < 0) { 4008 - int i = -class50_sub1_sub4_sub2.targetedEntityId - 1; 4009 - Player class50_sub1_sub4_sub3_sub2; 4007 + if (projectile.targetedEntityId < 0) { 4008 + int i = -projectile.targetedEntityId - 1; 4009 + Player player; 4010 4010 if (i == thisPlayerServerId) 4011 - class50_sub1_sub4_sub3_sub2 = localPlayer; 4011 + player = localPlayer; 4012 4012 else 4013 - class50_sub1_sub4_sub3_sub2 = players[i]; 4014 - if (class50_sub1_sub4_sub3_sub2 != null 4015 - && class50_sub1_sub4_sub3_sub2.worldX >= 0 4016 - && class50_sub1_sub4_sub3_sub2.worldX < 13312 4017 - && class50_sub1_sub4_sub3_sub2.worldY >= 0 4018 - && class50_sub1_sub4_sub3_sub2.worldY < 13312) 4019 - class50_sub1_sub4_sub2.trackTarget(class50_sub1_sub4_sub3_sub2.worldX, 4020 - class50_sub1_sub4_sub3_sub2.worldY, getFloorDrawHeight( 4021 - class50_sub1_sub4_sub2.sceneId, class50_sub1_sub4_sub3_sub2.worldX, class50_sub1_sub4_sub3_sub2.worldY 4013 + player = players[i]; 4014 + if (player != null 4015 + && player.worldX >= 0 4016 + && player.worldX < 13312 4017 + && player.worldY >= 0 4018 + && player.worldY < 13312) 4019 + projectile.trackTarget(player.worldX, 4020 + player.worldY, getFloorDrawHeight( 4021 + projectile.sceneId, player.worldX, player.worldY 4022 4022 ) 4023 - - class50_sub1_sub4_sub2.endHeight, pulseCycle); 4023 + - projectile.endHeight, pulseCycle); 4024 4024 } 4025 - class50_sub1_sub4_sub2.move(tickDelta); 4026 - currentScene.addEntity(plane, (int) class50_sub1_sub4_sub2.currentX, (int) class50_sub1_sub4_sub2.currentY, (int) class50_sub1_sub4_sub2.currentHeight, class50_sub1_sub4_sub2, -1, 4025 + projectile.move(tickDelta); 4026 + currentScene.addEntity(plane, (int) projectile.currentX, (int) projectile.currentY, (int) projectile.currentHeight, projectile, -1, 4027 4027 60, false, 4028 - class50_sub1_sub4_sub2.anInt1562); 4028 + projectile.anInt1562); 4029 4029 } 4030 4030 4031 4031 anInt1168++; ··· 4209 4209 activeInterfaceType = 2; 4210 4210 anInt1114 = super.clickX; 4211 4211 anInt1115 = super.clickY; 4212 - if (Widget.forId(id).parentId == openInterfaceId) 4212 + if (Widget.forId(id).parentId == openScreenWidgetId) 4213 4213 activeInterfaceType = 1; 4214 - if (Widget.forId(id).parentId == backDialogueId) 4214 + if (Widget.forId(id).parentId == openChatboxWidgetId) 4215 4215 activeInterfaceType = 3; 4216 4216 return; 4217 4217 } ··· 4561 4561 aBoolean1046 = true; 4562 4562 } 4563 4563 4564 - private void parseNpcUpdateMasks(Buffer class50_sub1_sub2, int i, int j) { 4564 + private void parseNpcUpdateMasks(Buffer buffer, int i, int j) { 4565 4565 j = 24 / j; 4566 4566 for (int k = 0; k < updatedPlayerCount; k++) { 4567 4567 int l = updatedPlayers[k]; 4568 4568 Npc npc = npcs[l]; 4569 - int i1 = class50_sub1_sub2.getUnsignedByte(); 4569 + int i1 = buffer.getUnsignedByte(); 4570 4570 if ((i1 & 1) != 0) { 4571 - npc.npcDefinition = ActorDefinition.getDefinition(class50_sub1_sub2.getUnsignedNegativeOffsetShortBE()); 4571 + npc.npcDefinition = ActorDefinition.getDefinition(buffer.getUnsignedNegativeOffsetShortBE()); 4572 4572 npc.boundaryDimension = npc.npcDefinition.boundaryDimension; 4573 4573 npc.anInt1600 = npc.npcDefinition.degreesToTurn; 4574 4574 npc.walkAnimationId = npc.npcDefinition.walkAnimationId; ··· 4578 4578 npc.idleAnimation = npc.npcDefinition.standAnimationId; 4579 4579 } 4580 4580 if ((i1 & 0x40) != 0) { 4581 - npc.anInt1609 = class50_sub1_sub2.getUnsignedShortLE(); 4582 - if (npc.anInt1609 == 65535) 4583 - npc.anInt1609 = -1; 4581 + npc.faceActor = buffer.getUnsignedShortLE(); 4582 + if (npc.faceActor == 65535) 4583 + npc.faceActor = -1; 4584 4584 } 4585 4585 if ((i1 & 0x80) != 0) { 4586 - int j1 = class50_sub1_sub2.getUnsignedPostNegativeOffsetByte(); 4587 - int j2 = class50_sub1_sub2.getUnsignedPostNegativeOffsetByte(); 4586 + int j1 = buffer.getUnsignedPostNegativeOffsetByte(); 4587 + int j2 = buffer.getUnsignedPostNegativeOffsetByte(); 4588 4588 npc.updateHits(j2, j1, pulseCycle); 4589 4589 npc.endCycle = pulseCycle + 300; 4590 - npc.anInt1596 = class50_sub1_sub2.getUnsignedByte(); 4591 - npc.anInt1597 = class50_sub1_sub2.getUnsignedPreNegativeOffsetByte(); 4590 + npc.anInt1596 = buffer.getUnsignedByte(); 4591 + npc.anInt1597 = buffer.getUnsignedPreNegativeOffsetByte(); 4592 4592 } 4593 4593 if ((i1 & 4) != 0) { 4594 - npc.graphic = class50_sub1_sub2.getUnsignedShortBE(); 4595 - int k1 = class50_sub1_sub2.getIntME1(); 4596 - npc.spotAnimationDelay = k1 >> 16; 4597 - npc.anInt1617 = pulseCycle + (k1 & 0xffff); 4594 + npc.graphic = buffer.getUnsignedShortBE(); 4595 + int k1 = buffer.getIntME1(); 4596 + npc.spotGraphicHeight = k1 >> 16; 4597 + npc.spotGraphicDelay = pulseCycle + (k1 & 0xffff); 4598 4598 npc.currentAnimation = 0; 4599 4599 npc.anInt1616 = 0; 4600 - if (npc.anInt1617 > pulseCycle) 4600 + if (npc.spotGraphicDelay > pulseCycle) 4601 4601 npc.currentAnimation = -1; 4602 4602 if (npc.graphic == 65535) 4603 4603 npc.graphic = -1; 4604 4604 } 4605 4605 if ((i1 & 0x20) != 0) { 4606 - npc.forcedChat = class50_sub1_sub2.getString(); 4606 + npc.forcedChat = buffer.getString(); 4607 4607 npc.textCycle = 100; 4608 4608 } 4609 4609 if ((i1 & 8) != 0) { 4610 - npc.anInt1598 = class50_sub1_sub2.getUnsignedNegativeOffsetShortLE(); 4611 - npc.anInt1599 = class50_sub1_sub2.getUnsignedShortLE(); 4610 + npc.anInt1598 = buffer.getUnsignedNegativeOffsetShortLE(); 4611 + npc.anInt1599 = buffer.getUnsignedShortLE(); 4612 4612 } 4613 4613 if ((i1 & 2) != 0) { 4614 - int l1 = class50_sub1_sub2.getUnsignedShortBE(); 4614 + int l1 = buffer.getUnsignedShortBE(); 4615 4615 if (l1 == 65535) 4616 4616 l1 = -1; 4617 - int k2 = class50_sub1_sub2.getUnsignedPreNegativeOffsetByte(); 4617 + int k2 = buffer.getUnsignedPreNegativeOffsetByte(); 4618 4618 if (l1 == npc.emoteAnimation && l1 != -1) { 4619 4619 int i3 = AnimationSequence.animations[l1].anInt307; 4620 4620 if (i3 == 1) { ··· 4637 4637 } 4638 4638 } 4639 4639 if ((i1 & 0x10) != 0) { 4640 - int i2 = class50_sub1_sub2.getUnsignedPreNegativeOffsetByte(); 4641 - int l2 = class50_sub1_sub2.getUnsignedPreNegativeOffsetByte(); 4640 + int i2 = buffer.getUnsignedPreNegativeOffsetByte(); 4641 + int l2 = buffer.getUnsignedPreNegativeOffsetByte(); 4642 4642 npc.updateHits(l2, i2, pulseCycle); 4643 4643 npc.endCycle = pulseCycle + 300; 4644 - npc.anInt1596 = class50_sub1_sub2.getUnsignedByte(); 4645 - npc.anInt1597 = class50_sub1_sub2.getUnsignedInvertedByte(); 4644 + npc.anInt1596 = buffer.getUnsignedByte(); 4645 + npc.anInt1597 = buffer.getUnsignedInvertedByte(); 4646 4646 } 4647 4647 } 4648 4648 ··· 4708 4708 } 4709 4709 4710 4710 if ((mask & 1) != 0) { 4711 - player.anInt1609 = buffer.getUnsignedNegativeOffsetShortBE(); 4711 + player.faceActor = buffer.getUnsignedNegativeOffsetShortBE(); 4712 4712 4713 - if (player.anInt1609 == 65535) 4714 - player.anInt1609 = -1; 4713 + if (player.faceActor == 65535) 4714 + player.faceActor = -1; 4715 4715 } 4716 4716 4717 4717 if ((mask & 2) != 0) { ··· 4722 4722 if ((mask & 0x200) != 0) { 4723 4723 player.graphic = buffer.getUnsignedNegativeOffsetShortBE(); 4724 4724 int heightAndDelay = buffer.getIntME1(); 4725 - player.spotAnimationDelay = heightAndDelay >> 16; 4726 - player.anInt1617 = pulseCycle + (heightAndDelay & 0xffff); 4725 + player.spotGraphicHeight = heightAndDelay >> 16; 4726 + player.spotGraphicDelay = pulseCycle + (heightAndDelay & 0xffff); 4727 4727 player.currentAnimation = 0; 4728 4728 player.anInt1616 = 0; 4729 4729 4730 - if (player.anInt1617 > pulseCycle) 4730 + if (player.spotGraphicDelay > pulseCycle) 4731 4731 player.currentAnimation = -1; 4732 4732 4733 4733 if (player.graphic == 65535) ··· 5652 5652 ; 5653 5653 } 5654 5654 5655 - private void method71(Actor class50_sub1_sub4_sub3, int i) { 5656 - class50_sub1_sub4_sub3.movementAnimation = class50_sub1_sub4_sub3.idleAnimation; 5657 - if (class50_sub1_sub4_sub3.pathLength == 0) { 5658 - class50_sub1_sub4_sub3.anInt1623 = 0; 5655 + private void method71(Actor actor, int i) { 5656 + actor.movementAnimation = actor.idleAnimation; 5657 + if (actor.pathLength == 0) { 5658 + actor.anInt1623 = 0; 5659 5659 return; 5660 5660 } 5661 - if (class50_sub1_sub4_sub3.emoteAnimation != -1 && class50_sub1_sub4_sub3.animationDelay == 0) { 5662 - AnimationSequence class14 = AnimationSequence.animations[class50_sub1_sub4_sub3.emoteAnimation]; 5663 - if (class50_sub1_sub4_sub3.anInt1613 > 0 && class14.anInt305 == 0) { 5664 - class50_sub1_sub4_sub3.anInt1623++; 5661 + if (actor.emoteAnimation != -1 && actor.animationDelay == 0) { 5662 + AnimationSequence class14 = AnimationSequence.animations[actor.emoteAnimation]; 5663 + if (actor.anInt1613 > 0 && class14.anInt305 == 0) { 5664 + actor.anInt1623++; 5665 5665 return; 5666 5666 } 5667 - if (class50_sub1_sub4_sub3.anInt1613 <= 0 && class14.priority == 0) { 5668 - class50_sub1_sub4_sub3.anInt1623++; 5667 + if (actor.anInt1613 <= 0 && class14.priority == 0) { 5668 + actor.anInt1623++; 5669 5669 return; 5670 5670 } 5671 5671 } 5672 - int j = class50_sub1_sub4_sub3.worldX; 5673 - int k = class50_sub1_sub4_sub3.worldY; 5674 - int l = class50_sub1_sub4_sub3.pathX[class50_sub1_sub4_sub3.pathLength - 1] * 128 5675 - + class50_sub1_sub4_sub3.boundaryDimension * 64; 5676 - int i1 = class50_sub1_sub4_sub3.pathY[class50_sub1_sub4_sub3.pathLength - 1] * 128 5677 - + class50_sub1_sub4_sub3.boundaryDimension * 64; 5672 + int j = actor.worldX; 5673 + int k = actor.worldY; 5674 + int l = actor.pathX[actor.pathLength - 1] * 128 5675 + + actor.boundaryDimension * 64; 5676 + int i1 = actor.pathY[actor.pathLength - 1] * 128 5677 + + actor.boundaryDimension * 64; 5678 5678 if (l - j > 256 || l - j < -256 || i1 - k > 256 || i1 - k < -256) { 5679 - class50_sub1_sub4_sub3.worldX = l; 5680 - class50_sub1_sub4_sub3.worldY = i1; 5679 + actor.worldX = l; 5680 + actor.worldY = i1; 5681 5681 return; 5682 5682 } 5683 5683 if (j < l) { 5684 5684 if (k < i1) 5685 - class50_sub1_sub4_sub3.nextStepOrientation = 1280; 5685 + actor.nextStepOrientation = 1280; 5686 5686 else if (k > i1) 5687 - class50_sub1_sub4_sub3.nextStepOrientation = 1792; 5687 + actor.nextStepOrientation = 1792; 5688 5688 else 5689 - class50_sub1_sub4_sub3.nextStepOrientation = 1536; 5689 + actor.nextStepOrientation = 1536; 5690 5690 } else if (j > l) { 5691 5691 if (k < i1) 5692 - class50_sub1_sub4_sub3.nextStepOrientation = 768; 5692 + actor.nextStepOrientation = 768; 5693 5693 else if (k > i1) 5694 - class50_sub1_sub4_sub3.nextStepOrientation = 256; 5694 + actor.nextStepOrientation = 256; 5695 5695 else 5696 - class50_sub1_sub4_sub3.nextStepOrientation = 512; 5696 + actor.nextStepOrientation = 512; 5697 5697 } else if (k < i1) 5698 - class50_sub1_sub4_sub3.nextStepOrientation = 1024; 5698 + actor.nextStepOrientation = 1024; 5699 5699 else 5700 - class50_sub1_sub4_sub3.nextStepOrientation = 0; 5701 - int j1 = class50_sub1_sub4_sub3.nextStepOrientation - class50_sub1_sub4_sub3.currentRotation & 0x7ff; 5700 + actor.nextStepOrientation = 0; 5701 + int j1 = actor.nextStepOrientation - actor.currentRotation & 0x7ff; 5702 5702 if (j1 > 1024) 5703 5703 j1 -= 2048; 5704 - int k1 = class50_sub1_sub4_sub3.turnAroundAnimationId; 5704 + int k1 = actor.turnAroundAnimationId; 5705 5705 if (i != 0) 5706 5706 outBuffer.putByte(34); 5707 5707 if (j1 >= -256 && j1 <= 256) 5708 - k1 = class50_sub1_sub4_sub3.walkAnimationId; 5708 + k1 = actor.walkAnimationId; 5709 5709 else if (j1 >= 256 && j1 < 768) 5710 - k1 = class50_sub1_sub4_sub3.turnLeftAnimationId; 5710 + k1 = actor.turnLeftAnimationId; 5711 5711 else if (j1 >= -768 && j1 <= -256) 5712 - k1 = class50_sub1_sub4_sub3.turnRightAnimationId; 5712 + k1 = actor.turnRightAnimationId; 5713 5713 if (k1 == -1) 5714 - k1 = class50_sub1_sub4_sub3.walkAnimationId; 5715 - class50_sub1_sub4_sub3.movementAnimation = k1; 5714 + k1 = actor.walkAnimationId; 5715 + actor.movementAnimation = k1; 5716 5716 int l1 = 4; 5717 - if (class50_sub1_sub4_sub3.currentRotation != class50_sub1_sub4_sub3.nextStepOrientation 5718 - && class50_sub1_sub4_sub3.anInt1609 == -1 && class50_sub1_sub4_sub3.anInt1600 != 0) 5717 + if (actor.currentRotation != actor.nextStepOrientation 5718 + && actor.faceActor == -1 && actor.anInt1600 != 0) 5719 5719 l1 = 2; 5720 - if (class50_sub1_sub4_sub3.pathLength > 2) 5720 + if (actor.pathLength > 2) 5721 5721 l1 = 6; 5722 - if (class50_sub1_sub4_sub3.pathLength > 3) 5722 + if (actor.pathLength > 3) 5723 5723 l1 = 8; 5724 - if (class50_sub1_sub4_sub3.anInt1623 > 0 && class50_sub1_sub4_sub3.pathLength > 1) { 5724 + if (actor.anInt1623 > 0 && actor.pathLength > 1) { 5725 5725 l1 = 8; 5726 - class50_sub1_sub4_sub3.anInt1623--; 5726 + actor.anInt1623--; 5727 5727 } 5728 - if (class50_sub1_sub4_sub3.runningQueue[class50_sub1_sub4_sub3.pathLength - 1]) 5728 + if (actor.runningQueue[actor.pathLength - 1]) 5729 5729 l1 <<= 1; 5730 - if (l1 >= 8 && class50_sub1_sub4_sub3.movementAnimation == class50_sub1_sub4_sub3.walkAnimationId 5731 - && class50_sub1_sub4_sub3.runAnimationId != -1) 5732 - class50_sub1_sub4_sub3.movementAnimation = class50_sub1_sub4_sub3.runAnimationId; 5730 + if (l1 >= 8 && actor.movementAnimation == actor.walkAnimationId 5731 + && actor.runAnimationId != -1) 5732 + actor.movementAnimation = actor.runAnimationId; 5733 5733 if (j < l) { 5734 - class50_sub1_sub4_sub3.worldX += l1; 5735 - if (class50_sub1_sub4_sub3.worldX > l) 5736 - class50_sub1_sub4_sub3.worldX = l; 5734 + actor.worldX += l1; 5735 + if (actor.worldX > l) 5736 + actor.worldX = l; 5737 5737 } else if (j > l) { 5738 - class50_sub1_sub4_sub3.worldX -= l1; 5739 - if (class50_sub1_sub4_sub3.worldX < l) 5740 - class50_sub1_sub4_sub3.worldX = l; 5738 + actor.worldX -= l1; 5739 + if (actor.worldX < l) 5740 + actor.worldX = l; 5741 5741 } 5742 5742 if (k < i1) { 5743 - class50_sub1_sub4_sub3.worldY += l1; 5744 - if (class50_sub1_sub4_sub3.worldY > i1) 5745 - class50_sub1_sub4_sub3.worldY = i1; 5743 + actor.worldY += l1; 5744 + if (actor.worldY > i1) 5745 + actor.worldY = i1; 5746 5746 } else if (k > i1) { 5747 - class50_sub1_sub4_sub3.worldY -= l1; 5748 - if (class50_sub1_sub4_sub3.worldY < i1) 5749 - class50_sub1_sub4_sub3.worldY = i1; 5747 + actor.worldY -= l1; 5748 + if (actor.worldY < i1) 5749 + actor.worldY = i1; 5750 5750 } 5751 - if (class50_sub1_sub4_sub3.worldX == l && class50_sub1_sub4_sub3.worldY == i1) { 5752 - class50_sub1_sub4_sub3.pathLength--; 5753 - if (class50_sub1_sub4_sub3.anInt1613 > 0) 5754 - class50_sub1_sub4_sub3.anInt1613--; 5751 + if (actor.worldX == l && actor.worldY == i1) { 5752 + actor.pathLength--; 5753 + if (actor.anInt1613 > 0) 5754 + actor.anInt1613--; 5755 5755 } 5756 5756 } 5757 5757 5758 5758 private void method72(Actor actor) { 5759 5759 if (actor.anInt1600 == 0) 5760 5760 return; 5761 - if (actor.anInt1609 != -1 && actor.anInt1609 < 32768) { 5762 - Npc class50_sub1_sub4_sub3_sub1 = npcs[actor.anInt1609]; 5763 - if (class50_sub1_sub4_sub3_sub1 != null) { 5764 - int l = actor.worldX - class50_sub1_sub4_sub3_sub1.worldX; 5765 - int j1 = actor.worldY - class50_sub1_sub4_sub3_sub1.worldY; 5761 + if (actor.faceActor != -1 && actor.faceActor < 32768) { 5762 + Npc npc = npcs[actor.faceActor]; 5763 + if (npc != null) { 5764 + int l = actor.worldX - npc.worldX; 5765 + int j1 = actor.worldY - npc.worldY; 5766 5766 if (l != 0 || j1 != 0) 5767 5767 actor.nextStepOrientation = (int) (Math.atan2(l, j1) * 325.94900000000001D) & 0x7ff; 5768 5768 } 5769 5769 } 5770 - if (actor.anInt1609 >= 32768) { 5771 - int i = actor.anInt1609 - 32768; 5770 + if (actor.faceActor >= 32768) { 5771 + int i = actor.faceActor - 32768; 5772 5772 if (i == thisPlayerServerId) 5773 5773 i = thisPlayerId; 5774 - Player class50_sub1_sub4_sub3_sub2 = players[i]; 5775 - if (class50_sub1_sub4_sub3_sub2 != null) { 5776 - int k1 = actor.worldX - class50_sub1_sub4_sub3_sub2.worldX; 5777 - int l1 = actor.worldY - class50_sub1_sub4_sub3_sub2.worldY; 5774 + Player player = players[i]; 5775 + if (player != null) { 5776 + int k1 = actor.worldX - player.worldX; 5777 + int l1 = actor.worldY - player.worldY; 5778 5778 if (k1 != 0 || l1 != 0) 5779 5779 actor.nextStepOrientation = (int) (Math.atan2(k1, l1) * 325.94900000000001D) & 0x7ff; 5780 5780 } ··· 5823 5823 actor.displayedMovementFrames = 0; 5824 5824 } 5825 5825 } 5826 - if (actor.graphic != -1 && pulseCycle >= actor.anInt1617) { 5826 + if (actor.graphic != -1 && pulseCycle >= actor.spotGraphicDelay) { 5827 5827 if (actor.currentAnimation < 0) 5828 5828 actor.currentAnimation = 0; 5829 5829 AnimationSequence class14_1 = SpotAnimation.cache[actor.graphic].sequences; ··· 5868 5868 } 5869 5869 5870 5870 private void method74(int i) { 5871 - if (anInt1053 != -1 && (loadingStage == 2 || super.imageProducer != null)) { 5871 + if (fullscreenWidgetId != -1 && (loadingStage == 2 || super.imageProducer != null)) { 5872 5872 if (loadingStage == 2) { 5873 - method88(tickDelta, anInt1053); 5874 - if (anInt960 != -1) 5875 - method88(tickDelta, anInt960); 5873 + method88(tickDelta, fullscreenWidgetId); 5874 + if (fullscreenWidgetChildId != -1) 5875 + method88(tickDelta, fullscreenWidgetChildId); 5876 5876 tickDelta = 0; 5877 5877 method147(anInt1140); 5878 5878 super.imageProducer.createRasterizer(); 5879 5879 Rasterizer3D.lineOffsets = anIntArray1003; 5880 5880 Rasterizer.resetPixels(); 5881 5881 aBoolean1046 = true; 5882 - Widget class13 = Widget.forId(anInt1053); 5882 + Widget class13 = Widget.forId(fullscreenWidgetId); 5883 5883 if (class13.width == 512 && class13.height == 334 && class13.type == 0) { 5884 5884 class13.width = 765; 5885 5885 class13.height = 503; 5886 5886 } 5887 5887 drawInterface(0, 0, class13, 0, 8); 5888 - if (anInt960 != -1) { 5889 - Widget class13_1 = Widget.forId(anInt960); 5888 + if (fullscreenWidgetChildId != -1) { 5889 + Widget class13_1 = Widget.forId(fullscreenWidgetChildId); 5890 5890 if (class13_1.width == 512 && class13_1.height == 334 && class13_1.type == 0) { 5891 5891 class13_1.width = 765; 5892 5892 class13_1.height = 503; ··· 5933 5933 renderGameView(); 5934 5934 if (menuOpen && menuScreenArea == 1) 5935 5935 redrawTabArea = true; 5936 - if (openInvOverLayId != -1) { 5937 - boolean flag = method88(tickDelta, openInvOverLayId); 5936 + if (tabAreaOverlayWidgetId != -1) { 5937 + boolean flag = method88(tickDelta, tabAreaOverlayWidgetId); 5938 5938 if (flag) 5939 5939 redrawTabArea = true; 5940 5940 } ··· 5946 5946 method134(); 5947 5947 redrawTabArea = false; 5948 5948 } 5949 - if (backDialogueId == -1 && inputType == 0) { 5949 + if (openChatboxWidgetId == -1 && inputType == 0) { 5950 5950 chatboxInterface.scrollPosition = chatboxScrollMax - chatboxScroll - 77; 5951 5951 if (super.mouseX > 448 && super.mouseX < 560 && super.mouseY > 332) 5952 5952 scrollInterface(chatboxScrollMax, 0, chatboxInterface, (byte) 102, super.mouseY - 357, -1, super.mouseX - 17, 77, 463); ··· 5960 5960 redrawChatbox = true; 5961 5961 } 5962 5962 } 5963 - if (backDialogueId == -1 && inputType == 3) { 5963 + if (openChatboxWidgetId == -1 && inputType == 3) { 5964 5964 int k = anInt862 * 14 + 7; 5965 5965 chatboxInterface.scrollPosition = anInt865; 5966 5966 if (super.mouseX > 448 && super.mouseX < 560 && super.mouseY > 332) ··· 5975 5975 redrawChatbox = true; 5976 5976 } 5977 5977 } 5978 - if (backDialogueId != -1) { 5979 - boolean flag1 = method88(tickDelta, backDialogueId); 5978 + if (openChatboxWidgetId != -1) { 5979 + boolean flag1 = method88(tickDelta, openChatboxWidgetId); 5980 5980 if (flag1) 5981 5981 redrawChatbox = true; 5982 5982 } ··· 5996 5996 renderMinimap(); 5997 5997 aClass18_1157.drawGraphics(550, 4, super.gameGraphics); 5998 5998 } 5999 - if (flashingSidebarId != -1) 5999 + if (flashingTabId != -1) 6000 6000 drawTabIcons = true; 6001 6001 if (drawTabIcons) { 6002 - if (flashingSidebarId != -1 && flashingSidebarId == currentTabId) { 6003 - flashingSidebarId = -1; 6002 + if (flashingTabId != -1 && flashingTabId == currentTabId) { 6003 + flashingTabId = -1; 6004 6004 outBuffer.putOpcode(119); 6005 6005 outBuffer.putByte(currentTabId); 6006 6006 } 6007 6007 drawTabIcons = false; 6008 6008 aClass18_1110.createRasterizer(); 6009 6009 anIndexedImage1054.drawImage(0, 0); 6010 - if (openInvOverLayId == -1) { 6011 - if (tabInterfaceIDs[currentTabId] != -1) { 6010 + if (tabAreaOverlayWidgetId == -1) { 6011 + if (tabWidgetIds[currentTabId] != -1) { 6012 6012 if (currentTabId == 0) 6013 6013 aClass50_Sub1_Sub1_Sub3_880.drawImage(22, 10); 6014 6014 if (currentTabId == 1) ··· 6024 6024 if (currentTabId == 6) 6025 6025 aClass50_Sub1_Sub1_Sub3_883.drawImage(209, 9); 6026 6026 } 6027 - if (tabInterfaceIDs[0] != -1 && (flashingSidebarId != 0 || pulseCycle % 20 < 10)) 6027 + if (tabWidgetIds[0] != -1 && (flashingTabId != 0 || pulseCycle % 20 < 10)) 6028 6028 tabIcon[0].drawImage(29, 13); 6029 - if (tabInterfaceIDs[1] != -1 && (flashingSidebarId != 1 || pulseCycle % 20 < 10)) 6029 + if (tabWidgetIds[1] != -1 && (flashingTabId != 1 || pulseCycle % 20 < 10)) 6030 6030 tabIcon[1].drawImage(53, 11); 6031 - if (tabInterfaceIDs[2] != -1 && (flashingSidebarId != 2 || pulseCycle % 20 < 10)) 6031 + if (tabWidgetIds[2] != -1 && (flashingTabId != 2 || pulseCycle % 20 < 10)) 6032 6032 tabIcon[2].drawImage(82, 11); 6033 - if (tabInterfaceIDs[3] != -1 && (flashingSidebarId != 3 || pulseCycle % 20 < 10)) 6033 + if (tabWidgetIds[3] != -1 && (flashingTabId != 3 || pulseCycle % 20 < 10)) 6034 6034 tabIcon[3].drawImage(115, 12); 6035 - if (tabInterfaceIDs[4] != -1 && (flashingSidebarId != 4 || pulseCycle % 20 < 10)) 6035 + if (tabWidgetIds[4] != -1 && (flashingTabId != 4 || pulseCycle % 20 < 10)) 6036 6036 tabIcon[4].drawImage(153, 13); 6037 - if (tabInterfaceIDs[5] != -1 && (flashingSidebarId != 5 || pulseCycle % 20 < 10)) 6037 + if (tabWidgetIds[5] != -1 && (flashingTabId != 5 || pulseCycle % 20 < 10)) 6038 6038 tabIcon[5].drawImage(180, 11); 6039 - if (tabInterfaceIDs[6] != -1 && (flashingSidebarId != 6 || pulseCycle % 20 < 10)) 6039 + if (tabWidgetIds[6] != -1 && (flashingTabId != 6 || pulseCycle % 20 < 10)) 6040 6040 tabIcon[6].drawImage(208, 13); 6041 6041 } 6042 6042 aClass18_1110.drawGraphics(516, 160, super.gameGraphics); 6043 6043 aClass18_1109.createRasterizer(); 6044 6044 anIndexedImage1053.drawImage(0, 0); 6045 - if (openInvOverLayId == -1) { 6046 - if (tabInterfaceIDs[currentTabId] != -1) { 6045 + if (tabAreaOverlayWidgetId == -1) { 6046 + if (tabWidgetIds[currentTabId] != -1) { 6047 6047 if (currentTabId == 7) 6048 6048 aClass50_Sub1_Sub1_Sub3_983.drawImage(42, 0); 6049 6049 if (currentTabId == 8) ··· 6059 6059 if (currentTabId == 13) 6060 6060 aClass50_Sub1_Sub1_Sub3_986.drawImage(229, 0); 6061 6061 } 6062 - if (tabInterfaceIDs[8] != -1 && (flashingSidebarId != 8 || pulseCycle % 20 < 10)) 6062 + if (tabWidgetIds[8] != -1 && (flashingTabId != 8 || pulseCycle % 20 < 10)) 6063 6063 tabIcon[7].drawImage(74, 2); 6064 - if (tabInterfaceIDs[9] != -1 && (flashingSidebarId != 9 || pulseCycle % 20 < 10)) 6064 + if (tabWidgetIds[9] != -1 && (flashingTabId != 9 || pulseCycle % 20 < 10)) 6065 6065 tabIcon[8].drawImage(102, 3); 6066 - if (tabInterfaceIDs[10] != -1 && (flashingSidebarId != 10 || pulseCycle % 20 < 10)) 6066 + if (tabWidgetIds[10] != -1 && (flashingTabId != 10 || pulseCycle % 20 < 10)) 6067 6067 tabIcon[9].drawImage(137, 4); 6068 - if (tabInterfaceIDs[11] != -1 && (flashingSidebarId != 11 || pulseCycle % 20 < 10)) 6068 + if (tabWidgetIds[11] != -1 && (flashingTabId != 11 || pulseCycle % 20 < 10)) 6069 6069 tabIcon[10].drawImage(174, 2); 6070 - if (tabInterfaceIDs[12] != -1 && (flashingSidebarId != 12 || pulseCycle % 20 < 10)) 6070 + if (tabWidgetIds[12] != -1 && (flashingTabId != 12 || pulseCycle % 20 < 10)) 6071 6071 tabIcon[11].drawImage(201, 2); 6072 - if (tabInterfaceIDs[13] != -1 && (flashingSidebarId != 13 || pulseCycle % 20 < 10)) 6072 + if (tabWidgetIds[13] != -1 && (flashingTabId != 13 || pulseCycle % 20 < 10)) 6073 6073 tabIcon[12].drawImage(226, 2); 6074 6074 } 6075 6075 aClass18_1109.drawGraphics(496, 466, super.gameGraphics); ··· 6233 6233 Model.loadModelHeader(onDemandNode.buffer, onDemandNode.id); 6234 6234 if ((onDemandRequester.modelId(onDemandNode.id) & 0x62) != 0) { 6235 6235 redrawTabArea = true; 6236 - if (backDialogueId != -1 || dialogueId != -1) 6236 + if (openChatboxWidgetId != -1 || dialogueId != -1) 6237 6237 redrawChatbox = true; 6238 6238 } 6239 6239 } ··· 6425 6425 method44(dialogueId); 6426 6426 dialogueId = -1; 6427 6427 6428 - method44(backDialogueId); 6429 - backDialogueId = -1; 6428 + method44(openChatboxWidgetId); 6429 + openChatboxWidgetId = -1; 6430 6430 6431 - method44(openInterfaceId); 6432 - openInterfaceId = -1; 6431 + method44(openScreenWidgetId); 6432 + openScreenWidgetId = -1; 6433 6433 6434 - method44(anInt1053); 6435 - anInt1053 = -1; 6434 + method44(fullscreenWidgetId); 6435 + fullscreenWidgetId = -1; 6436 6436 6437 - method44(anInt960); 6438 - anInt960 = -1; 6437 + method44(fullscreenWidgetChildId); 6438 + fullscreenWidgetChildId = -1; 6439 6439 6440 - method44(openInvOverLayId); 6441 - openInvOverLayId = -1; 6440 + method44(tabAreaOverlayWidgetId); 6441 + tabAreaOverlayWidgetId = -1; 6442 6442 6443 6443 method44(walkableWidgetId); 6444 6444 walkableWidgetId = -1; ··· 6450 6450 messagePromptRaised = false; 6451 6451 clickToContinueString = null; 6452 6452 anInt1319 = 0; 6453 - flashingSidebarId = -1; 6453 + flashingTabId = -1; 6454 6454 characterEditChangeGenger = true; 6455 6455 6456 6456 changeGender(); ··· 6801 6801 if (actorDefinition.actions[l] != null && !actorDefinition.actions[l].equalsIgnoreCase("attack")) { 6802 6802 menuActionTexts[menuActionRow] = actorDefinition.actions[l] + " @yel@" + s; 6803 6803 if (l == 0) 6804 - menuActionTypes[menuActionRow] = 318; 6804 + menuActionTypes[menuActionRow] = 318; // packet 112 6805 6805 if (l == 1) 6806 - menuActionTypes[menuActionRow] = 921; 6806 + menuActionTypes[menuActionRow] = 921; // packet 67 6807 6807 if (l == 2) 6808 - menuActionTypes[menuActionRow] = 118; 6808 + menuActionTypes[menuActionRow] = 118; // packet 13 6809 6809 if (l == 3) 6810 - menuActionTypes[menuActionRow] = 553; 6810 + menuActionTypes[menuActionRow] = 553; // packet 42 6811 6811 if (l == 4) 6812 - menuActionTypes[menuActionRow] = 432; 6812 + menuActionTypes[menuActionRow] = 432; // packet 8 6813 6813 selectedMenuActions[menuActionRow] = k; 6814 6814 firstMenuOperand[menuActionRow] = j; 6815 6815 secondMenuOperand[menuActionRow] = i; ··· 6939 6939 } else if (clickToContinueString != null) { 6940 6940 fontBold.drawStringLeft(clickToContinueString, 239, 40, 0); 6941 6941 fontBold.drawStringLeft("Click to continue", 239, 60, 128); 6942 - } else if (backDialogueId != -1) { 6943 - drawInterface(0, 0, Widget.forId(backDialogueId), 0, 8); 6942 + } else if (openChatboxWidgetId != -1) { 6943 + drawInterface(0, 0, Widget.forId(openChatboxWidgetId), 0, 8); 6944 6944 } else if (dialogueId != -1) { 6945 6945 drawInterface(0, 0, Widget.forId(dialogueId), 0, 8); 6946 6946 } else { ··· 7411 7411 menuActionRow = 1; 7412 7412 if (i >= 0) 7413 7413 anInt1004 = incomingRandom.nextInt(); 7414 - if (anInt1053 != -1) { 7414 + if (fullscreenWidgetId != -1) { 7415 7415 anInt915 = 0; 7416 7416 anInt1315 = 0; 7417 - method66(0, Widget.forId(anInt1053), 0, 0, 0, super.mouseX, 23658, super.mouseY); 7417 + method66(0, Widget.forId(fullscreenWidgetId), 0, 0, 0, super.mouseX, 23658, super.mouseY); 7418 7418 if (anInt915 != anInt1302) 7419 7419 anInt1302 = anInt915; 7420 7420 if (anInt1315 != anInt1129) ··· 7425 7425 anInt915 = 0; 7426 7426 anInt1315 = 0; 7427 7427 if (super.mouseX > 4 && super.mouseY > 4 && super.mouseX < 516 && super.mouseY < 338) 7428 - if (openInterfaceId != -1) 7429 - method66(4, Widget.forId(openInterfaceId), 0, 0, 4, super.mouseX, 23658, super.mouseY); 7428 + if (openScreenWidgetId != -1) 7429 + method66(4, Widget.forId(openScreenWidgetId), 0, 0, 4, super.mouseX, 23658, super.mouseY); 7430 7430 else 7431 7431 method43((byte) 7); 7432 7432 if (anInt915 != anInt1302) ··· 7436 7436 anInt915 = 0; 7437 7437 anInt1315 = 0; 7438 7438 if (super.mouseX > 553 && super.mouseY > 205 && super.mouseX < 743 && super.mouseY < 466) 7439 - if (openInvOverLayId != -1) 7440 - method66(205, Widget.forId(openInvOverLayId), 1, 0, 553, super.mouseX, 23658, super.mouseY); 7441 - else if (tabInterfaceIDs[currentTabId] != -1) 7442 - method66(205, Widget.forId(tabInterfaceIDs[currentTabId]), 1, 0, 553, super.mouseX, 23658, 7439 + if (tabAreaOverlayWidgetId != -1) 7440 + method66(205, Widget.forId(tabAreaOverlayWidgetId), 1, 0, 553, super.mouseX, 23658, super.mouseY); 7441 + else if (tabWidgetIds[currentTabId] != -1) 7442 + method66(205, Widget.forId(tabWidgetIds[currentTabId]), 1, 0, 553, super.mouseX, 23658, 7443 7443 super.mouseY); 7444 7444 if (anInt915 != anInt1280) { 7445 7445 redrawTabArea = true; ··· 7452 7452 anInt915 = 0; 7453 7453 anInt1315 = 0; 7454 7454 if (super.mouseX > 17 && super.mouseY > 357 && super.mouseX < 496 && super.mouseY < 453) 7455 - if (backDialogueId != -1) 7456 - method66(357, Widget.forId(backDialogueId), 2, 0, 17, super.mouseX, 23658, super.mouseY); 7455 + if (openChatboxWidgetId != -1) 7456 + method66(357, Widget.forId(openChatboxWidgetId), 2, 0, 17, super.mouseX, 23658, super.mouseY); 7457 7457 else if (dialogueId != -1) 7458 7458 method66(357, Widget.forId(dialogueId), 3, 0, 17, super.mouseX, 23658, super.mouseY); 7459 7459 else if (super.mouseY < 434 && super.mouseX < 426 && inputType == 0) 7460 7460 method113(466, super.mouseX - 17, super.mouseY - 357); 7461 - if ((backDialogueId != -1 || dialogueId != -1) && anInt915 != anInt1106) { 7461 + if ((openChatboxWidgetId != -1 || dialogueId != -1) && anInt915 != anInt1106) { 7462 7462 redrawChatbox = true; 7463 7463 anInt1106 = anInt915; 7464 7464 } 7465 - if ((backDialogueId != -1 || dialogueId != -1) && anInt1315 != anInt1284) { 7465 + if ((openChatboxWidgetId != -1 || dialogueId != -1) && anInt1315 != anInt1284) { 7466 7466 redrawChatbox = true; 7467 7467 anInt1284 = anInt1315; 7468 7468 } ··· 7901 7901 } 7902 7902 } 7903 7903 7904 - private void method103(byte byte0, Widget class13) { 7904 + private void method103(byte byte0, Widget widget) { 7905 7905 if (byte0 == 2) 7906 7906 byte0 = 0; 7907 7907 else 7908 7908 anInt1004 = -82; 7909 - int i = class13.contentType; 7909 + int i = widget.contentType; 7910 7910 if (i >= 1 && i <= 100 || i >= 701 && i <= 800) { 7911 7911 if (i == 1 && friendListStatus == 0) { 7912 - class13.disabledText = "Loading friend list"; 7913 - class13.actionType = 0; 7912 + widget.disabledText = "Loading friend list"; 7913 + widget.actionType = 0; 7914 7914 return; 7915 7915 } 7916 7916 if (i == 1 && friendListStatus == 1) { 7917 - class13.disabledText = "Connecting to friendserver"; 7918 - class13.actionType = 0; 7917 + widget.disabledText = "Connecting to friendserver"; 7918 + widget.actionType = 0; 7919 7919 return; 7920 7920 } 7921 7921 if (i == 2 && friendListStatus != 2) { 7922 - class13.disabledText = "Please wait..."; 7923 - class13.actionType = 0; 7922 + widget.disabledText = "Please wait..."; 7923 + widget.actionType = 0; 7924 7924 return; 7925 7925 } 7926 7926 int j = friendsCount; ··· 7931 7931 else 7932 7932 i--; 7933 7933 if (i >= j) { 7934 - class13.disabledText = ""; 7935 - class13.actionType = 0; 7934 + widget.disabledText = ""; 7935 + widget.actionType = 0; 7936 7936 return; 7937 7937 } else { 7938 - class13.disabledText = friendUsernames[i]; 7939 - class13.actionType = 1; 7938 + widget.disabledText = friendUsernames[i]; 7939 + widget.actionType = 1; 7940 7940 return; 7941 7941 } 7942 7942 } ··· 7949 7949 else 7950 7950 i -= 101; 7951 7951 if (i >= k) { 7952 - class13.disabledText = ""; 7953 - class13.actionType = 0; 7952 + widget.disabledText = ""; 7953 + widget.actionType = 0; 7954 7954 return; 7955 7955 } 7956 7956 if (friendWorlds[i] == 0) 7957 - class13.disabledText = "@red@Offline"; 7957 + widget.disabledText = "@red@Offline"; 7958 7958 else if (friendWorlds[i] < 200) { 7959 7959 if (friendWorlds[i] == world) 7960 - class13.disabledText = "@gre@World" + (friendWorlds[i] - 9); 7960 + widget.disabledText = "@gre@World" + (friendWorlds[i] - 9); 7961 7961 else 7962 - class13.disabledText = "@yel@World" + (friendWorlds[i] - 9); 7962 + widget.disabledText = "@yel@World" + (friendWorlds[i] - 9); 7963 7963 } else if (friendWorlds[i] == world) 7964 - class13.disabledText = "@gre@Classic" + (friendWorlds[i] - 219); 7964 + widget.disabledText = "@gre@Classic" + (friendWorlds[i] - 219); 7965 7965 else 7966 - class13.disabledText = "@yel@Classic" + (friendWorlds[i] - 219); 7967 - class13.actionType = 1; 7966 + widget.disabledText = "@yel@Classic" + (friendWorlds[i] - 219); 7967 + widget.actionType = 1; 7968 7968 return; 7969 7969 } 7970 7970 if (i == 203) { 7971 7971 int l = friendsCount; 7972 7972 if (friendListStatus != 2) 7973 7973 l = 0; 7974 - class13.scrollLimit = l * 15 + 20; 7975 - if (class13.scrollLimit <= class13.height) 7976 - class13.scrollLimit = class13.height + 1; 7974 + widget.scrollLimit = l * 15 + 20; 7975 + if (widget.scrollLimit <= widget.height) 7976 + widget.scrollLimit = widget.height + 1; 7977 7977 return; 7978 7978 } 7979 7979 if (i >= 401 && i <= 500) { 7980 7980 if ((i -= 401) == 0 && friendListStatus == 0) { 7981 - class13.disabledText = "Loading ignore list"; 7982 - class13.actionType = 0; 7981 + widget.disabledText = "Loading ignore list"; 7982 + widget.actionType = 0; 7983 7983 return; 7984 7984 } 7985 7985 if (i == 1 && friendListStatus == 0) { 7986 - class13.disabledText = "Please wait..."; 7987 - class13.actionType = 0; 7986 + widget.disabledText = "Please wait..."; 7987 + widget.actionType = 0; 7988 7988 return; 7989 7989 } 7990 7990 int i1 = ignoresCount; 7991 7991 if (friendListStatus == 0) 7992 7992 i1 = 0; 7993 7993 if (i >= i1) { 7994 - class13.disabledText = ""; 7995 - class13.actionType = 0; 7994 + widget.disabledText = ""; 7995 + widget.actionType = 0; 7996 7996 return; 7997 7997 } else { 7998 - class13.disabledText = TextUtils.formatName(TextUtils.longToName(ignores[i])); 7999 - class13.actionType = 1; 7998 + widget.disabledText = TextUtils.formatName(TextUtils.longToName(ignores[i])); 7999 + widget.actionType = 1; 8000 8000 return; 8001 8001 } 8002 8002 } 8003 8003 if (i == 503) { 8004 - class13.scrollLimit = ignoresCount * 15 + 20; 8005 - if (class13.scrollLimit <= class13.height) 8006 - class13.scrollLimit = class13.height + 1; 8004 + widget.scrollLimit = ignoresCount * 15 + 20; 8005 + if (widget.scrollLimit <= widget.height) 8006 + widget.scrollLimit = widget.height + 1; 8007 8007 return; 8008 8008 } 8009 8009 if (i == 327) { 8010 - class13.rotationX = 150; 8011 - class13.rotationY = (int) (Math.sin((double) pulseCycle / 40D) * 256D) & 0x7ff; 8010 + widget.rotationX = 150; 8011 + widget.rotationY = (int) (Math.sin((double) pulseCycle / 40D) * 256D) & 0x7ff; 8012 8012 if (characterModelChanged) { 8013 8013 for (int j1 = 0; j1 < 7; j1++) { 8014 8014 int i2 = characterEditIdentityKits[j1]; ··· 8025 8025 aclass50_sub1_sub4_sub4[j2++] = IdentityKit.cache[l2].getBodyModel(); 8026 8026 } 8027 8027 8028 - Model class50_sub1_sub4_sub4 = new Model(j2, aclass50_sub1_sub4_sub4); 8028 + Model model = new Model(j2, aclass50_sub1_sub4_sub4); 8029 8029 for (int i3 = 0; i3 < 5; i3++) 8030 8030 if (characterEditColors[i3] != 0) { 8031 - class50_sub1_sub4_sub4.replaceColor(playerColours[i3][0], 8031 + model.replaceColor(playerColours[i3][0], 8032 8032 playerColours[i3][characterEditColors[i3]]); 8033 8033 if (i3 == 1) 8034 - class50_sub1_sub4_sub4.replaceColor(SKIN_COLOURS[0], SKIN_COLOURS[characterEditColors[i3]]); 8034 + model.replaceColor(SKIN_COLOURS[0], SKIN_COLOURS[characterEditColors[i3]]); 8035 8035 } 8036 8036 8037 - class50_sub1_sub4_sub4.createBones(); 8038 - class50_sub1_sub4_sub4.applyTransform( 8037 + model.createBones(); 8038 + model.applyTransform( 8039 8039 AnimationSequence.animations[localPlayer.idleAnimation].getPrimaryFrame[0]); 8040 - class50_sub1_sub4_sub4.applyLighting(64, 850, -30, -50, -30, true); 8041 - class13.modelType = 5; 8042 - class13.modelId = 0; 8043 - Widget.setModel(5, class50_sub1_sub4_sub4, 0); 8040 + model.applyLighting(64, 850, -30, -50, -30, true); 8041 + widget.modelType = 5; 8042 + widget.modelId = 0; 8043 + Widget.setModel(5, model, 0); 8044 8044 } 8045 8045 return; 8046 8046 } 8047 8047 if (i == 324) { 8048 8048 if (aClass50_Sub1_Sub1_Sub1_1102 == null) { 8049 - aClass50_Sub1_Sub1_Sub1_1102 = class13.disabledImage; 8050 - aClass50_Sub1_Sub1_Sub1_1103 = class13.enabledImage; 8049 + aClass50_Sub1_Sub1_Sub1_1102 = widget.disabledImage; 8050 + aClass50_Sub1_Sub1_Sub1_1103 = widget.enabledImage; 8051 8051 } 8052 8052 if (characterEditChangeGenger) { 8053 - class13.disabledImage = aClass50_Sub1_Sub1_Sub1_1103; 8053 + widget.disabledImage = aClass50_Sub1_Sub1_Sub1_1103; 8054 8054 return; 8055 8055 } else { 8056 - class13.disabledImage = aClass50_Sub1_Sub1_Sub1_1102; 8056 + widget.disabledImage = aClass50_Sub1_Sub1_Sub1_1102; 8057 8057 return; 8058 8058 } 8059 8059 } 8060 8060 if (i == 325) { 8061 8061 if (aClass50_Sub1_Sub1_Sub1_1102 == null) { 8062 - aClass50_Sub1_Sub1_Sub1_1102 = class13.disabledImage; 8063 - aClass50_Sub1_Sub1_Sub1_1103 = class13.enabledImage; 8062 + aClass50_Sub1_Sub1_Sub1_1102 = widget.disabledImage; 8063 + aClass50_Sub1_Sub1_Sub1_1103 = widget.enabledImage; 8064 8064 } 8065 8065 if (characterEditChangeGenger) { 8066 - class13.disabledImage = aClass50_Sub1_Sub1_Sub1_1102; 8066 + widget.disabledImage = aClass50_Sub1_Sub1_Sub1_1102; 8067 8067 return; 8068 8068 } else { 8069 - class13.disabledImage = aClass50_Sub1_Sub1_Sub1_1103; 8069 + widget.disabledImage = aClass50_Sub1_Sub1_Sub1_1103; 8070 8070 return; 8071 8071 } 8072 8072 } 8073 8073 if (i == 600) { 8074 - class13.disabledText = reportedName; 8074 + widget.disabledText = reportedName; 8075 8075 if (pulseCycle % 20 < 10) { 8076 - class13.disabledText += "|"; 8076 + widget.disabledText += "|"; 8077 8077 return; 8078 8078 } else { 8079 - class13.disabledText += " "; 8079 + widget.disabledText += " "; 8080 8080 return; 8081 8081 } 8082 8082 } 8083 8083 if (i == 620) 8084 8084 if (playerRights >= 1) { 8085 8085 if (reportMutePlayer) { 8086 - class13.disabledColor = 0xff0000; 8087 - class13.disabledText = "Moderator option: Mute player for 48 hours: <ON>"; 8086 + widget.disabledColor = 0xff0000; 8087 + widget.disabledText = "Moderator option: Mute player for 48 hours: <ON>"; 8088 8088 } else { 8089 - class13.disabledColor = 0xffffff; 8090 - class13.disabledText = "Moderator option: Mute player for 48 hours: <OFF>"; 8089 + widget.disabledColor = 0xffffff; 8090 + widget.disabledText = "Moderator option: Mute player for 48 hours: <OFF>"; 8091 8091 } 8092 8092 } else { 8093 - class13.disabledText = ""; 8093 + widget.disabledText = ""; 8094 8094 } 8095 8095 if (i == 660) { 8096 - int k1 = anInt1170 - anInt1215; 8096 + int k1 = loginScreenUpdateTime - lastLoginTime; 8097 8097 String s1; 8098 8098 if (k1 <= 0) 8099 8099 s1 = "earlier today"; ··· 8101 8101 s1 = "yesterday"; 8102 8102 else 8103 8103 s1 = k1 + " days ago"; 8104 - class13.disabledText = "You last logged in @red@" + s1 + "@bla@ from: @red@" + SignLink.dns; 8104 + widget.disabledText = "You last logged in @red@" + s1 + "@bla@ from: @red@" + SignLink.dns; 8105 8105 } 8106 8106 if (i == 661) 8107 - if (anInt1034 == 0) 8108 - class13.disabledText = "\\nYou have not yet set any recovery questions.\\nIt is @lre@strongly@yel@ recommended that you do so.\\n\\nIf you don't you will be @lre@unable to recover your\\n@lre@password@yel@ if you forget it, or it is stolen."; 8109 - else if (anInt1034 <= anInt1170) { 8110 - class13.disabledText = "\\n\\nRecovery Questions Last Set:\\n@gre@" + getDate(anInt1034); 8107 + if (recoveryQuestionSetTime == 0) 8108 + widget.disabledText = "\\nYou have not yet set any recovery questions.\\nIt is @lre@strongly@yel@ recommended that you do so.\\n\\nIf you don't you will be @lre@unable to recover your\\n@lre@password@yel@ if you forget it, or it is stolen."; 8109 + else if (recoveryQuestionSetTime <= loginScreenUpdateTime) { 8110 + widget.disabledText = "\\n\\nRecovery Questions Last Set:\\n@gre@" + formatWelcomeScreenDate(recoveryQuestionSetTime); 8111 8111 } else { 8112 - int l1 = (anInt1170 + 14) - anInt1034; 8112 + int l1 = (loginScreenUpdateTime + 14) - recoveryQuestionSetTime; 8113 8113 String s2; 8114 8114 if (l1 <= 0) 8115 8115 s2 = "Earlier today"; ··· 8117 8117 s2 = "Yesterday"; 8118 8118 else 8119 8119 s2 = l1 + " days ago"; 8120 - class13.disabledText = s2 8120 + widget.disabledText = s2 8121 8121 + " you requested@lre@ new recovery\\n@lre@questions.@yel@ The requested change will occur\\non: @lre@" 8122 - + getDate(anInt1034) 8122 + + formatWelcomeScreenDate(recoveryQuestionSetTime) 8123 8123 + "\\n\\nIf you do not remember making this request\\ncancel it immediately, and change your password."; 8124 8124 } 8125 8125 if (i == 662) { 8126 8126 String s; 8127 - if (anInt1273 == 0) 8127 + if (unreadWebsiteMessages == 0) 8128 8128 s = "@yel@0 unread messages"; 8129 - else if (anInt1273 == 1) 8129 + else if (unreadWebsiteMessages == 1) 8130 8130 s = "@gre@1 unread message"; 8131 8131 else 8132 - s = "@gre@" + anInt1273 + " unread messages"; 8133 - class13.disabledText = "You have " + s + "\\nin your message centre."; 8132 + s = "@gre@" + unreadWebsiteMessages + " unread messages"; 8133 + widget.disabledText = "You have " + s + "\\nin your message centre."; 8134 8134 } 8135 8135 if (i == 663) 8136 - if (anInt1083 <= 0 || anInt1083 > anInt1170 + 10) 8137 - class13.disabledText = "Last password change:\\n@gre@Never changed"; 8136 + if (lastPasswordChangeTime <= 0 || lastPasswordChangeTime > loginScreenUpdateTime + 10) 8137 + widget.disabledText = "Last password change:\\n@gre@Never changed"; 8138 8138 else 8139 - class13.disabledText = "Last password change:\\n@gre@" + getDate(anInt1083); 8139 + widget.disabledText = "Last password change:\\n@gre@" + formatWelcomeScreenDate(lastPasswordChangeTime); 8140 8140 if (i == 665) 8141 - if (anInt992 > 2 && !memberServer) 8142 - class13.disabledText = "This is a non-members\\nworld. To enjoy your\\nmembers benefits we\\nrecommend you play on a\\nmembers world instead."; 8143 - else if (anInt992 > 2) 8144 - class13.disabledText = "\\n\\nYou have @gre@" + anInt992 + "@yel@ days of\\nmember credit remaining."; 8145 - else if (anInt992 > 0) 8146 - class13.disabledText = "You have @gre@" 8147 - + anInt992 8141 + if (membershipCreditRemaining > 2 && !memberServer) 8142 + widget.disabledText = "This is a non-members\\nworld. To enjoy your\\nmembers benefits we\\nrecommend you play on a\\nmembers world instead."; 8143 + else if (membershipCreditRemaining > 2) 8144 + widget.disabledText = "\\nYou have @gre@" + membershipCreditRemaining + "@yel@ days of\\nmember credit remaining."; 8145 + else if (membershipCreditRemaining > 0) 8146 + widget.disabledText = "You have @gre@" 8147 + + membershipCreditRemaining 8148 8148 + "@yel@ days of\\nmember credit remaining.\\n\\n@lre@Credit low! Renew now\\n@lre@to avoid losing members."; 8149 8149 else 8150 - class13.disabledText = "You are not a member.\\n\\nChoose to subscribe and\\nyou'll get loads of extra\\nbenefits and features."; 8150 + widget.disabledText = "You are not a member.\\n\\nChoose to subscribe and\\nyou'll get loads of extra\\nbenefits and features."; 8151 8151 if (i == 667) 8152 - if (anInt992 > 2 && !memberServer) 8153 - class13.disabledText = "To switch to a members-only world:\\n1) Logout and return to the world selection page.\\n2) Choose one of the members world with a gold star next to it's name.\\n\\nIf you prefer you can continue to use this world,\\nbut members only features will be unavailable here."; 8154 - else if (anInt992 > 0) 8155 - class13.disabledText = "To extend or cancel a subscription:\\n1) Logout and return to the frontpage of this website.\\n2)Choose the relevant option from the 'membership' section.\\n\\nNote: If you are a credit card subscriber a top-up payment will\\nautomatically be taken when 3 days credit remain.\\n(unless you cancel your subscription, which can be done at any time.)"; 8152 + if (membershipCreditRemaining > 2 && !memberServer) 8153 + widget.disabledText = "To switch to a members-only world:\\n1) Logout and return to the world selection page.\\n2) Choose one of the members world with a gold star next to it's name.\\n\\nIf you prefer you can continue to use this world,\\nbut members only features will be unavailable here."; 8154 + else if (membershipCreditRemaining > 0) 8155 + widget.disabledText = "To extend or cancel a subscription:\\n1) Logout and return to the frontpage of this website.\\n2)Choose the relevant option from the 'membership' section.\\n\\nNote: If you are a credit card subscriber a top-up payment will\\nautomatically be taken when 3 days credit remain.\\n(unless you cancel your subscription, which can be done at any time.)"; 8156 8156 else 8157 - class13.disabledText = "To initializeApplication a subscripton:\\n1) Logout and return to the frontpage of this website.\\n2) Choose 'Start a new subscription'"; 8157 + widget.disabledText = "To initializeApplication a subscripton:\\n1) Logout and return to the frontpage of this website.\\n2) Choose 'Start a new subscription'"; 8158 8158 if (i == 668) { 8159 - if (anInt1034 > anInt1170) { 8160 - class13.disabledText = "To cancel this request:\\n1) Logout and return to the frontpage of this website.\\n2) Choose 'Cancel recovery questions'."; 8159 + if (recoveryQuestionSetTime > loginScreenUpdateTime) { 8160 + widget.disabledText = "To cancel this request:\\n1) Logout and return to the frontpage of this website.\\n2) Choose 'Cancel recovery questions'."; 8161 8161 return; 8162 8162 } 8163 - class13.disabledText = "To change your recovery questions:\\n1) Logout and return to the frontpage of this website.\\n2) Choose 'Set new recovery questions'."; 8163 + widget.disabledText = "To change your recovery questions:\\n1) Logout and return to the frontpage of this website.\\n2) Choose 'Set new recovery questions'."; 8164 8164 } 8165 8165 } 8166 8166 8167 - private String getDate(int time) { 8168 - if (time > anInt1170 + 10) { 8167 + private String formatWelcomeScreenDate(int time) { 8168 + if (time > loginScreenUpdateTime + 10) { 8169 8169 return "Unknown"; 8170 8170 } else { 8171 8171 long date = ((long) time + 11745L) * 0x5265c00L; ··· 8382 8382 drawInterface(0, 0, Widget.forId(walkableWidgetId), 0, 8); 8383 8383 } 8384 8384 8385 - if (openInterfaceId != -1) { 8386 - method88(tickDelta, openInterfaceId); 8387 - drawInterface(0, 0, Widget.forId(openInterfaceId), 0, 8); 8385 + if (openScreenWidgetId != -1) { 8386 + method88(tickDelta, openScreenWidgetId); 8387 + drawInterface(0, 0, Widget.forId(openScreenWidgetId), 0, 8); 8388 8388 } 8389 8389 8390 8390 setTutorialIslandFlag(); ··· 8522 8522 private void method112(byte byte0, int i) { 8523 8523 if (byte0 != 36) 8524 8524 outBuffer.putByte(6); 8525 - Widget class13 = Widget.forId(i); 8526 - for (int j = 0; j < class13.children.length; j++) { 8527 - if (class13.children[j] == -1) 8525 + Widget widget = Widget.forId(i); 8526 + for (int j = 0; j < widget.children.length; j++) { 8527 + if (widget.children[j] == -1) 8528 8528 break; 8529 - Widget class13_1 = Widget.forId(class13.children[j]); 8529 + Widget class13_1 = Widget.forId(widget.children[j]); 8530 8530 if (class13_1.type == 1) 8531 8531 method112((byte) 36, class13_1.id); 8532 8532 class13_1.animationFrame = 0; ··· 8962 8962 anInt1330 = second; 8963 8963 anInt1331 = first; 8964 8964 atInventoryInterfaceType = 2; 8965 - if (Widget.forId(second).parentId == openInterfaceId) 8965 + if (Widget.forId(second).parentId == openScreenWidgetId) 8966 8966 atInventoryInterfaceType = 1; 8967 - if (Widget.forId(second).parentId == backDialogueId) 8967 + if (Widget.forId(second).parentId == openChatboxWidgetId) 8968 8968 atInventoryInterfaceType = 3; 8969 8969 } 8970 8970 if (action == 876) { ··· 9012 9012 anInt1330 = second; 9013 9013 anInt1331 = first; 9014 9014 atInventoryInterfaceType = 2; 9015 - if (Widget.forId(second).parentId == openInterfaceId) 9015 + if (Widget.forId(second).parentId == openScreenWidgetId) 9016 9016 atInventoryInterfaceType = 1; 9017 - if (Widget.forId(second).parentId == backDialogueId) 9017 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9018 9018 atInventoryInterfaceType = 3; 9019 9019 } 9020 9020 if (action == 467 && method80(second, 0, first, clicked)) { ··· 9035 9035 anInt1330 = second; 9036 9036 anInt1331 = first; 9037 9037 atInventoryInterfaceType = 2; 9038 - if (Widget.forId(second).parentId == openInterfaceId) 9038 + if (Widget.forId(second).parentId == openScreenWidgetId) 9039 9039 atInventoryInterfaceType = 1; 9040 - if (Widget.forId(second).parentId == backDialogueId) 9040 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9041 9041 atInventoryInterfaceType = 3; 9042 9042 } 9043 9043 if (action == 553) { ··· 9112 9112 anInt1330 = second; 9113 9113 anInt1331 = first; 9114 9114 atInventoryInterfaceType = 2; 9115 - if (Widget.forId(second).parentId == openInterfaceId) 9115 + if (Widget.forId(second).parentId == openScreenWidgetId) 9116 9116 atInventoryInterfaceType = 1; 9117 - if (Widget.forId(second).parentId == backDialogueId) 9117 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9118 9118 atInventoryInterfaceType = 3; 9119 9119 } 9120 9120 if (action == 347) { ··· 9178 9178 anInt1330 = second; 9179 9179 anInt1331 = first; 9180 9180 atInventoryInterfaceType = 2; 9181 - if (Widget.forId(second).parentId == openInterfaceId) 9181 + if (Widget.forId(second).parentId == openScreenWidgetId) 9182 9182 atInventoryInterfaceType = 1; 9183 - if (Widget.forId(second).parentId == backDialogueId) 9183 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9184 9184 atInventoryInterfaceType = 3; 9185 9185 } 9186 9186 if (action == 361) { ··· 9193 9193 anInt1330 = second; 9194 9194 anInt1331 = first; 9195 9195 atInventoryInterfaceType = 2; 9196 - if (Widget.forId(second).parentId == openInterfaceId) 9196 + if (Widget.forId(second).parentId == openScreenWidgetId) 9197 9197 atInventoryInterfaceType = 1; 9198 - if (Widget.forId(second).parentId == backDialogueId) 9198 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9199 9199 atInventoryInterfaceType = 3; 9200 9200 } 9201 9201 if (action == 118) { ··· 9353 9353 anInt1330 = second; 9354 9354 anInt1331 = first; 9355 9355 atInventoryInterfaceType = 2; 9356 - if (Widget.forId(second).parentId == openInterfaceId) 9356 + if (Widget.forId(second).parentId == openScreenWidgetId) 9357 9357 atInventoryInterfaceType = 1; 9358 - if (Widget.forId(second).parentId == backDialogueId) 9358 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9359 9359 atInventoryInterfaceType = 3; 9360 9360 } 9361 9361 if (action == Actions.USABLE_WIDGET) { ··· 9388 9388 anInt1330 = second; 9389 9389 anInt1331 = first; 9390 9390 atInventoryInterfaceType = 2; 9391 - if (Widget.forId(second).parentId == openInterfaceId) 9391 + if (Widget.forId(second).parentId == openScreenWidgetId) 9392 9392 atInventoryInterfaceType = 1; 9393 - if (Widget.forId(second).parentId == backDialogueId) 9393 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9394 9394 atInventoryInterfaceType = 3; 9395 9395 } 9396 9396 if (action == 894) { ··· 9402 9402 anInt1330 = second; 9403 9403 anInt1331 = first; 9404 9404 atInventoryInterfaceType = 2; 9405 - if (Widget.forId(second).parentId == openInterfaceId) 9405 + if (Widget.forId(second).parentId == openScreenWidgetId) 9406 9406 atInventoryInterfaceType = 1; 9407 - if (Widget.forId(second).parentId == backDialogueId) 9407 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9408 9408 atInventoryInterfaceType = 3; 9409 9409 } 9410 9410 if (action == 1280) { ··· 9437 9437 anInt1330 = second; 9438 9438 anInt1331 = first; 9439 9439 atInventoryInterfaceType = 2; 9440 - if (Widget.forId(second).parentId == openInterfaceId) 9440 + if (Widget.forId(second).parentId == openScreenWidgetId) 9441 9441 atInventoryInterfaceType = 1; 9442 - if (Widget.forId(second).parentId == backDialogueId) 9442 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9443 9443 atInventoryInterfaceType = 3; 9444 9444 } 9445 9445 if (action == Actions.EXAMINE_ITEM) { ··· 9583 9583 anInt1330 = second; 9584 9584 anInt1331 = first; 9585 9585 atInventoryInterfaceType = 2; 9586 - if (Widget.forId(second).parentId == openInterfaceId) 9586 + if (Widget.forId(second).parentId == openScreenWidgetId) 9587 9587 atInventoryInterfaceType = 1; 9588 - if (Widget.forId(second).parentId == backDialogueId) 9588 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9589 9589 atInventoryInterfaceType = 3; 9590 9590 } 9591 9591 if (action == 507) { 9592 9592 String string = menuActionTexts[id]; 9593 9593 int i_389_ = string.indexOf("@whi@"); 9594 9594 if (i_389_ != -1) 9595 - if (openInterfaceId == -1) { 9595 + if (openScreenWidgetId == -1) { 9596 9596 closeWidgets(); 9597 9597 reportedName = string.substring(i_389_ + 5).trim(); 9598 9598 reportMutePlayer = false; 9599 - reportAbuseInterfaceID = openInterfaceId = Widget.anInt246; 9599 + reportAbuseInterfaceID = openScreenWidgetId = Widget.anInt246; 9600 9600 } else { 9601 9601 addChatMessage("", "Please close the interface you have open before using 'report abuse'", 0); 9602 9602 } ··· 9617 9617 anInt1330 = second; 9618 9618 anInt1331 = first; 9619 9619 atInventoryInterfaceType = 2; 9620 - if (Widget.forId(second).parentId == openInterfaceId) 9620 + if (Widget.forId(second).parentId == openScreenWidgetId) 9621 9621 atInventoryInterfaceType = 1; 9622 - if (Widget.forId(second).parentId == backDialogueId) 9622 + if (Widget.forId(second).parentId == openChatboxWidgetId) 9623 9623 atInventoryInterfaceType = 3; 9624 9624 } 9625 9625 if (action == 984) { ··· 9660 9660 } 9661 9661 } 9662 9662 if (action == 318) { 9663 - Npc class50_sub1_sub4_sub3_sub1_7 = npcs[clicked]; 9664 - if (class50_sub1_sub4_sub3_sub1_7 != null) { 9665 - walk(false, false, class50_sub1_sub4_sub3_sub1_7.pathY[0], 9663 + Npc npc = npcs[clicked]; 9664 + if (npc != null) { 9665 + walk(false, false, npc.pathY[0], 9666 9666 localPlayer.pathY[0], 1, 1, 2, 0, 9667 - class50_sub1_sub4_sub3_sub1_7.pathX[0], 0, 0, 9667 + npc.pathX[0], 0, 0, 9668 9668 localPlayer.pathX[0]); 9669 9669 crossX = super.clickX; 9670 9670 crossY = super.clickY; ··· 10388 10388 } 10389 10389 } 10390 10390 10391 - private void method132(Buffer class50_sub1_sub2, int i, boolean flag) { 10391 + private void method132(Buffer buffer, int i, boolean flag) { 10392 10392 if (flag) 10393 10393 anInt1140 = 287; 10394 - while (class50_sub1_sub2.bitPosition + 21 < i * 8) { 10395 - int j = class50_sub1_sub2.getBits(14); 10394 + while (buffer.bitPosition + 21 < i * 8) { 10395 + int j = buffer.getBits(14); 10396 10396 if (j == 16383) 10397 10397 break; 10398 10398 if (npcs[j] == null) 10399 10399 npcs[j] = new Npc(); 10400 - Npc class50_sub1_sub4_sub3_sub1 = npcs[j]; 10400 + Npc npc = npcs[j]; 10401 10401 npcIds[npcCount++] = j; 10402 - class50_sub1_sub4_sub3_sub1.pulseCycle = pulseCycle; 10403 - int k = class50_sub1_sub2.getBits(1); 10402 + npc.pulseCycle = pulseCycle; 10403 + int k = buffer.getBits(1); 10404 10404 if (k == 1) 10405 10405 updatedPlayers[updatedPlayerCount++] = j; 10406 - int l = class50_sub1_sub2.getBits(5); 10406 + int l = buffer.getBits(5); 10407 10407 if (l > 15) 10408 10408 l -= 32; 10409 - int i1 = class50_sub1_sub2.getBits(5); 10409 + int i1 = buffer.getBits(5); 10410 10410 if (i1 > 15) 10411 10411 i1 -= 32; 10412 - int j1 = class50_sub1_sub2.getBits(1); 10413 - class50_sub1_sub4_sub3_sub1.npcDefinition = ActorDefinition.getDefinition(class50_sub1_sub2.getBits(13)); 10414 - class50_sub1_sub4_sub3_sub1.boundaryDimension = class50_sub1_sub4_sub3_sub1.npcDefinition.boundaryDimension; 10415 - class50_sub1_sub4_sub3_sub1.anInt1600 = class50_sub1_sub4_sub3_sub1.npcDefinition.degreesToTurn; 10416 - class50_sub1_sub4_sub3_sub1.walkAnimationId = class50_sub1_sub4_sub3_sub1.npcDefinition.walkAnimationId; 10417 - class50_sub1_sub4_sub3_sub1.turnAroundAnimationId = class50_sub1_sub4_sub3_sub1.npcDefinition.turnAroundAnimationId; 10418 - class50_sub1_sub4_sub3_sub1.turnRightAnimationId = class50_sub1_sub4_sub3_sub1.npcDefinition.turnRightAnimationId; 10419 - class50_sub1_sub4_sub3_sub1.turnLeftAnimationId = class50_sub1_sub4_sub3_sub1.npcDefinition.turnLeftAnimationId; 10420 - class50_sub1_sub4_sub3_sub1.idleAnimation = class50_sub1_sub4_sub3_sub1.npcDefinition.standAnimationId; 10421 - class50_sub1_sub4_sub3_sub1.setPosition(localPlayer.pathX[0] + i1, localPlayer.pathY[0] + l, 10412 + int j1 = buffer.getBits(1); 10413 + npc.npcDefinition = ActorDefinition.getDefinition(buffer.getBits(13)); 10414 + npc.boundaryDimension = npc.npcDefinition.boundaryDimension; 10415 + npc.anInt1600 = npc.npcDefinition.degreesToTurn; 10416 + npc.walkAnimationId = npc.npcDefinition.walkAnimationId; 10417 + npc.turnAroundAnimationId = npc.npcDefinition.turnAroundAnimationId; 10418 + npc.turnRightAnimationId = npc.npcDefinition.turnRightAnimationId; 10419 + npc.turnLeftAnimationId = npc.npcDefinition.turnLeftAnimationId; 10420 + npc.idleAnimation = npc.npcDefinition.standAnimationId; 10421 + npc.setPosition(localPlayer.pathX[0] + i1, localPlayer.pathY[0] + l, 10422 10422 j1 == 1); 10423 10423 } 10424 - class50_sub1_sub2.finishBitAccess(); 10424 + buffer.finishBitAccess(); 10425 10425 } 10426 10426 10427 10427 public void playSong(int id) { ··· 10738 10738 tabImageProducer.createRasterizer(); 10739 10739 Rasterizer3D.lineOffsets = sidebarOffsets; 10740 10740 inventoryBackgroundImage.drawImage(0, 0); 10741 - if (openInvOverLayId != -1) 10742 - drawInterface(0, 0, Widget.forId(openInvOverLayId), 0, 8); 10743 - else if (tabInterfaceIDs[currentTabId] != -1) 10744 - drawInterface(0, 0, Widget.forId(tabInterfaceIDs[currentTabId]), 0, 8); 10741 + if (tabAreaOverlayWidgetId != -1) 10742 + drawInterface(0, 0, Widget.forId(tabAreaOverlayWidgetId), 0, 8); 10743 + else if (tabWidgetIds[currentTabId] != -1) 10744 + drawInterface(0, 0, Widget.forId(tabWidgetIds[currentTabId]), 0, 8); 10745 10745 if (menuOpen && menuScreenArea == 1) 10746 10746 drawMenu(); 10747 10747 tabImageProducer.drawGraphics(553, 205, super.gameGraphics);
+4 -4
src/main/java/com/jagex/runescape/GameShell.java
··· 458 458 459 459 public boolean handleInterfaceScrolling(MouseWheelEvent event, Game client) { 460 460 int rotation = event.getWheelRotation(); 461 - if (mouseX > 0 && mouseY > 346 && mouseX < 516 && mouseY < 505 && client.backDialogueId == -1) { 461 + if (mouseX > 0 && mouseY > 346 && mouseX < 516 && mouseY < 505 && client.openChatboxWidgetId == -1) { 462 462 if (rotation < 0) { 463 463 if (client.chatboxInterface.scrollPosition >= 1) { 464 464 client.chatboxScroll = client.chatboxScroll + 30; ··· 483 483 int offsetY = 0; 484 484 int childID = 0; 485 485 /* Tab interface scrolling */ 486 - int tabInterfaceID = client.tabInterfaceIDs[client.currentTabId]; 486 + int tabInterfaceID = client.tabWidgetIds[client.currentTabId]; 487 487 if (tabInterfaceID != -1) { 488 488 Widget tab = Widget.interfaces[tabInterfaceID]; 489 489 offsetX = 765 - 218; ··· 506 506 } 507 507 } 508 508 /* Main interface scrolling */ 509 - if (client.openInterfaceId != -1) { 510 - Widget widget = Widget.interfaces[client.openInterfaceId]; 509 + if (client.openScreenWidgetId != -1) { 510 + Widget widget = Widget.interfaces[client.openScreenWidgetId]; 511 511 offsetX = 4; 512 512 offsetY = 4; 513 513 for (int index = 0; index < widget.children.length; index++) {
+28 -27
src/main/java/com/jagex/runescape/config/IncomingPacketIds.java
··· 27 27 CONSTRUCT_MAP_REGION = 53, 28 28 UPDATE_ACTIVE_MAP_REGION = 222, 29 29 30 - SET_INTERFACE_ANIMATION = 2, 31 - SET_INTERFACE_ITEM_MODEL = 21, 32 - SET_INTERFACE_PLAYER_HEAD = 255, 30 + SET_WIDGET_ANIMATION = 2, 31 + SET_WIDGET_ITEM_MODEL = 21, 32 + SET_WIDGET_PLAYER_HEAD = 255, 33 33 SET_CHAT_INPUT_TYPE_2 = 6, 34 - SET_INTERFACE_MODEL_1 = 216, 35 - SET_INTERFACE_MODEL_2 = 162, 36 - RESET_INTERFACE_SETTINGS = 113, 37 - FLASH_SIDEBAR_ICON = 238, 38 - SET_SIDEBAR_INTERFACE = 10, 39 - SET_OPEN_SIDEBAR = 252, 40 - CLEAR_INTERFACE_ITEMS = 219, 41 - UPDATE_ALL_INTERFACE_ITEMS = 206, 42 - UPDATE_INTERFACE_ITEMS_BY_SLOT = 134, 43 - UPDATE_INTERFACE_SETTING_LARGE = 115, 44 - UPDATE_INTERFACE_SETTING_SMALL = 182, 34 + SET_WIDGET_MODEL_1 = 216, 35 + SET_WIDGET_MODEL_2 = 162, 36 + RESET_WIDGET_SETTINGS = 113, 37 + FLASH_TAB_ICON = 238, 38 + SET_TAB_WIDGET = 10, 39 + SET_ACTIVE_TAB = 252, 40 + CLEAR_WIDGET_ITEMS = 219, 41 + UPDATE_ALL_WIDGET_ITEMS = 206, 42 + UPDATE_WIDGET_ITEMS_BY_SLOT = 134, 43 + UPDATE_WIDGET_SETTING_LARGE = 115, 44 + UPDATE_WIDGET_SETTING_SMALL = 182, 45 45 UPDATE_CHAT_SETTINGS = 201, 46 - UPDATE_INTERFACE_COLOR = 218, 47 - UPDATE_INTERFACE_STRING = 232, 48 - UPDATE_INTERFACE_SCROLL_POSITION = 200, 49 - UPDATE_INTERFACE_MODEL_DISPLAY = 186, 50 - UPDATE_INTERFACE_HIDDEN_ON_HOVER_STATE = 82, 51 - UPDATE_INTERFACE_POSITION = 166, 52 - SHOW_SIDEBAR_OVERLAY_INTERFACE = 246, 53 - SHOW_GAME_INTERFACE = 159, 54 - SHOW_SIDEBAR_AND_GAME_INTERFACE = 128, 55 - SHOW_WALKABLE_INTERFACE = 50, 56 - SHOW_WELCOME_SCREEN = 76, 46 + UPDATE_WIDGET_COLOR = 218, 47 + UPDATE_WIDGET_STRING = 232, 48 + UPDATE_WIDGET_SCROLL_POSITION = 200, 49 + UPDATE_WIDGET_MODEL_DISPLAY = 186, 50 + HIDE_WIDGET = 82, 51 + UPDATE_WIDGET_POSITION = 166, 52 + SHOW_SIDEBAR_OVERLAY_WIDGET = 246, 53 + SHOW_GAME_WIDGET = 159, 54 + SHOW_SIDEBAR_AND_GAME_WIDGET = 128, 55 + SHOW_WALKABLE_WIDGET = 50, 56 + UPDATE_WELCOME_SCREEN = 76, 57 57 SHOW_DIALOG = 158, 58 - SHOW_CHATBOX_INTERFACE = 109, 59 - CLOSE_ALL_INTERFACES = 29, 58 + SHOW_CHATBOX_WIDGET = 109, 59 + SHOW_FULLSCREEN_WIDGET = 253, 60 + CLOSE_ALL_WIDGETS = 29, 60 61 SET_MINIMAP_STATE = 156, 61 62 62 63 PLAYER_UPDATING = 90,
+3 -3
src/main/java/com/jagex/runescape/media/renderable/actor/Actor.java
··· 32 32 public int anInt1606; 33 33 public int anInt1607; 34 34 public int anInt1608; 35 - public int anInt1609 = -1; 35 + public int faceActor = -1; 36 36 public int worldX; 37 37 public int worldY; 38 38 public int currentRotation; ··· 40 40 public int graphic = -1; 41 41 public int currentAnimation; 42 42 public int anInt1616; 43 - public int anInt1617; 44 - public int spotAnimationDelay; 43 + public int spotGraphicDelay; 44 + public int spotGraphicHeight; 45 45 public int walkAnimationId = -1; 46 46 public int turnAroundAnimationId = -1; 47 47 public int turnRightAnimationId = -1;
+1 -1
src/main/java/com/jagex/runescape/media/renderable/actor/Npc.java
··· 38 38 int animationId = spotanimation.sequences.getPrimaryFrame[super.currentAnimation]; 39 39 Model animationModel = new Model(true, 40 40 model_4_, Animation.exists(animationId)); 41 - animationModel.translate(0, 0, -super.spotAnimationDelay); 41 + animationModel.translate(0, 0, -super.spotGraphicHeight); 42 42 animationModel.createBones(); 43 43 animationModel.applyTransform(animationId); 44 44 animationModel.triangleSkin = null;
+1 -1
src/main/java/com/jagex/runescape/media/renderable/actor/Player.java
··· 212 212 if (spotAnimationModel != null) { 213 213 Model spotAnimationModel2 = new Model(true, 214 214 spotAnimationModel, Animation.exists(super.currentAnimation)); 215 - spotAnimationModel2.translate(0, 0, -super.spotAnimationDelay); 215 + spotAnimationModel2.translate(0, 0, -super.spotGraphicHeight); 216 216 spotAnimationModel2.createBones(); 217 217 spotAnimationModel2.applyTransform(spotAnimation.sequences.getPrimaryFrame[super.currentAnimation]); 218 218 spotAnimationModel2.triangleSkin = null;