Table of Contents

Class Race

Namespace
Moongate.UO.Data.Races.Base
Assembly
Moongate.UO.Data.dll
public abstract class Race : ISpanParsable<Race>, IParsable<Race>
Inheritance
Race
Implements
Derived
Inherited Members

Constructors

Race(int, int, string, string, int, int, int, int)

protected Race(int raceID, int raceIndex, string name, string pluralName, int maleBody, int femaleBody, int maleGhostBody, int femaleGhostBody)

Parameters

raceID int
raceIndex int
name string
pluralName string
maleBody int
femaleBody int
maleGhostBody int
femaleGhostBody int

Fields

AllowAllRaces

public const int AllowAllRaces = 7

Field Value

int

AllowElvesOnly

public const int AllowElvesOnly = 2

Field Value

int

AllowGargoylesOnly

public const int AllowGargoylesOnly = 4

Field Value

int

AllowHumanOrElves

public const int AllowHumanOrElves = 3

Field Value

int

Properties

AllRaces

public static List<Race> AllRaces { get; }

Property Value

List<Race>

DefaultRace

public static Race DefaultRace { get; }

Property Value

Race

Elf

public static Race Elf { get; }

Property Value

Race

FemaleBody

public int FemaleBody { get; }

Property Value

int

FemaleGhostBody

public int FemaleGhostBody { get; }

Property Value

int

Gargoyle

public static Race Gargoyle { get; }

Property Value

Race

Human

public static Race Human { get; }

Property Value

Race

MaleBody

public int MaleBody { get; }

Property Value

int

MaleGhostBody

public int MaleGhostBody { get; }

Property Value

int

Name

public string Name { get; set; }

Property Value

string

PluralName

public string PluralName { get; set; }

Property Value

string

RaceFlag

public int RaceFlag { get; }

Property Value

int

RaceID

public int RaceID { get; }

Property Value

int

RaceIndex

public int RaceIndex { get; }

Property Value

int

Races

public static Race[] Races { get; }

Property Value

Race[]

Methods

AliveBody(UOMobileEntity)

public virtual int AliveBody(UOMobileEntity m)

Parameters

m UOMobileEntity

Returns

int

AliveBody(bool)

public virtual int AliveBody(bool female)

Parameters

female bool

Returns

int

Body(UOMobileEntity)

public virtual int Body(UOMobileEntity m)

Parameters

m UOMobileEntity

Returns

int

ClipHairHue(int)

public abstract int ClipHairHue(int hue)

Parameters

hue int

Returns

int

ClipSkinHue(int)

public abstract int ClipSkinHue(int hue)

Parameters

hue int

Returns

int

GetRace(int)

public static Race? GetRace(int raceID)

Parameters

raceID int

Returns

Race

GhostBody(UOMobileEntity)

public virtual int GhostBody(UOMobileEntity m)

Parameters

m UOMobileEntity

Returns

int

GhostBody(bool)

public virtual int GhostBody(bool female)

Parameters

female bool

Returns

int

IsAllowedRace(Race, int)

public static bool IsAllowedRace(Race race, int allowedRaceFlags)

Parameters

race Race
allowedRaceFlags int

Returns

bool

Parse(ReadOnlySpan<char>, IFormatProvider)

Parses a span of characters into a value.

public static Race Parse(ReadOnlySpan<char> s, IFormatProvider provider)

Parameters

s ReadOnlySpan<char>

The span of characters to parse.

provider IFormatProvider

An object that provides culture-specific formatting information about s.

Returns

Race

The result of parsing s.

Exceptions

FormatException

s is not in the correct format.

OverflowException

s is not representable by Race.

Parse(string)

public static Race Parse(string s)

Parameters

s string

Returns

Race

Parse(string, IFormatProvider)

Parses a string into a value.

public static Race Parse(string s, IFormatProvider provider)

Parameters

s string

The string to parse.

provider IFormatProvider

An object that provides culture-specific formatting information about s.

Returns

Race

The result of parsing s.

Exceptions

ArgumentNullException

s is null.

FormatException

s is not in the correct format.

OverflowException

s is not representable by Race.

RandomFacialHair(bool)

public abstract int RandomFacialHair(bool female)

Parameters

female bool

Returns

int

RandomHair(bool)

public abstract int RandomHair(bool female)

Parameters

female bool

Returns

int

RandomHairHue()

public abstract int RandomHairHue()

Returns

int

RandomSkinHue()

public abstract int RandomSkinHue()

Returns

int

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

TryParse(ReadOnlySpan<char>, IFormatProvider, out Race)

Tries to parse a span of characters into a value.

public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider provider, out Race result)

Parameters

s ReadOnlySpan<char>

The span of characters to parse.

provider IFormatProvider

An object that provides culture-specific formatting information about s.

result Race

When this method returns, contains the result of successfully parsing s, or an undefined value on failure.

Returns

bool

true if s was successfully parsed; otherwise, false.

TryParse(string, IFormatProvider, out Race)

Tries to parse a string into a value.

public static bool TryParse(string s, IFormatProvider provider, out Race result)

Parameters

s string

The string to parse.

provider IFormatProvider

An object that provides culture-specific formatting information about s.

result Race

When this method returns, contains the result of successfully parsing s or an undefined value on failure.

Returns

bool

true if s was successfully parsed; otherwise, false.

ValidateFacialHair(bool, int)

public abstract bool ValidateFacialHair(bool female, int itemID)

Parameters

female bool
itemID int

Returns

bool

ValidateHair(bool, int)

public abstract bool ValidateHair(bool female, int itemID)

Parameters

female bool
itemID int

Returns

bool