Package-level declarations

Types

Link copied to clipboard

A supplier for NPC info protocol to get around a circular dependency. Rather than re-design a significant portion of the classes around NPC info (and deal with backporting differences to previous revisions), it's easier to just use a supplier to get around the fact.

Link copied to clipboard

The npc avatar class represents an NPC as shown by the client. This class contains all the properties necessary to put a NPC into high resolution.

Link copied to clipboard

An exception handler for npc avatar processing. This is necessary as we might run into hiccups during computations of a specific npc, in which case we need to propagate the exceptions to the server, which will ideally remove said npcs from the world as a result of it.

Link copied to clipboard
class NpcAvatarExtendedInfo(avatarIndex: Int, filter: ExtendedInfoFilter, extendedInfoWriters: List<NpcAvatarExtendedInfoWriter>, allocator: ByteBufAllocator, huffmanCodec: HuffmanCodecProvider)

Npc avatar extended info is a data structure used to keep track of all the extended info properties of the given avatar.

Link copied to clipboard
class NpcAvatarExtendedInfoBlocks(writers: NpcExtendedInfoWriters)

A data structure to bring all the extended info blocks together, so the information can be passed onto various client-specific encoders.

Link copied to clipboard
class NpcAvatarFactory(allocator: ByteBufAllocator, extendedInfoFilter: ExtendedInfoFilter, extendedInfoWriter: List<NpcAvatarExtendedInfoWriter>, huffmanCodec: HuffmanCodecProvider, zoneIndexStorage: ZoneIndexStorage, npcInfoProtocolSupplier: DeferredNpcInfoProtocolSupplier)

NPC avatar factor is responsible for allocating new avatars for NPCs, or, if possible, re-using old ones that are no longer in use, to avoid generating mass amounts of garbage.

Link copied to clipboard

A class that allows us to check which players are currently observing each NPC. Servers sometimes rely on checking the players that currently observe a NPC when determining things like aggression. This implementation makes migrating to RSProt easier.

Link copied to clipboard

An implementation of the npc info packet. This class is responsible for bringing together all the bits of the npc info protocol, including copying all the pre-built buffers that were made beforehand.

Link copied to clipboard
Link copied to clipboard
class NpcInfoLargeV5(buffer: ByteBuf) : DefaultByteBufHolder, OutgoingGameMessage, ConsumableMessage

A large npc info wrapper packet, used to wrap the pre-built buffer from the npc info class.

Link copied to clipboard
class NpcInfoProtocol(allocator: ByteBufAllocator, resolutionChangeEncoders: ClientTypeMap<NpcResolutionChangeEncoder>, avatarFactory: NpcAvatarFactory, exceptionHandler: NpcAvatarExceptionHandler, worker: ProtocolWorker = DefaultProtocolWorker(), zoneIndexStorage: ZoneIndexStorage)

NPC info protocol is the root class bringing everything together about NPC info.

Link copied to clipboard
Link copied to clipboard
class NpcInfoSmallV5(buffer: ByteBuf) : DefaultByteBufHolder, OutgoingGameMessage, ConsumableMessage

A small npc info wrapper packet, used to wrap the pre-built buffer from the npc info class.

Link copied to clipboard
class SetNpcUpdateOrigin : OutgoingGameMessage

The set npc update origin packet is used to set the relative coordinate for npc info packet. As of revision 222, with the introduction of world entities, it is no longer viable to solely rely on the local player's coordinate, as it may be impacted by a specific world entity. As such, npc info updates should now be prefaced with the origin update to mark the relative coord. For no-world-entity use cases, just pass the player's coordinate in the current build area to get the old behavior.