This commit is contained in:
dingo
2025-12-15 16:07:17 -05:00
parent 8e197eefb2
commit b2ea3c19c1
8 changed files with 1850 additions and 2 deletions
+1
View File
@@ -31,6 +31,7 @@ public sealed class GameDbContext : DbContext
public DbSet<DungeonLootTable> DungeonLootTables => Set<DungeonLootTable>();
public DbSet<DungeonLootTableEntry> DungeonLootTableEntries => Set<DungeonLootTableEntry>();
public DbSet<DungeonMobLootTable> DungeonMobLootTables => Set<DungeonMobLootTable>();
public DbSet<DungeonBeltItem> DungeonBeltItems => Set<DungeonBeltItem>();
protected override void OnModelCreating(ModelBuilder b)
{
b.ApplyConfigurationsFromAssembly(typeof(GameDbContext).Assembly);
+32
View File
@@ -0,0 +1,32 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Server.Data.Entities;
/// <summary>
/// Hotbar/belt item slot assignment for quick item access
/// </summary>
[Table("dungeon_belt_items")]
public class DungeonBeltItem
{
[Key]
public ulong Id { get; set; }
[Required]
public ulong CharacterId { get; set; }
/// <summary>
/// Hotbar slot (0-7)
/// </summary>
[Required]
public int SlotIndex { get; set; }
/// <summary>
/// Reference to inventory slot index (not item ID, since items can stack/move)
/// </summary>
public int InventorySlotIndex { get; set; }
// Navigation
[ForeignKey("CharacterId")]
public virtual DungeonCharacter? Character { get; set; }
}