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.

Game: Refactored Method method104 -> getDate

+16 -14
+16 -14
src/com/jagex/runescape/Game.java
··· 8021 8021 if (anInt1034 == 0) 8022 8022 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."; 8023 8023 else if (anInt1034 <= anInt1170) { 8024 - class13.disabledText = "\\n\\nRecovery Questions Last Set:\\n@gre@" + method104(anInt1034, (byte) 83); 8024 + class13.disabledText = "\\n\\nRecovery Questions Last Set:\\n@gre@" + getDate(anInt1034); 8025 8025 } else { 8026 8026 int l1 = (anInt1170 + 14) - anInt1034; 8027 8027 String s2; ··· 8033 8033 s2 = l1 + " days ago"; 8034 8034 class13.disabledText = s2 8035 8035 + " you requested@lre@ new recovery\\n@lre@questions.@yel@ The requested change will occur\\non: @lre@" 8036 - + method104(anInt1034, (byte) 83) 8036 + + getDate(anInt1034) 8037 8037 + "\\n\\nIf you do not remember making this request\\ncancel it immediately, and change your password."; 8038 8038 } 8039 8039 if (i == 662) { ··· 8050 8050 if (anInt1083 <= 0 || anInt1083 > anInt1170 + 10) 8051 8051 class13.disabledText = "Last password change:\\n@gre@Never changed"; 8052 8052 else 8053 - class13.disabledText = "Last password change:\\n@gre@" + method104(anInt1083, (byte) 83); 8053 + class13.disabledText = "Last password change:\\n@gre@" + getDate(anInt1083); 8054 8054 if (i == 665) 8055 8055 if (anInt992 > 2 && !memberServer) 8056 8056 class13.disabledText = "This is a non-members\\nworld. To enjoy your\\nmembers benefits we\\nrecommend you play on a\\nmembers world instead."; ··· 8078 8078 } 8079 8079 } 8080 8080 8081 - public String method104(int i, byte byte0) { 8082 - if (byte0 != 83) 8083 - opcode = buffer.getUnsignedByte(); 8084 - if (i > anInt1170 + 10) { 8081 + private String getDate(int time) { 8082 + if (time > anInt1170 + 10) { 8085 8083 return "Unknown"; 8086 8084 } else { 8087 - long l = ((long) i + 11745L) * 0x5265c00L; 8085 + long date = ((long) time + 11745L) * 0x5265c00L; 8088 8086 Calendar calendar = Calendar.getInstance(); 8089 - calendar.setTime(new Date(l)); 8090 - int j = calendar.get(5); 8091 - int k = calendar.get(2); 8092 - int i1 = calendar.get(1); 8093 - String as[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; 8094 - return j + "-" + as[k] + "-" + i1; 8087 + 8088 + calendar.setTime(new Date(date)); 8089 + 8090 + int day = calendar.get(Calendar.DAY_OF_MONTH); 8091 + int month = calendar.get(Calendar.MONTH); 8092 + int year = calendar.get(Calendar.YEAR); 8093 + String[] monthNames = { "Jan", "Feb", "Mar", "Apr", "May", 8094 + "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; 8095 + 8096 + return day + "-" + monthNames[month] + "-" + year; 8095 8097 } 8096 8098 } 8097 8099