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 method75 -> renderSplitPrivateMessages

+70 -53
+70 -53
src/com/jagex/runescape/Game.java
··· 6019 6019 } 6020 6020 } 6021 6021 6022 - public void method75(int i) { 6023 - packetSize += i; 6022 + private void renderSplitPrivateMessages() { 6024 6023 if (anInt1223 == 0) 6025 6024 return; 6026 - TypeFace class50_sub1_sub1_sub2 = fontNormal; 6027 - int j = 0; 6025 + 6026 + TypeFace typeFace = fontNormal; 6027 + int line = 0; 6028 + 6028 6029 if (systemUpdateTime != 0) 6029 - j = 1; 6030 - for (int k = 0; k < 100; k++) 6031 - if (chatMessages[k] != null) { 6032 - int l = chatTypes[k]; 6033 - String s = chatPlayerNames[k]; 6034 - byte byte0 = 0; 6035 - if (s != null && s.startsWith("@cr1@")) { 6036 - s = s.substring(5); 6037 - byte0 = 1; 6038 - } 6039 - if (s != null && s.startsWith("@cr2@")) { 6040 - s = s.substring(5); 6041 - byte0 = 2; 6042 - } 6043 - if ((l == 3 || l == 7) && (l == 7 || privateChatMode == 0 || privateChatMode == 1 && method148(13292, s))) { 6044 - int i1 = 329 - j * 13; 6045 - int l1 = 4; 6046 - class50_sub1_sub1_sub2.drawString("From", l1, i1, 0); 6047 - class50_sub1_sub1_sub2.drawString("From", l1, i1 - 1, 65535); 6048 - l1 += class50_sub1_sub1_sub2.getStringEffectWidth("From "); 6049 - if (byte0 == 1) { 6050 - moderatorIcon[0].drawImage(l1, i1 - 12); 6051 - l1 += 14; 6052 - } 6053 - if (byte0 == 2) { 6054 - moderatorIcon[1].drawImage(l1, i1 - 12); 6055 - l1 += 14; 6056 - } 6057 - class50_sub1_sub1_sub2.drawString(s + ": " + chatMessages[k], l1, i1, 0); 6058 - class50_sub1_sub1_sub2.drawString(s + ": " + chatMessages[k], l1, i1 - 1, 65535); 6059 - if (++j >= 5) 6060 - return; 6061 - } 6062 - if (l == 5 && privateChatMode < 2) { 6063 - int j1 = 329 - j * 13; 6064 - class50_sub1_sub1_sub2.drawString(chatMessages[k], 4, j1, 0); 6065 - class50_sub1_sub1_sub2.drawString(chatMessages[k], 4, j1 - 1, 65535); 6066 - if (++j >= 5) 6067 - return; 6068 - } 6069 - if (l == 6 && privateChatMode < 2) { 6070 - int k1 = 329 - j * 13; 6071 - class50_sub1_sub1_sub2.drawString("To " + s + ": " + chatMessages[k], 4, k1, 0); 6072 - class50_sub1_sub1_sub2.drawString("To " + s + ": " + chatMessages[k], 4, k1 - 1, 65535); 6073 - if (++j >= 5) 6074 - return; 6075 - } 6076 - } 6030 + line = 1; 6031 + 6032 + for (int i = 0; i < 100; i++) { 6033 + if (chatMessages[i] != null) { 6034 + int type = chatTypes[i]; 6035 + String name = chatPlayerNames[i]; 6036 + byte privilege = 0; 6037 + 6038 + if (name != null && name.startsWith("@cr1@")) { 6039 + name = name.substring(5); 6040 + privilege = 1; 6041 + } 6042 + 6043 + if (name != null && name.startsWith("@cr2@")) { 6044 + name = name.substring(5); 6045 + privilege = 2; 6046 + } 6047 + 6048 + if ((type == 3 || type == 7) && (type == 7 || privateChatMode == 0 || privateChatMode == 1 && method148(13292, name))) { 6049 + int y = 329 - line * 13; 6050 + int x = 4; 6051 + 6052 + typeFace.drawString("From", x, y, 0); 6053 + typeFace.drawString("From", x, y - 1, 65535); 6054 + 6055 + x += typeFace.getStringEffectWidth("From "); 6056 + 6057 + if (privilege == 1) { 6058 + moderatorIcon[0].drawImage(x, y - 12); 6059 + x += 14; 6060 + } 6061 + 6062 + if (privilege == 2) { 6063 + moderatorIcon[1].drawImage(x, y - 12); 6064 + x += 14; 6065 + } 6066 + 6067 + typeFace.drawString(name + ": " + chatMessages[i], x, y, 0); 6068 + typeFace.drawString(name + ": " + chatMessages[i], x, y - 1, 65535); 6069 + 6070 + if (++line >= 5) 6071 + return; 6072 + } 6073 + 6074 + if (type == 5 && privateChatMode < 2) { 6075 + int y = 329 - line * 13; 6076 + 6077 + typeFace.drawString(chatMessages[i], 4, y, 0); 6078 + typeFace.drawString(chatMessages[i], 4, y - 1, 65535); 6079 + 6080 + if (++line >= 5) 6081 + return; 6082 + } 6083 + 6084 + if (type == 6 && privateChatMode < 2) { 6085 + int y = 329 - line * 13; 6086 + 6087 + typeFace.drawString("To " + name + ": " + chatMessages[i], 4, y, 0); 6088 + typeFace.drawString("To " + name + ": " + chatMessages[i], 4, y - 1, 65535); 6077 6089 6090 + if (++line >= 5) 6091 + return; 6092 + } 6093 + } 6094 + } 6078 6095 } 6079 6096 6080 6097 public void init() { ··· 8254 8271 public void method109(int i) { 8255 8272 if (i != 30729) 8256 8273 anInt1056 = incomingRandom.nextInt(); 8257 - method75(0); 8274 + renderSplitPrivateMessages(); 8258 8275 if (crossType == 1) 8259 8276 cursorCross[crossIndex / 100].drawImage(anInt1021 - 8 - 4, anInt1020 - 8 - 4); 8260 8277 if (crossType == 2)