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

62 lines
1.5 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Server.Data.Enums;
namespace Server.Data.Entities;
/// <summary>
/// A loot table defines a collection of possible item drops
/// </summary>
[Table("dungeon_loot_tables")]
public class DungeonLootTable
{
[Key]
public int Id { get; set; }
[Required]
[MaxLength(64)]
public string Name { get; set; } = "";
[MaxLength(256)]
public string Description { get; set; } = "";
/// <summary>
/// Minimum dungeon tier for this loot table to be active
/// </summary>
public int MinTier { get; set; } = 1;
/// <summary>
/// Maximum dungeon tier (99 = no limit)
/// </summary>
public int MaxTier { get; set; } = 99;
/// <summary>
/// Global drop chance multiplier for all entries in this table
/// </summary>
public float DropChanceMultiplier { get; set; } = 1.0f;
/// <summary>
/// Minimum number of items to drop from this table
/// </summary>
public int MinDrops { get; set; } = 1;
/// <summary>
/// Maximum number of items to drop from this table
/// </summary>
public int MaxDrops { get; set; } = 3;
/// <summary>
/// If true, guaranteed to drop at least MinDrops items
/// </summary>
public bool GuaranteedDrop { get; set; } = false;
public bool IsEnabled { get; set; } = true;
// Navigation
public ICollection<DungeonLootTableEntry> Entries { get; set; } = new List<DungeonLootTableEntry>();
}