diff --git a/Game/Dungeon/DungeonHandler.cs b/Game/Dungeon/DungeonHandler.cs
index 9396ece..f34a8da 100644
--- a/Game/Dungeon/DungeonHandler.cs
+++ b/Game/Dungeon/DungeonHandler.cs
@@ -71,7 +71,8 @@ public sealed class DungeonHandler : IClientMessageHandler
DungeonOpCodes.UNEQUIP_ITEM,
DungeonOpCodes.USE_ITEM,
DungeonOpCodes.DROP_ITEM,
- DungeonOpCodes.CHAT_SEND
+ DungeonOpCodes.CHAT_SEND,
+ DungeonOpCodes.HOTBAR_ASSIGN
};
public async Task InitializeAsync()
@@ -195,6 +196,9 @@ public sealed class DungeonHandler : IClientMessageHandler
case DungeonOpCodes.CHAT_SEND:
await HandleChatSend(connection, session, payload, ct);
break;
+ case DungeonOpCodes.HOTBAR_ASSIGN:
+ await HandleHotbarAssign(connection, session, payload, ct);
+ break;
}
}
catch (Exception ex)
@@ -545,6 +549,71 @@ public sealed class DungeonHandler : IClientMessageHandler
{
session.IsEscaping = false;
}
+ ///
+ /// Handle hotbar slot assignment - links a hotbar slot to an inventory slot
+ ///
+ private async Task HandleHotbarAssign(IConnection connection, DungeonPlayerSession session, ReadOnlyMemory payload, CancellationToken ct)
+ {
+ var json = System.Text.Encoding.UTF8.GetString(payload.Span);
+ var request = System.Text.Json.JsonSerializer.Deserialize(json);
+ if (request == null) return;
+
+ // Validate slots
+ if (request.HotbarSlot < 0 || request.HotbarSlot >= 8) return;
+ if (request.InventorySlot < 0 || request.InventorySlot >= 30) return;
+
+ using var scope = _scopeFactory.CreateScope();
+ var db = scope.ServiceProvider.GetRequiredService();
+
+ // Check if the inventory slot has a consumable item
+ var invItem = await db.Set()
+ .FirstOrDefaultAsync(i => i.CharacterId == session.CharacterId &&
+ i.SlotIndex == request.InventorySlot &&
+ !i.IsEquipped, ct);
+
+ if (invItem != null)
+ {
+ var itemDef = await db.Set()
+ .FirstOrDefaultAsync(d => d.Id == invItem.ItemDefinitionId, ct);
+
+ // Only allow consumables in hotbar
+ if (itemDef == null || itemDef.Type != ItemType.Consumable)
+ {
+ _log.LogDebug("Cannot assign non-consumable item to hotbar");
+ return;
+ }
+ }
+
+ // Find existing hotbar entry for this slot
+ var existingEntry = await db.Set()
+ .FirstOrDefaultAsync(b => b.CharacterId == session.CharacterId &&
+ b.SlotIndex == request.HotbarSlot, ct);
+
+ if (existingEntry != null)
+ {
+ // Update existing
+ existingEntry.InventorySlotIndex = request.InventorySlot;
+ }
+ else
+ {
+ // Create new
+ var newEntry = new DungeonBeltItem
+ {
+ CharacterId = session.CharacterId,
+ SlotIndex = request.HotbarSlot,
+ InventorySlotIndex = request.InventorySlot
+ };
+ db.Set().Add(newEntry);
+ }
+
+ await db.SaveChangesAsync(ct);
+
+ // Send updated inventory state (includes hotbar)
+ await HandleInventoryRequest(connection, session, ct);
+
+ _log.LogDebug("Player {Name} assigned inventory slot {InvSlot} to hotbar slot {HotbarSlot}",
+ session.Character.Name, request.InventorySlot, request.HotbarSlot);
+ }
private void TickAll(object? state)
{
@@ -782,7 +851,23 @@ public sealed class DungeonHandler : IClientMessageHandler
};
}
}
+ // Load hotbar assignments
+ var hotbarItems = await db.Set()
+ .Where(b => b.CharacterId == session.CharacterId)
+ .OrderBy(b => b.SlotIndex)
+ .ToListAsync(ct);
+ var hotbar = new object?[8];
+ foreach (var belt in hotbarItems)
+ {
+ if (belt.SlotIndex >= 0 && belt.SlotIndex < 8)
+ {
+ hotbar[belt.SlotIndex] = new
+ {
+ inventory_slot = belt.InventorySlotIndex
+ };
+ }
+ }
// Build equipment map - using your actual enum names
var equipment = new Dictionary();
foreach (var equippedItem in inventoryItems.Where(i => i.IsEquipped))
@@ -824,7 +909,8 @@ public sealed class DungeonHandler : IClientMessageHandler
await SendAsync(connection, DungeonOpCodes.INVENTORY_STATE, new
{
items,
- equipment
+ equipment,
+ hotbar,
}, ct);
}
diff --git a/Migrations/20251215205932_AddDungeonBeltItems.Designer.cs b/Migrations/20251215205932_AddDungeonBeltItems.Designer.cs
new file mode 100644
index 0000000..562f0d9
--- /dev/null
+++ b/Migrations/20251215205932_AddDungeonBeltItems.Designer.cs
@@ -0,0 +1,1639 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Server.Data;
+
+#nullable disable
+
+namespace SystemRevivalServer.Migrations
+{
+ [DbContext(typeof(GameDbContext))]
+ [Migration("20251215205932_AddDungeonBeltItems")]
+ partial class AddDungeonBeltItems
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.10")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("Server.Data.Account", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("BannedUntil")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("datetime(6)")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
+
+ b.Property("Email")
+ .HasMaxLength(255)
+ .HasColumnType("varchar(255)");
+
+ b.Property("IsBanned")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("PasswordHash")
+ .IsRequired()
+ .HasColumnType("varbinary(64)");
+
+ b.Property("PasswordSalt")
+ .IsRequired()
+ .HasColumnType("varbinary(32)");
+
+ b.Property("Role")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(0);
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("datetime(6)")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
+
+ MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedAt"));
+
+ b.Property("Username")
+ .IsRequired()
+ .HasMaxLength(32)
+ .HasColumnType("varchar(32)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Email")
+ .IsUnique();
+
+ b.HasIndex("Username")
+ .IsUnique();
+
+ b.ToTable("accounts", (string)null);
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("CharacterId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("InventorySlotIndex")
+ .HasColumnType("int");
+
+ b.Property("SlotIndex")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CharacterId");
+
+ b.ToTable("dungeon_belt_items");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("AccountId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("BossesKilled")
+ .HasColumnType("int");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CurrentHealth")
+ .HasColumnType("int");
+
+ b.Property("CurrentMana")
+ .HasColumnType("int");
+
+ b.Property("Dexterity")
+ .HasColumnType("int");
+
+ b.Property("DungeonsCompleted")
+ .HasColumnType("int");
+
+ b.Property("Endurance")
+ .HasColumnType("int");
+
+ b.Property("EquippedAccessory")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("EquippedBoots")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("EquippedChest")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("EquippedGloves")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("EquippedHead")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("EquippedLegs")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("EquippedOffhand")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("EquippedWeapon")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("Experience")
+ .HasColumnType("bigint");
+
+ b.Property("Intelligence")
+ .HasColumnType("int");
+
+ b.Property("IsDeleted")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastPlayedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Level")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(32)
+ .HasColumnType("varchar(32)");
+
+ b.Property("PlayersKilled")
+ .HasColumnType("int");
+
+ b.Property("Strength")
+ .HasColumnType("int");
+
+ b.Property("TotalDeaths")
+ .HasColumnType("int");
+
+ b.Property("TotalKills")
+ .HasColumnType("int");
+
+ b.Property("UnspentStatPoints")
+ .HasColumnType("int");
+
+ b.Property("Wisdom")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AccountId");
+
+ b.ToTable("dungeon_characters");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("AcquiredAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CharacterId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("EquipSlot")
+ .HasColumnType("int");
+
+ b.Property("IsEquipped")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ItemDefinitionId")
+ .HasColumnType("int");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("SlotIndex")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CharacterId");
+
+ b.HasIndex("ItemDefinitionId");
+
+ b.ToTable("dungeon_character_items");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Armor")
+ .HasColumnType("int");
+
+ b.Property("AttackRange")
+ .HasColumnType("float");
+
+ b.Property("BonusDexterity")
+ .HasColumnType("int");
+
+ b.Property("BonusEndurance")
+ .HasColumnType("int");
+
+ b.Property("BonusHealth")
+ .HasColumnType("int");
+
+ b.Property("BonusIntelligence")
+ .HasColumnType("int");
+
+ b.Property("BonusMana")
+ .HasColumnType("int");
+
+ b.Property("BonusStrength")
+ .HasColumnType("int");
+
+ b.Property("BonusWisdom")
+ .HasColumnType("int");
+
+ b.Property("DamageType")
+ .HasColumnType("int");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("EquipSlot")
+ .HasColumnType("int");
+
+ b.Property("HealAmount")
+ .HasColumnType("int");
+
+ b.Property("IsEnabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsTeleportScroll")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("MagicResist")
+ .HasColumnType("int");
+
+ b.Property("ManaRestore")
+ .HasColumnType("int");
+
+ b.Property("MaxDamage")
+ .HasColumnType("int");
+
+ b.Property("MaxStack")
+ .HasColumnType("int");
+
+ b.Property("MinDamage")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Rarity")
+ .HasColumnType("int");
+
+ b.Property("RequiredDexterity")
+ .HasColumnType("int");
+
+ b.Property("RequiredIntelligence")
+ .HasColumnType("int");
+
+ b.Property("RequiredLevel")
+ .HasColumnType("int");
+
+ b.Property("RequiredStrength")
+ .HasColumnType("int");
+
+ b.Property("RequiredWisdom")
+ .HasColumnType("int");
+
+ b.Property("SpriteId")
+ .HasColumnType("int");
+
+ b.Property("Stackable")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("StaminaRestore")
+ .HasColumnType("int");
+
+ b.Property("TeachesSpellId")
+ .HasColumnType("int");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("dungeon_item_definitions");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("CharacterId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("DefinitionId")
+ .HasColumnType("int");
+
+ b.Property("LearnedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("SpellDefinitionId")
+ .HasColumnType("int");
+
+ b.Property("SpellLevel")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CharacterId");
+
+ b.HasIndex("DefinitionId");
+
+ b.ToTable("dungeon_learned_spells");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("DropChanceMultiplier")
+ .HasColumnType("float");
+
+ b.Property("GuaranteedDrop")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsEnabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("MaxDrops")
+ .HasColumnType("int");
+
+ b.Property("MaxTier")
+ .HasColumnType("int");
+
+ b.Property("MinDrops")
+ .HasColumnType("int");
+
+ b.Property("MinTier")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.HasKey("Id");
+
+ b.ToTable("dungeon_loot_tables");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DropChance")
+ .HasColumnType("float");
+
+ b.Property("DropChancePerTier")
+ .HasColumnType("float");
+
+ b.Property("Guaranteed")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ItemDefinitionId")
+ .HasColumnType("int");
+
+ b.Property("LootTableId")
+ .HasColumnType("int");
+
+ b.Property("MaxDropChance")
+ .HasColumnType("float");
+
+ b.Property("MaxQuantity")
+ .HasColumnType("int");
+
+ b.Property("MinQuantity")
+ .HasColumnType("int");
+
+ b.Property("Weight")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ItemDefinitionId");
+
+ b.HasIndex("LootTableId");
+
+ b.ToTable("dungeon_loot_table_entries");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("AbilitiesJson")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("AggroRange")
+ .HasColumnType("float");
+
+ b.Property("AnimationSpeed")
+ .HasColumnType("float");
+
+ b.Property("ArmorPerTier")
+ .HasColumnType("float");
+
+ b.Property("AttackFrames")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("AttackRange")
+ .HasColumnType("float");
+
+ b.Property("AttackSpeed")
+ .HasColumnType("float");
+
+ b.Property("BaseArmor")
+ .HasColumnType("int");
+
+ b.Property("BaseHealth")
+ .HasColumnType("int");
+
+ b.Property("BaseMagicDamage")
+ .HasColumnType("int");
+
+ b.Property("BaseMagicResist")
+ .HasColumnType("int");
+
+ b.Property("BaseMana")
+ .HasColumnType("int");
+
+ b.Property("BasePhysicalDamage")
+ .HasColumnType("int");
+
+ b.Property("BaseXp")
+ .HasColumnType("int");
+
+ b.Property("Category")
+ .HasColumnType("int");
+
+ b.Property("DamagePerTier")
+ .HasColumnType("float");
+
+ b.Property("DeathFrames")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("DropChanceMultiplier")
+ .HasColumnType("float");
+
+ b.Property("HealthPerTier")
+ .HasColumnType("float");
+
+ b.Property("IdleFrames")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("IsEnabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LeashRange")
+ .HasColumnType("float");
+
+ b.Property("LootTableId")
+ .HasColumnType("int");
+
+ b.Property("MaxTier")
+ .HasColumnType("int");
+
+ b.Property("MinTier")
+ .HasColumnType("int");
+
+ b.Property("MoveSpeed")
+ .HasColumnType("float");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ResistancesJson")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("SpriteHeight")
+ .HasColumnType("int");
+
+ b.Property("SpriteIndex")
+ .HasColumnType("int");
+
+ b.Property("SpriteSheet")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("SpriteWidth")
+ .HasColumnType("int");
+
+ b.Property("TintColor")
+ .IsRequired()
+ .HasMaxLength(16)
+ .HasColumnType("varchar(16)");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.Property("WalkFrames")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("XpPerTier")
+ .HasColumnType("float");
+
+ b.HasKey("Id");
+
+ b.ToTable("dungeon_mob_definitions");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("LootTableId")
+ .HasColumnType("int");
+
+ b.Property("MobDefinitionId")
+ .HasColumnType("int");
+
+ b.Property("Priority")
+ .HasColumnType("int");
+
+ b.Property("RollChance")
+ .HasColumnType("float");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LootTableId");
+
+ b.HasIndex("MobDefinitionId");
+
+ b.ToTable("dungeon_mob_loot_tables");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("AreaOfEffect")
+ .HasColumnType("float");
+
+ b.Property("BaseDamage")
+ .HasColumnType("int");
+
+ b.Property("BaseHealing")
+ .HasColumnType("int");
+
+ b.Property("Cooldown")
+ .HasColumnType("float");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("EffectColor")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("IsEnabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsShield")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsTeleport")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ManaCost")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("Range")
+ .HasColumnType("float");
+
+ b.Property("RequiredIntelligence")
+ .HasColumnType("int");
+
+ b.Property("RequiredLevel")
+ .HasColumnType("int");
+
+ b.Property("RequiredWisdom")
+ .HasColumnType("int");
+
+ b.Property("ShieldAmount")
+ .HasColumnType("int");
+
+ b.Property("SpriteId")
+ .HasColumnType("int");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("dungeon_spell_definitions");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("CharacterId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("DefinitionId")
+ .HasColumnType("int");
+
+ b.Property("ItemDefinitionId")
+ .HasColumnType("int");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("SlotIndex")
+ .HasColumnType("int");
+
+ b.Property("StoredAt")
+ .HasColumnType("datetime(6)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CharacterId");
+
+ b.HasIndex("DefinitionId");
+
+ b.ToTable("dungeon_stash_items");
+ });
+
+ modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("CharacterId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("datetime(6)")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
+
+ b.Property("ItemTemplateId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("SlotCode")
+ .HasColumnType("tinyint unsigned");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("datetime(6)")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
+
+ MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedAt"));
+
+ b.HasKey("Id");
+
+ b.HasIndex("ItemTemplateId");
+
+ b.HasIndex("CharacterId", "SlotCode")
+ .IsUnique();
+
+ b.ToTable("equipment", (string)null);
+ });
+
+ modelBuilder.Entity("Server.Data.GameItem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("int");
+
+ b.Property("AmmoType")
+ .HasColumnType("int");
+
+ b.Property("Category")
+ .HasColumnType("int");
+
+ b.Property("CraftCost")
+ .HasColumnType("int");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("datetime(6)")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
+
+ b.Property("Damage")
+ .HasColumnType("int");
+
+ b.Property("DamageReduction")
+ .HasColumnType("float");
+
+ b.Property("DashCooldown")
+ .HasColumnType("float");
+
+ b.Property("DashDistance")
+ .HasColumnType("float");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("ExplosionRadius")
+ .HasColumnType("float");
+
+ b.Property("FireRate")
+ .HasColumnType("float");
+
+ b.Property("HarvestMultiplier")
+ .HasColumnType("float");
+
+ b.Property("HealAmount")
+ .HasColumnType("int");
+
+ b.Property("HealthBonus")
+ .HasColumnType("int");
+
+ b.Property("IsEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(true);
+
+ b.Property("LootValue")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("PelletCount")
+ .HasColumnType("int");
+
+ b.Property("ProjectileSpeed")
+ .HasColumnType("float");
+
+ b.Property("Range")
+ .HasColumnType("float");
+
+ b.Property("ScanCooldown")
+ .HasColumnType("float");
+
+ b.Property("ScanRadius")
+ .HasColumnType("float");
+
+ b.Property("ShieldBoostDuration")
+ .HasColumnType("float");
+
+ b.Property("ShieldDuration")
+ .HasColumnType("float");
+
+ b.Property("ShieldHealth")
+ .HasColumnType("int");
+
+ b.Property("SpeedBoostDuration")
+ .HasColumnType("float");
+
+ b.Property("SpeedMultiplier")
+ .HasColumnType("float");
+
+ b.Property("SpeedPenalty")
+ .HasColumnType("float");
+
+ b.Property("Spread")
+ .HasColumnType("float");
+
+ b.Property("Stackable")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("datetime(6)")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
+
+ MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedAt"));
+
+ b.HasKey("Id");
+
+ b.HasIndex("Category");
+
+ b.HasIndex("IsEnabled");
+
+ b.ToTable("game_items", (string)null);
+ });
+
+ modelBuilder.Entity("Server.Data.GameRecipe", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("int");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("datetime(6)")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
+
+ b.Property("EnergyCost")
+ .HasColumnType("int");
+
+ b.Property("IsEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(true);
+
+ b.Property("RareCost")
+ .HasColumnType("int");
+
+ b.Property("ResultItemId")
+ .HasColumnType("int");
+
+ b.Property("ScrapCost")
+ .HasColumnType("int");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("datetime(6)")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP(6)");
+
+ MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("UpdatedAt"));
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsEnabled");
+
+ b.HasIndex("ResultItemId");
+
+ b.ToTable("game_recipes", (string)null);
+ });
+
+ modelBuilder.Entity("Server.Data.InventoryItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("CharacterId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property