using System.Collections.Generic; using ACE.Server.Factories.Entity; using ACE.Server.Factories.Enum; namespace ACE.Server.Factories.Tables { public static class TreasureProfile_Mundane { // indexed by TreasureDeath.MundaneItemTypeSelectionChances private static ChanceTable mundaneProfile1 = new ChanceTable() { ( TreasureItemType.Consumable, 1.0f ), }; private static ChanceTable mundaneProfile2 = new ChanceTable() { ( TreasureItemType.HealKit, 1.0f ), }; private static ChanceTable mundaneProfile3 = new ChanceTable() { ( TreasureItemType.Lockpick, 1.0f ), }; private static ChanceTable mundaneProfile4 = new ChanceTable() { ( TreasureItemType.SpellComponent, 1.0f ), }; private static ChanceTable mundaneProfile5 = new ChanceTable() { ( TreasureItemType.ManaStone, 1.0f ), }; private static ChanceTable mundaneProfile6 = new ChanceTable() { ( TreasureItemType.Pyreal, 1.0f ), }; /// /// The most common MundaneItem profile /// private static ChanceTable mundaneProfile7 = new ChanceTable() { ( TreasureItemType.Pyreal, 0.17f ), ( TreasureItemType.Consumable, 0.17f ), ( TreasureItemType.HealKit, 0.16f ), ( TreasureItemType.Lockpick, 0.16f ), ( TreasureItemType.SpellComponent, 0.17f ), ( TreasureItemType.ManaStone, 0.17f ), }; /// /// The second most common MundaneItem profile /// private static ChanceTable mundaneProfile8 = new ChanceTable() { ( TreasureItemType.Pyreal, 0.34f ), ( TreasureItemType.SpellComponent, 0.33f ), ( TreasureItemType.ManaStone, 0.33f ), }; /// /// TreasureDeath.MundaneItemTypeSelectionChances indexes into these profiles /// public static List> mundaneProfiles = new List>() { mundaneProfile1, mundaneProfile2, mundaneProfile3, mundaneProfile4, mundaneProfile5, mundaneProfile6, mundaneProfile7, mundaneProfile8, }; /// /// Rolls for a TreasureItemType for a TreasureItemCategory.MundaneItem /// /// From TreasureDeath.MundaneItemTypeSelectionChances public static TreasureItemType Roll(int mundaneProfile) { if (mundaneProfile < 1 || mundaneProfile > mundaneProfiles.Count) return TreasureItemType.Undef; return mundaneProfiles[mundaneProfile - 1].Roll(); } } }