Files
systemrevivalserver/data/entities/DungeonMobLootTable.cs
T
2025-12-08 11:57:08 -05:00

38 lines
1.1 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Server.Data.Entities;
namespace Server.Data.Entities
{
/// <summary>
/// Maps mobs to their loot tables (many-to-many)
/// A mob can have multiple loot tables, and a loot table can be used by multiple mobs
/// </summary>
[Table("dungeon_mob_loot_tables")]
public class DungeonMobLootTable
{
[Key]
public int Id { get; set; }
public int MobDefinitionId { get; set; }
[ForeignKey(nameof(MobDefinitionId))]
public DungeonMobDefinition? MobDefinition { get; set; }
public int LootTableId { get; set; }
[ForeignKey(nameof(LootTableId))]
public DungeonLootTable? LootTable { get; set; }
/// <summary>
/// Priority/order for rolling this table (lower = first)
/// </summary>
public int Priority { get; set; } = 0;
/// <summary>
/// Chance this loot table is rolled at all (0.0 - 1.0)
/// </summary>
public float RollChance { get; set; } = 1.0f;
}
}