Creates random element extension (#196)
This commit is contained in:
parent
0926b5abaa
commit
4403d6c1c7
84 changed files with 226 additions and 330 deletions
|
|
@ -32,7 +32,7 @@ namespace Server.Spells.Bushido
|
|||
if (!CheckMana(attacker, true))
|
||||
return;
|
||||
|
||||
Mobile target = targets[Utility.Random(targets.Count)];
|
||||
Mobile target = targets.RandomElement();
|
||||
|
||||
double damageBonus = attacker.Skills.Bushido.Value / 100.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace Server.Spells.Fifth
|
|||
if (CheckSequence())
|
||||
try
|
||||
{
|
||||
BaseCreature creature = (BaseCreature)ActivatorUtil.CreateInstance(m_Types[Utility.Random(m_Types.Length)]);
|
||||
BaseCreature creature = (BaseCreature)ActivatorUtil.CreateInstance(m_Types.RandomElement());
|
||||
|
||||
// creature.ControlSlots = 2;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace Server.Spells.First
|
|||
{
|
||||
if (CheckSequence())
|
||||
{
|
||||
FoodInfo foodInfo = m_Food[Utility.Random(m_Food.Length)];
|
||||
FoodInfo foodInfo = m_Food.RandomElement();
|
||||
Item food = foodInfo.Create();
|
||||
|
||||
if (food != null)
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
Type[] animates = entry.m_ToSummon;
|
||||
|
||||
toSummon = animates[Utility.Random(animates.Length)];
|
||||
toSummon = animates.RandomElement();
|
||||
}
|
||||
|
||||
if (toSummon == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue