rswiki-book/Class-Check.mediawiki

168 lines
4.7 KiB
Plaintext
Raw Normal View History

2012-09-03 16:23:43 -04:00
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.
2012-09-03 15:42:38 -04:00
2012-09-03 16:39:51 -04:00
== Request Structure ==
+-------------------------+
| amount requests : ubyte |
+-------------------------+
| uid : dword |
+-------------------------+--------------+------------------------+
| for each request | type : ubyte | type dependent data... |
+-------------------------+--------------+------------------------+
2012-09-03 16:36:20 -04:00
== Response Structure ==
2012-09-03 16:31:46 -04:00
+---------------------+
| uid : dword |
+---------------------+----------------------+------------------------+
2012-09-03 16:32:09 -04:00
| for each request | response code : byte | type dependent data... |
2012-09-03 16:31:46 -04:00
+---------------------+----------------------+------------------------+
| payload crc : dword |
+---------------------+
2012-09-03 16:22:46 -04:00
== Request Types ==
2012-09-03 16:36:08 -04:00
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.
2012-09-03 16:22:46 -04:00
{| 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.
|}
2012-09-03 16:05:49 -04:00
== Return Codes ==
2012-09-03 16:18:56 -04:00
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.
2012-09-03 15:50:32 -04:00
{| border=2px
! Opcode
2012-09-03 16:05:49 -04:00
! Name
2012-09-03 16:08:39 -04:00
! On Receive/Response
2012-09-03 15:50:32 -04:00
! Description
|-
! 0
2012-09-03 16:05:49 -04:00
! Successful
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 15:50:32 -04:00
! Successfully executed the request.
|-
2012-09-03 16:15:09 -04:00
! 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.
|-
2012-09-03 15:50:32 -04:00
! -1
2012-09-03 16:05:49 -04:00
! ClassNotFoundException
! Receive
! A ClassNotFoundException was thrown while receiving a request from the server.
2012-09-03 15:50:32 -04:00
|-
! -2
2012-09-03 16:05:49 -04:00
! SecurityException
! Receive
! A SecurityException was thrown while receiving a request from the server.
2012-09-03 15:50:32 -04:00
|-
! -3
2012-09-03 16:05:49 -04:00
! NullPointerException
2012-09-03 16:08:39 -04:00
! Receive
2012-09-03 16:05:49 -04:00
! A NullPointerException was thrown while receiving a request from the server.
2012-09-03 15:50:32 -04:00
|-
! -4
2012-09-03 16:05:49 -04:00
! Exception
2012-09-03 16:08:39 -04:00
! Receive
2012-09-03 16:05:49 -04:00
! An Exception was thrown while receiving a request from the server.
2012-09-03 15:50:32 -04:00
|-
! -5
2012-09-03 16:05:49 -04:00
! Throwable
2012-09-03 16:17:20 -04:00
! Receive
2012-09-03 16:05:49 -04:00
! An error or exception was thrown while receiving a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -10
2012-09-03 16:05:49 -04:00
! ClassNotFoundException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! A ClassNotFoundException was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -11
2012-09-03 16:05:49 -04:00
! InvalidClassException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! An InvalidClassException was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -12
2012-09-03 16:05:49 -04:00
! StreamCorruptedException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! A StreamCorruptedException was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -13
2012-09-03 16:05:49 -04:00
! OptionalDataException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! An OptionDataException was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -14
2012-09-03 16:05:49 -04:00
! IllegalAccessException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! An IllegalAccessException was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -15
2012-09-03 16:05:49 -04:00
! IllegalArgumentException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! An IllegalArgumentException was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -16
2012-09-03 16:05:49 -04:00
! InvocationTargetException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! An InvocationTargetException was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -17
2012-09-03 16:05:49 -04:00
! SecurityException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! A SecurityException was thrown while responding to a request from the server.
!
2012-09-03 15:54:51 -04:00
|-
! -18
2012-09-03 16:05:49 -04:00
! IOException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! An IOException was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -19
2012-09-03 16:05:49 -04:00
! NullPointerException
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! A NullPointerException was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -20
2012-09-03 16:05:49 -04:00
! Exception
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! An Exception was thrown while responding to a request from the server.
2012-09-03 15:54:51 -04:00
|-
! -21
2012-09-03 16:05:49 -04:00
! Throwable
2012-09-03 16:08:39 -04:00
! Response
2012-09-03 16:05:49 -04:00
! An error or exception was thrown while receiving a request from the server.
2012-09-03 15:50:32 -04:00
|}