diff --git a/Game/Dungeon/DungeonHandler.cs b/Game/Dungeon/DungeonHandler.cs
index 826ed54..c887cd2 100644
--- a/Game/Dungeon/DungeonHandler.cs
+++ b/Game/Dungeon/DungeonHandler.cs
@@ -80,7 +80,9 @@ public sealed class DungeonHandler : IClientMessageHandler
// Dungeon browser
DungeonOpCodes.DUNGEON_LIST_REQUEST,
DungeonOpCodes.DUNGEON_CREATE,
- DungeonOpCodes.DUNGEON_JOIN
+ DungeonOpCodes.DUNGEON_JOIN,
+ // Asset management
+ DungeonOpCodes.ASSET_MANIFEST_REQUEST
};
public async Task InitializeAsync()
@@ -228,6 +230,9 @@ public sealed class DungeonHandler : IClientMessageHandler
case DungeonOpCodes.DUNGEON_JOIN:
await HandleDungeonJoin(connection, session, payload, ct);
break;
+ case DungeonOpCodes.ASSET_MANIFEST_REQUEST:
+ await HandleAssetManifestRequest(connection, ct);
+ break;
}
}
catch (Exception ex)
@@ -783,7 +788,7 @@ public sealed class DungeonHandler : IClientMessageHandler
var emptyTime = DateTime.UtcNow - instance.LastPlayerActivity;
// If boss not killed and empty for 10+ minutes, persist to database
- if (!instance.BossKilled && !instance.IsPersisted && emptyTime.TotalMinutes >= 5)
+ if (!instance.BossKilled && !instance.IsPersisted && emptyTime.TotalMinutes >= 10)
{
_ = PersistDungeonAsync(instance, CancellationToken.None);
_dungeons.TryRemove(dungeonId, out _);
@@ -1614,6 +1619,38 @@ public sealed class DungeonHandler : IClientMessageHandler
#region Dungeon Browser Handlers
+ ///
+ /// Handle request for asset manifest (list of all CDN files for hot-update)
+ ///
+ private async Task HandleAssetManifestRequest(IConnection connection, CancellationToken ct)
+ {
+ using var scope = _scopeFactory.CreateScope();
+ var db = scope.ServiceProvider.GetRequiredService();
+
+ var assets = await db.ClientAssets
+ .Where(a => a.IsEnabled)
+ .Select(a => new
+ {
+ filePath = a.FilePath,
+ assetType = (int)a.AssetType,
+ fileHash = a.FileHash,
+ fileSize = a.FileSize,
+ version = a.Version,
+ isRequired = a.IsRequired,
+ minClientVersion = a.MinClientVersion,
+ cdnPath = a.CdnPath ?? a.FilePath
+ })
+ .ToListAsync(ct);
+
+ await SendAsync(connection, DungeonOpCodes.ASSET_MANIFEST_RESPONSE, new
+ {
+ cdnBaseUrl = "https://assets.aeternalisgames.com/downloads/",
+ assets = assets
+ }, ct);
+
+ _log.LogInformation("Sent asset manifest with {Count} files", assets.Count);
+ }
+
///
/// Handle request for list of available dungeons
///
@@ -1905,10 +1942,9 @@ public sealed class DungeonHandler : IClientMessageHandler
y = m.Y,
health = m.Health,
maxHealth = m.MaxHealth,
- spriteSheet = m.SpriteSheet,
- spriteWidth = m.SpriteWidth,
- spriteHeight = m.SpriteHeight,
- tintColor = m.TintColor
+ scenePath = m.ScenePath,
+ tintColor = m.TintColor,
+ scale = m.Scale
}),
chests = instance.Simulation.Chests.Values.Select(c => new
{
@@ -2022,13 +2058,13 @@ public sealed class DungeonHandler : IClientMessageHandler
instance.Simulation.DroppedItems.Clear();
// Reset portals (exit portal should be inactive until boss killed)
- //foreach (var portal in instance.Simulation.Portals.Values)
- //{
- // if (portal.Type == PortalType.Exit)
- // {
- // portal.IsActive = false;
- // }
- //}
+ foreach (var portal in instance.Simulation.Portals.Values)
+ {
+ if (portal.Type == PortalType.Exit)
+ {
+ portal.IsActive = false;
+ }
+ }
_log.LogDebug("Respawned {MobCount} mobs in dungeon {Id}", instance.Simulation.Mobs.Count, instance.Id);
}
@@ -2455,10 +2491,9 @@ public sealed class DungeonHandler : IClientMessageHandler
health = m.Health,
maxHealth = m.MaxHealth,
state = m.State.ToString().ToLower(),
- spriteSheet = m.SpriteSheet,
- spriteWidth = m.SpriteWidth,
- spriteHeight = m.SpriteHeight,
- tintColor = m.TintColor
+ scenePath = m.ScenePath,
+ tintColor = m.TintColor,
+ scale = m.Scale
}),
chests = sim.Chests.Values.Select(c => new
diff --git a/Game/Dungeon/DungeonSimulation.cs b/Game/Dungeon/DungeonSimulation.cs
index c7eee54..dd335c5 100644
--- a/Game/Dungeon/DungeonSimulation.cs
+++ b/Game/Dungeon/DungeonSimulation.cs
@@ -123,10 +123,9 @@ public class DungeonSimulation
MaxHealth = stats.MaxHealth,
Stats = stats,
State = MobState.Idle,
- SpriteSheet = mobDef.SpriteSheet,
- SpriteWidth = mobDef.SpriteWidth,
- SpriteHeight = mobDef.SpriteHeight,
+ ScenePath = mobDef.ScenePath,
TintColor = mobDef.TintColor,
+ Scale = mobDef.Scale,
Type = mobDef.Type
};
}
diff --git a/Game/Dungeon/MobInstance.cs b/Game/Dungeon/MobInstance.cs
index fccc59e..9d66ef4 100644
--- a/Game/Dungeon/MobInstance.cs
+++ b/Game/Dungeon/MobInstance.cs
@@ -46,11 +46,10 @@ public class MobInstance
public ulong? TargetId { get; set; }
public long LastAttackTick { get; set; }
- // Visual
- public string SpriteSheet { get; set; } = "";
- public int SpriteWidth { get; set; } = 32;
- public int SpriteHeight { get; set; } = 32;
+ // Visual - CDN scene path
+ public string? ScenePath { get; set; }
public string TintColor { get; set; } = "#ffffff";
+ public float Scale { get; set; } = 1.0f;
// Carried loot from player kills
public List CarriedPlayerLoot { get; set; } = new();
diff --git a/Migrations/20251219151110_CDN Integration.Designer.cs b/Migrations/20251219151110_CDN Integration.Designer.cs
new file mode 100644
index 0000000..b1d768a
--- /dev/null
+++ b/Migrations/20251219151110_CDN Integration.Designer.cs
@@ -0,0 +1,1880 @@
+//
+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("20251219151110_CDN Integration")]
+ partial class CDNIntegration
+ {
+ ///
+ 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.ClientAsset", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("AssetType")
+ .HasColumnType("int");
+
+ b.Property("CdnPath")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("FileHash")
+ .IsRequired()
+ .HasMaxLength(32)
+ .HasColumnType("varchar(32)");
+
+ b.Property("FilePath")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("FileSize")
+ .HasColumnType("bigint");
+
+ b.Property("IsEnabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsRequired")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("MinClientVersion")
+ .HasMaxLength(16)
+ .HasColumnType("varchar(16)");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("client_assets");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DungeonInstanceId")
+ .HasColumnType("char(36)");
+
+ b.Property("EmptiedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("GoldAmount")
+ .HasColumnType("bigint");
+
+ b.Property("IsEmpty")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("OwnerCharacterId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("VictimCharacterId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("VictimMobDefinitionId")
+ .HasColumnType("int");
+
+ b.Property("X")
+ .HasColumnType("float");
+
+ b.Property("Y")
+ .HasColumnType("float");
+
+ b.HasKey("Id");
+
+ b.HasIndex("OwnerCharacterId");
+
+ b.HasIndex("VictimCharacterId");
+
+ b.ToTable("dungeon_death_chests");
+ });
+
+ modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint unsigned");
+
+ MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id"));
+
+ b.Property("DeathChestId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("IsTaken")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ItemDefinitionId")
+ .HasColumnType("int");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("SlotIndex")
+ .HasColumnType("int");
+
+ b.Property("TakenAt")
+ .HasColumnType("datetime(6)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DeathChestId");
+
+ b.HasIndex("ItemDefinitionId");
+
+ b.ToTable("dungeon_death_chest_items");
+ });
+
+ 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("Gold")
+ .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("SpritePath")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("Stackable")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("StaminaRestore")
+ .HasColumnType("int");
+
+ b.Property("TeachesSpellId")
+ .HasColumnType("int");
+
+ b.Property("TintColor")
+ .HasMaxLength(16)
+ .HasColumnType("varchar(16)");
+
+ 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("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("Description")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("DropChanceMultiplier")
+ .HasColumnType("float");
+
+ b.Property("HealthPerTier")
+ .HasColumnType("float");
+
+ 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("Scale")
+ .HasColumnType("float");
+
+ b.Property("ScenePath")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)");
+
+ b.Property("SpriteHeight")
+ .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("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.DungeonPersistence", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("BossKilled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ChestStateJson")
+ .HasColumnType("json");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("CreatorCharacterId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("CreatorId")
+ .HasColumnType("bigint unsigned");
+
+ b.Property("CreatorLevel")
+ .HasColumnType("int");
+
+ b.Property("CreatorName")
+ .IsRequired()
+ .HasColumnType("longtext");
+
+ b.Property("IsCleared")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastActivity")
+ .HasColumnType("datetime(6)");
+
+ b.Property("LevelBracketMax")
+ .HasColumnType("int");
+
+ b.Property("LevelBracketMin")
+ .HasColumnType("int");
+
+ b.Property("LootChestStateJson")
+ .HasColumnType("json");
+
+ b.Property("MobStateJson")
+ .HasColumnType("json");
+
+ b.Property("PersistedAt")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Seed")
+ .HasColumnType("int");
+
+ b.Property("Tier")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreatorId");
+
+ b.ToTable("dungeon_instances");
+ });
+
+ 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