Pathfinder 1e for Foundry VTT
    Preparing search index...

    Class CurrencyTransfer

    Hierarchy

    • HandlebarsApplication<this> & ApplicationV2<
          RenderContext,
          Configuration,
          RenderOptions,
          this,
      >
      • CurrencyTransfer
    Index

    Properties

    constructor: typeof CurrencyTransfer
    dest: {}
    source: {}

    Accessors

    • get promise(): Promise<any>

      Returns Promise<any>

    • get order(): ("gp" | "cp" | "pp" | "sp")[]

      Order of coin types, descending in value

      Returns ("gp" | "cp" | "pp" | "sp")[]

    Methods

    • Protected

      Commit Send

      Parameters

      • this: CurrencyTransfer
      • event: SubmitEvent
      • form: HTMLFormElement
      • formData: FormDataExtended

      Returns void

    • Internal Alpha

      Parameters

      • event: DragEvent

        Drag event

      • dropData: object

        Drop data

      • target: Actor<"base" | ModuleSubType> | Item<"base" | ModuleSubType>

        Target document

      Returns Promise<void>

    • Error message handler

      Parameters

      • i18nKey: string

      Returns undefined

    • Protected

      Send All

      Parameters

      Returns void

    • Protected

      Send None

      Parameters

      Returns void

    • Convert totalAmount to object

      Parameters

      • limit: object

        currency object containing max number of coins. Falsey values will assume infinity

      • totalAmount: number | object

        currency as gold pieces. If provided as a currency object, will convert to gold

      Returns boolean | object

      false if failed, currency object containing new amounts on conversion success

    • Transfer an amount of currency to a valid document

      Parameters

      • sourceDoc: Document

        ActorPF or ItemPF with currency

      • destDoc: Document

        ActorPF or ItemPF with currency

      • amount: number | object

        currency object containing transferred amount. Undefined keys will be assumed to be zero. Providing just a number will assume just gold

      • sourceAlt: boolean = false

        Use alt currency on source

      • destAlt: boolean = false

        Use alt currency on destination

      • OptionalallowConversion: number = false

        Attempts to make change with sourceDoc's currency limit

      Returns Promise<boolean | object>

      false if failed, object containing amount transferred on success

    • Initialize transfer and wait for it to finish

      Parameters

      • source: any
      • dest: any
      • options: any

      Returns Promise<void>