com.planet_ink.coffee_mud.MOBS
Class StdBanker

java.lang.Object
  extended by com.planet_ink.coffee_mud.MOBS.StdMOB
      extended by com.planet_ink.coffee_mud.MOBS.StdShopKeeper
          extended by com.planet_ink.coffee_mud.MOBS.StdBanker
All Implemented Interfaces:
AbilityContainer, Affectable, Behavable, CMObject, Combatant, Contingent, DBIdentifiable, Economics, Environmental, FactionMember, Followable<MOB>, ItemCollection, ItemPossessor, Modifiable, MsgListener, MUDCmdProcessor, Physical, PhysicalAgent, Rider, ShopKeeper, StatsAffecting, Tattooable, Tickable, Banker, MOB, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
GenBanker

public class StdBanker
extends StdShopKeeper
implements Banker


Nested Class Summary
 
Nested classes/interfaces inherited from class com.planet_ink.coffee_mud.MOBS.StdMOB
StdMOB.ApplyAffectCharState<T extends StatsAffecting>, StdMOB.ApplyAffectCharStats<T extends StatsAffecting>, StdMOB.ApplyRecAffectPhyStats<T extends StatsAffecting>
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper
ShopKeeper.ShopPrice
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.MOB
MOB.Attrib
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ItemPossessor
ItemPossessor.Expire, ItemPossessor.Find, ItemPossessor.Move
 
Field Summary
protected static java.util.Map<java.lang.String,java.lang.Long> bankTimes
           
protected  double coinInterest
           
protected  double itemInterest
           
protected  double loanInterest
           
 
Fields inherited from class com.planet_ink.coffee_mud.MOBS.StdShopKeeper
budget, budgetMax, budgetRemaining, budgetTickDown, devalueRate, invResetRate, invResetTickDown, itemZapperMask, pricingAdjustments, shop, whatIsSoldMask
 
Fields inherited from class com.planet_ink.coffee_mud.MOBS.StdMOB
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, tattoos, tickAgeCounter, tickStatus, trains, username, victim, wimpHitPoint, worshipCharID, xtraValues
 
Fields inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.Banker
MIN_ITEM_BALANCE_DIVISOR
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper
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_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
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
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_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, 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_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Fields inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.MOB
AGE_MILLIS_THRESHOLD, END_SHEATH_TIME, START_SHEATH_TIME
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.MUDCmdProcessor
METAFLAG_AS, METAFLAG_ASMESSAGE, METAFLAG_FORCED, METAFLAG_INORDER, METAFLAG_MPFORCED, METAFLAG_ORDER, METAFLAG_POSSESSED, METAFLAG_SNOOPED
 
Constructor Summary
StdBanker()
           
 
Method Summary
 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.
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()
           
 double totalItemsWorth(java.lang.String depositorName)
          Returns the base money value of all items deposited in the given account.
 
Methods inherited from class com.planet_ink.coffee_mud.MOBS.StdShopKeeper
budget, cloneFix, destroy, devalueRate, doInventoryReset, doISellThis, finalBudget, finalDevalueRate, finalIgnoreMask, finalInvResetRate, finalItemPricingAdjustments, finalPrejudiceFactors, getShop, getStartArea, getWhatIsSoldMask, getWhatIsSoldZappermask, ignoreMask, invResetRate, isSold, itemPricingAdjustments, prejudiceFactors, setBudget, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactors, setWhatIsSoldZappermask, storeKeeperString
 
Methods inherited from class com.planet_ink.coffee_mud.MOBS.StdMOB
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, clanEffects, clans, clearCommandQueue, commandQueSize, compareTo, confirmLocation, copyFactions, copyOf, 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, getDirectionToTarget, getExperience, getExpNeededDelevel, getExpNeededLevel, getExpNextLevel, getExpPrevLevel, getFactionListing, getGroupMembers, getGroupMembersAndRideables, getItem, getLiegeID, getMoney, getMoneyVariation, getMyDeity, getNaturalWeapon, getPeaceTime, getPractices, getQuestPoint, getRandomItem, getRideBuddies, getSaveStatIndex, getStartRoom, getStat, getStatCodes, getTickStatus, getTrains, getVictim, getWearPositions, getWimpHitPoint, getWorshipCharID, 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, setDisplayText, setExperience, setExpirationDate, setFollowing, setImage, setLiegeID, setLocation, setMiscText, setMoney, setMoneyVariation, setName, setPlayerStats, setPractices, setQuestPoint, setRangeToTarget, setRiding, setSavable, setSession, setSoulMate, setStartRoom, setStat, setTrains, setVictim, setWimpHitPoint, setWorshipCharID, soulMate, tattoos, tell, tell, text, titledName, totalFollowers, willFollowOrdersOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper
doISellThis, getShop, getWhatIsSoldMask, getWhatIsSoldZappermask, isSold, setWhatIsSoldZappermask, storeKeeperString
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Economics
budget, devalueRate, finalBudget, finalDevalueRate, finalIgnoreMask, finalInvResetRate, finalItemPricingAdjustments, finalPrejudiceFactors, ignoreMask, invResetRate, itemPricingAdjustments, prejudiceFactors, setBudget, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactors
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectPhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent
amDestroyed, destroy, isSavable, setSavable
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 

Field Detail

coinInterest

protected double coinInterest

itemInterest

protected double itemInterest

loanInterest

protected double loanInterest

bankTimes

protected static java.util.Map<java.lang.String,java.lang.Long> bankTimes
Constructor Detail

StdBanker

public StdBanker()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Overrides:
ID in class StdShopKeeper
Returns:
the name of this class

addSoldType

public void addSoldType(int mask)
Description copied from interface: ShopKeeper
Adds the ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper to the existing shopkeeper mask. A value of 0 will clear the whole mask.

Specified by:
addSoldType in interface ShopKeeper
Overrides:
addSoldType in class StdShopKeeper
Parameters:
mask - the ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper
See Also:
ShopKeeper.DEAL_DESCS, ShopKeeper.isSold(int)

setWhatIsSoldMask

public void setWhatIsSoldMask(long newSellCode)
Description copied from interface: ShopKeeper
Sets the encoded ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper

Specified by:
setWhatIsSoldMask in interface ShopKeeper
Overrides:
setWhatIsSoldMask in class StdShopKeeper
Parameters:
newSellCode - the dealer type constants to the 2nd power, shifted 8 bits left
See Also:
ShopKeeper.DEAL_DESCS, ShopKeeper.addSoldType(int)

bankChain

public java.lang.String bankChain()
Description copied from interface: Banker
Gets the name of the bank chain to which this banker belongs.

Specified by:
bankChain in interface Banker
Returns:
the bank chain name
See Also:
Banker.setBankChain(String)

setBankChain

public void setBankChain(java.lang.String name)
Description copied from interface: Banker
Sets the name of the bank chain to which this banker belongs.

Specified by:
setBankChain in interface Banker
Parameters:
name - the bank chain name
See Also:
Banker.bankChain()

addDepositInventory

public void addDepositInventory(java.lang.String depositorName,
                                Item item,
                                Item container)
Description copied from interface: Banker
Deposits a new item into the given account. Coin items are, of course, money.

Specified by:
addDepositInventory in interface Banker
Parameters:
depositorName - the account to deposit into, like mob or clan name
item - the item to deposit
container - the container the item is in, which also needs depositing
See Also:
Banker.delAllDeposits(String), Banker.delDepositInventory(String, Item), Banker.getBalance(String)

makeItemContainer

protected Pair<Item,java.lang.String> makeItemContainer(java.lang.String data)

findDeleteRecursiveDepositInventoryByContainerKey

protected java.util.List<Item> findDeleteRecursiveDepositInventoryByContainerKey(Container C,
                                                                                 java.util.List<DatabaseEngine.PlayerData> rawInventoryV,
                                                                                 java.lang.String key)

delDepositInventory

public java.util.List<Item> delDepositInventory(java.lang.String depositorName,
                                                Item likeItem)
Description copied from interface: Banker
Deletes item into the given account. Coin items are, of course, money. The items are returned in a list to the caller. If the item is a container, all contained items are also returned.

Specified by:
delDepositInventory in interface Banker
Parameters:
depositorName - the account to delete from, like mob or clan name
likeItem - the likeItem to delete
Returns:
the collection of items deleted from the account
See Also:
Banker.delAllDeposits(String), Banker.addDepositInventory(String, Item, Item), Banker.getBalance(String)

delAllDeposits

public void delAllDeposits(java.lang.String depositorName)
Description copied from interface: Banker
Empties all the items and money from a given depositors box.

Specified by:
delAllDeposits in interface Banker
Parameters:
depositorName - the account to empty, like mob or clan name
See Also:
Banker.delDepositInventory(String, Item), Banker.addDepositInventory(String, Item, Item), Banker.getBalance(String)

numberDeposited

public int numberDeposited(java.lang.String depositorName)
Description copied from interface: Banker
Returns the number of items deposited, including money items

Specified by:
numberDeposited in interface Banker
Parameters:
depositorName - the account to size up, like mob or clan name
Returns:
the number of items in the account
See Also:
Banker.getDepositedItems(String), Banker.findDepositInventory(String, String), Banker.totalItemsWorth(String)

getDepositedItems

public java.util.List<Item> getDepositedItems(java.lang.String depositorName)
Description copied from interface: Banker
Returns all of the items deposited in the account. Make sure you destroy these when you are done looking at them!

Specified by:
getDepositedItems in interface Banker
Parameters:
depositorName - the account to return, like mob or clan name
Returns:
the list of all items in the account
See Also:
Banker.numberDeposited(String), Banker.findDepositInventory(String, String), Banker.totalItemsWorth(String)

getRawPDDepositInventory

protected java.util.List<DatabaseEngine.PlayerData> getRawPDDepositInventory(java.lang.String depositorName)

getAccountNames

public java.util.List<java.lang.String> getAccountNames()
Description copied from interface: Banker
Returns all the player and clan names who have open accounts at this bank.

Specified by:
getAccountNames in interface Banker
Returns:
all the player and clan names who have open accounts

bankLedger

protected void bankLedger(java.lang.String depositorName,
                          java.lang.String msg)

findDepositInventory

public Item findDepositInventory(java.lang.String depositorName,
                                 java.lang.String itemName)
Description copied from interface: Banker
Searches the deposit inventory for an item with a substring name like the one given, returning the first found. If the search string resembles a number at all, this will return the Coins item in the account.

Specified by:
findDepositInventory in interface Banker
Parameters:
depositorName - the player or clan name of the account to search
itemName - the search string
Returns:
the item found, or null.
See Also:
Banker.getDepositedItems(String), Banker.numberDeposited(String), Banker.totalItemsWorth(String)

timeInterval

public long timeInterval()

setCoinInterest

public void setCoinInterest(double interest)
Description copied from interface: Banker
Sets the interest rate paid (or cost) on deposited money. A positive value is a payment, a negative is a cost.

Specified by:
setCoinInterest in interface Banker
Parameters:
interest - the interest rate paid (or cost) on deposited money.
See Also:
Banker.getCoinInterest()

setItemInterest

public void setItemInterest(double interest)
Description copied from interface: Banker
Sets the interest rate paid (or cost) on the value of deposited items. A positive value is a payment, a negative is a cost.

Specified by:
setItemInterest in interface Banker
Parameters:
interest - the interest rate paid (or cost) on deposited items.
See Also:
Banker.getItemInterest()

getCoinInterest

public double getCoinInterest()
Description copied from interface: Banker
Gets the interest rate paid (or cost) on deposited money. A positive value is a payment, a negative is a cost.

Specified by:
getCoinInterest in interface Banker
Returns:
the interest rate paid (or cost) on deposited money.
See Also:
Banker.setCoinInterest(double)

getItemInterest

public double getItemInterest()
Description copied from interface: Banker
Gets the interest rate paid (or cost) on the value of deposited items. A positive value is a payment, a negative is a cost.

Specified by:
getItemInterest in interface Banker
Returns:
the interest rate paid (or cost) on deposited items.
See Also:
Banker.setItemInterest(double)

setLoanInterest

public void setLoanInterest(double interest)
Description copied from interface: Banker
Sets the interest rate paid (or cost) on loaned out funds as debt. A positive value is a cost, a negative is a bonus.

Specified by:
setLoanInterest in interface Banker
Parameters:
interest - the interest rate paid (or cost) on loaned money debt.
See Also:
Banker.getLoanInterest()

getLoanInterest

public double getLoanInterest()
Description copied from interface: Banker
Gets the interest rate paid (or cost) on loaned out funds as debt. A positive value is a cost, a negative is a bonus.

Specified by:
getLoanInterest in interface Banker
Returns:
the interest rate paid (or cost) on loaned money debt.
See Also:
Banker.setLoanInterest(double)

getDebtInfo

public MoneyLibrary.DebtItem getDebtInfo(java.lang.String depositorName)
Description copied from interface: Banker
Returns debt information for the given depositor to this bank chain.

Specified by:
getDebtInfo in interface Banker
Parameters:
depositorName - the player or clan name that owes the bank money
Returns:
information about the debt
See Also:
MoneyLibrary.DebtItem

processAccounts

protected void processAccounts()

tick

public boolean tick(Tickable ticking,
                    int tickID)
Description copied from interface: Tickable
this is the method which is called periodically by the threading engine. How often it is called depends on the parameters passed to the threadding engine when it is submitted for thread access. Typically the period is once per TIME_TICK period, but that is determined when the object is submitted to the thread engine.

Specified by:
tick in interface Tickable
Overrides:
tick in class StdShopKeeper
Parameters:
ticking - a reference to this Tickable object
tickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Returns:
true always, unless this object no longer wishes to ever tick again, in which case false
See Also:
Tickable, ServiceEngine, TickableGroup

getBalance

public double getBalance(java.lang.String depositorName)
Description copied from interface: Banker
Returns the money balance in the account, in base value

Specified by:
getBalance in interface Banker
Parameters:
depositorName - the account to empty, like mob or clan name
Returns:
the money balance, in base value
See Also:
Banker.delDepositInventory(String, Item), Banker.addDepositInventory(String, Item, Item), Banker.delAllDeposits(String)

totalItemsWorth

public double totalItemsWorth(java.lang.String depositorName)
Description copied from interface: Banker
Returns the base money value of all items deposited in the given account.

Specified by:
totalItemsWorth in interface Banker
Parameters:
depositorName - the account to account for, like mob or clan name
Returns:
the base money value of all items deposited
See Also:
Banker.getDepositedItems(String), Banker.numberDeposited(String), Banker.findDepositInventory(String, String)

getBankClientName

public java.lang.String getBankClientName(MOB mob,
                                          Clan.Function func,
                                          boolean checked)
Description copied from interface: Banker
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. If checked is true, and the mob does NOT have clan privileges, then an error message is given to the mob and null is returned.

Specified by:
getBankClientName in interface Banker
Parameters:
mob - the mob who is trying to deposit or withdraw or list or something
func - either Clan.Function.WITHDRAW or Clan.FUNCTION.DEPOSIT or LIST
checked - true if the mob must have clan privileges, false if not.
Returns:
the mobs name, their clan name, or null
See Also:
Clan.Function

executeMsg

public void executeMsg(Environmental myHost,
                       CMMsg msg)
Description copied from interface: MsgListener
The general message event handler for the object. Messages passed herein may not necessarily be FOR this object, or from it, but will almost always represent events happening in the same room. The messages have already been through an approval process, so this method is called only to affect the final execution of the meaning of the message. Every game event goes through these methods.

Specified by:
executeMsg in interface MsgListener
Overrides:
executeMsg in class StdShopKeeper
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that needs to be executed
See Also:
CMMsg

okMessage

public boolean okMessage(Environmental myHost,
                         CMMsg msg)
Description copied from interface: MsgListener
The general message event previewer for the object. Messages passed herein are in a pending state, and may be safely modified or rejected without fear that they might be in the middle of being executed. Messages passed herein may not necessarily be FOR or FROM this object, but will almost always represent events which want to happen in the same rom. This method should always always return true UNLESS this message needs to be canceled, in which case it is necessary to tell the mob initiating the event (CMMsg.source()) why it is being cancelled. Every game event goes through these methods.

Specified by:
okMessage in interface MsgListener
Overrides:
okMessage in class StdShopKeeper
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that wants to be executed
Returns:
whether this message is allowed to execute
See Also:
CMMsg, CMMsg.source()