accept

open override fun accept(writableBytes: Int, constantFlag: Int, remainingAvatars: Int, previouslyObserved: Boolean): Boolean

Whether to accept writing the extended info blocks for the next avatar.

Parameters

writableBytes

the amount of bytes that can still be written into the buffer before reaching its absolute capacity. 1 byte of space is required as a minimum per each remainingAvatars.

constantFlag

the bitpacked flag of all the extended info blocks flagged for this avatar. This function utilizes the constant flags found in net.rsprot.protocol.game.outgoing.info.playerinfo.PlayerAvatarExtendedInfo, rather than the client-specific variants.

remainingAvatars

the number of avatars for whom we need to still write extended info blocks. This includes the current avatar on whom we are checking the accept function. Per each avatar, at least one byte must be writable.

previouslyObserved

whether the protocol has previously observed this avatar. This is done by checking if our appearance cache has previously tracked an avatar by that index. While the exact acceptation mechanics are unknown, in times of high pressure, OldSchool RuneScape seems to always send extended info about the avatars whom you've already observed in the past. However, it is very strict with whom it newly accepts, often only rendering 16 or 32 players when there's high resolution information sent about a thousand of them.