public static string ComputeFameTitle(Mobile beheld)
{
int fame = beheld.Fame;
int karma = beheld.Karma;
for (int i = 0; i < m_FameEntries.Length; ++i)
{
FameEntry fe = m_FameEntries[i];
if (fame <= fe.m_Fame || i == (m_FameEntries.Length - 1))
{
KarmaEntry[] karmaEntries = fe.m_Karma;
for (int j = 0; j < karmaEntries.Length; ++j)
{
KarmaEntry ke = karmaEntries[j];
if (karma <= ke.m_Karma || j == (karmaEntries.Length - 1))
{
return String.Format(ke.m_Title, beheld.Name, beheld.Female ? "Lady" : "Lord");
}
}
return String.Empty;
}
}
return String.Empty;
}
[CommandProperty(AccessLevel.Decorator)]
public override string TitleName
{
get
{
string title = Titles.ComputeFameTitle(this);
return title.Length > 0 ? title : RawName;
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.