This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -1,5 +1,3 @@
|
|||
using System.Linq;
|
||||
|
||||
namespace Server.Misc
|
||||
{
|
||||
public class RaceDefinitions
|
||||
|
|
@ -32,9 +30,22 @@ namespace Server.Misc
|
|||
{
|
||||
}
|
||||
|
||||
public override bool ValidateHair(bool female, int itemID) =>
|
||||
itemID == 0 || (!female || itemID != 0x2048) && (female || itemID != 0x2046) &&
|
||||
(itemID >= 0x203B && itemID <= 0x203D || itemID >= 0x2044 && itemID <= 0x204A);
|
||||
public override bool ValidateHair(bool female, int itemID)
|
||||
{
|
||||
if (itemID == 0)
|
||||
return true;
|
||||
|
||||
if (female && itemID == 0x2048 || !female && itemID == 0x2046)
|
||||
return false; //Buns & Receding Hair
|
||||
|
||||
if (itemID >= 0x203B && itemID <= 0x203D)
|
||||
return true;
|
||||
|
||||
if (itemID >= 0x2044 && itemID <= 0x204A)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int RandomHair(bool female) //Random hair doesn't include baldness
|
||||
{
|
||||
|
|
@ -79,18 +90,32 @@ namespace Server.Misc
|
|||
return (rand < 4 ? 0x203E : 0x2047) + rand;
|
||||
}
|
||||
|
||||
public override int ClipSkinHue(int hue) => hue < 1002 ? 1002 : hue > 1058 ? 1058 : hue;
|
||||
public override int ClipSkinHue(int hue)
|
||||
{
|
||||
if (hue < 1002)
|
||||
return 1002;
|
||||
if (hue > 1058)
|
||||
return 1058;
|
||||
return hue;
|
||||
}
|
||||
|
||||
public override int RandomSkinHue() => Utility.Random(1002, 57) | 0x8000;
|
||||
|
||||
public override int ClipHairHue(int hue) => hue < 1102 ? 1102 : hue > 1149 ? 1149 : hue;
|
||||
public override int ClipHairHue(int hue)
|
||||
{
|
||||
if (hue < 1102)
|
||||
return 1102;
|
||||
if (hue > 1149)
|
||||
return 1149;
|
||||
return hue;
|
||||
}
|
||||
|
||||
public override int RandomHairHue() => Utility.Random(1102, 48);
|
||||
}
|
||||
|
||||
private class Elf : Race
|
||||
{
|
||||
private static readonly int[] m_SkinHues =
|
||||
private static int[] m_SkinHues =
|
||||
{
|
||||
0x0BF, 0x24D, 0x24E, 0x24F, 0x353, 0x361, 0x367, 0x374,
|
||||
0x375, 0x376, 0x381, 0x382, 0x383, 0x384, 0x385, 0x389,
|
||||
|
|
@ -98,7 +123,7 @@ namespace Server.Misc
|
|||
0x51D, 0x53F, 0x579, 0x76B, 0x76C, 0x76D, 0x835, 0x903
|
||||
};
|
||||
|
||||
private static readonly int[] m_HairHues =
|
||||
private static int[] m_HairHues =
|
||||
{
|
||||
0x034, 0x035, 0x036, 0x037, 0x038, 0x039, 0x058, 0x08E,
|
||||
0x08F, 0x090, 0x091, 0x092, 0x101, 0x159, 0x15A, 0x15B,
|
||||
|
|
@ -114,10 +139,10 @@ namespace Server.Misc
|
|||
{
|
||||
}
|
||||
|
||||
public override bool ValidateHair(bool female, int itemID) =>
|
||||
itemID == 0 || (!female || itemID != 0x2FCD && itemID != 0x2FBF) &&
|
||||
(female || itemID != 0x2FCC && itemID != 0x2FD0) &&
|
||||
(itemID >= 0x2FBF && itemID <= 0x2FC2 || itemID >= 0x2FCC && itemID <= 0x2FD1);
|
||||
public override bool ValidateHair(bool female, int itemID)
|
||||
{
|
||||
if (itemID == 0)
|
||||
return true;
|
||||
|
||||
if (female && (itemID == 0x2FCD || itemID == 0x2FBF) || !female && (itemID == 0x2FCC || itemID == 0x2FD0))
|
||||
return false;
|
||||
|
|
@ -161,9 +186,14 @@ namespace Server.Misc
|
|||
|
||||
public override int RandomSkinHue() => m_SkinHues[Utility.Random(m_SkinHues.Length)] | 0x8000;
|
||||
|
||||
public override int RandomSkinHue() => m_SkinHues[Utility.Random(m_SkinHues.Length)] | 0x8000;
|
||||
public override int ClipHairHue(int hue)
|
||||
{
|
||||
for (int i = 0; i < m_HairHues.Length; i++)
|
||||
if (m_HairHues[i] == hue)
|
||||
return hue;
|
||||
|
||||
public override int ClipHairHue(int hue) => m_HairHues.Any(t => t == hue) ? hue : m_HairHues[0];
|
||||
return m_HairHues[0];
|
||||
}
|
||||
|
||||
public override int RandomHairHue() => m_HairHues[Utility.Random(m_HairHues.Length)];
|
||||
}
|
||||
|
|
@ -195,11 +225,13 @@ namespace Server.Misc
|
|||
{
|
||||
}
|
||||
|
||||
public override bool ValidateHair(bool female, int itemID) =>
|
||||
female == false
|
||||
? itemID >= 0x4258 && itemID <= 0x425F
|
||||
: itemID == 0x4261 || itemID == 0x4262 || itemID >= 0x4273 && itemID <= 0x4275 || itemID == 0x42B0 ||
|
||||
itemID == 0x42B1 || itemID == 0x42AA || itemID == 0x42AB;
|
||||
public override bool ValidateHair(bool female, int itemID)
|
||||
{
|
||||
if (female == false) return itemID >= 0x4258 && itemID <= 0x425F;
|
||||
|
||||
return itemID == 0x4261 || itemID == 0x4262 || itemID >= 0x4273 && itemID <= 0x4275 || itemID == 0x42B0 ||
|
||||
itemID == 0x42B1 || itemID == 0x42AA || itemID == 0x42AB;
|
||||
}
|
||||
|
||||
public override int RandomHair(bool female)
|
||||
{
|
||||
|
|
@ -230,9 +262,14 @@ namespace Server.Misc
|
|||
|
||||
public override int RandomSkinHue() => m_BodyHues[Utility.Random(m_BodyHues.Length)] | 0x8000;
|
||||
|
||||
public override int RandomSkinHue() => m_BodyHues[Utility.Random(m_BodyHues.Length)] | 0x8000;
|
||||
public override int ClipHairHue(int hue)
|
||||
{
|
||||
for (int i = 0; i < m_HornHues.Length; i++)
|
||||
if (m_HornHues[i] == hue)
|
||||
return hue;
|
||||
|
||||
public override int ClipHairHue(int hue) => m_HornHues.Any(t => t == hue) ? hue : m_HornHues[0];
|
||||
return m_HornHues[0];
|
||||
}
|
||||
|
||||
public override int RandomHairHue() => m_HornHues[Utility.Random(m_HornHues.Length)];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue