Skip to content

deductActorCurrency doesn't look at higher currencies if lower currencies partially fulfill request #6627

Description

@xthesaintx

deductActorCurrency fails to deduct currency when there are insufficient funds from lower denominations, even if higher denominations exist.

ie.
This will fail:
Player: 1pp 0gp 0sp 0cp
dnd5e.applications.CurrencyManager.deductActorCurrency(a, 1, "gp")

But cascading down works:
Player: 0pp 0gp 10sp 0cp
dnd5e.applications.CurrencyManager.deductActorCurrency(a, 1, "gp")

-- update --

It actually does seem to work with whole numbers, but doesn't work with remainders.

ie if I have 1pp I can deduct 10gp sucessfully, but not 1gp

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions