跳转到正文

combat_observations API ​

完整接口目录 · 观察流用法 · 工具包下载

模块说明 ​

text
Observed combat signals, never an assertion of complete combat coverage.

Feed every event from one OriginalPackets stream in order, including Text and
identity updates. Create a new projection on reconnect; it never reconnects or
retries. Times are caller supplied monotonic consumer timestamps, not server time.

CombatObservations ​

python
class CombatObservations

CombatObservations.packet_ids ​

python
packet_ids = (19, 27, 29, 44)

CombatObservations.__init__ ​

python
def __init__(self, snapshot)

CombatObservations.close ​

python
def close(self)

SDK 说明:

text
Invalidate on stream error, revocation, loss, normal close or shutdown.

CombatObservations.apply ​

python
def apply(self, event, *, epoch, received_at)

SDK 说明:

text
Return zero or more directly observed signals; malformed input seals it.

Identical packet contents at different sequence numbers are distinct
observations. Replay/gaps are rejected rather than silently deduplicated.
An unknown/ambiguous player identity produces no attributed signal.

CombatObservations.players ​

python
self.players

公开实例属性,在 __init__ 中设置。

Neomega · 使用、开发与参考文档