using System.Collections.Generic; using ACE.Database.Models.World; using ACE.Server.Factories.Entity; namespace ACE.Server.Factories.Tables { public static class PetDeviceChance { private static ChanceTable T1_T3_PetLevelChances = new ChanceTable() { ( 50, 1.0f ) }; private static ChanceTable T4_PetLevelChances = new ChanceTable() { ( 50, 0.75f ), ( 80, 0.25f ) }; private static ChanceTable T5_PetLevelChances = new ChanceTable() { ( 50, 0.15f ), ( 80, 0.65f ), ( 100, 0.20f ), }; private static ChanceTable T6_PetLevelChances = new ChanceTable() { ( 80, 0.15f ), ( 100, 0.25f ), ( 125, 0.50f ), ( 150, 0.10f ), }; private static ChanceTable T7_PetLevelChances = new ChanceTable() { ( 100, 0.15f ), ( 125, 0.25f ), ( 150, 0.50f ), ( 180, 0.10f ), }; private static ChanceTable T8_PetLevelChances = new ChanceTable() { ( 100, 0.0125f ), ( 125, 0.025f ), ( 150, 0.05f ), ( 180, 0.50f ), ( 200, 0.4125f ), }; private static readonly List> petLevelChances = new List>() { T1_T3_PetLevelChances, T1_T3_PetLevelChances, T1_T3_PetLevelChances, T4_PetLevelChances, T5_PetLevelChances, T6_PetLevelChances, T7_PetLevelChances, T8_PetLevelChances, }; /// /// Rolls for a CombatPet level for a PetDevice /// public static int Roll(TreasureDeath profile) { var table = petLevelChances[profile.Tier - 1]; return table.Roll(profile.LootQualityMod); } } }