Updates rest of the random list (#197)

This commit is contained in:
Kamron Batman 2020-08-22 00:23:51 -07:00 • committed by GitHub
parent 4403d6c1c7
commit 8caf5a422f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 116 additions and 79 deletions

View file

@ -335,8 +335,7 @@ namespace Server.Engines.Harvest
public virtual void DoHarvestingSound(Mobile from, Item tool, HarvestDefinition def, object toHarvest)
{
if (def.EffectSounds.Length > 0)
from.PlaySound(Utility.RandomList(def.EffectSounds));
from.PlaySound(def.EffectSounds.RandomElement(-1));
}
public virtual void DoHarvestingEffect(Mobile from, Item tool, HarvestDefinition def, Map map, Point3D loc)
@ -344,7 +343,7 @@ namespace Server.Engines.Harvest
from.Direction = from.GetDirectionTo(loc);
if (!from.Mounted)
from.Animate(Utility.RandomList(def.EffectActions), 5, 1, true, false, 0);
from.Animate(def.EffectActions.RandomElement(), 5, 1, true, false, 0);
}
public virtual HarvestDefinition GetDefinition() => Definitions.First();