ObjAdd

class ObjAdd : ZoneProt

Obj add packets are used to spawn an obj on the ground.

Ownership table:

| Id | Ownership Type |
|----|:--------------:|
| 0 | None |
| 1 | Self Player |
| 2 | Other Player |
| 3 | Group Ironman |

Constructors

Link copied to clipboard
constructor(id: Int, quantity: Int, xInZone: Int, zInZone: Int, opFlags: Byte, timeUntilPublic: Int, timeUntilDespawn: Int, ownershipType: Int, neverBecomesPublic: Boolean)
constructor(id: Int, quantity: Int, xInZone: Int, zInZone: Int, opFlags: Byte)

A helper constructor for the JVM-based clients, as these clients do not utilize the timeUntilPublic, timeUntilDespawn, ownershipType and neverBecomesPublic properties.

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 obj config

Link copied to clipboard

whether the item turns public in the future. This property is only used on the c++-based clients.

Link copied to clipboard

the right-click options enabled on this obj. 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

the type of ownership of this obj (see table above). This property is only used on the C++-based clients.

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

the quantity of the obj to be spawned

Link copied to clipboard

how many game cycles until the obj disappears. This property is only used on the C++-based clients.

Link copied to clipboard

how many game cycles until the obj turns public. This property is only used on the C++-based clients.

Link copied to clipboard

the x coordinate of the obj 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 obj 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