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, MOB, PostOffice, java.lang.Cloneable, java.lang.Comparable<CMObject>GenPostmanpublic class StdPostman extends StdShopKeeper implements PostOffice
ItemPossessor.Expire, ItemPossessor.Find, ItemPossessor.MoveMOB.AttribPostOffice.MailPieceShopKeeper.ShopPrice, ShopKeeper.ViewTypeStdMOB.ApplyAffectCharState<T extends StatsAffecting>, StdMOB.ApplyAffectCharStats<T extends StatsAffecting>, StdMOB.ApplyRecAffectPhyStats<T extends StatsAffecting>| Modifier and Type | Field | Description | 
|---|---|---|
| protected double | feeForNewBox | |
| protected double | holdFeePerPound | |
| protected int | maxMudMonthsHeld | |
| protected double | minimumPostage | |
| protected double | postagePerPound | |
| protected static java.util.Map<java.lang.String,java.lang.Long> | postalTimes | 
idConverterAGE_MILLIS_THRESHOLD, END_SHEATH_TIME, START_SHEATH_TIMEMETAFLAG_AS, METAFLAG_ASMESSAGE, METAFLAG_FORCED, METAFLAG_INORDER, METAFLAG_MPFORCED, METAFLAG_ORDER, METAFLAG_POSSESSED, METAFLAG_QUIETLY, METAFLAG_REVERSED, METAFLAG_SNOOPEDDEAL_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, xtraValuesbudget, budgetMax, budgetRemaining, budgetTickDown, currency, devalueRate, invResetRate, invResetTickDown, itemZapperMask, pricingAdjustments, shop, viewTypes, whatIsSoldMaskSTATUS_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 | 
|---|---|
| StdPostman() | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | addSoldType(int mask) | Adds the ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeper
 to the existing shopkeeper mask. | 
| void | addToBox(java.lang.String mob,
        Item thisThang,
        java.lang.String from,
        java.lang.String to,
        long holdTime,
        double COD) | Low level method to add an item directly to a postal box. | 
| void | autoGive(MOB src,
        MOB tgt,
        Item I) | |
| void | createBoxHere(java.lang.String boxName,
             java.lang.String forward) | Creates a new post office box for the given player or clan
 name, with the given forwarding address. | 
| void | deleteBoxHere(java.lang.String boxName) | Removes the given post office box for the given player or
 clan name. | 
| boolean | delFromBox(java.lang.String boxName,
          Item thisThang) | Low level method to remove an item from a postal box | 
| void | emptyBox(java.lang.String boxName) | Removes all items from the given post office box | 
| void | executeMsg(Environmental myHost,
          CMMsg msg) | The general message event handler for the object. | 
| double | feeForNewBox() | Gets the fee to open a new postal box at this branch. | 
| Item | findBoxContents(java.lang.String boxName,
               java.lang.String likeThis) | Searches the given postal box for an item with the given
 name, or one with the given string as a substring. | 
| PostOffice.MailPiece | findExactBoxData(java.lang.String boxName,
                Item likeThis) | Searches the given postal box for an item like the given
 one. | 
| java.lang.String | findProperBranch(java.lang.String toWhom) | Returns the proper branch of this postal chain to which to
 deliver packages belonging to the given mob or clan name. | 
| java.util.List<DatabaseEngine.PlayerData> | getAllLocalBoxPD(java.lang.String boxName) | |
| java.util.List<DatabaseEngine.PlayerData> | getBoxRowPDData(java.lang.String mob) | |
| protected java.lang.String | getBranchPostableTo(java.lang.String toWhom,
                   java.lang.String branch,
                   java.util.Map<java.lang.String,java.lang.String> allBranchBoxes) | |
| protected int | getChargeableWeight(Item I) | |
| protected double | getCODChargeForPiece(PostOffice.MailPiece data) | |
| protected double | getHoldingCost(PostOffice.MailPiece data,
              int chargeableWeight) | |
| java.util.Map<java.lang.String,java.lang.String> | getOurOpenBoxes(java.lang.String boxName) | Returns a mapping of postal branches in this chain to forwarding
 addresses, for the given postal box. | 
| java.lang.String | getSenderName(MOB mob,
             Clan.Function func,
             boolean checked) | When the given mob tries to send or withdraw a package, this method is
 called to get the proper FROM address, which is either the mob themselves
 or their clan, if they are (optionally) permitted by their rank. | 
| protected double | getSimplePostage(int chargeableWeight) | |
| double | holdFeePerPound() | Gets the fee charged per pound per mud month to hold a
 package in a postal box at this branch. | 
| java.lang.String | ID() | The CoffeeMud Java Class ID shared by all instances of
 this object. | 
| protected Item | makeItem(PostOffice.MailPiece data) | |
| int | maxMudMonthsHeld() | Returns the maximum number of mud-months that a package
 will be held before it gets put on sale at this branch. | 
| double | minimumPostage() | Gets the minimum postage to send a package from this branch. | 
| boolean | okMessage(Environmental myHost,
         CMMsg msg) | The general message event previewer for the object. | 
| PostOffice.MailPiece | parsePostalItemData(java.lang.String data) | Parses an postal package entry, which is formatted
 as item xml preceded by various semicolon-delimited
 numbers and data. | 
| double | postagePerPound() | Gets the postage charged per pound after the first, to send
 packages from this branch. | 
| java.lang.String | postalBranch() | Returns the branch of the postal chain that this specific
 postoffice employee belongs to. | 
| java.lang.String | postalChain() | Returns the postal chain, a string shared by all post
 offices that deal with the same postal boxes and
 customers, able to send mail to each other. | 
| long | postalWaitTime() | |
| void | setFeeForNewBox(double d) | Sets the fee to open a new postal box at this branch. | 
| void | setHoldFeePerPound(double d) | Sets the fee charged per pound per mud month to hold a
 package in a postal box at this branch. | 
| void | setMaxMudMonthsHeld(int months) | Sets the maximum number of mud-months that a package
 will be held before it gets put on sale at this branch. | 
| void | setMinimumPostage(double d) | Sets the minimum postage to send a package from this branch. | 
| void | setPostagePerPound(double d) | Sets the postage charged per pound after the first, to send
 packages from this branch. | 
| void | setPostalChain(java.lang.String name) | Sets the postal chain, a string shared by all post
 offices that deal with the same postal boxes and
 customers, able to send mail to each other. | 
| 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. | 
copyOf, initializeClass, newInstanceamDestroyed, destroy, isSavable, setSavablegetFinalBudget, getFinalCurrency, getFinalDevalueRate, getFinalIgnoreMask, getFinalInvResetRate, getFinalItemPricingAdjustments, getFinalPrejudiceFactors, getRawBbudget, getRawCurrency, getRawDevalueRate, getRawIgnoreMask, getRawInvResetRate, getRawItemPricingAdjustments, getRawPrejudiceFactors, setBudget, setCurrency, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactorsdescription, displayText, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setImage, setMiscText, setName, textexpirationDate, setExpirationDategetSaveStatIndex, getStat, getStatCodes, isStat, setStatclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoISellThis, getShop, getWhatIsSoldMask, getWhatIsSoldZappermask, isSold, setWhatIsSoldZappermask, storeKeeperString, viewFlagsaffectCharState, affectCharStats, affectPhyStatsabilities, 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, willFollowOrdersOfcloneFix, 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, viewFlagsgetTickStatus, nameprotected double minimumPostage
protected double postagePerPound
protected double holdFeePerPound
protected double feeForNewBox
protected int maxMudMonthsHeld
protected static java.util.Map<java.lang.String,java.lang.Long> postalTimes
public java.lang.String ID()
CMObjectID in interface CMObjectID in class StdShopKeeperpublic double minimumPostage()
PostOfficeminimumPostage in interface PostOfficePostOffice.setMinimumPostage(double)public void setMinimumPostage(double d)
PostOfficesetMinimumPostage in interface PostOfficed - the minimum postage to send a package from this branch.PostOffice.minimumPostage()public double postagePerPound()
PostOfficepostagePerPound in interface PostOfficePostOffice.setPostagePerPound(double)public void setPostagePerPound(double d)
PostOfficesetPostagePerPound in interface PostOfficed - the postage charged per pound after the firstPostOffice.postagePerPound()public double holdFeePerPound()
PostOfficeholdFeePerPound in interface PostOfficePostOffice.setHoldFeePerPound(double)public void setHoldFeePerPound(double d)
PostOfficesetHoldFeePerPound in interface PostOfficed - the fee charged per pound per mud monthPostOffice.holdFeePerPound()public double feeForNewBox()
PostOfficefeeForNewBox in interface PostOfficePostOffice.setFeeForNewBox(double)public void setFeeForNewBox(double d)
PostOfficesetFeeForNewBox in interface PostOfficed - the fee to open a new postal box at this branch.PostOffice.feeForNewBox()public int maxMudMonthsHeld()
PostOfficemaxMudMonthsHeld in interface PostOfficePostOffice.setMaxMudMonthsHeld(int)public void setMaxMudMonthsHeld(int months)
PostOfficesetMaxMudMonthsHeld in interface PostOfficemonths - the maximum number of mud-months to holdPostOffice.setMaxMudMonthsHeld(int)public void addSoldType(int mask)
ShopKeeperaddSoldType in interface ShopKeeperaddSoldType in class StdShopKeepermask - the ShopKeeper DEAL_* constants describing what is sold or bought by this ShopKeeperShopKeeper.DEAL_DESCS, 
ShopKeeper.isSold(int)public void setWhatIsSoldMask(long newSellCode)
ShopKeepersetWhatIsSoldMask in interface ShopKeepersetWhatIsSoldMask in class StdShopKeepernewSellCode - the dealer type constants to the 2nd power, shifted 8 bits leftShopKeeper.DEAL_DESCS, 
ShopKeeper.addSoldType(int)public java.lang.String postalChain()
PostOfficepostalChain in interface PostOfficePostOffice.setPostalChain(String)public void setPostalChain(java.lang.String name)
PostOfficesetPostalChain in interface PostOfficename - the name of the postal chainPostOffice.postalChain()public java.lang.String postalBranch()
PostOfficepostalBranch in interface PostOfficePostOffice.findProperBranch(String)public java.lang.String getSenderName(MOB mob, Clan.Function func, boolean checked)
PostOfficegetSenderName in interface PostOfficemob - the mob who is trying to send the packagefunc - either Clan.Function.WITHDRAW or Clan.FUNCTION.DEPOSITchecked - true if the mob must have clan privileges, false if not.Clan.Functionpublic void addToBox(java.lang.String mob,
                     Item thisThang,
                     java.lang.String from,
                     java.lang.String to,
                     long holdTime,
                     double COD)
PostOfficeaddToBox in interface PostOfficemob - the box name, such as a player or clan namethisThang - the item to add to the postal boxfrom - player or clan the item is fromto - player or clan the item is toholdTime - when the package was sent, real time, in millisecondsCOD - the amount of money which must be paid to withdraw the itemPostOffice.delFromBox(String, Item), 
PostOffice.emptyBox(String)public boolean delFromBox(java.lang.String boxName,
                          Item thisThang)
PostOfficedelFromBox in interface PostOfficeboxName - the box name, such as a player or clan namethisThang - the item to remove from the postal boxPostOffice.addToBox(String, Item, String, String, long, double), 
PostOffice.emptyBox(String)public void emptyBox(java.lang.String boxName)
PostOfficeemptyBox in interface PostOfficeboxName - the box name, such as a player or clan namePostOffice.addToBox(String, Item, String, String, long, double), 
PostOffice.delFromBox(String, Item)public java.util.Map<java.lang.String,java.lang.String> getOurOpenBoxes(java.lang.String boxName)
PostOfficegetOurOpenBoxes in interface PostOfficeboxName - the player or clan name of the boxPostOffice.deleteBoxHere(String), 
PostOffice.createBoxHere(String, String)public void createBoxHere(java.lang.String boxName,
                          java.lang.String forward)
PostOfficecreateBoxHere in interface PostOfficeboxName - the player or clan name of the new boxforward - the player or clan name of the forwardingPostOffice.deleteBoxHere(String), 
PostOffice.getOurOpenBoxes(String)public void deleteBoxHere(java.lang.String boxName)
PostOfficedeleteBoxHere in interface PostOfficeboxName - the player or clan name of the new boxPostOffice.createBoxHere(String, String), 
PostOffice.getOurOpenBoxes(String)public java.util.List<DatabaseEngine.PlayerData> getAllLocalBoxPD(java.lang.String boxName)
public java.util.List<DatabaseEngine.PlayerData> getBoxRowPDData(java.lang.String mob)
public Item findBoxContents(java.lang.String boxName, java.lang.String likeThis)
PostOfficefindBoxContents in interface PostOfficeboxName - the player or clan name of the postal boxlikeThis - the search string for the item namepublic PostOffice.MailPiece findExactBoxData(java.lang.String boxName, Item likeThis)
PostOfficefindExactBoxData in interface PostOfficeboxName - the player or clan name of the postal boxlikeThis - the item to look forpublic PostOffice.MailPiece parsePostalItemData(java.lang.String data)
PostOfficeparsePostalItemData in interface PostOfficedata - the postal package formatted stringPostOffice.MailPieceprotected Item makeItem(PostOffice.MailPiece data)
protected int getChargeableWeight(Item I)
protected double getSimplePostage(int chargeableWeight)
protected double getHoldingCost(PostOffice.MailPiece data, int chargeableWeight)
protected double getCODChargeForPiece(PostOffice.MailPiece data)
protected java.lang.String getBranchPostableTo(java.lang.String toWhom,
                                               java.lang.String branch,
                                               java.util.Map<java.lang.String,java.lang.String> allBranchBoxes)
public java.lang.String findProperBranch(java.lang.String toWhom)
PostOfficefindProperBranch in interface PostOfficetoWhom - the player or clan name receiving the packagePostOffice.postalBranch()public long postalWaitTime()
public boolean tick(Tickable ticking, int tickID)
Tickabletick in interface Tickabletick in class StdShopKeeperticking - a reference to this Tickable objecttickID - the TICKID_ constant describing this periodic call, as defined in TickableTickable, 
ServiceEngine, 
TickableGrouppublic void executeMsg(Environmental myHost, CMMsg msg)
MsgListenerexecuteMsg in interface MsgListenerexecuteMsg in class StdShopKeepermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that needs to be executedCMMsgpublic boolean okMessage(Environmental myHost, CMMsg msg)
MsgListenerokMessage in interface MsgListenerokMessage in class StdShopKeepermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that wants to be executedCMMsg, 
CMMsg.source()