Skip to main content
Version: 1.0.0

Class ServerRefIds

Namespace: OblivionMp.Sdk.Serverside
Assembly: OblivionMp.Sdk.Serverside.dll

Hands out ref ids for entities the server creates (dropped items, spawned npcs). The next one is kept on the World (ServerRefIdMark), which is saved in Global, so cells that are not loaded keep their ids.

public sealed class ServerRefIds

Inheritance​

object ← ServerRefIds

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors​

ServerRefIds(IEntities)​

Hands out ref ids for entities the server creates (dropped items, spawned npcs). The next one is kept on the World (ServerRefIdMark), which is saved in Global, so cells that are not loaded keep their ids.

public ServerRefIds(IEntities entities)

Parameters​

entities IEntities

Methods​

Next()​

Returns a ref id no other object in the session uses yet.

public uint Next()

Returns​

uint

Resume(uint, uint)​

The first id to hand out in a run. Public for the tests.

public static uint Resume(uint savedNext, uint liveFirstFree)

Parameters​

savedNext uint

liveFirstFree uint

Returns​

uint