ZoneIndexStorage

class ZoneIndexStorage(maxKeyCount: Int)

A dictionary based implementation allowing one to store npc indices within zones.

Parameters

maxKeyCount

the maximum number of keys that will be stored in the map. This value must be a power of two (e.g. 2048, 65536).

Constructors

Link copied to clipboard
constructor(maxKeyCount: Int)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun add(entityIndex: Int, coordGrid: CoordGrid)

Adds the entityIndex to the zone that contains the coordGrid coord.

Link copied to clipboard
fun get(level: Int, zoneX: Int, zoneZ: Int): ShortArray?

Gets the array of indices at the provided zone coordinate (not to be confused with coord grids).

Link copied to clipboard
fun remove(entityIndex: Int, coordGrid: CoordGrid)

Removes the entityIndex at the zone located at coordGrid.