LocAddChangeV2

class LocAddChangeV2 : ZoneProt

Loc add-change v2 packet is used to either add or change a loc in the world. The client will add a new loc if none exists by this description, or overwrites an old one with the same layer (layer is obtained through the shape property of the loc).

Constructors

Link copied to clipboard
constructor(id: Int, xInZone: Int, zInZone: Int, shape: Int, rotation: Int, opFlags: Byte, ops: Map<Byte, String>?)
constructor(id: Int, xInZone: Int, zInZone: Int, shape: Int, rotation: Int, opFlags: Byte)

Properties

Link copied to clipboard
open override val category: ServerProtCategory
Link copied to clipboard
Link copied to clipboard
val id: Int

the id of the loc to add

Link copied to clipboard
Link copied to clipboard

the right-click options enabled on this loc. Use the net.rsprot.protocol.game.outgoing.util.OpFlags helper object to create these bitpacked values which can be passed into it.

Link copied to clipboard
val ops: Map<Byte, String>?

a map of mini menu ops to override the defaults with. If the map is null or empty, the ops will not be overridden and the ones provided in the respective cache config will be used. If the map has entries, all the cache ops are ignored and the provided map is used. Note that only ops 1-5 will actually be used, any other values get ignored by the client. As such, if a map is provided that has no keys of value 1-5, all the ops will simply be hidden.

Link copied to clipboard
open override val protId: Int
Link copied to clipboard

the rotation of the loc, a value of 0 to 3 (inclusive) is expected.

Link copied to clipboard
val shape: Int

the shape of the loc, a value of 0 to 22 (inclusive) is expected.

Link copied to clipboard

the x coordinate of the loc within the zone it is in, a value in range of 0 to 7 (inclusive) is expected. Any bits outside that are ignored.

Link copied to clipboard

the z coordinate of the loc within the zone it is in, a value in range of 0 to 7 (inclusive) is expected. Any bits outside that are ignored.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open fun estimateSize(): Int
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String