LootGenerator
Namespace: TestProject
Main class for generating loot based on drop tables and context. This is the primary entry point for the loot generation system.
public class LootGenerator
Inheritance Object → LootGenerator Attributes NullableContextAttribute, NullableAttribute
Remarks:
This class applies all registered modifiers before generating drops.
Properties
Id
Gets the unique identifier for this generator.
public string Id { get; set; }
Property Value
Seed
Gets or sets the seed for random number generation.
public Nullable<int> Seed { get; set; }
Property Value
Constructors
LootGenerator()
Initializes a new instance of the LootGenerator class.
public LootGenerator()
LootGenerator(Int32)
Initializes a new instance of the LootGenerator class with a specific seed.
public LootGenerator(int seed)
Parameters
seed Int32
The seed for random number generation.
Methods
AddModifier(ILootModifier)
Adds a modifier to the loot generation process.
public void AddModifier(ILootModifier modifier)
Parameters
modifier ILootModifier
The modifier to add.
Exceptions
ArgumentNullException Thrown when modifier is null.
GenerateLoot(IDropTable, DropContext)
Generates loot based on the provided drop table and context.
public List<DropResult> GenerateLoot(IDropTable dropTable, DropContext context)
Parameters
dropTable IDropTable
The drop table to use for generation.
context DropContext
The context for loot generation.
Returns
List<DropResult> A list of generated drop results.