RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
com.osroyale.net.packet.PacketRepository Class Reference

Static Public Member Functions

static void registerListener (int opcode, PacketListener listener)
static PacketListener lookupListener (final int opcode)
static PacketType lookupType (int opcode)
static int lookupSize (int opcode)
static void registerType (int opcode, int type)

Detailed Description

The repository that stores packets sizes and listeners for how to execute the packets.

Author
nshusa

Definition at line 49 of file PacketRepository.java.

Member Function Documentation

◆ lookupListener()

PacketListener com.osroyale.net.packet.PacketRepository.lookupListener ( final int opcode)
inlinestatic

Looks up the listener for this packet.

Parameters
opcodeThe opcode of the packet
Returns
The result.

Definition at line 96 of file PacketRepository.java.

◆ lookupSize()

int com.osroyale.net.packet.PacketRepository.lookupSize ( int opcode)
inlinestatic

Looks up the reference size of a packet.

Parameters
opcodeThe packet to lookup
Returns
The reference size.

Definition at line 134 of file PacketRepository.java.

◆ lookupType()

PacketType com.osroyale.net.packet.PacketRepository.lookupType ( int opcode)
inlinestatic

The method that looks up the packets type.

Parameters
opcodeThe opcode to lookup
Returns
The packet type.

Definition at line 110 of file PacketRepository.java.

◆ registerListener()

void com.osroyale.net.packet.PacketRepository.registerListener ( int opcode,
PacketListener listener )
inlinestatic

Registers a listener to listen for client -> server packet events.

Parameters
opcodeThe packet to intercept.
listenerThe listener that will execute this packet.

Definition at line 84 of file PacketRepository.java.

◆ registerType()

void com.osroyale.net.packet.PacketRepository.registerType ( int opcode,
int type )
inlinestatic

Registers a type for a packet.

The following types are...

-2 var_short -1 var_byte 0 empty

0 fixed

Parameters
opcodeThe packet to register this type for
typeThe type for this packet.

Definition at line 154 of file PacketRepository.java.


The documentation for this class was generated from the following file: