CMObject, Tickable, CMLibrary, WorldHuntLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>public class WorldHuntUtils extends StdLibrary implements WorldHuntLibrary
idConverterisDebugging, name, serviceClient, tickStatusSTATUS_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 |
|---|---|
WorldHuntUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
protected Room |
addWorldRoomsLiberally(java.util.List<Room> rooms,
Area area) |
|
protected Room |
addWorldRoomsLiberally(java.util.List<Room> rooms,
Room room) |
|
protected Room |
addWorldRoomsLiberally(java.util.List<Room> rooms,
java.util.List<? extends Environmental> choicesV) |
|
protected java.util.List<Item> |
checkInvCachedList(java.util.List<Item> list) |
|
protected java.util.List<MOB> |
checkMOBCachedList(java.util.List<MOB> list) |
|
protected java.util.List<Item> |
checkRoomItemCachedList(java.util.List<Item> list) |
|
protected boolean |
enforceTimeLimit(long startTime,
long maxMillis) |
|
Room |
findAreaRoomLiberally(MOB mob,
Area A,
java.lang.String cmd,
java.lang.String srchWhatAERIPMVK,
int timePct) |
Given an area, searches the rooms liberally and returns the first room with a match.
|
java.util.List<Room> |
findAreaRoomsLiberally(MOB mob,
Area A,
java.lang.String cmd,
java.lang.String srchWhatAERIPMVK,
int timePct) |
Given an area, searches the rooms liberally and returns all rooms with a match.
|
MOB |
findFirstInhabitant(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
int timePct) |
Finds the first matched mob in the rooms of the given room
enumerator.
|
Item |
findFirstInventory(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
int timePct) |
Finds the first matched item in the inventory of mobs in the given room
enumerator, or in the inventory of players if null rooms are given.
|
Room |
findFirstRoom(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean displayOnly,
int timePct) |
Finds the first matched room in the rooms of the given room
enumerator.
|
Item |
findFirstRoomItem(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean anyItems,
int timePct) |
Finds the first matched item in the rooms of the given room
enumerator.
|
Environmental |
findFirstShopStock(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
int timePct) |
Finds the first matched stock item in the shops of shopkeepeers in the given room
enumerator.
|
Environmental |
findFirstShopStocker(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
int timePct) |
Finds the first shopkeeper from the given room enumerator and given mob room accessor who
has a shop stock item matching the given hunt search string.
|
java.util.List<MOB> |
findInhabitants(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean returnFirst,
int timePct) |
|
java.util.List<MOB> |
findInhabitants(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
int timePct) |
Finds all the matched mobs in the rooms in the given room
enumerator.
|
java.util.List<MOB> |
findInhabitantsFavorExact(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean returnFirst,
int timePct) |
Finds the matched mobs in the rooms in the given room
enumerator.
|
java.util.List<Item> |
findInventory(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean returnFirst,
int timePct) |
|
java.util.List<Item> |
findInventory(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
int timePct) |
Finds all matched items in the inventory of mobs in the given room
enumerator, or in the inventory of players if null rooms are given.
|
protected java.util.List<Item> |
findRoomItems(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean anyItems,
boolean returnFirst,
int timePct) |
|
java.util.List<Item> |
findRoomItems(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean anyItems,
int timePct) |
Finds all the matched items in the rooms in the given room
enumerator.
|
java.util.List<Room> |
findRooms(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean displayOnly,
boolean returnFirst,
int timePct) |
|
java.util.List<Room> |
findRooms(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean displayOnly,
int timePct) |
Finds all the matched rooms in the rooms in the given room
enumerator.
|
protected void |
findRoomsByDesc(MOB mob,
java.util.Enumeration<Room> rooms,
java.util.List<Room> foundRooms,
java.lang.String srchStr,
boolean returnFirst,
long maxTime) |
|
protected void |
findRoomsByDisplay(MOB mob,
java.util.Enumeration<Room> rooms,
java.util.List<Room> foundRooms,
java.lang.String srchStr,
boolean returnFirst,
long maxTime) |
|
java.util.List<Environmental> |
findShopStock(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
boolean returnFirst,
boolean returnStockers,
int timePct) |
|
java.util.List<Environmental> |
findShopStock(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
int timePct) |
Finds all the matched stock item in the shops of shopkeepeers in the given room
enumerator.
|
java.util.List<Environmental> |
findShopStockers(java.util.Enumeration<Room> rooms,
MOB mob,
java.lang.String srchStr,
int timePct) |
Finds all shopkeepers from the given room enumerator and given mob room accessor who
has a shop stock item matching the given hunt search string.
|
Room |
findWorldRoomLiberally(MOB mob,
java.lang.String cmd,
java.lang.String srchWhatAERIPMVK,
int timePct,
long maxMillis) |
Searches the whole world's rooms liberally and returns the first room with a match.
|
java.util.List<Room> |
findWorldRoomsLiberally(MOB mob,
java.lang.String cmd,
java.lang.String srchWhatAERIPMVK,
int timePct,
long maxMillis) |
Searches the whole world's rooms liberally and returns all rooms with a match.
|
protected java.util.List<Room> |
findWorldRoomsLiberally(MOB mob,
java.lang.String cmd,
java.lang.String srchWhatAERIPMVK,
Area area,
boolean returnFirst,
int timePct,
long maxMillis) |
|
java.util.Set<Physical> |
getAllGroupRiders(Physical P,
Room hereOnlyR) |
Gets the entire party -- group members, ridden things,
followed and things riding them, etc, etc.
|
protected java.util.Set<Physical> |
getAllGroupRiders(Physical P,
java.util.Set<Physical> set) |
|
java.util.Map<java.lang.String,Area> |
getAreaFinder() |
|
java.util.Map<java.lang.String,java.util.List<Item>> |
getInvItemFinder() |
|
java.util.Map<java.lang.String,java.util.List<MOB>> |
getMOBFinder() |
|
java.util.Map<java.lang.String,java.util.List<Room>> |
getRoomFinder() |
|
java.util.Map<java.lang.String,java.util.List<Item>> |
getRoomItemFinder() |
|
java.util.Map<java.lang.String,java.util.List<Environmental>> |
getStockFinder() |
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
boolean |
isAnAdminHere(Room R,
boolean sysMsgsOnly) |
Returns whether an authorized room or mob editor
is in the room, optionally with sysmsgs turned on.
|
boolean |
isHere(CMObject E2,
Area here) |
Returns whether the given object is in the given area.
|
boolean |
isHere(CMObject E2,
Room here) |
Returns whether the given object is in the given room.
|
protected java.util.List<Room> |
returnResponse(java.util.List<Room> rooms,
Room room) |
activate, getServiceClient, L, propertiesLoaded, shutdowncopyOf, initializeClass, name, newInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tickpublic java.lang.String ID()
CMObjectID in interface CMObjectID in class StdLibrarypublic java.util.List<Room> findRooms(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean displayOnly, int timePct)
WorldHuntLibraryfindRooms in interface WorldHuntLibraryrooms - the rooms with mobs to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulesdisplayOnly - true to search only display, and skip descriptiontimePct - % of a second to keep searching between rooms, 100% is full timepublic Room findFirstRoom(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean displayOnly, int timePct)
WorldHuntLibraryfindFirstRoom in interface WorldHuntLibraryrooms - the rooms to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulesdisplayOnly - true to search only display, and skip descriptiontimePct - % of a second to keep searching between rooms, 100% is full timepublic java.util.List<Room> findRooms(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean displayOnly, boolean returnFirst, int timePct)
protected void findRoomsByDisplay(MOB mob, java.util.Enumeration<Room> rooms, java.util.List<Room> foundRooms, java.lang.String srchStr, boolean returnFirst, long maxTime)
protected void findRoomsByDesc(MOB mob, java.util.Enumeration<Room> rooms, java.util.List<Room> foundRooms, java.lang.String srchStr, boolean returnFirst, long maxTime)
public java.util.List<MOB> findInhabitants(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, int timePct)
WorldHuntLibraryfindInhabitants in interface WorldHuntLibraryrooms - the rooms with mobs to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulestimePct - % of a second to keep searching between rooms, 100% is full timepublic MOB findFirstInhabitant(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, int timePct)
WorldHuntLibraryfindFirstInhabitant in interface WorldHuntLibraryrooms - the rooms to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulestimePct - % of a second to keep searching between rooms, 100% is full timepublic java.util.List<MOB> findInhabitants(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean returnFirst, int timePct)
public java.util.List<MOB> findInhabitantsFavorExact(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean returnFirst, int timePct)
WorldHuntLibraryfindInhabitantsFavorExact in interface WorldHuntLibraryrooms - the rooms with mobs to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulesreturnFirst - true to return only 1 match, false for alltimePct - % of a second to keep searching between rooms, 100% is full timepublic java.util.List<Item> findInventory(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, int timePct)
WorldHuntLibraryfindInventory in interface WorldHuntLibraryrooms - null for players, or the rooms with mobs to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulestimePct - % of a second to keep searching between rooms, 100% is full timepublic Item findFirstInventory(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, int timePct)
WorldHuntLibraryfindFirstInventory in interface WorldHuntLibraryrooms - null for players, or the rooms with mobs to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulestimePct - % of a second to keep searching between rooms, 100% is full timepublic java.util.List<Item> findInventory(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean returnFirst, int timePct)
public java.util.List<Environmental> findShopStock(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, int timePct)
WorldHuntLibraryfindShopStock in interface WorldHuntLibraryrooms - the rooms with mobs to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulestimePct - % of a second to keep searching between rooms, 100% is full timepublic Environmental findFirstShopStock(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, int timePct)
WorldHuntLibraryfindFirstShopStock in interface WorldHuntLibraryrooms - the rooms with mobs to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulestimePct - % of a second to keep searching between rooms, 100% is full timepublic java.util.List<Environmental> findShopStockers(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, int timePct)
WorldHuntLibraryfindShopStockers in interface WorldHuntLibraryrooms - the rooms to iterate throughmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulestimePct - % of a second to keep searching between rooms, 100% is full timepublic Environmental findFirstShopStocker(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, int timePct)
WorldHuntLibraryfindFirstShopStocker in interface WorldHuntLibraryrooms - the rooms to iterate throughmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulestimePct - % of a second to keep searching between rooms, 100% is full timepublic java.util.List<Environmental> findShopStock(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean returnFirst, boolean returnStockers, int timePct)
public java.util.List<Item> findRoomItems(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean anyItems, int timePct)
WorldHuntLibraryfindRoomItems in interface WorldHuntLibraryrooms - the rooms with mobs to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulesanyItems - true to include container searches, false for non-contained onlytimePct - % of a second to keep searching between rooms, 100% is full timepublic Item findFirstRoomItem(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean anyItems, int timePct)
WorldHuntLibraryfindFirstRoomItem in interface WorldHuntLibraryrooms - the rooms to searchmob - the mob whose room access to confirmsrchStr - the search string, using full world hunt rulesanyItems - true to include container searches, false for non-contained onlytimePct - % of a second to keep searching between rooms, 100% is full timeprotected java.util.List<Item> findRoomItems(java.util.Enumeration<Room> rooms, MOB mob, java.lang.String srchStr, boolean anyItems, boolean returnFirst, int timePct)
public Room findWorldRoomLiberally(MOB mob, java.lang.String cmd, java.lang.String srchWhatAERIPMVK, int timePct, long maxMillis)
WorldHuntLibraryfindWorldRoomLiberally in interface WorldHuntLibrarymob - the mob whose room access to respectcmd - the search stringsrchWhatAERIPMVK - the librarl codes for what to searchtimePct - % of a second to keep searching between rooms, 100% is full timemaxMillis - maximum amount of time to search before abortingpublic java.util.List<Room> findWorldRoomsLiberally(MOB mob, java.lang.String cmd, java.lang.String srchWhatAERIPMVK, int timePct, long maxMillis)
WorldHuntLibraryfindWorldRoomsLiberally in interface WorldHuntLibrarymob - the mob whose room access to respectcmd - the search stringsrchWhatAERIPMVK - the librarl codes for what to searchtimePct - % of a second to keep searching between rooms, 100% is full timemaxMillis - maximum amount of time to search before abortingpublic Room findAreaRoomLiberally(MOB mob, Area A, java.lang.String cmd, java.lang.String srchWhatAERIPMVK, int timePct)
WorldHuntLibraryfindAreaRoomLiberally in interface WorldHuntLibrarymob - the mob whose room access to respectA - the area to searchcmd - the search stringsrchWhatAERIPMVK - the librarl codes for what to searchtimePct - % of a second to keep searching between rooms, 100% is full timepublic java.util.List<Room> findAreaRoomsLiberally(MOB mob, Area A, java.lang.String cmd, java.lang.String srchWhatAERIPMVK, int timePct)
WorldHuntLibraryfindAreaRoomsLiberally in interface WorldHuntLibrarymob - the mob whose room access to respectA - the area to searchcmd - the search stringsrchWhatAERIPMVK - the librarl codes for what to searchtimePct - % of a second to keep searching between rooms, 100% is full timeprotected Room addWorldRoomsLiberally(java.util.List<Room> rooms, java.util.List<? extends Environmental> choicesV)
protected Room addWorldRoomsLiberally(java.util.List<Room> rooms, Room room)
protected Room addWorldRoomsLiberally(java.util.List<Room> rooms, Area area)
protected java.util.List<Room> returnResponse(java.util.List<Room> rooms, Room room)
protected boolean enforceTimeLimit(long startTime,
long maxMillis)
protected java.util.List<Item> checkRoomItemCachedList(java.util.List<Item> list)
public java.util.Map<java.lang.String,java.util.List<MOB>> getMOBFinder()
public java.util.Map<java.lang.String,Area> getAreaFinder()
public java.util.Map<java.lang.String,java.util.List<Item>> getRoomItemFinder()
public java.util.Map<java.lang.String,java.util.List<Item>> getInvItemFinder()
public java.util.Map<java.lang.String,java.util.List<Environmental>> getStockFinder()
public java.util.Map<java.lang.String,java.util.List<Room>> getRoomFinder()
protected java.util.List<Room> findWorldRoomsLiberally(MOB mob, java.lang.String cmd, java.lang.String srchWhatAERIPMVK, Area area, boolean returnFirst, int timePct, long maxMillis)
public boolean isHere(CMObject E2, Room here)
WorldHuntLibraryisHere in interface WorldHuntLibraryE2 - the object to look forhere - the room to see if its inWorldHuntLibrary.isHere(CMObject, Area)public boolean isHere(CMObject E2, Area here)
WorldHuntLibraryisHere in interface WorldHuntLibraryE2 - the object to look forhere - the room to see if its inWorldHuntLibrary.isHere(CMObject, Room)public boolean isAnAdminHere(Room R, boolean sysMsgsOnly)
WorldHuntLibraryisAnAdminHere in interface WorldHuntLibraryR - the room to checksysMsgsOnly - true to return true only if sysmsgs are onprotected java.util.Set<Physical> getAllGroupRiders(Physical P, java.util.Set<Physical> set)
public java.util.Set<Physical> getAllGroupRiders(Physical P, Room hereOnlyR)
WorldHuntLibrarygetAllGroupRiders in interface WorldHuntLibraryP - the starting point for the grouphereOnlyR - null, or the room they must all ne present in