Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Updater

A static class used to download the latest game assets and packet ids.

Hierarchy

  • Updater

Index

Methods

Static areAssetsOutdated

  • areAssetsOutdated(localVersion: string): Promise<boolean>
  • Checks if the remote asset version matches the local asset version.

    Parameters

    • localVersion: string

      The local version of the asset.

    Returns Promise<boolean>

    true if the localVersion does not match the remote version,

Static extractPacketInfo

  • extractPacketInfo(source: string): PacketIdMap
  • Extracts the packet information from the given source.

    Parameters

    • source: string

      The text containing the packet ids to extract.

    Returns PacketIdMap

Static getClient

  • getClient(version: string, stream?: WriteStream): Promise<Buffer>
  • Downloads the latest client.swf into a buffer.

    Parameters

    • version: string
    • Optional stream: WriteStream

    Returns Promise<Buffer>

Static getGroundTypes

  • getGroundTypes(stream?: WriteStream): Promise<Buffer>
  • Downdloads the latest GroundTypes.json into a buffer.

    Parameters

    • Optional stream: WriteStream

    Returns Promise<Buffer>

Static getObjects

  • getObjects(stream?: WriteStream): Promise<Buffer>
  • Downloads the latest Objects.json into a buffer.

    Parameters

    • Optional stream: WriteStream

    Returns Promise<Buffer>

Static getRemoteAssetVersion

  • getRemoteAssetVersion(): Promise<string>

Static getRemoteClientVersion

  • getRemoteClientVersion(): Promise<string>

Static getRemoteVersions

Static isClientOutdated

  • isClientOutdated(localVersion: string): Promise<boolean>
  • Checks if the remote client version matches the local client version.

    Parameters

    • localVersion: string

      The local version of the client.

    Returns Promise<boolean>

    true if the localVersion does not match the remote version,

Static makeGSCPath

  • makeGSCPath(base: string): string
  • Creates a path from the base path to the GameServerConnection.as file.

    Parameters

    • base: string

      The parent dir which contains the decompiled client source.

    Returns string

Static unpackSwf

  • unpackSwf(swfPath: string): Promise<string>
  • Unpacks the client. Returns the path which the client was unpacked into.

    Parameters

    • swfPath: string

      The path to the swf file to unpack. E.g. C:\\clients\\latest-client.swf.

    Returns Promise<string>

Generated using TypeDoc