Add a convenience function for checking start color if you have the full colorPrint
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1017 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -304,6 +304,16 @@ public class ColorPository implements Serializable
|
||||
return cids;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the specified color is legal for use at character creation time. false is
|
||||
* always returned for non-existent colors or classes.
|
||||
*/
|
||||
public boolean isLegalStartColor (int colorPrint)
|
||||
{
|
||||
ColorRecord color = getColorRecord(colorPrint >> 8, colorPrint & 0xFF);
|
||||
return (color == null) ? false : color.starter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the specified color is legal for use at character creation time. false is
|
||||
* always returned for non-existent colors or classes.
|
||||
|
||||
Reference in New Issue
Block a user