AbilityContainer
, Affectable
, Behavable
, CMObject
, Combatant
, Contingent
, DBIdentifiable
, Economics
, Environmental
, Expireable
, FactionMember
, Followable<MOB>
, ItemCollection
, ItemPossessor
, Modifiable
, MsgListener
, MUDCmdProcessor
, Physical
, PhysicalAgent
, Rider
, ShopKeeper
, StatsAffecting
, Tattooable
, Tickable
, Banker
, MOB
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
GenBanker
public class StdBanker extends StdShopKeeper implements Banker
ItemPossessor.Expire, ItemPossessor.Find, ItemPossessor.Move
MOB.Attrib
ShopKeeper.ShopPrice, ShopKeeper.ViewType
StdMOB.ApplyAffectCharState<T extends StatsAffecting>, StdMOB.ApplyAffectCharStats<T extends StatsAffecting>, StdMOB.ApplyRecAffectPhyStats<T extends StatsAffecting>
Modifier and Type | Field | Description |
---|---|---|
protected static java.util.Map<java.lang.String,java.lang.Long> |
bankTimes |
|
protected double |
coinInterest |
|
protected double |
itemInterest |
|
protected double |
loanInterest |
MIN_ITEM_BALANCE_DIVISOR
idConverter
AGE_MILLIS_THRESHOLD, END_SHEATH_TIME, START_SHEATH_TIME
METAFLAG_AS, METAFLAG_ASMESSAGE, METAFLAG_FORCED, METAFLAG_INORDER, METAFLAG_MPFORCED, METAFLAG_ORDER, METAFLAG_POSSESSED, METAFLAG_QUIETLY, METAFLAG_REVERSED, METAFLAG_SNOOPED
DEAL_ALCHEMIST, DEAL_ANYTECHNOLOGY, DEAL_ANYTHING, DEAL_ARMOR, DEAL_AUCTIONEER, DEAL_BANKER, DEAL_BOOKS, DEAL_BUTCHER, DEAL_CASTER, DEAL_CLANBANKER, DEAL_CLANDSELLER, DEAL_CLANPOSTMAN, DEAL_CLOTHSPINNER, DEAL_CONFLICTS, DEAL_CSHIPSELLER, DEAL_DESCS, DEAL_FOODSELLER, DEAL_GENERAL, DEAL_GROWER, DEAL_HIDESELLER, DEAL_INNKEEPER, DEAL_INSTRUMENTS, DEAL_INVENTORYONLY, DEAL_JEWELLER, DEAL_LANDSELLER, DEAL_LEATHER, DEAL_LUMBERER, DEAL_MAGIC, DEAL_METALSMITH, DEAL_PETS, DEAL_POSTMAN, DEAL_READABLES, DEAL_SHIPSELLER, DEAL_SLAVES, DEAL_STONEYARDER, DEAL_TRAINER, DEAL_WEAPONS
_name, abilitys, abilityUseCache, abilityUseTrig, affectCharState, affectCharStats, affectPhyStats, affects, ageMinutes, amDead, amDestroyed, amFollowing, atRange, attributesBitmap, baseCharStats, basePhyStats, baseState, behaviors, cachedImageName, charStats, clanAffects, clans, CODES, commandQue, curState, databaseID, description, displayText, experience, expertises, factions, followers, inventory, kickFlag, lastLocation, liegeID, location, maxState, me, miscText, money, moneyVariation, mySession, peaceTime, phyStats, playerStats, possHeldItem, possStartRoom, possWieldedItem, practices, questPoint, racialAffects, rawImageName, recoverAffectP, recoverTickCter, removeFromGame, riding, scripts, soulMate, speedAdj, tattoos, tickAgeCounter, tickStatus, trains, triggerer, validChkCounter, victim, wimpHitPoint, xtraValues
budget, budgetMax, budgetRemaining, budgetTickDown, currency, devalueRate, invResetRate, invResetTickDown, itemZapperMask, pricingAdjustments, shop, viewTypes, whatIsSoldMask
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Constructor | Description |
---|---|
StdBanker() |
Modifier and Type | Method | Description |
---|---|---|
void |
addDepositInventory(java.lang.String depositorName,
Item item,
Item container) |
Deposits a new item into the given account.
|
void |
addSoldType(int mask) |
Adds the ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper
to the existing shopkeeper mask.
|
java.lang.String |
bankChain() |
Gets the name of the bank chain to which this banker belongs.
|
protected void |
bankLedger(java.lang.String depositorName,
java.lang.String msg) |
|
void |
delAllDeposits(java.lang.String depositorName) |
Empties all the items and money from a given depositors box.
|
java.util.List<Item> |
delDepositInventory(java.lang.String depositorName,
Item likeItem) |
Deletes item into the given account.
|
void |
executeMsg(Environmental myHost,
CMMsg msg) |
The general message event handler for the object.
|
protected java.util.List<Item> |
findDeleteRecursiveDepositInventoryByContainerKey(Container C,
java.util.List<DatabaseEngine.PlayerData> rawInventoryV,
java.lang.String key) |
|
Item |
findDepositInventory(java.lang.String depositorName,
java.lang.String itemName) |
Searches the deposit inventory for an item with a substring name
like the one given, returning the first found.
|
java.util.List<java.lang.String> |
getAccountNames() |
Returns all the player and clan names who have open accounts
at this bank.
|
double |
getBalance(java.lang.String depositorName) |
Returns the money balance in the account, in base value
|
java.lang.String |
getBankClientName(MOB mob,
Clan.Function func,
boolean checked) |
When the given mob tries to deposit or withdraw something, this method is
called to get the proper account name, which is either the mob themselves
or their clan, if they are (optionally) permitted by their rank.
|
double |
getCoinInterest() |
Gets the interest rate paid (or cost) on deposited money.
|
MoneyLibrary.DebtItem |
getDebtInfo(java.lang.String depositorName) |
Returns debt information for the given depositor to this bank chain.
|
java.util.List<Item> |
getDepositedItems(java.lang.String depositorName) |
Returns all of the items deposited in the account.
|
double |
getItemInterest() |
Gets the interest rate paid (or cost) on the value of deposited
items.
|
double |
getLoanInterest() |
Gets the interest rate paid (or cost) on loaned out funds as debt.
|
protected java.util.List<DatabaseEngine.PlayerData> |
getRawPDDepositInventory(java.lang.String depositorName) |
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
boolean |
isAccountName(java.lang.String name) |
Returns true if the given name has an account at this bank.
|
protected Pair<Item,java.lang.String> |
makeItemContainer(java.lang.String data) |
|
int |
numberDeposited(java.lang.String depositorName) |
Returns the number of items deposited, including money items
|
boolean |
okMessage(Environmental myHost,
CMMsg msg) |
The general message event previewer for the object.
|
protected void |
processAccounts() |
|
void |
setBankChain(java.lang.String name) |
Sets the name of the bank chain to which this banker belongs.
|
void |
setCoinInterest(double interest) |
Sets the interest rate paid (or cost) on deposited money.
|
void |
setItemInterest(double interest) |
Sets the interest rate paid (or cost) on the value of deposited
items.
|
void |
setLoanInterest(double interest) |
Sets the interest rate paid (or cost) on loaned out funds as debt.
|
void |
setWhatIsSoldMask(long newSellCode) |
Sets the encoded ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
long |
timeInterval() |
|
protected double |
totalItemsPawningWorth(MOB buyer,
java.lang.String depositorName) |
|
double |
totalItemsWorth(java.lang.String depositorName) |
Returns the base money value of all items deposited in the given account.
|
copyOf, initializeClass, newInstance
amDestroyed, destroy, isSavable, setSavable
getFinalBudget, getFinalCurrency, getFinalDevalueRate, getFinalIgnoreMask, getFinalInvResetRate, getFinalItemPricingAdjustments, getFinalPrejudiceFactors, getRawBbudget, getRawCurrency, getRawDevalueRate, getRawIgnoreMask, getRawInvResetRate, getRawItemPricingAdjustments, getRawPrejudiceFactors, setBudget, setCurrency, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactors
description, displayText, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setImage, setMiscText, setName, text
expirationDate, setExpirationDate
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doISellThis, getShop, getWhatIsSoldMask, getWhatIsSoldZappermask, isSold, setWhatIsSoldZappermask, storeKeeperString, viewFlags
affectCharState, affectCharStats, affectPhyStats
abilities, actions, addAbility, addBehavior, addEffect, addExpertise, addFaction, addFollower, addItem, addItem, addNonUninvokableEffect, addPriorityEffect, addScript, addTattoo, addTattoo, addTattoo, adjustFaction, affectCharState, affectCharStats, affectPhyStats, allAbilities, amActive, amDead, amDestroyed, amFollowing, amUltimatelyFollowing, baseCharStats, basePhyStats, baseState, baseWeight, behaviors, bringToLife, bringToLife, calculateActionCost, canSaveDatabaseID, charStats, checkCommandCancel, clanEffects, clans, clearCommandQueue, commandQueSize, compareTo, confirmLocation, copyFactions, copyOf, counItemsWornAt, curState, databaseID, delAbility, delAllAbilities, delAllBehaviors, delAllEffects, delAllExpertises, delAllItems, delAllScripts, delBehavior, delEffect, delExpertise, delFollower, delItem, delScript, delTattoo, delTattoo, dequeCommand, description, description, displayText, displayText, dispossess, doCommand, doCommand, eachBehavior, eachEffect, eachItem, eachScript, effects, enqueCommand, enqueCommands, expertises, expirationDate, factions, fetchAbility, fetchAbility, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchExpertise, fetchFaction, fetchFactionData, fetchFactionRanges, fetchFirstWornItem, fetchFollower, fetchFollower, fetchFollowerOrder, fetchFromInventory, fetchHeldItem, fetchItem, fetchRandomAbility, fetchScript, fetchWieldedItem, fetchWornItems, findAbility, findItem, findItem, findItems, findItems, findTattoo, findTattooStartsWith, fixChannelColors, flagVariableEq, followers, freeWearPositions, genericName, getAbilityUsageCache, getAgeMinutes, getAttributesBitmap, getClanRole, getCodeNum, getCombatant, getContextName, getDirectionToTarget, getExperience, getExpNeededDelevel, getExpNeededLevel, getExpNextLevel, getExpPrevLevel, getFactionListing, getGroupMembers, getGroupMembersAndRideables, getItem, getLiegeID, getMoney, getMoneyVariation, getNaturalWeapon, getPeaceTime, getPractices, getQuestPoint, getRandomItem, getRideBuddies, getSaveStatIndex, getStartRoom, getStat, getStatCodes, getTickStatus, getTopCommand, getTrains, getVictim, getWearPositions, getWimpHitPoint, hasFaction, hasOnlyGoldInInventory, healthText, image, initializeClass, isAttributeSet, isContent, isEitherOfUsDead, isFollowedBy, isGeneric, isInCombat, isMarriedToLiege, isMine, isMonster, isPermissableToFight, isPlayer, isPossessing, isRacialAbility, isSavable, isStat, items, killMeDead, L, lastTickedDateTime, location, makePeace, maxCarry, maxFollowers, maxItems, maxRange, maxState, mayIFight, mayPhysicallyAttack, minRange, miscTextFormat, moveItemTo, moveItemTo, name, name, Name, newInstance, numAbilities, numAllAbilities, numAllEffects, numBehaviors, numEffects, numFollowers, numItems, numScripts, personalEffects, phyStats, playerStats, prequeCommand, prequeCommands, racialEffects, rangeToTarget, rawImage, recoverCharStats, recoverMaxState, recoverPhyStats, removeFaction, removeFromGame, resetToMaxState, riding, sameAs, scripts, session, setActions, setAgeMinutes, setAttribute, setAttributesBitmap, setBaseCharStats, setBasePhyStats, setBaseState, setClan, setCombatant, setDatabaseID, setDescription, setDestroyed, setDisplayText, setExperience, setExpirationDate, setFollowing, setImage, setLiegeID, setLocation, setMiscText, setMoney, setMoneyVariation, setName, setPlayerStats, setPractices, setQuestPoint, setRangeToTarget, setRiding, setSavable, setSession, setSoulMate, setStartRoom, setStat, setTrains, setTriggerer, setVictim, setWimpHitPoint, soulMate, tattoos, tell, tell, text, titledName, titledName, totalFollowers, triggerer, willFollowOrdersOf
cloneFix, destroy, doBudgetReset, doInventoryReset, doISellThis, getFinalBudget, getFinalCurrency, getFinalDevalueRate, getFinalIgnoreMask, getFinalInvResetRate, getFinalItemPricingAdjustments, getFinalPrejudiceFactors, getRawBbudget, getRawCurrency, getRawDevalueRate, getRawIgnoreMask, getRawInvResetRate, getRawItemPricingAdjustments, getRawPrejudiceFactors, getShop, getStartArea, getWhatIsSoldMask, getWhatIsSoldZappermask, isSold, setBudget, setCurrency, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactors, setWhatIsSoldZappermask, stdokMessage, storeKeeperString, viewFlags
getTickStatus, name
protected double coinInterest
protected double itemInterest
protected double loanInterest
protected static java.util.Map<java.lang.String,java.lang.Long> bankTimes
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdShopKeeper
public void addSoldType(int mask)
ShopKeeper
addSoldType
in interface ShopKeeper
addSoldType
in class StdShopKeeper
mask
- the ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeperShopKeeper.DEAL_DESCS
,
ShopKeeper.isSold(int)
public void setWhatIsSoldMask(long newSellCode)
ShopKeeper
setWhatIsSoldMask
in interface ShopKeeper
setWhatIsSoldMask
in class StdShopKeeper
newSellCode
- the dealer type constants to the 2nd power, shifted 8 bits leftShopKeeper.DEAL_DESCS
,
ShopKeeper.addSoldType(int)
public java.lang.String bankChain()
Banker
bankChain
in interface Banker
Banker.setBankChain(String)
public void setBankChain(java.lang.String name)
Banker
setBankChain
in interface Banker
name
- the bank chain nameBanker.bankChain()
public void addDepositInventory(java.lang.String depositorName, Item item, Item container)
Banker
addDepositInventory
in interface Banker
depositorName
- the account to deposit into, like mob or clan nameitem
- the item to depositcontainer
- the container the item is in, which also needs depositingBanker.delAllDeposits(String)
,
Banker.delDepositInventory(String, Item)
,
Banker.getBalance(String)
protected java.util.List<Item> findDeleteRecursiveDepositInventoryByContainerKey(Container C, java.util.List<DatabaseEngine.PlayerData> rawInventoryV, java.lang.String key)
public java.util.List<Item> delDepositInventory(java.lang.String depositorName, Item likeItem)
Banker
delDepositInventory
in interface Banker
depositorName
- the account to delete from, like mob or clan namelikeItem
- the likeItem to deleteBanker.delAllDeposits(String)
,
Banker.addDepositInventory(String, Item, Item)
,
Banker.getBalance(String)
public void delAllDeposits(java.lang.String depositorName)
Banker
delAllDeposits
in interface Banker
depositorName
- the account to empty, like mob or clan nameBanker.delDepositInventory(String, Item)
,
Banker.addDepositInventory(String, Item, Item)
,
Banker.getBalance(String)
public int numberDeposited(java.lang.String depositorName)
Banker
numberDeposited
in interface Banker
depositorName
- the account to size up, like mob or clan nameBanker.getDepositedItems(String)
,
Banker.findDepositInventory(String, String)
,
Banker.totalItemsWorth(String)
public java.util.List<Item> getDepositedItems(java.lang.String depositorName)
Banker
getDepositedItems
in interface Banker
depositorName
- the account to return, like mob or clan nameBanker.numberDeposited(String)
,
Banker.findDepositInventory(String, String)
,
Banker.totalItemsWorth(String)
protected java.util.List<DatabaseEngine.PlayerData> getRawPDDepositInventory(java.lang.String depositorName)
public java.util.List<java.lang.String> getAccountNames()
Banker
getAccountNames
in interface Banker
public boolean isAccountName(java.lang.String name)
Banker
isAccountName
in interface Banker
name
- the name to look forprotected void bankLedger(java.lang.String depositorName, java.lang.String msg)
public Item findDepositInventory(java.lang.String depositorName, java.lang.String itemName)
Banker
findDepositInventory
in interface Banker
depositorName
- the player or clan name of the account to searchitemName
- the search stringBanker.getDepositedItems(String)
,
Banker.numberDeposited(String)
,
Banker.totalItemsWorth(String)
public long timeInterval()
public void setCoinInterest(double interest)
Banker
setCoinInterest
in interface Banker
interest
- the interest rate paid (or cost) on deposited money.Banker.getCoinInterest()
public void setItemInterest(double interest)
Banker
setItemInterest
in interface Banker
interest
- the interest rate paid (or cost) on deposited items.Banker.getItemInterest()
public double getCoinInterest()
Banker
getCoinInterest
in interface Banker
Banker.setCoinInterest(double)
public double getItemInterest()
Banker
getItemInterest
in interface Banker
Banker.setItemInterest(double)
public void setLoanInterest(double interest)
Banker
setLoanInterest
in interface Banker
interest
- the interest rate paid (or cost) on loaned money debt.Banker.getLoanInterest()
public double getLoanInterest()
Banker
getLoanInterest
in interface Banker
Banker.setLoanInterest(double)
public MoneyLibrary.DebtItem getDebtInfo(java.lang.String depositorName)
Banker
getDebtInfo
in interface Banker
depositorName
- the player or clan name that owes the bank moneyMoneyLibrary.DebtItem
protected void processAccounts()
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
tick
in class StdShopKeeper
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
public double getBalance(java.lang.String depositorName)
Banker
getBalance
in interface Banker
depositorName
- the account to empty, like mob or clan nameBanker.delDepositInventory(String, Item)
,
Banker.addDepositInventory(String, Item, Item)
,
Banker.delAllDeposits(String)
public double totalItemsWorth(java.lang.String depositorName)
Banker
totalItemsWorth
in interface Banker
depositorName
- the account to account for, like mob or clan nameBanker.getDepositedItems(String)
,
Banker.numberDeposited(String)
,
Banker.findDepositInventory(String, String)
protected double totalItemsPawningWorth(MOB buyer, java.lang.String depositorName)
public java.lang.String getBankClientName(MOB mob, Clan.Function func, boolean checked)
Banker
getBankClientName
in interface Banker
mob
- the mob who is trying to deposit or withdraw or list or somethingfunc
- either Clan.Function.WITHDRAW or Clan.FUNCTION.DEPOSIT or LISTchecked
- true if the mob must have clan privileges, false if not.Clan.Function
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListener
executeMsg
in interface MsgListener
executeMsg
in class StdShopKeeper
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
public boolean okMessage(Environmental myHost, CMMsg msg)
MsgListener
okMessage
in interface MsgListener
okMessage
in class StdShopKeeper
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that wants to be executedCMMsg
,
CMMsg.source()