Updates rest of the random list (#197)
This commit is contained in:
parent
4403d6c1c7
commit
8caf5a422f
18 changed files with 116 additions and 79 deletions
|
|
@ -599,8 +599,7 @@ namespace Server.Items
|
|||
Item item = Loot.Construct(m_Types);
|
||||
|
||||
if (item is Key key)
|
||||
key.ItemID = Utility.RandomList((int)KeyType.Copper, (int)KeyType.Gold, (int)KeyType.Iron,
|
||||
(int)KeyType.Rusty);
|
||||
key.ItemID = Utility.RandomList((int)KeyType.Copper, (int)KeyType.Gold, (int)KeyType.Iron, (int)KeyType.Rusty);
|
||||
else if (item is Arrow || item is Bolt)
|
||||
item.Amount = Utility.RandomMinMax(2, 6);
|
||||
else if (item is Bandage || item is Lockpick)
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ namespace Server.Items
|
|||
private string m_Name;
|
||||
|
||||
[Constructible]
|
||||
public ParagonChest(string name, int level) : base(Utility.RandomList(m_ItemIDs))
|
||||
public ParagonChest(string name, int level) : base(m_ItemIDs.RandomElement())
|
||||
{
|
||||
m_Name = name;
|
||||
Hue = Utility.RandomList(m_Hues);
|
||||
Hue = m_Hues.RandomElement();
|
||||
Fill(level);
|
||||
}
|
||||
|
||||
|
|
@ -207,4 +207,4 @@ namespace Server.Items
|
|||
m_Name = Utility.Intern(reader.ReadString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Server.Items
|
|||
};
|
||||
|
||||
[Constructible]
|
||||
public ShimmeringCrystals() : base(Utility.RandomList(m_ItemIDs))
|
||||
public ShimmeringCrystals() : base(m_ItemIDs.RandomElement())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -36,4 +36,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Server.Items
|
|||
Weight = 1.0;
|
||||
|
||||
if (Utility.RandomDouble() < 0.01)
|
||||
Hue = Utility.RandomList(m_Hues);
|
||||
Hue = m_Hues.RandomElement();
|
||||
else
|
||||
Hue = 0x8A0;
|
||||
}
|
||||
|
|
@ -405,4 +405,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ namespace Server.Items
|
|||
|
||||
public override void Initialize()
|
||||
{
|
||||
Hue = Utility.RandomList(m_Hues);
|
||||
Hue = m_Hues.RandomElement();
|
||||
|
||||
AddComponent(new PlagueBeastComponent(0x3BB, Hue), 0, 0);
|
||||
AddComponent(new PlagueBeastComponent(0x3BA, Hue), 4, 6);
|
||||
|
|
@ -264,13 +264,13 @@ namespace Server.Items
|
|||
Opened = true;
|
||||
}
|
||||
|
||||
private static int RandomHue(int exculde)
|
||||
private static int RandomHue(int exclude)
|
||||
{
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int hue = Utility.RandomList(m_Hues);
|
||||
int hue = m_Hues.RandomElement();
|
||||
|
||||
if (hue != exculde)
|
||||
if (hue != exclude)
|
||||
return hue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Server.Items
|
|||
private bool m_IsRewardItem;
|
||||
|
||||
[Constructible]
|
||||
public RewardBrazier() : this(Utility.RandomList(m_Art))
|
||||
public RewardBrazier() : this(m_Art.RandomElement())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,14 +208,13 @@ namespace Server.Items
|
|||
return;
|
||||
|
||||
Effects.PlaySound(target, map, Utility.RandomList(0x11B, 0x11C, 0x11D));
|
||||
Effects.SendLocationEffect(target, map, Utility.RandomList(m_Effects), 16, 1);
|
||||
Effects.SendLocationEffect(target, map, m_Effects.RandomElement(), 16, 1);
|
||||
|
||||
for (int count = Utility.Random(3); count > 0; count--)
|
||||
{
|
||||
IPoint3D location = new Point3D(target.X + Utility.RandomMinMax(-1, 1),
|
||||
target.Y + Utility.RandomMinMax(-1, 1), target.Z);
|
||||
int effect = Utility.RandomList(m_Effects);
|
||||
Effects.SendLocationEffect(location, map, effect, 16, 1);
|
||||
Effects.SendLocationEffect(location, map, m_Effects.RandomElement(), 16, 1);
|
||||
}
|
||||
|
||||
Charges -= 1;
|
||||
|
|
|
|||
|
|
@ -903,7 +903,7 @@ namespace Server.Items
|
|||
0x2F58, 0x2F59, 0x2F5A, 0x2F5B
|
||||
};
|
||||
|
||||
public static int GetRandomItemID() => Utility.RandomList(m_ItemIDs);
|
||||
public static int GetRandomItemID() => m_ItemIDs.RandomElement();
|
||||
|
||||
private static readonly Type[] m_Summons =
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue