Additional tools for Admin portal, and huge NameSpace Revamp
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
using Server.Networking;
|
||||
using Server.Networking.Messages;
|
||||
using System.Text.Json;
|
||||
|
||||
@@ -3,9 +3,9 @@ using System.Text.Json;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using Server.Data.Enums;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
using DataServer.Data.Enums;
|
||||
using Server.Networking;
|
||||
using Server.Networking.Handling;
|
||||
using Server.Networking.Messages;
|
||||
@@ -120,12 +120,7 @@ public sealed class DungeonHandler : IClientMessageHandler
|
||||
|
||||
if (mobs.Count == 0)
|
||||
{
|
||||
// Seed default mobs
|
||||
var defaults = DefaultDungeonMobs.GetDefaultMobs();
|
||||
db.Set<DungeonMobDefinition>().AddRange(defaults);
|
||||
await db.SaveChangesAsync();
|
||||
mobs = defaults;
|
||||
_log.LogInformation("Seeded {Count} default mob definitions", defaults.Count);
|
||||
_log.LogCritical("Dungeon Mobs Table EMPTY");
|
||||
}
|
||||
|
||||
// Debug: Log which mobs have SpriteConfigJson
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Server.Data.Entities;
|
||||
using Server.Data.Enums;
|
||||
using DataServer.Data.Entities;
|
||||
using DataServer.Data.Enums;
|
||||
using Server.Networking;
|
||||
|
||||
namespace Server.Game.Dungeon;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using Server.Data.Entities;
|
||||
using Server.Data.Enums;
|
||||
using DataServer.Data.Entities;
|
||||
using DataServer.Data.Enums;
|
||||
|
||||
namespace Server.Game.Dungeon;
|
||||
|
||||
|
||||
+11
-11
@@ -1,8 +1,8 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
|
||||
namespace Server.Game.Dungeon;
|
||||
|
||||
@@ -89,7 +89,7 @@ public class LootService
|
||||
// Seed default items if empty
|
||||
if (items.Count == 0)
|
||||
{
|
||||
items = await SeedDefaultItemsAsync(db);
|
||||
_log.LogCritical("Database Items EMPTY!");
|
||||
}
|
||||
|
||||
_itemDefinitions = items.ToDictionary(i => i.Id);
|
||||
@@ -412,12 +412,12 @@ public class LootService
|
||||
};
|
||||
}
|
||||
|
||||
private async Task<List<DungeonItemDefinition>> SeedDefaultItemsAsync(GameDbContext db)
|
||||
{
|
||||
var items = DefaultDungeonItems.GetDefaultItems();
|
||||
db.Set<DungeonItemDefinition>().AddRange(items);
|
||||
await db.SaveChangesAsync();
|
||||
_log.LogInformation("Seeded {Count} default item definitions", items.Count);
|
||||
return items;
|
||||
}
|
||||
//private async Task<List<DungeonItemDefinition>> SeedDefaultItemsAsync(GameDbContext db)
|
||||
//{
|
||||
// var items = DefaultDungeonItems.GetDefaultItems();
|
||||
// db.Set<DungeonItemDefinition>().AddRange(items);
|
||||
// await db.SaveChangesAsync();
|
||||
// _log.LogInformation("Seeded {Count} default item definitions", items.Count);
|
||||
// return items;
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Server.Data.Entities;
|
||||
using Server.Data.Enums;
|
||||
using DataServer.Data.Entities;
|
||||
using DataServer.Data.Enums;
|
||||
|
||||
namespace Server.Game.Dungeon;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Server.Data.Enums;
|
||||
using DataServer.Data.Enums;
|
||||
|
||||
namespace Server.Game.Dungeon;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user