mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* update recipes to use mutation scripts * additional refactoring * . * update proficiency code * foolproof salvage code is still needed until recipes are added * add comment * add rare foolproof * update sandstone * adding sandstone mutation * update RecipeManager_New recipes for foolproof salvage * add RecipeManager_New caching * finish removing ClearRecipe() * update comments * update defense imbues to include shields, as per base recipe * improved UpdateObject server sync
21 lines
507 B
C#
21 lines
507 B
C#
using System.Collections.Generic;
|
|
|
|
using ACE.Server.WorldObjects;
|
|
|
|
namespace ACE.Server.Entity.Mutations
|
|
{
|
|
public class MutationOutcome
|
|
{
|
|
public List<EffectList> EffectLists = new List<EffectList>();
|
|
|
|
public bool TryMutate(WorldObject wo, double rng)
|
|
{
|
|
foreach (var effectList in EffectLists)
|
|
{
|
|
if (rng < effectList.Chance)
|
|
return effectList.TryMutate(wo);
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|