mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2026-08-28 05:45:15 -06:00
Identified some ClientProt packets
This commit is contained in:
parent
0043d54196
commit
7fc2498cc5
8 changed files with 51 additions and 26 deletions
|
|
@ -239,7 +239,7 @@ public class Cheat {
|
|||
}
|
||||
|
||||
public static void sendCheatPacket(JagString commandLine) {
|
||||
Protocol.outboundBuffer.p1isaac(44);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.CLIENT_CHEAT);
|
||||
Protocol.outboundBuffer.p1(commandLine.length() - 1);
|
||||
Protocol.outboundBuffer.pjstr(commandLine.substring(2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@ public class ClanChat {
|
|||
|
||||
@OriginalMember(owner = "client!kh", name = "b", descriptor = "(I)V")
|
||||
public static void leave() {
|
||||
Protocol.outboundBuffer.p1isaac(104);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.CLAN_JOINCHAT_LEAVECHAT);
|
||||
Protocol.outboundBuffer.p8(0L);
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!mf", name = "a", descriptor = "(JI)V")
|
||||
public static void join(@OriginalArg(0) long arg0) {
|
||||
if ((long) 0 != arg0) {
|
||||
Protocol.outboundBuffer.p1isaac(104);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.CLAN_JOINCHAT_LEAVECHAT);
|
||||
Protocol.outboundBuffer.p8(arg0);
|
||||
}
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ public class ClanChat {
|
|||
local24++;
|
||||
}
|
||||
if (local24 < members.length && members[local24] != null) {
|
||||
Protocol.outboundBuffer.p1isaac(162);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.CLAN_KICKUSER);
|
||||
Protocol.outboundBuffer.p8(members[local24].key);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,31 @@ import java.io.IOException;
|
|||
|
||||
public class ClientProt {
|
||||
|
||||
public static final int CLIENT_CHEAT = 44;
|
||||
public static final int CLAN_JOINCHAT_LEAVECHAT = 104;
|
||||
public static final int CLAN_KICKUSER = 162; // or CLANCHANNEL_KICKUSER
|
||||
public static final int FRIENDLIST_ADD = 120;
|
||||
public static final int FRIENDLIST_DEL = 57;
|
||||
public static final int FRIEND_SETRANK = 188;
|
||||
public static final int IGNORELIST_ADD = 34;
|
||||
public static final int IGNORELIST_DEL = 213;
|
||||
public static final int WINDOW_STATUS = 243; // assumed
|
||||
public static final int TRANSMITVAR_VERIFYID = 177;
|
||||
public static final int EVENT_MOUSE_MOVE = 123;
|
||||
public static final int EVENT_MOUSE_CLICK = 75;
|
||||
public static final int EVENT_CAMERA_POSITION = 21;
|
||||
public static final int EVENT_APPLET_FOCUS = 22;
|
||||
public static final int RESUME_P_COUNTDIALOG = 23;
|
||||
public static final int RESUME_P_NAMEDIALOG = 244;
|
||||
public static final int RESUME_P_STRINGDIALOG = 65;
|
||||
public static final int SET_CHATFILTERSETTINGS = 157;
|
||||
public static final int BUG_REPORT = 99;
|
||||
public static final int SOUND_SONGEND = 137;
|
||||
public static final int MOVE_GAMECLICK = 215;
|
||||
public static final int MOVE_MINIMAPCLICK = 39;
|
||||
public static final int CLOSE_MODAL = 184;
|
||||
public static final int NO_TIMEOUT = 93; // assumed
|
||||
|
||||
@OriginalMember(owner = "client!vg", name = "a", descriptor = "(Lclient!na;IIBI)V")
|
||||
public static void method4512(@OriginalArg(0) JagString arg0, @OriginalArg(1) int arg1, @OriginalArg(2) int arg2, @OriginalArg(4) int arg3) {
|
||||
@Pc(8) Component local8 = InterfaceList.method1418(arg3, arg1);
|
||||
|
|
@ -91,11 +116,11 @@ public class ClientProt {
|
|||
@Pc(23) int local23 = PathFinder.queueX[arg0];
|
||||
@Pc(27) int local27 = PathFinder.queueZ[arg0];
|
||||
if (arg1 == 0) {
|
||||
Protocol.outboundBuffer.p1isaac(215);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.MOVE_GAMECLICK);
|
||||
Protocol.outboundBuffer.p1(local13 + local13 + 3);
|
||||
}
|
||||
if (arg1 == 1) {
|
||||
Protocol.outboundBuffer.p1isaac(39);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.MOVE_MINIMAPCLICK);
|
||||
Protocol.outboundBuffer.p1(local13 + local13 + 3 + 14);
|
||||
}
|
||||
if (arg1 == 2) {
|
||||
|
|
@ -116,7 +141,7 @@ public class ClientProt {
|
|||
|
||||
@OriginalMember(owner = "client!mc", name = "f", descriptor = "(B)V")
|
||||
public static void closeWidget() {
|
||||
Protocol.outboundBuffer.p1isaac(184);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.CLOSE_MODAL);
|
||||
for (@Pc(18) ComponentPointer local18 = (ComponentPointer) InterfaceList.openInterfaces.head(); local18 != null; local18 = (ComponentPointer) InterfaceList.openInterfaces.next()) {
|
||||
if (local18.anInt5879 == 0) {
|
||||
InterfaceList.closeInterface(true, local18);
|
||||
|
|
@ -163,7 +188,7 @@ public class ClientProt {
|
|||
|
||||
@OriginalMember(owner = "client!ej", name = "i", descriptor = "(I)V")
|
||||
public static void sendWindowDetails() {
|
||||
Protocol.outboundBuffer.p1isaac(243);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.WINDOW_STATUS);
|
||||
Protocol.outboundBuffer.p1(DisplayMode.getWindowMode());
|
||||
Protocol.outboundBuffer.p2(GameShell.canvasWidth);
|
||||
Protocol.outboundBuffer.p2(GameShell.canvasHeight);
|
||||
|
|
@ -182,7 +207,7 @@ public class ClientProt {
|
|||
}
|
||||
Protocol.anInt3251 = 0;
|
||||
if (!LoginManager.aBoolean247 && Protocol.socket != null) {
|
||||
Protocol.outboundBuffer.p1isaac(93);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.NO_TIMEOUT);
|
||||
try {
|
||||
Protocol.socket.write(Protocol.outboundBuffer.data, Protocol.outboundBuffer.offset);
|
||||
Protocol.outboundBuffer.offset = 0;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class FriendsList {
|
|||
sameGame[size] = false;
|
||||
size++;
|
||||
transmitAt = InterfaceList.transmitTimer;
|
||||
Protocol.outboundBuffer.p1isaac(120);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.FRIENDLIST_ADD);
|
||||
Protocol.outboundBuffer.p8(arg0);
|
||||
}
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ public class FriendsList {
|
|||
sameGame[local41] = sameGame[local41 + 1];
|
||||
}
|
||||
transmitAt = InterfaceList.transmitTimer;
|
||||
Protocol.outboundBuffer.p1isaac(57);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.FRIENDLIST_DEL);
|
||||
Protocol.outboundBuffer.p8(arg0);
|
||||
break;
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ public class FriendsList {
|
|||
|
||||
@OriginalMember(owner = "client!ni", name = "a", descriptor = "(ILclient!na;I)V")
|
||||
public static void setRank(@OriginalArg(1) JagString arg0, @OriginalArg(2) int arg1) {
|
||||
Protocol.outboundBuffer.p1isaac(188);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.FRIEND_SETRANK);
|
||||
Protocol.outboundBuffer.p1add(arg1);
|
||||
Protocol.outboundBuffer.p8(arg0.encode37());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class IgnoreList {
|
|||
encodedUsernames[size] = arg0;
|
||||
usernames[size++] = Base37.decode37(arg0);
|
||||
FriendsList.transmitAt = InterfaceList.transmitTimer;
|
||||
Protocol.outboundBuffer.p1isaac(34);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.IGNORELIST_ADD);
|
||||
Protocol.outboundBuffer.p8(arg0);
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ public class IgnoreList {
|
|||
usernames[local36] = usernames[local36 + 1];
|
||||
}
|
||||
FriendsList.transmitAt = InterfaceList.transmitTimer;
|
||||
Protocol.outboundBuffer.p1isaac(213);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.IGNORELIST_DEL);
|
||||
Protocol.outboundBuffer.p8(arg0);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2415,7 +2415,7 @@ public class Protocol {
|
|||
if (!MouseRecorder.enabled) {
|
||||
MouseRecorder.instance.samples = 0;
|
||||
} else if (Mouse.clickButton != 0 || MouseRecorder.instance.samples >= 40) {
|
||||
outboundBuffer.p1isaac(123);
|
||||
outboundBuffer.p1isaac(ClientProt.EVENT_MOUSE_MOVE);
|
||||
type = 0;
|
||||
outboundBuffer.p1(0);
|
||||
offset = outboundBuffer.offset;
|
||||
|
|
@ -2511,7 +2511,7 @@ public class Protocol {
|
|||
if (Mouse.clickButton == 2) {
|
||||
button = 1;
|
||||
}
|
||||
outboundBuffer.p1isaac(75);
|
||||
outboundBuffer.p1isaac(ClientProt.EVENT_MOUSE_CLICK);
|
||||
outboundBuffer.ip2add(button << 15 | x);
|
||||
outboundBuffer.mp4(i | type << 16);
|
||||
}
|
||||
|
|
@ -2532,18 +2532,18 @@ public class Protocol {
|
|||
if (aBoolean228 && anInt551 <= 0) {
|
||||
anInt551 = 20;
|
||||
aBoolean228 = false;
|
||||
outboundBuffer.p1isaac(21);
|
||||
outboundBuffer.p1isaac(ClientProt.EVENT_CAMERA_POSITION);
|
||||
outboundBuffer.p2add((int) Camera.pitchTarget);
|
||||
outboundBuffer.ip2((int) Camera.yawTarget);
|
||||
}
|
||||
if (GameShell.focus && !prevFocus) {
|
||||
prevFocus = true;
|
||||
outboundBuffer.p1isaac(22);
|
||||
outboundBuffer.p1isaac(ClientProt.EVENT_APPLET_FOCUS);
|
||||
outboundBuffer.p1(1);
|
||||
}
|
||||
if (!GameShell.focus && prevFocus) {
|
||||
prevFocus = false;
|
||||
outboundBuffer.p1isaac(22);
|
||||
outboundBuffer.p1isaac(ClientProt.EVENT_APPLET_FOCUS);
|
||||
outboundBuffer.p1(0);
|
||||
}
|
||||
if (!Preferences.sentToServer) {
|
||||
|
|
@ -3281,7 +3281,7 @@ public class Protocol {
|
|||
|
||||
@OriginalMember(owner = "client!fk", name = "c", descriptor = "(I)V")
|
||||
public static void transmitVerifyId() {
|
||||
outboundBuffer.p1isaac(177);
|
||||
outboundBuffer.p1isaac(ClientProt.TRANSMITVAR_VERIFYID);
|
||||
outboundBuffer.p2(verifyId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3045,21 +3045,21 @@ public final class ScriptRunner {
|
|||
if (string.isInt()) {
|
||||
int3 = string.parseInt();
|
||||
}
|
||||
Protocol.outboundBuffer.p1isaac(23);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.RESUME_P_COUNTDIALOG);
|
||||
Protocol.outboundBuffer.p4(int3);
|
||||
continue;
|
||||
}
|
||||
if (opcode == Cs2Opcodes.sendNameInput) {
|
||||
ssp--;
|
||||
string = stringStack[ssp];
|
||||
Protocol.outboundBuffer.p1isaac(244);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.RESUME_P_NAMEDIALOG);
|
||||
Protocol.outboundBuffer.p8(string.encode37());
|
||||
continue;
|
||||
}
|
||||
if (opcode == Cs2Opcodes.sendStringInput) {
|
||||
ssp--;
|
||||
string = stringStack[ssp];
|
||||
Protocol.outboundBuffer.p1isaac(65);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.RESUME_P_STRINGDIALOG);
|
||||
Protocol.outboundBuffer.p1(string.length() + 1);
|
||||
Protocol.outboundBuffer.pjstr(string);
|
||||
continue;
|
||||
|
|
@ -3968,7 +3968,7 @@ public final class ScriptRunner {
|
|||
Chat.publicFilter = intStack[isp];
|
||||
Chat.privateFilter = intStack[isp + 1];
|
||||
Chat.tradeFilter = intStack[isp + 2];
|
||||
Protocol.outboundBuffer.p1isaac(157);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.SET_CHATFILTERSETTINGS);
|
||||
Protocol.outboundBuffer.p1(Chat.publicFilter);
|
||||
Protocol.outboundBuffer.p1(Chat.privateFilter);
|
||||
Protocol.outboundBuffer.p1(Chat.tradeFilter);
|
||||
|
|
@ -3980,7 +3980,7 @@ public final class ScriptRunner {
|
|||
isp -= 2;
|
||||
int3 = intStack[isp];
|
||||
int2 = intStack[isp + 1];
|
||||
Protocol.outboundBuffer.p1isaac(99);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.BUG_REPORT);
|
||||
Protocol.outboundBuffer.p8(string.encode37());
|
||||
Protocol.outboundBuffer.p1(int3 - 1);
|
||||
Protocol.outboundBuffer.p1(int2);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ public class SoundPlayer {
|
|||
}
|
||||
|
||||
public static void sendTrackEndPacket() {
|
||||
Protocol.outboundBuffer.p1isaac(137);
|
||||
Protocol.outboundBuffer.p1isaac(ClientProt.SOUND_SONGEND);
|
||||
Protocol.outboundBuffer.p4(MusicPlayer.groupId);
|
||||
MusicPlayer.groupId = -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue