mirror of
https://github.com/moparisthebest/rswiki-book
synced 2024-11-16 06:05:03 -05:00
168 lines
4.7 KiB
Plaintext
168 lines
4.7 KiB
Plaintext
The class check originated with the new Runescape engine update which took place around the 4xx revisions. It gives the Jagex servers the ability to check the modifiers, update, or fetch the value for a field. It also gives functionality to invoke a method with parameters and get it's return value, or check it's modifiers. Each of these functionalities are described with a request type. A class check request is built up with many of these request types. Each request is tagged with an unique id.
|
|
|
|
== Request Structure ==
|
|
|
|
+-------------------------+
|
|
| amount requests : ubyte |
|
|
+-------------------------+
|
|
| uid : dword |
|
|
+-------------------------+--------------+------------------------+
|
|
| for each request | type : ubyte | type dependent data... |
|
|
+-------------------------+--------------+------------------------+
|
|
|
|
== Response Structure ==
|
|
|
|
+---------------------+
|
|
| uid : dword |
|
|
+---------------------+----------------------+------------------------+
|
|
| for each request | response code : byte | type dependent data... |
|
|
+---------------------+----------------------+------------------------+
|
|
| payload crc : dword |
|
|
+---------------------+
|
|
|
|
== Request Types ==
|
|
|
|
For request types 0, 2, 4 there will only be one successful response code and a dword value of the value being requested will be sent. For request type 1, only the successful response code will be used but no value will be sent back.
|
|
|
|
{| border=2px
|
|
! Opcode
|
|
! Name
|
|
! Description
|
|
|-
|
|
! 0
|
|
! Fetch Numeric Field
|
|
! Fetches the value of a numeric field.
|
|
|-
|
|
! 1
|
|
! Update Numeric Field
|
|
! Updates the value of a numeric field.
|
|
|-
|
|
! 2
|
|
! Get Field Modifiers
|
|
! Gets the modifiers of a field.
|
|
|-
|
|
! 3
|
|
! Invoke Method
|
|
! Invokes a method and sends back its return object.
|
|
|-
|
|
! 4
|
|
! Get Method Modifiers
|
|
! Gets the modifiers of a method.
|
|
|}
|
|
|
|
== Return Codes ==
|
|
|
|
All the return codes are in descending priority by numerical order. For opcode 0, there are cases where a numeric value is sent to the server on fetch requests. This value is always a dword. For a method invoke request, there isn't a value that is sent to the server. It is just assumed that there wasn't a return object from the invoked method.
|
|
|
|
{| border=2px
|
|
! Opcode
|
|
! Name
|
|
! On Receive/Response
|
|
! Description
|
|
|-
|
|
! 0
|
|
! Successful
|
|
! Response
|
|
! Successfully executed the request.
|
|
|-
|
|
! 1
|
|
! Successful - Returned numeric value
|
|
! Response
|
|
! Successfully executed the request, and returned a numeric value.
|
|
|-
|
|
! 2
|
|
! Successful - Returned string value
|
|
! Response
|
|
! Successfully executed the request, and returned a string value.
|
|
|-
|
|
! 4
|
|
! Successful - Returned object value
|
|
! Response
|
|
! Successfully executed the request, and returned an object value.
|
|
|-
|
|
! -1
|
|
! ClassNotFoundException
|
|
! Receive
|
|
! A ClassNotFoundException was thrown while receiving a request from the server.
|
|
|-
|
|
! -2
|
|
! SecurityException
|
|
! Receive
|
|
! A SecurityException was thrown while receiving a request from the server.
|
|
|-
|
|
! -3
|
|
! NullPointerException
|
|
! Receive
|
|
! A NullPointerException was thrown while receiving a request from the server.
|
|
|-
|
|
! -4
|
|
! Exception
|
|
! Receive
|
|
! An Exception was thrown while receiving a request from the server.
|
|
|-
|
|
! -5
|
|
! Throwable
|
|
! Receive
|
|
! An error or exception was thrown while receiving a request from the server.
|
|
|-
|
|
! -10
|
|
! ClassNotFoundException
|
|
! Response
|
|
! A ClassNotFoundException was thrown while responding to a request from the server.
|
|
|-
|
|
! -11
|
|
! InvalidClassException
|
|
! Response
|
|
! An InvalidClassException was thrown while responding to a request from the server.
|
|
|-
|
|
! -12
|
|
! StreamCorruptedException
|
|
! Response
|
|
! A StreamCorruptedException was thrown while responding to a request from the server.
|
|
|-
|
|
! -13
|
|
! OptionalDataException
|
|
! Response
|
|
! An OptionDataException was thrown while responding to a request from the server.
|
|
|-
|
|
! -14
|
|
! IllegalAccessException
|
|
! Response
|
|
! An IllegalAccessException was thrown while responding to a request from the server.
|
|
|-
|
|
! -15
|
|
! IllegalArgumentException
|
|
! Response
|
|
! An IllegalArgumentException was thrown while responding to a request from the server.
|
|
|-
|
|
! -16
|
|
! InvocationTargetException
|
|
! Response
|
|
! An InvocationTargetException was thrown while responding to a request from the server.
|
|
|-
|
|
! -17
|
|
! SecurityException
|
|
! Response
|
|
! A SecurityException was thrown while responding to a request from the server.
|
|
!
|
|
|-
|
|
! -18
|
|
! IOException
|
|
! Response
|
|
! An IOException was thrown while responding to a request from the server.
|
|
|-
|
|
! -19
|
|
! NullPointerException
|
|
! Response
|
|
! A NullPointerException was thrown while responding to a request from the server.
|
|
|-
|
|
! -20
|
|
! Exception
|
|
! Response
|
|
! An Exception was thrown while responding to a request from the server.
|
|
|-
|
|
! -21
|
|
! Throwable
|
|
! Response
|
|
! An error or exception was thrown while receiving a request from the server.
|
|
|} |