BeanCounter
public interface MoneyLibrary extends CMLibrary
Modifier and Type | Interface | Description |
---|---|---|
static interface |
MoneyLibrary.DebtItem |
Interface for an object referencing a debt
from one to another, denominated in base
currency, and carrying a due date and interest rate.
|
static interface |
MoneyLibrary.MoneyDefinition |
Interface for an object referencing an entire
currency system, including all of its denominations.
|
static interface |
MoneyLibrary.MoneyDenomination |
Interface for an object referencing a single
denomination of a specific currency.
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
abbreviatedPrice(MOB shopkeeper,
double absoluteAmount) |
Given a mob to get a currency from and a total money value, this
will return a very brief representation of the money in a single
denomination of the currency that best matches.
|
java.lang.String |
abbreviatedPrice(java.lang.String currency,
double absoluteAmount) |
Given a currency and a total money value, this will return a very
brief representation of the money in a single denomination of the
currency that best matches.
|
double |
abbreviatedRePrice(MOB shopkeeper,
double absoluteAmount) |
Given a mob to get a currency from and a total money value, this
will return final value of the given value after finding a single
denomination of the currency that best matches.
|
double |
abbreviatedRePrice(java.lang.String currency,
double absoluteAmount) |
Given a currency and a total money value, this will return the
final value of the given value after finding a single denomination
of the currency that best matches.
|
void |
addMoney(ItemCollection IP,
double deltaValue) |
Adds the given amount of money to the given holders items in their native currency.
|
void |
addMoney(ItemCollection IP,
int deltaValue) |
Adds the given amount of money to the given holders items in their native currency.
|
void |
addMoney(ItemCollection IP,
Container container,
java.lang.String currency,
double deltaValue) |
Adds the given amount of money, in the given currency, to the given holders items,
in the given container.
|
void |
addMoney(ItemCollection IP,
Container container,
java.lang.String currency,
int deltaValue) |
Adds the given amount of money, in the given currency, to the given holders items,
in the given container.
|
void |
addMoney(ItemCollection IP,
java.lang.String currency,
double deltaValue) |
Adds the given amount of money, in the given currency, to the given holders items.
|
void |
addMoney(ItemCollection IP,
java.lang.String currency,
int deltaValue) |
Adds the given amount of money, in the given currency, to the given holders items.
|
void |
addToBankLedger(java.lang.String bankName,
java.lang.String owner,
java.lang.String explanation) |
Adds a new record to the bank account ledger, which is an accounting of deposits
and withdrawls.
|
void |
adjustDebt(java.lang.String name,
java.lang.String owedTo,
double adjustAmt,
java.lang.String reason,
double interest,
long due) |
Adds or alters a debt record between the given debtor,
and lender.
|
void |
clearInventoryMoney(MOB mob,
java.lang.String currency) |
Removes all item money from the given mob, of
the given currency.
|
void |
clearZeroMoney(MOB mob,
java.lang.String currency) |
Removes all money from the given mob, item and
npc numeric of the given currency.
|
MoneyLibrary.MoneyDefinition |
createCurrencySet(java.lang.String currency) |
Creates and registers a new currency definition.
|
void |
delAllDebt(java.lang.String name,
java.lang.String owedTo) |
Deletes a particular debt record.
|
void |
dropMoney(Room R,
Container container,
java.lang.String currency,
double absoluteValue) |
Adds the amount of money items to the given room, in the given container, of the
given currency, and the given total absolute value.
|
java.util.List<java.lang.String> |
getAllCurrencies() |
Returns the list of all known currency names.
|
java.util.Set<java.lang.String> |
getBankAccountChains(java.lang.String owner) |
Returns the set of all bank chains that have accounts for the
given bank account owner.
|
Pair<java.lang.String,java.lang.Double> |
getBankBalance(java.lang.String bankName,
java.lang.String owner,
java.lang.String optionalCurrency) |
For the given bank chain and given bank account owner name, and optionally a
currency, this will return the found currency and bank balance.
|
java.lang.String |
getBankChainCurrency(java.lang.String bankChain) |
Given a bank chain, which may deal in many currencies due to having
branches in many areas, this method will return the chains most
popular currency.
|
double |
getBestDenomination(java.lang.String currency,
double absoluteValue) |
Given a currency and a total money value in that currency, this will return
the denomination which will most evenly divide into the given value.
|
double |
getBestDenomination(java.lang.String currency,
int numberOfCoins,
double absoluteValue) |
Given a currency, a total money value, and a number of currency coins, this
will find the denomination that is closest to the total money value in that
given number of coins
|
double[] |
getBestDenominations(java.lang.String currency,
double absoluteValue) |
Given a currency and a total money value in that currency, this will return
the denominations whose combination will produce the total value evenly.
|
java.lang.String |
getConvertableDescription(java.lang.String currency,
double denomination) |
Given a currency, returns the string "Equal to" followed by the conversion
of the given duration into the lowest denomination in the currency.
|
java.lang.String |
getCurrency(CMObject E) |
Returns the currency code/name most applicable to the given object.
|
MoneyLibrary.MoneyDefinition |
getCurrencySet(java.lang.String currency) |
Returns the official MoneyDefinition object for the
given currency.
|
java.util.List<MoneyLibrary.DebtItem> |
getDebt(java.lang.String name) |
Returns all debt records owed by the given debtor.
|
java.util.List<MoneyLibrary.DebtItem> |
getDebt(java.lang.String name,
java.lang.String owedTo) |
Returns all debt records between the given debtor and
the given lender.
|
java.util.List<MoneyLibrary.DebtItem> |
getDebtOwed(java.lang.String owedTo) |
Returns all debt records owed to the given lender.
|
double |
getDebtOwed(java.lang.String name,
java.lang.String owedTo) |
Returns total debt amount owed between the given debtor and
the given lender.
|
MoneyLibrary.MoneyDenomination |
getDenomination(java.lang.String currency,
java.lang.String name) |
Returns the denomination of the given currency and given
abbreviation or name.
|
int |
getDenominationIndex(java.lang.String currency,
double value) |
Returns the ordinal index of the given denomination value in the
given currency definitions list of denominations.
|
java.lang.String |
getDenominationName(MOB mob,
double denomination) |
Returns the name of the denomination that matches the given mobs
currency, and the given denomination value
|
java.lang.String |
getDenominationName(java.lang.String currency) |
Returns the name of the lowest denomination in the given currency.
|
java.lang.String |
getDenominationName(java.lang.String currency,
double denomination) |
Returns the name of the denomination that matches the given
currency and the given denomination value.
|
java.lang.String |
getDenominationName(java.lang.String currency,
double denomination,
long number) |
Returns the amount and name of the denomination that matches the given
currency and the given denomination value, in the given amount.
|
java.util.List<java.lang.String> |
getDenominationNameSet(java.lang.String currency) |
Returns the names of all the denominations in the given currency.
|
java.lang.String |
getDenominationShortCode(java.lang.String currency,
double denomination) |
Given a currency and a denomination value, this will return the short
code/char of the denomination.
|
double |
getLowestDenomination(java.lang.String currency) |
Returns the value of the lowest denomination in the given
currency.
|
int |
getMoney(MOB mob) |
If the given mob/room is an npc with native parameter-value
money set, this will return that value.
|
java.util.List<Coins> |
getMoneyItems(ItemCollection IP,
Item container,
java.lang.String currency) |
Scans the given mob/room and returns any money items in the given
currency and given container.
|
java.util.List<Coins> |
getMoneyItems(ItemCollection IP,
java.lang.String currency) |
/**
Scans the given mob and returns any money items in the given
currency and NOT in a container.
|
long |
getNumberOfCoins(MOB mob,
java.lang.String currency,
double denomination) |
Returns the number of coins that the given mob has in the given currency
and the given denomination.
|
double |
getTotalAbsoluteNativeValue(MOB mob) |
Returns the accumulated total value of the money on the given
mob, in that mobs native currency.
|
double |
getTotalAbsoluteShopKeepersValue(MOB mob,
MOB shopkeeper) |
Returns the accumulated total value of the money on the given
mob, in the given shopkeepers native currency.
|
double |
getTotalAbsoluteValue(ItemCollection IP,
Item container,
java.lang.String currency) |
Returns the accumulated total value of the money of the given
currency, in the given container, on the given mob/room.
|
double |
getTotalAbsoluteValue(ItemCollection IP,
java.lang.String currency) |
Returns the accumulated total value of the money of the given
currency, on the given mob/room.
|
double |
getTotalAbsoluteValueAllCurrencies(ItemCollection IP) |
Returns the accumulated total value of the money on the given
holder, counting all currencies.
|
void |
giveSomeoneMoney(MOB recipient,
double absoluteValue) |
Generates a visible message of the given recipient receiving the given amount
of money in their native currency from themselves.
|
void |
giveSomeoneMoney(MOB banker,
MOB customer,
double absoluteValue) |
Generates a visible message of the given recipient receiving the given amount
of money in the banker's currency from the given banker/giver.
|
void |
giveSomeoneMoney(MOB banker,
MOB customer,
java.lang.String currency,
double absoluteValue) |
Generates a visible message of the given recipient receiving the given amount
of money in the given currency from the given banker/giver.
|
void |
giveSomeoneMoney(MOB recipient,
java.lang.String currency,
double absoluteValue) |
Generates a visible message of the given recipient receiving the given amount
of money in the given currency from themselves.
|
boolean |
isCurrencyMatch(java.lang.String curr1,
java.lang.String curr2) |
Because a currency code could include an entire definition, or maybe
just the name/code itself, this method exists to resolve those
differences and compare just the codes
|
double |
lowestAbbreviatedDenomination(java.lang.String currency) |
Returns the lowest denomination in the given currency that
has an abbreviation char/code.
|
double |
lowestAbbreviatedDenomination(java.lang.String currency,
double absoluteAmount) |
Given a currency type and an absolute value, this will return the lowest
denomination that best divides into the given absolute amount AND which
has a abbreviation char/code.
|
java.util.List<Coins> |
makeAllCurrency(java.lang.String currency,
double absoluteValue) |
This great workhorse generates the individual denomination coins necessary
to properly represent the given absolute value in the given currency.
|
Coins |
makeBestCurrency(MOB mob,
double absoluteValue) |
Given a mob to derive a currency from, this will find the denomination
in that currency which is capable to generating a stack of money closest
to the given value.
|
Coins |
makeBestCurrency(MOB mob,
double absoluteValue,
ItemCollection owner,
Container container) |
Given a mob to derive a currency from, this will find the denomination
in that currency which is capable to generating a stack of money closest
to the given value.
|
Coins |
makeBestCurrency(java.lang.String currency,
double absoluteValue) |
Given a currency type, this will find the denomination in that currency which
is capable to generating a stack of money closest to the given value.
|
Coins |
makeBestCurrency(java.lang.String currency,
double absoluteValue,
ItemCollection owner,
Container container) |
Given a currency type, this will find the denomination in that currency which
is capable to generating a stack of money closest to the given value.
|
Coins |
makeCurrency(java.lang.String currency,
double denomination,
long numberOfCoins) |
Generates an individual currency item of the given type, denomination, and
number, as an item stack of currency item.
|
boolean |
modifyBankGold(java.lang.String bankName,
java.lang.String owner,
java.lang.String explanation,
java.lang.String currency,
double deltaAmount) |
Modifies the amount of money in the bank account of the given
account name owner and the given bank name.
|
boolean |
modifyLocalBankGold(Area A,
java.lang.String owner,
java.lang.String explanation,
double deltaAmount) |
Starting with the given area, and proceeding to parent areas,
this will attempt to alter the amount of money in any bank chains
account associated with the given account name owner.
|
boolean |
modifyThisAreaBankGold(Area A,
java.util.Set<java.lang.String> triedBanks,
java.lang.String owner,
java.lang.String explanation,
double deltaAmount) |
Loops through all bank chains in the given area and attempts to
find an account for the given account name owner and modify the
amount of money in the bank account.
|
java.lang.String |
nameCurrencyLong(MOB mob,
double absoluteValue) |
Given a mob whose currency to use, this will split the given
amount of value into denominations of that currency and
return a string with the number and denoms, comma delimited,
necessary to produce the value.
|
java.lang.String |
nameCurrencyLong(MOB mob,
int absoluteValue) |
Given a mob whose currency to use, this will split the given
amount of value into denominations of that currency and
return a string with the number and denoms, comma delimited,
necessary to produce the value.
|
java.lang.String |
nameCurrencyLong(java.lang.String currency,
double absoluteValue) |
Given a currency, this will split the given amount of value into
denominations and return a string with the number and denoms,
comma delimited, necessary to produce the value.
|
java.lang.String |
nameCurrencyShort(MOB mob,
double absoluteValue) |
Given a mob to get a currency, this will determine the denomination in
that currency closest to the given total value, and return a string
denoting that denomination and the amount, in x.xx form, of that
denomination.
|
java.lang.String |
nameCurrencyShort(MOB mob,
int absoluteValue) |
Given a mob to get a currency, this will determine the denomination in
that currency closest to the given total value, and return a string
denoting that denomination and the amount, in x.xx form, of that
denomination.
|
java.lang.String |
nameCurrencyShort(java.lang.String currency,
double absoluteValue) |
Given a particular currency, this will determine the denomination in
that currency closest to the given total value, and return a string
denoting that denomination and the amount, in x.xx form, of that
denomination.
|
boolean |
putCoinsBack(Coins C,
ItemCollection coll) |
When a Coins item is dropped into a new collection,
this method will seek out a similar denominated pile
and update it, thus destroying the given coins, and
return true, otherwise it does nothing and returns false.
|
void |
removeMoney(Room R,
Container container,
java.lang.String currency,
double absoluteValue) |
Removes the amount of money items from the given room, in the given container, of the
given currency, and the given total absolute value.
|
void |
setMoney(MOB mob,
double absoluteAmount) |
Sets the total amount of money the given mob has in their native
currency to the given absolute value.
|
void |
setMoney(MOB mob,
int amount) |
Called only on npcs saved to the database, and primarily for legacy
use, this method destroys any money items and sets the npc money
property to the given absolute value.
|
void |
setMoney(MOB mob,
java.lang.String currency,
double absoluteAmount) |
Sets the total amount of money the given mob has in the given
currency to the given absolute value.
|
void |
subtractMoney(ItemCollection IP,
double positiveDeltaAmount) |
Removes the given total amount of money from the given mob/room.
|
void |
subtractMoney(ItemCollection IP,
double denomination,
double positiveDeltaAmount) |
Removes the given total amount of money from the given IP, in their native
currency and the given denomination of that currency.
|
void |
subtractMoney(ItemCollection IP,
Container container,
java.lang.String currency,
double positiveDeltaAmount) |
Removes the given total amount of money from the given IP, in the given
currency and the given container of that currency.
|
void |
subtractMoney(ItemCollection IP,
java.lang.String currency,
double positiveDeltaAmount) |
Removes the given total amount of money from the given IP, in the given
currency.
|
void |
subtractMoney(ItemCollection IP,
java.lang.String currency,
double denomination,
double positiveDeltaAmount) |
Removes the given total amount of money from the given IP, in the given
currency and the given denomination of that currency.
|
void |
subtractMoneyGiveChange(MOB banker,
MOB mob,
double positiveDeltaAmount) |
This strange method takes away all the money from the given mob, of the bankers
native currency, and then has the given banker hand money back to the mob equal
to the total money minus the given amount.
|
void |
subtractMoneyGiveChange(MOB banker,
MOB mob,
int positiveDeltaAmount) |
This strange method takes away all the money from the given mob, of the bankers
native currency, and then has the given banker hand money back to the mob equal
to the total money minus the given amount.
|
void |
subtractMoneyGiveChange(MOB banker,
MOB mob,
java.lang.String currency,
double positiveDeltaAmount) |
This strange method takes away all the money from the given mob, of the given
currency, and then has the given banker hand money back to the mob equal to the
total money minus the given amount.
|
void |
unloadCurrencySet(java.lang.String currency) |
Unregisters the given currency
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
void unloadCurrencySet(java.lang.String currency)
currency
- the currency to killMoneyLibrary.MoneyDefinition createCurrencySet(java.lang.String currency)
currency
- the encoded currency definitionMoneyLibrary.MoneyDefinition getCurrencySet(java.lang.String currency)
currency
- the currencyjava.util.List<java.lang.String> getAllCurrencies()
double abbreviatedRePrice(MOB shopkeeper, double absoluteAmount)
shopkeeper
- the mob to get a currency from to useabsoluteAmount
- the total amount of value to uselowestAbbreviatedDenomination(String, double)
,
abbreviatedPrice(MOB, double)
,
abbreviatedPrice(String, double)
,
abbreviatedRePrice(MOB, double)
,
abbreviatedRePrice(String, double)
double abbreviatedRePrice(java.lang.String currency, double absoluteAmount)
currency
- the currency to useabsoluteAmount
- the total amount of value to uselowestAbbreviatedDenomination(String, double)
,
abbreviatedPrice(MOB, double)
,
abbreviatedPrice(String, double)
,
abbreviatedRePrice(MOB, double)
,
abbreviatedRePrice(String, double)
java.lang.String abbreviatedPrice(MOB shopkeeper, double absoluteAmount)
shopkeeper
- the mob to get a currency from to useabsoluteAmount
- the total amount of value to namelowestAbbreviatedDenomination(String, double)
,
abbreviatedPrice(MOB, double)
,
abbreviatedPrice(String, double)
,
abbreviatedRePrice(MOB, double)
,
abbreviatedRePrice(String, double)
java.lang.String abbreviatedPrice(java.lang.String currency, double absoluteAmount)
currency
- the currency to useabsoluteAmount
- the total amount of value to namelowestAbbreviatedDenomination(String, double)
,
abbreviatedPrice(MOB, double)
,
abbreviatedPrice(String, double)
,
abbreviatedRePrice(MOB, double)
,
abbreviatedRePrice(String, double)
int getDenominationIndex(java.lang.String currency, double value)
currency
- the currency to usevalue
- the denomination valuejava.util.List<java.lang.String> getDenominationNameSet(java.lang.String currency)
currency
- the currency to get denominations fordouble getLowestDenomination(java.lang.String currency)
currency
- the currency to uselowestAbbreviatedDenomination(String, double)
,
lowestAbbreviatedDenomination(String)
double lowestAbbreviatedDenomination(java.lang.String currency)
currency
- the currency to find a denomination forlowestAbbreviatedDenomination(String, double)
,
getLowestDenomination(String)
MoneyLibrary.MoneyDenomination getDenomination(java.lang.String currency, java.lang.String name)
currency
- the currencyname
- the abbreviation or namedouble lowestAbbreviatedDenomination(java.lang.String currency, double absoluteAmount)
currency
- the currency typeabsoluteAmount
- the total amount to divide intolowestAbbreviatedDenomination(String)
,
getLowestDenomination(String)
,
getDenominationName(String)
java.lang.String getDenominationShortCode(java.lang.String currency, double denomination)
currency
- the currency to usedenomination
- the denomination valuegetDenominationName(String, double)
java.lang.String getDenominationName(java.lang.String currency)
currency
- the currency to usegetDenominationName(String, double, long)
,
getDenominationName(String, double)
,
getDenominationName(MOB, double)
,
getLowestDenomination(String)
java.lang.String getDenominationName(java.lang.String currency, double denomination, long number)
currency
- the currency type to usedenomination
- the denomination value to matchnumber
- the amount of the denomination to namegetDenominationName(String)
,
getDenominationName(String, double)
,
getDenominationName(MOB, double)
java.lang.String getDenominationName(java.lang.String currency, double denomination)
currency
- the currency type to usedenomination
- the denomination value to matchgetDenominationName(String)
,
getDenominationName(String, double, long)
,
getDenominationName(MOB, double)
,
getDenominationShortCode(String, double)
java.lang.String getDenominationName(MOB mob, double denomination)
mob
- the mob to get a currency fromdenomination
- the denomination value to matchgetDenominationName(String)
,
getDenominationName(String, double, long)
,
getDenominationName(String, double)
double getBestDenomination(java.lang.String currency, double absoluteValue)
currency
- the currency to get denominations fromabsoluteValue
- the total value to parse outgetBestDenomination(String, int, double)
,
getBestDenominations(String, double)
double getBestDenomination(java.lang.String currency, int numberOfCoins, double absoluteValue)
currency
- the currency to usenumberOfCoins
- the number of coins that MUST be usedabsoluteValue
- the total value to get cloest togetBestDenomination(String, double)
,
getBestDenominations(String, double)
double[] getBestDenominations(java.lang.String currency, double absoluteValue)
currency
- the currency to get denominations fromabsoluteValue
- the total value to parse outgetBestDenomination(String, double)
,
getBestDenomination(String, int, double)
java.lang.String getConvertableDescription(java.lang.String currency, double denomination)
currency
- the currency to get a conversion fordenomination
- the denomination to get a conversion to lowest forjava.lang.String nameCurrencyShort(MOB mob, double absoluteValue)
mob
- the mob from whom to get a currency to useabsoluteValue
- the total value to shownameCurrencyLong(String, double)
,
nameCurrencyShort(String, double)
,
nameCurrencyShort(MOB, int)
java.lang.String nameCurrencyShort(MOB mob, int absoluteValue)
mob
- the mob from which to get the currency to useabsoluteValue
- the total value to shownameCurrencyLong(String, double)
,
nameCurrencyShort(String, double)
,
nameCurrencyShort(MOB, double)
java.lang.String nameCurrencyShort(java.lang.String currency, double absoluteValue)
currency
- the currency to useabsoluteValue
- the total value to shownameCurrencyLong(String, double)
,
nameCurrencyShort(MOB, double)
,
nameCurrencyShort(MOB, int)
java.lang.String nameCurrencyLong(MOB mob, double absoluteValue)
mob
- the mob whose currency to useabsoluteValue
- the total value of the moneynameCurrencyLong(MOB, int)
,
nameCurrencyLong(String, double)
,
nameCurrencyShort(String, double)
java.lang.String nameCurrencyLong(MOB mob, int absoluteValue)
mob
- the mob whose currency to useabsoluteValue
- the total value of the moneynameCurrencyLong(MOB, double)
,
nameCurrencyLong(String, double)
,
nameCurrencyShort(String, double)
java.lang.String nameCurrencyLong(java.lang.String currency, double absoluteValue)
currency
- the currency to useabsoluteValue
- the total value of the moneynameCurrencyLong(MOB, double)
,
nameCurrencyLong(MOB, int)
,
nameCurrencyShort(String, double)
Coins makeBestCurrency(MOB mob, double absoluteValue, ItemCollection owner, Container container)
mob
- the mob from whom to get a currency to useabsoluteValue
- the amount to approximateowner
- the new owner of the returned itemcontainer
- the container to put the item inmakeBestCurrency(MOB, double)
,
makeBestCurrency(String, double)
,
makeBestCurrency(String, double, ItemCollection, Container)
,
makeAllCurrency(String, double)
,
makeCurrency(String, double, long)
Coins makeBestCurrency(java.lang.String currency, double absoluteValue, ItemCollection owner, Container container)
currency
- the currency to useabsoluteValue
- the amount to approximateowner
- the new owner of the returned itemcontainer
- the container to put the item inmakeBestCurrency(MOB, double)
,
makeBestCurrency(String, double)
,
makeBestCurrency(MOB, double, ItemCollection, Container)
,
makeAllCurrency(String, double)
,
makeCurrency(String, double, long)
Coins makeBestCurrency(MOB mob, double absoluteValue)
mob
- the mob to get the native currency fromabsoluteValue
- the amount to approximatemakeBestCurrency(String, double)
,
makeBestCurrency(MOB, double, ItemCollection, Container)
,
makeBestCurrency(String, double, ItemCollection, Container)
,
makeAllCurrency(String, double)
,
makeCurrency(String, double, long)
Coins makeBestCurrency(java.lang.String currency, double absoluteValue)
currency
- the currency to useabsoluteValue
- the amount to approximatemakeBestCurrency(MOB, double)
,
makeBestCurrency(MOB, double, ItemCollection, Container)
,
makeBestCurrency(String, double, ItemCollection, Container)
,
makeAllCurrency(String, double)
,
makeCurrency(String, double, long)
Coins makeCurrency(java.lang.String currency, double denomination, long numberOfCoins)
currency
- the currency of the moneydenomination
- the denomination of that moneynumberOfCoins
- the number of coins of that denomination in the stackmakeAllCurrency(String, double)
,
makeBestCurrency(String, double)
java.util.List<Coins> makeAllCurrency(java.lang.String currency, double absoluteValue)
currency
- the currency to make the money inabsoluteValue
- the absolute value of all the money to make combinedmakeCurrency(String, double, long)
,
makeBestCurrency(String, double)
void addMoney(ItemCollection IP, int deltaValue)
IP
- the holder to have more moneydeltaValue
- the amount of total value to addaddMoney(ItemCollection, double)
,
addMoney(ItemCollection, String, double)
,
addMoney(ItemCollection, String, int)
,
addMoney(ItemCollection, Container, String, double)
,
addMoney(ItemCollection, Container, String, int)
void addMoney(ItemCollection IP, double deltaValue)
IP
- the mob to have more moneydeltaValue
- the amount of total value to addaddMoney(ItemCollection, int)
,
addMoney(ItemCollection, String, double)
,
addMoney(ItemCollection, String, int)
,
addMoney(ItemCollection, Container, String, double)
,
addMoney(ItemCollection, Container, String, int)
void addMoney(ItemCollection IP, java.lang.String currency, int deltaValue)
IP
- the mob to have more moneycurrency
- the currency of the money to makedeltaValue
- the amount of total value to addaddMoney(ItemCollection, double)
,
addMoney(ItemCollection, int)
,
addMoney(ItemCollection, String, double)
,
addMoney(ItemCollection, Container, String, double)
,
addMoney(ItemCollection, Container, String, int)
void addMoney(ItemCollection IP, java.lang.String currency, double deltaValue)
IP
- the mob to have more moneycurrency
- the currency of the money to makedeltaValue
- the amount of total value to addaddMoney(ItemCollection, double)
,
addMoney(ItemCollection, int)
,
addMoney(ItemCollection, String, int)
,
addMoney(ItemCollection, Container, String, double)
,
addMoney(ItemCollection, Container, String, int)
void addMoney(ItemCollection IP, Container container, java.lang.String currency, int deltaValue)
IP
- the mob to have more moneycontainer
- null, or the container to put the money incurrency
- the currency of the money to makedeltaValue
- the amount of total value to addaddMoney(ItemCollection, double)
,
addMoney(ItemCollection, int)
,
addMoney(ItemCollection, String, double)
,
addMoney(ItemCollection, String, int)
,
addMoney(ItemCollection, Container, String, double)
void addMoney(ItemCollection IP, Container container, java.lang.String currency, double deltaValue)
IP
- the mob to have more moneycontainer
- null, or the container to put the money incurrency
- the currency of the money to makedeltaValue
- the amount of total value to addaddMoney(ItemCollection, double)
,
addMoney(ItemCollection, int)
,
addMoney(ItemCollection, String, double)
,
addMoney(ItemCollection, String, int)
,
addMoney(ItemCollection, Container, String, int)
void giveSomeoneMoney(MOB recipient, double absoluteValue)
recipient
- the recipient of the moneyabsoluteValue
- the absolute amount of the money to givegiveSomeoneMoney(MOB, MOB, double)
,
giveSomeoneMoney(MOB, String, double)
,
giveSomeoneMoney(MOB, MOB, String, double)
void giveSomeoneMoney(MOB recipient, java.lang.String currency, double absoluteValue)
recipient
- the recipient of the moneycurrency
- the currency the money is inabsoluteValue
- the absolute amount of the money to givegiveSomeoneMoney(MOB, double)
,
giveSomeoneMoney(MOB, MOB, double)
,
giveSomeoneMoney(MOB, MOB, String, double)
void giveSomeoneMoney(MOB banker, MOB customer, double absoluteValue)
banker
- the giver of the moneycustomer
- the recipient of the moneyabsoluteValue
- the absolute amount of the money to givegiveSomeoneMoney(MOB, double)
,
giveSomeoneMoney(MOB, String, double)
,
giveSomeoneMoney(MOB, MOB, String, double)
void giveSomeoneMoney(MOB banker, MOB customer, java.lang.String currency, double absoluteValue)
banker
- the giver of the moneycustomer
- the recipient of the moneycurrency
- the currency the money is inabsoluteValue
- the absolute amount of the money to givegiveSomeoneMoney(MOB, double)
,
giveSomeoneMoney(MOB, MOB, double)
,
giveSomeoneMoney(MOB, String, double)
void addToBankLedger(java.lang.String bankName, java.lang.String owner, java.lang.String explanation)
bankName
- the bank chain nameowner
- the account owner name (a player usually)explanation
- a brief explanation of what happenedgetBankAccountChains(String)
,
getBankBalance(String, String, String)
,
modifyBankGold(String, String, String, String, double)
,
modifyThisAreaBankGold(Area, Set, String, String, double)
,
modifyLocalBankGold(Area, String, String, double)
,
getBankChainCurrency(String)
java.util.Set<java.lang.String> getBankAccountChains(java.lang.String owner)
owner
- the bank account owner, typically a playeraddToBankLedger(String, String, String)
,
getBankBalance(String, String, String)
,
modifyBankGold(String, String, String, String, double)
,
modifyThisAreaBankGold(Area, Set, String, String, double)
,
modifyLocalBankGold(Area, String, String, double)
,
getBankChainCurrency(String)
Pair<java.lang.String,java.lang.Double> getBankBalance(java.lang.String bankName, java.lang.String owner, java.lang.String optionalCurrency)
bankName
- the bank chain nameowner
- the account owner name (usually a player)optionalCurrency
- null, or a currency to ensure is returnedaddToBankLedger(String, String, String)
,
getBankAccountChains(String)
,
modifyBankGold(String, String, String, String, double)
,
modifyThisAreaBankGold(Area, Set, String, String, double)
,
modifyLocalBankGold(Area, String, String, double)
,
getBankChainCurrency(String)
boolean modifyBankGold(java.lang.String bankName, java.lang.String owner, java.lang.String explanation, java.lang.String currency, double deltaAmount)
bankName
- the name of the bank chainowner
- the account name (player) to alter money inexplanation
- the reason for the change, for the ledgercurrency
- the currency to usedeltaAmount
- an amount to change local money byaddToBankLedger(String, String, String)
,
getBankAccountChains(String)
,
getBankBalance(String, String, String)
,
modifyThisAreaBankGold(Area, Set, String, String, double)
,
modifyLocalBankGold(Area, String, String, double)
,
getBankChainCurrency(String)
boolean modifyThisAreaBankGold(Area A, java.util.Set<java.lang.String> triedBanks, java.lang.String owner, java.lang.String explanation, double deltaAmount)
A
- null or the area to find chains intriedBanks
- set of bank chains already tried (don't try again)owner
- the account name (player) to alter money inexplanation
- the reason for the change, for the ledgerdeltaAmount
- an amount to change local money byaddToBankLedger(String, String, String)
,
getBankAccountChains(String)
,
getBankBalance(String, String, String)
,
modifyBankGold(String, String, String, String, double)
,
modifyLocalBankGold(Area, String, String, double)
,
getBankChainCurrency(String)
boolean modifyLocalBankGold(Area A, java.lang.String owner, java.lang.String explanation, double deltaAmount)
A
- the area to start finding chains inowner
- the account name (player) to alter money inexplanation
- the reason for the change, for the ledgerdeltaAmount
- an amount to change local money byaddToBankLedger(String, String, String)
,
getBankAccountChains(String)
,
getBankBalance(String, String, String)
,
modifyBankGold(String, String, String, String, double)
,
modifyThisAreaBankGold(Area, Set, String, String, double)
,
getBankChainCurrency(String)
java.lang.String getBankChainCurrency(java.lang.String bankChain)
bankChain
- the bank chain nameaddToBankLedger(String, String, String)
,
getBankAccountChains(String)
,
getBankBalance(String, String, String)
,
modifyBankGold(String, String, String, String, double)
,
modifyThisAreaBankGold(Area, Set, String, String, double)
,
modifyLocalBankGold(Area, String, String, double)
void subtractMoneyGiveChange(MOB banker, MOB mob, int positiveDeltaAmount)
banker
- the banker who gives changemob
- the mob losing their money, but maybe getting some backpositiveDeltaAmount
- the amount to NOT give backsubtractMoneyGiveChange(MOB, MOB, int)
,
subtractMoneyGiveChange(MOB, MOB, double)
,
subtractMoneyGiveChange(MOB, MOB, String, double)
void subtractMoneyGiveChange(MOB banker, MOB mob, double positiveDeltaAmount)
banker
- the banker who gives changemob
- the mob losing their money, but maybe getting some backpositiveDeltaAmount
- the amount to NOT give backsubtractMoneyGiveChange(MOB, MOB, int)
,
subtractMoneyGiveChange(MOB, MOB, double)
,
subtractMoneyGiveChange(MOB, MOB, String, double)
void subtractMoneyGiveChange(MOB banker, MOB mob, java.lang.String currency, double positiveDeltaAmount)
banker
- the banker who gives changemob
- the mob losing their money, but maybe getting some backcurrency
- the currency of the money to losepositiveDeltaAmount
- the amount to NOT give backsubtractMoneyGiveChange(MOB, MOB, int)
,
subtractMoneyGiveChange(MOB, MOB, double)
,
subtractMoneyGiveChange(MOB, MOB, String, double)
void subtractMoney(ItemCollection IP, double positiveDeltaAmount)
IP
- the mob/room/item holder losing moneypositiveDeltaAmount
- the total value to removesubtractMoney(ItemCollection, double, double)
,
subtractMoney(ItemCollection, String, double)
,
subtractMoney(ItemCollection, Container, String, double)
,
subtractMoney(ItemCollection, String, double, double)
void subtractMoney(ItemCollection IP, java.lang.String currency, double positiveDeltaAmount)
IP
- the mob/room/item holder losing moneycurrency
- the type of currency to removepositiveDeltaAmount
- the total value to removesubtractMoney(ItemCollection, double)
,
subtractMoney(ItemCollection, double, double)
,
subtractMoney(ItemCollection, Container, String, double)
,
subtractMoney(ItemCollection, String, double, double)
void subtractMoney(ItemCollection IP, Container container, java.lang.String currency, double positiveDeltaAmount)
IP
- the mob/room/item holder losing moneycontainer
- null, or the container with the money in itcurrency
- the type of currency to removepositiveDeltaAmount
- the total value to removesubtractMoney(ItemCollection, double)
,
subtractMoney(ItemCollection, double, double)
,
subtractMoney(ItemCollection, String, double)
,
subtractMoney(ItemCollection, String, double, double)
void subtractMoney(ItemCollection IP, double denomination, double positiveDeltaAmount)
IP
- the mob/room/item holder losing moneydenomination
- the denomination of the currency to removepositiveDeltaAmount
- the total value to removesubtractMoney(ItemCollection, double)
,
subtractMoney(ItemCollection, String, double)
,
subtractMoney(ItemCollection, Container, String, double)
,
subtractMoney(ItemCollection, String, double, double)
void subtractMoney(ItemCollection IP, java.lang.String currency, double denomination, double positiveDeltaAmount)
IP
- the mob/room/item holder losing moneycurrency
- the type of currency to removedenomination
- the denomination of the currency to removepositiveDeltaAmount
- the total value to removesubtractMoney(ItemCollection, double)
,
subtractMoney(ItemCollection, double, double)
,
subtractMoney(ItemCollection, String, double)
,
subtractMoney(ItemCollection, Container, String, double)
boolean putCoinsBack(Coins C, ItemCollection coll)
C
- the coins already droppedcoll
- the collection that might have a dupint getMoney(MOB mob)
mob
- the mob whose money to getvoid setMoney(MOB mob, double absoluteAmount)
mob
- the mob to have their money setabsoluteAmount
- the amount for the mob to havesetMoney(MOB, int)
,
setMoney(MOB, String, double)
void setMoney(MOB mob, java.lang.String currency, double absoluteAmount)
mob
- the mob to have their money setcurrency
- the required currency to setabsoluteAmount
- the amount for the mob to havesetMoney(MOB, double)
,
setMoney(MOB, int)
void setMoney(MOB mob, int amount)
mob
- the npc to have their money setamount
- the amount of their currency to set it tosetMoney(MOB, double)
,
setMoney(MOB, String, double)
void clearZeroMoney(MOB mob, java.lang.String currency)
mob
- the mob to make poorcurrency
- null, or the currency items to killclearInventoryMoney(MOB, String)
void clearInventoryMoney(MOB mob, java.lang.String currency)
mob
- the mob to make poorcurrency
- null, or the currency to killclearZeroMoney(MOB, String)
void dropMoney(Room R, Container container, java.lang.String currency, double absoluteValue)
R
- the room to add value tocontainer
- null, or the container the money must be put incurrency
- the currency of the value to addabsoluteValue
- the total value of the currency items to addremoveMoney(Room, Container, String, double)
void removeMoney(Room R, Container container, java.lang.String currency, double absoluteValue)
R
- the room to remove value fromcontainer
- null, or the container the money must be incurrency
- null, or the currency of the value to removeabsoluteValue
- the total value of the currency items to removedropMoney(Room, Container, String, double)
java.util.List<Coins> getMoneyItems(ItemCollection IP, java.lang.String currency)
IP
- the mob/room to scancurrency
- null, or the currency the money must be ingetMoney(MOB)
,
getMoneyItems(ItemCollection, Item, String)
java.util.List<Coins> getMoneyItems(ItemCollection IP, Item container, java.lang.String currency)
IP
- the mob/room to scancontainer
- null, or the container the money must be incurrency
- null, or the currency the money must be ingetMoney(MOB)
,
getMoneyItems(ItemCollection, String)
boolean isCurrencyMatch(java.lang.String curr1, java.lang.String curr2)
curr1
- the first currency code or definitioncurr2
- the second currency code or definitionjava.lang.String getCurrency(CMObject E)
E
- the object to find a currency forlong getNumberOfCoins(MOB mob, java.lang.String currency, double denomination)
mob
- the mob to count the money ofcurrency
- null for all, or the currency of the money to countdenomination
- the denomination of the money to countdouble getTotalAbsoluteValue(ItemCollection IP, Item container, java.lang.String currency)
IP
- the money holder to count the money ofcontainer
- null, or the container that the currency must be incurrency
- null for all, or the current type to filter the money throughgetTotalAbsoluteNativeValue(MOB)
,
getTotalAbsoluteShopKeepersValue(MOB, MOB)
,
getTotalAbsoluteValue(ItemCollection, String)
,
getTotalAbsoluteValueAllCurrencies(ItemCollection)
double getTotalAbsoluteValue(ItemCollection IP, java.lang.String currency)
IP
- the money holder to count the money ofcurrency
- null for all, or the current type to filter the money throughgetTotalAbsoluteNativeValue(MOB)
,
getTotalAbsoluteShopKeepersValue(MOB, MOB)
,
getTotalAbsoluteValue(ItemCollection, Item, String)
,
getTotalAbsoluteValueAllCurrencies(ItemCollection)
double getTotalAbsoluteNativeValue(MOB mob)
mob
- the mob to count the money ofgetTotalAbsoluteShopKeepersValue(MOB, MOB)
,
getTotalAbsoluteValue(ItemCollection, String)
,
getTotalAbsoluteValue(ItemCollection, Item, String)
,
getTotalAbsoluteValueAllCurrencies(ItemCollection)
double getTotalAbsoluteShopKeepersValue(MOB mob, MOB shopkeeper)
mob
- the mob to count the money ofshopkeeper
- the shopkeeper to get the currency type fromgetTotalAbsoluteNativeValue(MOB)
,
getTotalAbsoluteValue(ItemCollection, String)
,
getTotalAbsoluteValue(ItemCollection, Item, String)
,
getTotalAbsoluteValueAllCurrencies(ItemCollection)
double getTotalAbsoluteValueAllCurrencies(ItemCollection IP)
IP
- the holder to count the money ofgetTotalAbsoluteNativeValue(MOB)
,
getTotalAbsoluteShopKeepersValue(MOB, MOB)
,
getTotalAbsoluteValue(ItemCollection, String)
,
getTotalAbsoluteValue(ItemCollection, Item, String)
java.util.List<MoneyLibrary.DebtItem> getDebt(java.lang.String name)
name
- the debtor, usually a player nameMoneyLibrary.DebtItem
,
getDebt(String, String)
,
getDebtOwed(String)
,
getDebtOwed(String, String)
,
adjustDebt(String, String, double, String, double, long)
,
delAllDebt(String, String)
java.util.List<MoneyLibrary.DebtItem> getDebt(java.lang.String name, java.lang.String owedTo)
name
- the debtor, usually a player nameowedTo
- the money lender, usually a bank chainMoneyLibrary.DebtItem
,
getDebt(String)
,
getDebtOwed(String, String)
,
getDebtOwed(String)
,
adjustDebt(String, String, double, String, double, long)
,
delAllDebt(String, String)
java.util.List<MoneyLibrary.DebtItem> getDebtOwed(java.lang.String owedTo)
owedTo
- the money lender, usually a bank chainMoneyLibrary.DebtItem
,
getDebt(String)
,
getDebt(String, String)
,
getDebtOwed(String, String)
,
adjustDebt(String, String, double, String, double, long)
,
delAllDebt(String, String)
double getDebtOwed(java.lang.String name, java.lang.String owedTo)
name
- the debtor, usually a player nameowedTo
- the money lender, usually a bank chaingetDebt(String)
,
getDebt(String, String)
,
getDebtOwed(String)
,
adjustDebt(String, String, double, String, double, long)
,
delAllDebt(String, String)
void adjustDebt(java.lang.String name, java.lang.String owedTo, double adjustAmt, java.lang.String reason, double interest, long due)
name
- the debtor, usually a player nameowedTo
- the money lender, usually a bank chainadjustAmt
- the amount to add/remove to the debtreason
- the short debt description, like "Bank Loan"interest
- the interest rate to charge on new loans/mudmonthdue
- the real life due datestamp in millisecondsgetDebt(String)
,
getDebt(String, String)
,
getDebtOwed(String)
,
getDebtOwed(String, String)
,
delAllDebt(String, String)
void delAllDebt(java.lang.String name, java.lang.String owedTo)
name
- the debtor, usually a player nameowedTo
- the money lender, usually a bank chaingetDebt(String)
,
getDebt(String, String)
,
getDebtOwed(String)
,
getDebtOwed(String, String)
,
adjustDebt(String, String, double, String, double, long)