|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Clan
Nested Class Summary | |
---|---|
static class |
Clan.Authority
An enumeration of relationships between a clan position and a particular power of clans. |
static class |
Clan.AutoPromoteFlag
An enumeration of ways auto-promotion can work in a clan |
static class |
Clan.ClanVote
Represents an individual clan vote |
static class |
Clan.FullMemberRecord
A internal membership record, as returned by the database, plus extra fields from cmchar |
static class |
Clan.Function
An enumation of all the major clan functions gated by internal security |
static class |
Clan.MemberRecord
A internal membership record, as returned by the database |
static class |
Clan.Trophy
enum for the getTrophies @see Clan#getTrophies() method. |
Field Summary | |
---|---|
static java.lang.String[] |
CLAN_STATS
Stat variables associated with clan objects. |
static int |
CLANSTATUS_ACTIVE
constant for the getStatus() method, denoting normal status. |
static java.lang.String[] |
CLANSTATUS_DESC
constant descriptor strings for the CLANSTATUS_* constants, ordered by their value. |
static int |
CLANSTATUS_FADING
constant for the getStatus() method, denoting fading status. |
static int |
CLANSTATUS_PENDING
constant for the getStatus() method, denoting unapproved status. |
static int |
REL_ALLY
constant for getClanRelations method, denoting ally with. |
static java.lang.String[] |
REL_COLORS
|
static java.lang.String[] |
REL_DESCS
descriptor strings for the REL_* constants, ordered by their value. |
static int |
REL_FRIENDLY
constant for getClanRelations method, denoting friendly to. |
static int |
REL_HOSTILE
constant for getClanRelations method, denoting hostile to. |
static int |
REL_NEUTRAL
constant for getClanRelations method, denoting neutral status towards. |
static int[] |
REL_NEUTRALITYGAUGE
constant used to determine something about clan relations |
static java.lang.String[] |
REL_STATES
long descriptor strings for the REL_* constants, ordered by their value. |
static int |
REL_WAR
constant for getClanRelations method, denoting at war with. |
static int[][] |
RELATIONSHIP_VECTOR
table used to determine how two clans are related when their declared relations differ. |
static java.lang.String[] |
VSTAT_DESCS
Descriptors for the values of ClanVote.voteStatus member. |
static int |
VSTAT_FAILED
Vote has failed constant for the ClanVote.voteStatus member. |
static int |
VSTAT_PASSED
Vote has passed constant for the ClanVote.voteStatus member. |
static int |
VSTAT_STARTED
Vote just started constant for the ClanVote.voteStatus member. |
Method Summary | |
---|---|
void |
addMember(MOB M,
int role)
Adds a new member to this clan |
void |
addVote(Clan.ClanVote CV)
Adds a new ClanVote object to the list of ongoing votes for this |
void |
adjDeposit(MOB memberM,
double newValue)
Adjusts the amount of base gold value deposited by this member. |
void |
adjExp(MOB memberM,
int howMuch)
Adjusts the amount of experience earned by this |
int |
applyExpMods(MOB memberM,
int exp)
Adjusts the amount of experience earned by a player based on the tax rate. |
long |
calculateMapPoints()
Returns the total control points earned by this clan |
long |
calculateMapPoints(java.util.List<Area> controlledAreas)
Returns the total control points represented by the list of controlled areas given. |
boolean |
canBeAssigned(MOB mob,
int role)
Returns whether the given user can be assigned the given role |
SearchIDList<Ability> |
clanAbilities(MOB mob)
Return a vector of skills, spells, and other abilities granted to the given mob of the given mobs level. |
void |
clanAnnounce(java.lang.String msg)
Sends a message to all members of all clans. |
ChameleonList<Ability> |
clanEffects(MOB mob)
Return a vector of skills, spells, and other effects granted to the given mob of the given mobs level. |
java.lang.String |
clanID()
Returns the unique identifying ID of the clan for reference elsewhere. |
void |
create()
Orders the system to create this clan in the database. |
void |
delMember(MOB M)
Del a member from this clan |
void |
delVote(Clan.ClanVote CV)
Removes a new ClanVote object from the list of ongoing votes for this |
void |
destroyClan()
Orders the system to destroy this clan in the database. |
boolean |
doesOutRank(int highRoleID,
int lowRoleID)
Returns whether the high role id outranks the low roldid |
MOB |
findMember(java.lang.String name)
Returns the named member, if possible |
Clan.MemberRecord |
findMemberRecord(java.lang.String name)
Returns the named member, if possible |
java.lang.String |
getAcceptanceSettings()
Returns a mask used to identify whether a player is allowed to join a particular |
Clan.Authority |
getAuthority(int roleID,
Clan.Function function)
Returns whether the given roleID is allowed to perform the given function. |
int |
getAutoPosition()
Returns whether membership is automatically approved to this And if so, what the default position for members are. |
java.lang.String |
getBasicRequirementMask()
Returns the inner (government usually) requirements to even apply to this clan |
java.lang.String |
getCategory()
Returns the category of the clan, which is almost always the same as the government category. |
java.lang.String |
getClanClass()
Retrieves this Clan's enforced character class. |
int |
getClanLevel()
Returns the current clan level |
int |
getClanRelations(java.lang.String id)
Returns a REL_* constant denoting the relationship between this clan and the clan of the given name. |
java.util.List<Area> |
getControlledAreas()
Returns all the areas on the map controlled by this |
double |
getCurrentClanGoldDonations(MOB killer)
Returns the amount of base gold value this clan has received. |
int |
getCurrentClanKills(MOB killer)
Returns the number of other-clan kills this clan has recorded. |
long |
getCurrentClanXPDonations(MOB killer)
Returns the amount of xp this clan has earned. |
java.lang.String |
getDetail(MOB mob)
Creates the string for the 'clandetail' command, based on the security of the given mob who will view the details. |
java.lang.String |
getDonation()
Returns the roomID of this clans donation room |
long |
getExp()
Gets the amount of experience earned by this |
ItemCollection |
getExtItems()
Gets external items belonging to this clan, which should be destroyed with the clan, but can still be transient. |
java.util.List<Clan.FullMemberRecord> |
getFullMemberList()
Returns the set of members, where each row represents a FullMemberRecord |
ClanGovernment |
getGovernment()
Returns the object representing the government of this |
int |
getGovernmentID()
Returns the id representing the government type of this |
java.lang.String |
getGovernmentName()
Returns Clan, Republic, or another one of the clan government types. |
long |
getLastRelationChange(java.lang.String id)
Returns the time/date stamp when this clan last changed its relations with the given |
java.util.List<Clan.MemberRecord> |
getMemberList()
Returns the set of members, where each row represents a MemberRecord |
java.util.List<Clan.MemberRecord> |
getMemberList(int PosFilter)
Returns the set of members, where each row represents a MemberRecord. |
int |
getMinClanMembers()
Returns the minimum clan members for the clan to become active, or to prevent being purged. |
java.lang.String |
getMorgue()
Returns the roomID of this clans morgue room |
int |
getMostInRole(int roleID)
Returns the maximum number of players who can hold the given role in this For assignment purposes. |
java.lang.String |
getName()
Returns the name of the clan, which is almost always the same as the ID, which is why clans can't change their names. |
int |
getNumberRoles()
Returns the number of roles (max roleid) |
int |
getNumVoters(Clan.Function function)
Returns the number of members allowed to vote on the given function. |
java.lang.String |
getPolitics()
Returns an XML string used to identify the political relations between this clan and others. |
java.lang.String |
getPremise()
Retrieves this Clan's basic story. |
java.lang.String |
getRecall()
Returns the roomID of this clans recall room (their clan home) |
MOB |
getResponsibleMember()
Returns the highest ranking member of this |
int |
getRoleFromName(java.lang.String position)
For the clan government type, this function will return the clan role that most closely matches the given string "position". |
java.lang.String |
getRoleName(int roleID,
boolean titleCase,
boolean plural)
Returns the friendly descriptive name of a given role in a clan, based on very specific criteria. |
java.lang.String[] |
getRolesList()
Returns the list of roles for people in this clan, from lowest rank to the highest. |
int |
getSize()
Returns the number of members of this |
int |
getStatus()
Returns one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out. |
double |
getTaxes()
Gets the tax rate for this |
int |
getTopQualifiedRoleID(Clan.Function func,
MOB mob)
Returns the roleid constant representing the highest rank in this clan type that can perform the given function or null. |
java.util.List<java.lang.Integer> |
getTopRankedRoles(Clan.Function func)
Returns the roleid(s) constant representing the highest rank roleid(s) in this clan type that can perform the given function. |
int |
getTrophies()
Returns a bitmap representing the trophies won by this The bitmap is made up of TROPHY_* constants. |
boolean |
isLoyaltyThroughItems()
Returns whether this clan attains conquest loyalty through giving out clan items. |
boolean |
isOnlyFamilyApplicants()
Returns whether this clan only accepts applicants from people who are family of current members/founder. |
boolean |
isPubliclyListedFor(MOB mob)
Returns whether this clan gets listed with the clanlist command. |
boolean |
isRivalrous()
Returns true if this clan is rivalrous with other rivalrous clans, meaning that pvp is enabled between them, and war can be declared between them. |
boolean |
isWorshipConquest()
Returns whether this clan attains conquest loyalty through mobs worshiping the same deity as their leader. |
int |
numClanEffects(MOB mob)
Return size of a vector of skills, spells, and other effects granted to the given mob of the given mobs level. |
void |
recordClanKill(MOB killer,
MOB killed)
Called when a member of this clan kills a member of another Will update the clan in the database. |
void |
setAcceptanceSettings(java.lang.String newSettings)
Sets a mask used to identify whether a player is allowed to join a particular |
void |
setAutoPosition(int pos)
Sets whether membership is automatically approved to this And if so, what the default position for members are. |
void |
setCategory(java.lang.String newCategory)
Sets a new category for this, which is almost always the same as the government category. |
void |
setClanClass(java.lang.String newClass)
Sets this Clan's enforced character class. |
void |
setClanLevel(int newClanLevel)
Sets the new clan level |
void |
setClanRelations(java.lang.String id,
int rel,
long time)
Sets a new relationship between this clan and the clan with the given id. |
void |
setDonation(java.lang.String newDonation)
Sets the roomID of this clans donation room |
void |
setExp(long exp)
Sets the amount of experience earned by this |
void |
setGovernmentID(int type)
Returns the id constant representing the government type of this |
void |
setMinClanMembers(int amt)
Sets the minimum clan members for the clan to become active, or to prevent being purged. |
void |
setMorgue(java.lang.String newRecall)
Sets the roomID of this clans morgue room |
void |
setName(java.lang.String newName)
Sets a new name for this |
void |
setPolitics(java.lang.String politics)
Sets an XML string used to identify the political relations between this clan and others. |
void |
setPremise(java.lang.String newPremise)
Sets this Clan's basic story. |
void |
setRecall(java.lang.String newRecall)
Sets the roomID of this clans recall room (their clan home) |
void |
setRivalrous(boolean isRivalrous)
Set to true if this clan is rivalrous with other rivalrous clans, meaning that pvp is enabled between them, and war can be declared |
void |
setStatus(int newStatus)
Sets one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out. |
void |
setTaxes(double rate)
Sets the tax rate for this |
void |
setTrophies(int trophyFlag)
Sets a bitmap representing the trophies won by this The bitmap is made up of TROPHY_* constants. |
void |
update()
Orders the system to update this clan in the database. |
boolean |
updateClanPrivileges(MOB mob)
This method is called when a given mobs clan status changes, for instance if they are added to the clan, removed from it, or change their rank. |
void |
updateVotes()
Orders the system to save any changes to existing ongoing votes for this |
java.util.Enumeration<Clan.ClanVote> |
votes()
If the clan type allows voting, this returns a series of ClanVote objects |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
---|
getTickStatus, name, tick |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
---|
copyOf, ID, 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 |
---|
static final int VSTAT_STARTED
static final int VSTAT_FAILED
static final int VSTAT_PASSED
static final java.lang.String[] VSTAT_DESCS
static final java.lang.String[] CLAN_STATS
static final int CLANSTATUS_ACTIVE
static final int CLANSTATUS_PENDING
static final int CLANSTATUS_FADING
static final java.lang.String[] CLANSTATUS_DESC
static final int REL_NEUTRAL
static final int REL_WAR
static final int REL_HOSTILE
static final int REL_FRIENDLY
static final int REL_ALLY
static final int[] REL_NEUTRALITYGAUGE
static final int[][] RELATIONSHIP_VECTOR
static final java.lang.String[] REL_DESCS
static final java.lang.String[] REL_COLORS
static final java.lang.String[] REL_STATES
Method Detail |
---|
Clan.Authority getAuthority(int roleID, Clan.Function function)
roleID
- the roleID whose priviledges to check.function
- the ClanFunction function constant to use
Clan
,
Clan.Authority
void clanAnnounce(java.lang.String msg)
msg
- the message to sendjava.util.Enumeration<Clan.ClanVote> votes()
Clan.ClanVote
void updateVotes()
void addVote(Clan.ClanVote CV)
CV
- the clanvote object to addClan.ClanVote
void delVote(Clan.ClanVote CV)
CV
- the clanvote object to removeClan.ClanVote
int getNumVoters(Clan.Function function)
function
- the FUNC_* constant
Clan
int getSize()
java.lang.String getName()
setName(String)
java.lang.String clanID()
getName()
void setName(java.lang.String newName)
newName
- the new name of this clangetName()
,
clanID()
java.lang.String getCategory()
setCategory(String)
void setCategory(java.lang.String newCategory)
newCategory
- the new cata of this clangetCategory()
java.lang.String getGovernmentName()
Clan
boolean updateClanPrivileges(MOB mob)
mob
- the mob whose status needs updating
SearchIDList<Ability> clanAbilities(MOB mob)
mob
- the mob to grant the abilities to
Ability
ChameleonList<Ability> clanEffects(MOB mob)
mob
- the mob to grant the abilities to
Ability
int numClanEffects(MOB mob)
mob
- the mob to grant the abilities to
Ability
java.lang.String getPremise()
setPremise(String)
boolean doesOutRank(int highRoleID, int lowRoleID)
highRoleID
- firstlowRoleID
- second
void setPremise(java.lang.String newPremise)
newPremise
- the new premise textgetPremise()
void setClanClass(java.lang.String newClass)
newClass
- the new enforced character classgetClanClass()
java.lang.String getClanClass()
setClanClass(String)
java.lang.String getDetail(MOB mob)
mob
- the one who will view the details
java.lang.String getAcceptanceSettings()
MaskingLibrary
,
setAcceptanceSettings(String)
void setAcceptanceSettings(java.lang.String newSettings)
newSettings
- the mask used to identify prospectsMaskingLibrary
,
getAcceptanceSettings()
java.lang.String getPolitics()
setPolitics(String)
void setPolitics(java.lang.String politics)
politics
- xml document describing the politics of this clangetPolitics()
int getAutoPosition()
setAutoPosition(int)
void setAutoPosition(int pos)
pos
- the positition to give to applicantsgetAutoPosition()
int getStatus()
Clan
,
setStatus(int)
void setStatus(int newStatus)
newStatus
- a CLANSTAT_* constantClan
,
getStatus()
boolean isRivalrous()
Clan
,
setRivalrous(boolean)
void setRivalrous(boolean isRivalrous)
isRivalrous
- true or falseClan
,
isRivalrous()
int getClanLevel()
setClanLevel(int)
void setClanLevel(int newClanLevel)
newClanLevel
- the new clan levelgetClanLevel()
java.lang.String getRecall()
setRecall(String)
void setRecall(java.lang.String newRecall)
newRecall
- the roomid of this clans clan homegetRecall()
java.lang.String getMorgue()
setMorgue(String)
void setMorgue(java.lang.String newRecall)
newRecall
- the roomID of this clans morgue roomgetMorgue()
int getTrophies()
Clan
,
setTrophies(int)
void setTrophies(int trophyFlag)
trophyFlag
- a bitmap of the trophiesClan
,
getTrophies()
java.lang.String getDonation()
setDonation(String)
void setDonation(java.lang.String newDonation)
newDonation
- the roomID of this clans donation roomgetDonation()
long getExp()
void setExp(long exp)
exp
- the experience earnedjava.lang.String getBasicRequirementMask()
void adjExp(MOB memberM, int howMuch)
memberM
- member the person contributing the xphowMuch
- the experience adjustment, + or -void adjDeposit(MOB memberM, double newValue)
memberM
- member the person contributingnewValue
- the value adjustment, + or -int applyExpMods(MOB memberM, int exp)
memberM
- member the person contributing the xpexp
- the old experience
void recordClanKill(MOB killer, MOB killed)
killer
- the member of this clan that did the killingkilled
- the mob or member of other clan killedint getCurrentClanKills(MOB killer)
killer
- the member of this clan that did the killing or NULL for all
double getCurrentClanGoldDonations(MOB killer)
killer
- the member of this clan that did the killing or NULL for all
long getCurrentClanXPDonations(MOB killer)
killer
- the member of this clan that did the killing or NULL for all
long calculateMapPoints(java.util.List<Area> controlledAreas)
controlledAreas
- the areas controlled
calculateMapPoints()
,
getControlledAreas()
,
Conquerable
long calculateMapPoints()
calculateMapPoints(List)
,
getControlledAreas()
,
Conquerable
java.util.List<Area> getControlledAreas()
Conquerable
,
Area
void setTaxes(double rate)
rate
- the tax rate 0-100.0getTaxes()
double getTaxes()
setTaxes(double)
int getMostInRole(int roleID)
roleID
- the role to get a max for
java.lang.String getRoleName(int roleID, boolean titleCase, boolean plural)
roleID
- the role code of the role to describetitleCase
- whether or not to uppercase the first wordplural
- whether or not to return the word as a plural
int getRoleFromName(java.lang.String position)
position
- the name of the position to look for
boolean isPubliclyListedFor(MOB mob)
mob
- the person viewing
boolean isOnlyFamilyApplicants()
java.lang.String[] getRolesList()
java.util.List<Clan.MemberRecord> getMemberList()
getMemberList(int)
,
getFullMemberList()
,
Clan.MemberRecord
Clan.MemberRecord findMemberRecord(java.lang.String name)
name
- the name of the member
getMemberList(int)
,
getFullMemberList()
,
Clan.MemberRecord
MOB findMember(java.lang.String name)
name
- the name of the member
getMemberList(int)
,
getFullMemberList()
,
Clan.MemberRecord
java.util.List<Clan.FullMemberRecord> getFullMemberList()
getMemberList()
,
Clan.FullMemberRecord
java.util.List<Clan.MemberRecord> getMemberList(int PosFilter)
PosFilter
- the position filter
Clan
,
Clan.MemberRecord
MOB getResponsibleMember()
int getClanRelations(java.lang.String id)
id
- the name of another
setClanRelations(String, int, long)
,
getLastRelationChange(String)
long getLastRelationChange(java.lang.String id)
id
- the other clan
setClanRelations(String, int, long)
,
getClanRelations(String)
void setClanRelations(java.lang.String id, int rel, long time)
id
- another clanrel
- the REL_* constant for the new relationshiptime
- a current date/time stamp for this changeint getGovernmentID()
Clan
,
setGovernmentID(int)
,
getGovernment()
ClanGovernment getGovernment()
ClanGovernment
,
getGovernmentID()
,
setGovernmentID(int)
int getMinClanMembers()
void setMinClanMembers(int amt)
amt
- the new min clan membersboolean isLoyaltyThroughItems()
boolean isWorshipConquest()
void setGovernmentID(int type)
type
- the type id constantClan
,
getGovernmentID()
,
getGovernment()
int getTopQualifiedRoleID(Clan.Function func, MOB mob)
func
- the function (or null) they must be able to domob
- the mob to check for a top rank
ClanPosition
,
Clan.Function
java.util.List<java.lang.Integer> getTopRankedRoles(Clan.Function func)
func
- the function to perform, or null just to return privileged rank
ClanPosition
,
Clan.Function
int getNumberRoles()
void delMember(MOB M)
M
- the member to removevoid addMember(MOB M, int role)
M
- the member to addrole
- the coded role numbervoid update()
void destroyClan()
void create()
ItemCollection getExtItems()
ItemCollection
,
Item
boolean canBeAssigned(MOB mob, int role)
mob
- the mob to checkrole
- the role to check for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |