Additional tools for Admin portal, and huge NameSpace Revamp
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
using Server.Services.Auth;
|
||||
|
||||
namespace VoidScavengers.Api;
|
||||
namespace Server.Api;
|
||||
|
||||
/// <summary>
|
||||
/// Admin API endpoints for account and server management
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
using Server.Services.Auth;
|
||||
|
||||
namespace VoidScavengers.Api;
|
||||
namespace Server.Api;
|
||||
|
||||
/// <summary>
|
||||
/// HTTP authentication endpoints (for admin/API access)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
using Server.Services.Auth;
|
||||
using VoidScavengers.Game;
|
||||
using Server.Game;
|
||||
|
||||
namespace VoidScavengers.Api;
|
||||
namespace Server.Api;
|
||||
|
||||
/// <summary>
|
||||
/// API endpoints for game items and recipes
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace VoidScavengers.Api;
|
||||
namespace Server.Api;
|
||||
|
||||
/// <summary>
|
||||
/// API endpoints for player statistics and leaderboards
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,233 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace VoidScavengers.Networking.Messages;
|
||||
|
||||
// ===== Lobby Contracts =====
|
||||
public sealed record LobbyJoinRequest(string PlayerName);
|
||||
public sealed record LobbyJoinResult(bool Ok, string? Error, string? LobbyId, int PlayerCount);
|
||||
public sealed record LobbyState(string LobbyId, LobbyPlayer[] Players, int CountdownSeconds);
|
||||
public sealed record LobbyPlayer(ulong PlayerId, string Name, bool Ready);
|
||||
public sealed record LobbyReadyRequest(bool Ready);
|
||||
public sealed record LobbyCountdown(int SecondsRemaining);
|
||||
|
||||
// ===== Game Start =====
|
||||
public sealed record GameStartInfo(
|
||||
string MatchId,
|
||||
int MapSeed,
|
||||
float MapWidth,
|
||||
float MapHeight,
|
||||
PlayerSpawnInfo Self,
|
||||
PlayerSpawnInfo[] OtherPlayers,
|
||||
AsteroidInfo[] Asteroids,
|
||||
ResourceNodeInfo[] Resources,
|
||||
ExtractionZoneInfo[] ExtractionZones
|
||||
);
|
||||
|
||||
public sealed record PlayerSpawnInfo(
|
||||
ulong PlayerId,
|
||||
string Name,
|
||||
float X,
|
||||
float Y,
|
||||
float Rotation,
|
||||
int Health,
|
||||
int MaxHealth
|
||||
);
|
||||
|
||||
public sealed record AsteroidInfo(
|
||||
int Id,
|
||||
float X,
|
||||
float Y,
|
||||
float Radius,
|
||||
int AsteroidType // 0=small, 1=medium, 2=large
|
||||
);
|
||||
|
||||
public sealed record ResourceNodeInfo(
|
||||
int Id,
|
||||
float X,
|
||||
float Y,
|
||||
int ResourceType, // 0=scrap, 1=energy, 2=rare
|
||||
int Amount
|
||||
);
|
||||
|
||||
public sealed record ExtractionZoneInfo(
|
||||
int Id,
|
||||
float X,
|
||||
float Y,
|
||||
float Radius,
|
||||
bool Active,
|
||||
int ActivatesAtTick
|
||||
);
|
||||
|
||||
// ===== Game State Snapshots =====
|
||||
public sealed record GameStateSnapshot(
|
||||
long Tick,
|
||||
float TimeRemaining,
|
||||
int PlayersAlive,
|
||||
EntityState[] Entities,
|
||||
ProjectileState[] Projectiles,
|
||||
ResourceState[] Resources
|
||||
);
|
||||
|
||||
public sealed record EntityState(
|
||||
ulong Id,
|
||||
int Type, // 0=player, 1=dropped_item
|
||||
float X,
|
||||
float Y,
|
||||
float Rotation,
|
||||
float VelX,
|
||||
float VelY,
|
||||
int Health,
|
||||
int? ItemId // For dropped items
|
||||
);
|
||||
|
||||
public sealed record ProjectileState(
|
||||
int Id,
|
||||
float X,
|
||||
float Y,
|
||||
float VelX,
|
||||
float VelY,
|
||||
ulong OwnerId,
|
||||
int ProjectileType
|
||||
);
|
||||
|
||||
public sealed record ResourceState(
|
||||
int Id,
|
||||
int Amount
|
||||
);
|
||||
|
||||
// ===== Player Input =====
|
||||
public sealed record MoveInput(
|
||||
float Dx, // -1 to 1 normalized
|
||||
float Dy, // -1 to 1 normalized
|
||||
float AimAngle, // Radians, where player is aiming
|
||||
uint Seq // Client sequence number for reconciliation
|
||||
);
|
||||
|
||||
public sealed record ActionInput(
|
||||
int ActionType, // 0=interact, 1=pickup, 2=use_ability
|
||||
int? TargetId
|
||||
);
|
||||
|
||||
public sealed record ShootInput(
|
||||
float AimAngle,
|
||||
uint Seq
|
||||
);
|
||||
|
||||
public sealed record DropInput(
|
||||
int InventorySlot
|
||||
);
|
||||
|
||||
public sealed record CraftRequest(
|
||||
int RecipeId
|
||||
);
|
||||
|
||||
// ===== Events =====
|
||||
public sealed record SpawnEvent(
|
||||
ulong EntityId,
|
||||
int EntityType,
|
||||
float X,
|
||||
float Y,
|
||||
object? Data // Type-specific spawn data
|
||||
);
|
||||
|
||||
public sealed record DespawnEvent(ulong EntityId);
|
||||
|
||||
public sealed record DamageEvent(
|
||||
ulong TargetId,
|
||||
ulong? SourceId,
|
||||
int Amount,
|
||||
int NewHealth,
|
||||
int DamageType // 0=projectile, 1=collision, 2=zone
|
||||
);
|
||||
|
||||
public sealed record DeathEvent(
|
||||
ulong PlayerId,
|
||||
ulong? KillerId,
|
||||
string PlayerName,
|
||||
string? KillerName,
|
||||
DroppedItemInfo[] DroppedItems
|
||||
);
|
||||
|
||||
public sealed record DroppedItemInfo(
|
||||
int DropId,
|
||||
float X,
|
||||
float Y,
|
||||
int ItemId,
|
||||
int Quantity
|
||||
);
|
||||
|
||||
public sealed record PickupEvent(
|
||||
ulong PlayerId,
|
||||
int DropId,
|
||||
int ItemId,
|
||||
int Quantity
|
||||
);
|
||||
|
||||
public sealed record ProjectileEvent(
|
||||
int ProjectileId,
|
||||
ulong OwnerId,
|
||||
float X,
|
||||
float Y,
|
||||
float VelX,
|
||||
float VelY,
|
||||
int ProjectileType
|
||||
);
|
||||
|
||||
public sealed record ExplosionEvent(
|
||||
float X,
|
||||
float Y,
|
||||
float Radius,
|
||||
int ExplosionType
|
||||
);
|
||||
|
||||
public sealed record CraftCompleteEvent(
|
||||
ulong PlayerId,
|
||||
int RecipeId,
|
||||
int ResultItemId,
|
||||
int Quantity
|
||||
);
|
||||
|
||||
public sealed record ExtractEvent(
|
||||
ulong PlayerId,
|
||||
string PlayerName,
|
||||
int TotalLootValue
|
||||
);
|
||||
|
||||
// ===== Game End =====
|
||||
public sealed record GameEndInfo(
|
||||
string MatchId,
|
||||
string Reason, // "last_standing", "time_expired", "all_extracted"
|
||||
ulong? WinnerId,
|
||||
string? WinnerName,
|
||||
PlayerStatsInfo[] PlayerStats
|
||||
);
|
||||
|
||||
public sealed record PlayerStatsInfo(
|
||||
ulong PlayerId,
|
||||
string Name,
|
||||
int Kills,
|
||||
int Deaths,
|
||||
int DamageDealt,
|
||||
int ResourcesCollected,
|
||||
int ItemsCrafted,
|
||||
bool Extracted,
|
||||
int FinalPlacement
|
||||
);
|
||||
|
||||
// ===== Inventory State (sent periodically or on change) =====
|
||||
public sealed record InventoryUpdate(
|
||||
InventorySlot[] Slots,
|
||||
int ScrapCount,
|
||||
int EnergyCount,
|
||||
int RareCount
|
||||
);
|
||||
|
||||
public sealed record InventorySlot(
|
||||
int SlotIndex,
|
||||
int? ItemId,
|
||||
int Quantity
|
||||
);
|
||||
|
||||
// ===== Chat =====
|
||||
public sealed record ChatMessage(string Text);
|
||||
public sealed record ChatReceived(ulong SenderId, string SenderName, string Text, long Timestamp);
|
||||
@@ -1,927 +0,0 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Numerics;
|
||||
using System.Text.Json;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Networking;
|
||||
using Server.Networking.Handling;
|
||||
using Server.Networking.Messages;
|
||||
using Server.Services.Auth;
|
||||
|
||||
namespace VoidScavengers.Game;
|
||||
|
||||
/// <summary>
|
||||
/// Handles all game-related messages and manages match instances.
|
||||
/// Integrates with the existing SystemRevival server architecture.
|
||||
/// </summary>
|
||||
public sealed class GameHandler : IClientMessageHandler
|
||||
{
|
||||
private readonly ILogger<GameHandler> _log;
|
||||
private readonly ISessionRegistry _sessions;
|
||||
private readonly IMessageSerializer _ser;
|
||||
private readonly MatchManager _matchManager;
|
||||
|
||||
public GameHandler(
|
||||
ILogger<GameHandler> log,
|
||||
ISessionRegistry sessions,
|
||||
IMessageSerializer ser,
|
||||
MatchManager matchManager)
|
||||
{
|
||||
_log = log;
|
||||
_sessions = sessions;
|
||||
_ser = ser;
|
||||
_matchManager = matchManager;
|
||||
}
|
||||
|
||||
public IReadOnlyCollection<int> SupportedOpCodes => new[]
|
||||
{
|
||||
// Lobby
|
||||
GameOpCodes.LOBBY_JOIN,
|
||||
GameOpCodes.LOBBY_READY,
|
||||
GameOpCodes.LOBBY_LEAVE,
|
||||
|
||||
// Game Input
|
||||
GameOpCodes.INPUT_MOVE,
|
||||
GameOpCodes.INPUT_ACTION,
|
||||
GameOpCodes.INPUT_SHOOT,
|
||||
GameOpCodes.INPUT_DROP,
|
||||
GameOpCodes.INPUT_CRAFT,
|
||||
|
||||
// Chat
|
||||
GameOpCodes.CHAT_SEND
|
||||
};
|
||||
|
||||
public async Task HandleAsync(int opCode, IConnection connection, ReadOnlyMemory<byte> payload, CancellationToken ct)
|
||||
{
|
||||
// All game operations require authentication
|
||||
if (!_sessions.TryGet(connection.Id, out var accountId, out _))
|
||||
{
|
||||
await SendErrorAsync(connection, "auth_required", ct);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
switch (opCode)
|
||||
{
|
||||
case GameOpCodes.LOBBY_JOIN:
|
||||
await HandleLobbyJoinAsync(connection, accountId, payload, ct);
|
||||
break;
|
||||
|
||||
case GameOpCodes.LOBBY_READY:
|
||||
await HandleLobbyReadyAsync(connection, accountId, payload, ct);
|
||||
break;
|
||||
|
||||
case GameOpCodes.LOBBY_LEAVE:
|
||||
await HandleLobbyLeaveAsync(connection, accountId, ct);
|
||||
break;
|
||||
|
||||
case GameOpCodes.INPUT_MOVE:
|
||||
await HandleMoveInputAsync(connection, accountId, payload, ct);
|
||||
break;
|
||||
|
||||
case GameOpCodes.INPUT_SHOOT:
|
||||
await HandleShootInputAsync(connection, accountId, payload, ct);
|
||||
break;
|
||||
|
||||
case GameOpCodes.INPUT_ACTION:
|
||||
await HandleActionInputAsync(connection, accountId, payload, ct);
|
||||
break;
|
||||
|
||||
case GameOpCodes.INPUT_CRAFT:
|
||||
await HandleCraftInputAsync(connection, accountId, payload, ct);
|
||||
break;
|
||||
|
||||
case GameOpCodes.INPUT_DROP:
|
||||
await HandleDropInputAsync(connection, accountId, payload, ct);
|
||||
break;
|
||||
|
||||
case GameOpCodes.CHAT_SEND:
|
||||
await HandleChatAsync(connection, accountId, payload, ct);
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log.LogError(ex, "Error handling opcode {OpCode} from account {AccountId}", opCode, accountId);
|
||||
await SendErrorAsync(connection, "internal_error", ct);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task HandleLobbyJoinAsync(IConnection conn, ulong accountId, ReadOnlyMemory<byte> payload, CancellationToken ct)
|
||||
{
|
||||
var request = _ser.Deserialize<LobbyJoinRequest>(payload);
|
||||
|
||||
// Get or create player name (in production, fetch from database)
|
||||
string playerName = request?.PlayerName ?? $"Player{accountId % 10000}";
|
||||
|
||||
var (ok, lobbyId, error) = await _matchManager.JoinLobbyAsync(accountId, conn, playerName);
|
||||
|
||||
var result = new LobbyJoinResult(ok, error, lobbyId, ok ? _matchManager.GetLobbyPlayerCount(lobbyId!) : 0);
|
||||
await SendAsync(conn, GameOpCodes.LOBBY_JOIN_RESULT, result, ct);
|
||||
}
|
||||
|
||||
private async Task HandleLobbyReadyAsync(IConnection conn, ulong accountId, ReadOnlyMemory<byte> payload, CancellationToken ct)
|
||||
{
|
||||
var request = _ser.Deserialize<LobbyReadyRequest>(payload);
|
||||
await _matchManager.SetPlayerReadyAsync(accountId, request?.Ready ?? true);
|
||||
}
|
||||
|
||||
private async Task HandleLobbyLeaveAsync(IConnection conn, ulong accountId, CancellationToken ct)
|
||||
{
|
||||
await _matchManager.LeaveLobbyAsync(accountId);
|
||||
}
|
||||
|
||||
private Task HandleMoveInputAsync(IConnection conn, ulong accountId, ReadOnlyMemory<byte> payload, CancellationToken ct)
|
||||
{
|
||||
var input = _ser.Deserialize<MoveInputMsg>(payload);
|
||||
if (input == null) return Task.CompletedTask;
|
||||
|
||||
_matchManager.EnqueueInput(accountId, new PlayerInput
|
||||
{
|
||||
PlayerId = accountId,
|
||||
Type = InputType.Move,
|
||||
Dx = input.Dx,
|
||||
Dy = input.Dy,
|
||||
AimAngle = input.AimAngle,
|
||||
Seq = input.Seq
|
||||
});
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Task HandleShootInputAsync(IConnection conn, ulong accountId, ReadOnlyMemory<byte> payload, CancellationToken ct)
|
||||
{
|
||||
var input = _ser.Deserialize<ShootInputMsg>(payload);
|
||||
if (input == null) return Task.CompletedTask;
|
||||
|
||||
_matchManager.EnqueueInput(accountId, new PlayerInput
|
||||
{
|
||||
PlayerId = accountId,
|
||||
Type = InputType.Shoot,
|
||||
AimAngle = input.AimAngle,
|
||||
Seq = input.Seq
|
||||
});
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Task HandleActionInputAsync(IConnection conn, ulong accountId, ReadOnlyMemory<byte> payload, CancellationToken ct)
|
||||
{
|
||||
var input = _ser.Deserialize<ActionInputMsg>(payload);
|
||||
|
||||
_matchManager.EnqueueInput(accountId, new PlayerInput
|
||||
{
|
||||
PlayerId = accountId,
|
||||
Type = InputType.Action,
|
||||
TargetId = input?.TargetId
|
||||
});
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Task HandleCraftInputAsync(IConnection conn, ulong accountId, ReadOnlyMemory<byte> payload, CancellationToken ct)
|
||||
{
|
||||
var input = _ser.Deserialize<CraftInputMsg>(payload);
|
||||
if (input == null) return Task.CompletedTask;
|
||||
|
||||
_matchManager.EnqueueInput(accountId, new PlayerInput
|
||||
{
|
||||
PlayerId = accountId,
|
||||
Type = InputType.Craft,
|
||||
TargetId = input.RecipeId
|
||||
});
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Task HandleDropInputAsync(IConnection conn, ulong accountId, ReadOnlyMemory<byte> payload, CancellationToken ct)
|
||||
{
|
||||
var input = _ser.Deserialize<DropInputMsg>(payload);
|
||||
if (input == null) return Task.CompletedTask;
|
||||
|
||||
_matchManager.EnqueueInput(accountId, new PlayerInput
|
||||
{
|
||||
PlayerId = accountId,
|
||||
Type = InputType.Drop,
|
||||
TargetId = input.SlotIndex
|
||||
});
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private async Task HandleChatAsync(IConnection conn, ulong accountId, ReadOnlyMemory<byte> payload, CancellationToken ct)
|
||||
{
|
||||
var msg = _ser.Deserialize<ChatMsg>(payload);
|
||||
if (string.IsNullOrWhiteSpace(msg?.Text)) return;
|
||||
|
||||
// Sanitize and limit message
|
||||
string text = msg.Text.Trim();
|
||||
if (text.Length > 200) text = text[..200];
|
||||
|
||||
await _matchManager.BroadcastChatAsync(accountId, text);
|
||||
}
|
||||
|
||||
private async Task SendAsync<T>(IConnection conn, int opCode, T data, CancellationToken ct)
|
||||
{
|
||||
var payload = _ser.Serialize(data);
|
||||
var wire = _ser.Serialize(new ServerMessage(opCode, payload));
|
||||
await conn.SendAsync(wire, ct);
|
||||
}
|
||||
|
||||
private async Task SendErrorAsync(IConnection conn, string error, CancellationToken ct)
|
||||
{
|
||||
await SendAsync(conn, OpCodes.ERROR, new { error }, ct);
|
||||
}
|
||||
}
|
||||
|
||||
// ===== Input message types for deserialization =====
|
||||
public sealed record LobbyJoinRequest(string? PlayerName);
|
||||
public sealed record LobbyReadyRequest(bool Ready);
|
||||
public sealed record LobbyJoinResult(bool Ok, string? Error, string? LobbyId, int PlayerCount);
|
||||
public sealed record MoveInputMsg(float Dx, float Dy, float AimAngle, uint Seq);
|
||||
public sealed record ShootInputMsg(float AimAngle, uint Seq);
|
||||
public sealed record ActionInputMsg(int? TargetId);
|
||||
public sealed record CraftInputMsg(int RecipeId);
|
||||
public sealed record DropInputMsg(int SlotIndex);
|
||||
public sealed record ChatMsg(string Text);
|
||||
|
||||
/// <summary>
|
||||
/// Static OpCodes class for game-specific operations
|
||||
/// </summary>
|
||||
public static class GameOpCodes
|
||||
{
|
||||
// Lobby
|
||||
public const int LOBBY_JOIN = 400;
|
||||
public const int LOBBY_JOIN_RESULT = 401;
|
||||
public const int LOBBY_STATE = 402;
|
||||
public const int LOBBY_READY = 403;
|
||||
public const int LOBBY_COUNTDOWN = 404;
|
||||
public const int LOBBY_LEAVE = 405;
|
||||
|
||||
// Game State
|
||||
public const int GAME_START = 420;
|
||||
public const int GAME_STATE = 421;
|
||||
public const int GAME_TICK = 422;
|
||||
public const int GAME_END = 423;
|
||||
|
||||
// Input
|
||||
public const int INPUT_MOVE = 450;
|
||||
public const int INPUT_ACTION = 451;
|
||||
public const int INPUT_SHOOT = 452;
|
||||
public const int INPUT_DROP = 453;
|
||||
public const int INPUT_CRAFT = 454;
|
||||
|
||||
// Events
|
||||
public const int EVENT_SPAWN = 470;
|
||||
public const int EVENT_DESPAWN = 471;
|
||||
public const int EVENT_DAMAGE = 472;
|
||||
public const int EVENT_DEATH = 473;
|
||||
public const int EVENT_PICKUP = 474;
|
||||
public const int EVENT_PROJECTILE = 475;
|
||||
public const int EVENT_EXPLOSION = 476;
|
||||
|
||||
// Chat
|
||||
public const int CHAT_SEND = 500;
|
||||
public const int CHAT_RECEIVE = 501;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Manages lobbies, matchmaking, and active game instances
|
||||
/// </summary>
|
||||
public sealed class MatchManager : IDisposable
|
||||
{
|
||||
private readonly ILogger<MatchManager> _log;
|
||||
private readonly IMessageSerializer _ser;
|
||||
private readonly IServiceScopeFactory _scopeFactory;
|
||||
|
||||
private readonly ConcurrentDictionary<string, Lobby> _lobbies = new();
|
||||
private readonly ConcurrentDictionary<string, MatchInstance> _matches = new();
|
||||
private readonly ConcurrentDictionary<ulong, string> _playerToLobby = new();
|
||||
private readonly ConcurrentDictionary<ulong, string> _playerToMatch = new();
|
||||
private readonly ConcurrentDictionary<ulong, IConnection> _playerConnections = new();
|
||||
|
||||
private readonly Timer _tickTimer;
|
||||
private readonly Timer _lobbyTimer;
|
||||
|
||||
private const int MinPlayersToStart = 2;
|
||||
private const int MaxPlayersPerLobby = 8;
|
||||
private const int LobbyCountdownSeconds = 10;
|
||||
|
||||
public MatchManager(ILogger<MatchManager> log, IMessageSerializer ser, IServiceScopeFactory scopeFactory)
|
||||
{
|
||||
_log = log;
|
||||
_ser = ser;
|
||||
_scopeFactory = scopeFactory;
|
||||
|
||||
// Game tick timer (20 Hz)
|
||||
_tickTimer = new Timer(OnGameTick, null, 50, 50);
|
||||
|
||||
// Lobby update timer (1 Hz)
|
||||
_lobbyTimer = new Timer(OnLobbyTick, null, 1000, 1000);
|
||||
}
|
||||
|
||||
public async Task<(bool ok, string? lobbyId, string? error)> JoinLobbyAsync(ulong accountId, IConnection conn, string playerName)
|
||||
{
|
||||
// Remove from any existing lobby
|
||||
await LeaveLobbyAsync(accountId);
|
||||
|
||||
// Find or create lobby
|
||||
Lobby? lobby = null;
|
||||
foreach (var l in _lobbies.Values)
|
||||
{
|
||||
if (l.Phase == LobbyPhase.Waiting && l.Players.Count < MaxPlayersPerLobby)
|
||||
{
|
||||
lobby = l;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (lobby == null)
|
||||
{
|
||||
lobby = new Lobby
|
||||
{
|
||||
Id = Guid.NewGuid().ToString("N")[..8],
|
||||
CreatedAt = DateTime.UtcNow
|
||||
};
|
||||
_lobbies[lobby.Id] = lobby;
|
||||
_log.LogInformation("Created new lobby {LobbyId}", lobby.Id);
|
||||
}
|
||||
|
||||
var player = new LobbyPlayer
|
||||
{
|
||||
AccountId = accountId,
|
||||
Name = playerName,
|
||||
Ready = false,
|
||||
Connection = conn
|
||||
};
|
||||
|
||||
lobby.Players[accountId] = player;
|
||||
_playerToLobby[accountId] = lobby.Id;
|
||||
_playerConnections[accountId] = conn;
|
||||
|
||||
_log.LogInformation("Player {AccountId} ({Name}) joined lobby {LobbyId}", accountId, playerName, lobby.Id);
|
||||
|
||||
// Broadcast updated lobby state
|
||||
await BroadcastLobbyStateAsync(lobby);
|
||||
|
||||
return (true, lobby.Id, null);
|
||||
}
|
||||
|
||||
public async Task LeaveLobbyAsync(ulong accountId)
|
||||
{
|
||||
if (_playerToLobby.TryRemove(accountId, out var lobbyId))
|
||||
{
|
||||
if (_lobbies.TryGetValue(lobbyId, out var lobby))
|
||||
{
|
||||
lobby.Players.Remove(accountId);
|
||||
|
||||
// Clean up empty lobbies
|
||||
if (lobby.Players.Count == 0)
|
||||
{
|
||||
_lobbies.TryRemove(lobbyId, out _);
|
||||
_log.LogInformation("Removed empty lobby {LobbyId}", lobbyId);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Reset countdown if in progress
|
||||
if (lobby.Phase == LobbyPhase.Countdown)
|
||||
{
|
||||
lobby.Phase = LobbyPhase.Waiting;
|
||||
lobby.CountdownSeconds = 0;
|
||||
}
|
||||
await BroadcastLobbyStateAsync(lobby);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_playerConnections.TryRemove(accountId, out _);
|
||||
}
|
||||
|
||||
public async Task SetPlayerReadyAsync(ulong accountId, bool ready)
|
||||
{
|
||||
if (!_playerToLobby.TryGetValue(accountId, out var lobbyId)) return;
|
||||
if (!_lobbies.TryGetValue(lobbyId, out var lobby)) return;
|
||||
if (!lobby.Players.TryGetValue(accountId, out var player)) return;
|
||||
|
||||
player.Ready = ready;
|
||||
await BroadcastLobbyStateAsync(lobby);
|
||||
|
||||
// Check if all players ready
|
||||
if (lobby.Players.Count >= MinPlayersToStart &&
|
||||
lobby.Players.Values.All(p => p.Ready) &&
|
||||
lobby.Phase == LobbyPhase.Waiting)
|
||||
{
|
||||
lobby.Phase = LobbyPhase.Countdown;
|
||||
lobby.CountdownSeconds = LobbyCountdownSeconds;
|
||||
_log.LogInformation("Lobby {LobbyId} starting countdown", lobbyId);
|
||||
}
|
||||
}
|
||||
|
||||
public int GetLobbyPlayerCount(string lobbyId)
|
||||
{
|
||||
return _lobbies.TryGetValue(lobbyId, out var lobby) ? lobby.Players.Count : 0;
|
||||
}
|
||||
|
||||
public void EnqueueInput(ulong accountId, PlayerInput input)
|
||||
{
|
||||
if (!_playerToMatch.TryGetValue(accountId, out var matchId)) return;
|
||||
if (!_matches.TryGetValue(matchId, out var match)) return;
|
||||
|
||||
match.Simulation.EnqueueInput(accountId, input);
|
||||
}
|
||||
|
||||
public async Task BroadcastChatAsync(ulong senderId, string text)
|
||||
{
|
||||
// Find which match/lobby the sender is in
|
||||
string? targetId = null;
|
||||
Dictionary<ulong, IConnection>? targets = null;
|
||||
string? senderName = null;
|
||||
|
||||
if (_playerToMatch.TryGetValue(senderId, out var matchId) &&
|
||||
_matches.TryGetValue(matchId, out var match))
|
||||
{
|
||||
targets = match.Connections;
|
||||
senderName = match.Simulation.Players.TryGetValue(senderId, out var p) ? p.Name : "Unknown";
|
||||
}
|
||||
else if (_playerToLobby.TryGetValue(senderId, out var lobbyId) &&
|
||||
_lobbies.TryGetValue(lobbyId, out var lobby))
|
||||
{
|
||||
targets = lobby.Players.ToDictionary(kv => kv.Key, kv => kv.Value.Connection);
|
||||
senderName = lobby.Players.TryGetValue(senderId, out var p) ? p.Name : "Unknown";
|
||||
}
|
||||
|
||||
if (targets == null) return;
|
||||
|
||||
var chatMsg = new
|
||||
{
|
||||
senderId,
|
||||
senderName,
|
||||
text,
|
||||
timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
|
||||
};
|
||||
|
||||
var payload = _ser.Serialize(chatMsg);
|
||||
var wire = _ser.Serialize(new ServerMessage(GameOpCodes.CHAT_RECEIVE, payload));
|
||||
|
||||
foreach (var (_, conn) in targets)
|
||||
{
|
||||
try
|
||||
{
|
||||
await conn.SendAsync(wire);
|
||||
}
|
||||
catch { /* ignore failed sends */ }
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnLobbyTick(object? state)
|
||||
{
|
||||
foreach (var lobby in _lobbies.Values.ToList())
|
||||
{
|
||||
if (lobby.Phase == LobbyPhase.Countdown)
|
||||
{
|
||||
lobby.CountdownSeconds--;
|
||||
|
||||
// Broadcast countdown
|
||||
await BroadcastToLobbyAsync(lobby, GameOpCodes.LOBBY_COUNTDOWN,
|
||||
new { seconds = lobby.CountdownSeconds });
|
||||
|
||||
if (lobby.CountdownSeconds <= 0)
|
||||
{
|
||||
// Start the match!
|
||||
await StartMatchAsync(lobby);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task StartMatchAsync(Lobby lobby)
|
||||
{
|
||||
lobby.Phase = LobbyPhase.Starting;
|
||||
|
||||
var matchId = Guid.NewGuid().ToString("N")[..12];
|
||||
var seed = (int)(DateTime.UtcNow.Ticks % int.MaxValue);
|
||||
var simulation = new GameSimulation(matchId, seed);
|
||||
|
||||
var match = new MatchInstance
|
||||
{
|
||||
Id = matchId,
|
||||
Simulation = simulation,
|
||||
StartedAt = DateTime.UtcNow
|
||||
};
|
||||
|
||||
// Add players to match
|
||||
int playerIndex = 0;
|
||||
foreach (var (accountId, lobbyPlayer) in lobby.Players)
|
||||
{
|
||||
var spawnPos = simulation.GetSpawnPosition(playerIndex, lobby.Players.Count);
|
||||
simulation.AddPlayer(accountId, lobbyPlayer.Name, spawnPos);
|
||||
|
||||
match.Connections[accountId] = lobbyPlayer.Connection;
|
||||
_playerToMatch[accountId] = matchId;
|
||||
_playerToLobby.TryRemove(accountId, out _);
|
||||
|
||||
playerIndex++;
|
||||
}
|
||||
|
||||
_matches[matchId] = match;
|
||||
_lobbies.TryRemove(lobby.Id, out _);
|
||||
|
||||
// Start simulation
|
||||
simulation.StartGame();
|
||||
|
||||
// Send GAME_START to all players
|
||||
foreach (var (accountId, conn) in match.Connections)
|
||||
{
|
||||
var startInfo = BuildGameStartInfo(simulation, accountId);
|
||||
var payload = _ser.Serialize(startInfo);
|
||||
var wire = _ser.Serialize(new ServerMessage(GameOpCodes.GAME_START, payload));
|
||||
|
||||
try
|
||||
{
|
||||
await conn.SendAsync(wire);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log.LogWarning(ex, "Failed to send GAME_START to {AccountId}", accountId);
|
||||
}
|
||||
}
|
||||
|
||||
_log.LogInformation("Match {MatchId} started with {PlayerCount} players", matchId, match.Connections.Count);
|
||||
}
|
||||
|
||||
private object BuildGameStartInfo(GameSimulation sim, ulong forPlayerId)
|
||||
{
|
||||
var self = sim.Players[forPlayerId];
|
||||
var others = sim.Players.Values.Where(p => p.Id != forPlayerId).ToArray();
|
||||
|
||||
return new
|
||||
{
|
||||
matchId = sim.MatchId,
|
||||
mapSeed = sim.MapSeed,
|
||||
mapWidth = sim.MapWidth,
|
||||
mapHeight = sim.MapHeight,
|
||||
self = new
|
||||
{
|
||||
playerId = self.Id,
|
||||
name = self.Name,
|
||||
x = self.X,
|
||||
y = self.Y,
|
||||
rotation = self.Rotation,
|
||||
health = self.Health,
|
||||
maxHealth = self.MaxHealth
|
||||
},
|
||||
otherPlayers = others.Select(p => new
|
||||
{
|
||||
playerId = p.Id,
|
||||
name = p.Name,
|
||||
x = p.X,
|
||||
y = p.Y,
|
||||
rotation = p.Rotation,
|
||||
health = p.Health,
|
||||
maxHealth = p.MaxHealth
|
||||
}).ToArray(),
|
||||
asteroids = sim.Asteroids.Values.Select(a => new
|
||||
{
|
||||
id = a.Id,
|
||||
x = a.X,
|
||||
y = a.Y,
|
||||
radius = a.Radius,
|
||||
type = a.Type
|
||||
}).ToArray(),
|
||||
resources = sim.Resources.Values.Select(r => new
|
||||
{
|
||||
id = r.Id,
|
||||
x = r.X,
|
||||
y = r.Y,
|
||||
resourceType = r.ResourceType,
|
||||
amount = r.Amount
|
||||
}).ToArray(),
|
||||
extractionZones = sim.ExtractionZones.Values.Select(z => new
|
||||
{
|
||||
id = z.Id,
|
||||
x = z.X,
|
||||
y = z.Y,
|
||||
radius = z.Radius,
|
||||
active = z.Active,
|
||||
activatesAtTick = z.ActivatesAtTick
|
||||
}).ToArray()
|
||||
};
|
||||
}
|
||||
|
||||
private async void OnGameTick(object? state)
|
||||
{
|
||||
foreach (var match in _matches.Values.ToList())
|
||||
{
|
||||
if (match.Simulation.Phase != GamePhase.InProgress) continue;
|
||||
|
||||
// Advance simulation
|
||||
var events = match.Simulation.Tick();
|
||||
|
||||
// Broadcast state snapshot every tick
|
||||
await BroadcastGameStateAsync(match);
|
||||
|
||||
// Broadcast events
|
||||
foreach (var evt in events)
|
||||
{
|
||||
await BroadcastEventAsync(match, evt);
|
||||
|
||||
// Handle game end
|
||||
if (evt.Type == EventType.GameEnd)
|
||||
{
|
||||
await EndMatchAsync(match);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task BroadcastGameStateAsync(MatchInstance match)
|
||||
{
|
||||
var sim = match.Simulation;
|
||||
|
||||
var state = new
|
||||
{
|
||||
tick = sim.CurrentTick,
|
||||
timeRemaining = sim.TimeRemaining,
|
||||
playersAlive = sim.Players.Values.Count(p => p.Alive),
|
||||
entities = sim.Players.Values.Where(p => p.Alive).Select(p => new
|
||||
{
|
||||
id = p.Id,
|
||||
type = 0, // player
|
||||
x = p.X,
|
||||
y = p.Y,
|
||||
rotation = p.Rotation,
|
||||
health = p.Health,
|
||||
scrap = p.Scrap,
|
||||
energy = p.Energy,
|
||||
rare = p.Rare,
|
||||
inventory = p.Inventory,
|
||||
equippedWeaponId = p.EquippedWeaponId,
|
||||
name = p.Name
|
||||
}).ToArray(),
|
||||
projectiles = sim.Projectiles.Values.Select(p => new
|
||||
{
|
||||
id = p.Id,
|
||||
x = p.X,
|
||||
y = p.Y,
|
||||
velX = p.VelX,
|
||||
velY = p.VelY,
|
||||
ownerId = p.OwnerId
|
||||
}).ToArray(),
|
||||
droppedItems = sim.DroppedItems.Values.Select(d => new
|
||||
{
|
||||
id = d.Id,
|
||||
x = d.X,
|
||||
y = d.Y,
|
||||
itemId = d.ItemId,
|
||||
quantity = d.Quantity
|
||||
}).ToArray(),
|
||||
resources = sim.Resources.Values.Where(r => r.Amount > 0).Select(r => new
|
||||
{
|
||||
id = r.Id,
|
||||
amount = r.Amount
|
||||
}).ToArray()
|
||||
};
|
||||
|
||||
var payload = _ser.Serialize(state);
|
||||
var wire = _ser.Serialize(new ServerMessage(GameOpCodes.GAME_STATE, payload));
|
||||
|
||||
foreach (var (_, conn) in match.Connections)
|
||||
{
|
||||
try
|
||||
{
|
||||
await conn.SendAsync(wire);
|
||||
}
|
||||
catch { /* ignore */ }
|
||||
}
|
||||
}
|
||||
|
||||
private async Task BroadcastEventAsync(MatchInstance match, GameEvent evt)
|
||||
{
|
||||
int opCode = evt.Type switch
|
||||
{
|
||||
EventType.Spawn => GameOpCodes.EVENT_SPAWN,
|
||||
EventType.Despawn => GameOpCodes.EVENT_DESPAWN,
|
||||
EventType.Damage => GameOpCodes.EVENT_DAMAGE,
|
||||
EventType.Death => GameOpCodes.EVENT_DEATH,
|
||||
EventType.Pickup => GameOpCodes.EVENT_PICKUP,
|
||||
EventType.Projectile => GameOpCodes.EVENT_PROJECTILE,
|
||||
EventType.Explosion => GameOpCodes.EVENT_EXPLOSION,
|
||||
EventType.GameEnd => GameOpCodes.GAME_END,
|
||||
_ => 0
|
||||
};
|
||||
|
||||
if (opCode == 0) return;
|
||||
|
||||
var payload = _ser.Serialize(evt.Data);
|
||||
var wire = _ser.Serialize(new ServerMessage(opCode, payload));
|
||||
|
||||
foreach (var (_, conn) in match.Connections)
|
||||
{
|
||||
try
|
||||
{
|
||||
await conn.SendAsync(wire);
|
||||
}
|
||||
catch { /* ignore */ }
|
||||
}
|
||||
}
|
||||
|
||||
private async Task EndMatchAsync(MatchInstance match)
|
||||
{
|
||||
// Get match results before cleanup
|
||||
var results = match.Simulation.GetMatchResults();
|
||||
|
||||
// Persist stats to database
|
||||
try
|
||||
{
|
||||
await PersistMatchResultsAsync(match.Id, results);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log.LogError(ex, "Failed to persist match results for {MatchId}", match.Id);
|
||||
}
|
||||
|
||||
// Remove players from match tracking
|
||||
foreach (var accountId in match.Connections.Keys)
|
||||
{
|
||||
_playerToMatch.TryRemove(accountId, out _);
|
||||
}
|
||||
|
||||
_matches.TryRemove(match.Id, out _);
|
||||
_log.LogInformation("Match {MatchId} ended with {PlayerCount} players", match.Id, results.Count);
|
||||
}
|
||||
|
||||
private async Task PersistMatchResultsAsync(string matchId, List<MatchPlayerResult> results)
|
||||
{
|
||||
using var scope = _scopeFactory.CreateScope();
|
||||
var db = scope.ServiceProvider.GetRequiredService<Server.Data.GameDbContext>();
|
||||
|
||||
foreach (var result in results)
|
||||
{
|
||||
// Get or create player stats
|
||||
var stats = await db.PlayerStats.FirstOrDefaultAsync(s => s.AccountId == result.AccountId);
|
||||
if (stats == null)
|
||||
{
|
||||
stats = new Server.Data.PlayerStats
|
||||
{
|
||||
AccountId = result.AccountId,
|
||||
CreatedAt = DateTime.UtcNow
|
||||
};
|
||||
db.PlayerStats.Add(stats);
|
||||
}
|
||||
|
||||
// Update lifetime stats
|
||||
stats.MatchesPlayed++;
|
||||
stats.Kills += result.Kills;
|
||||
stats.Deaths += result.Deaths;
|
||||
stats.TotalDamageDealt += result.DamageDealt;
|
||||
stats.TotalDamageTaken += result.DamageTaken;
|
||||
stats.TotalScrapCollected += result.ScrapCollected;
|
||||
stats.TotalEnergyCollected += result.EnergyCollected;
|
||||
stats.TotalRareCollected += result.RareCollected;
|
||||
stats.ItemsCrafted += result.ItemsCrafted;
|
||||
stats.TotalPlayTimeSeconds += result.SurvivalTimeSeconds;
|
||||
|
||||
if (result.SurvivalTimeSeconds > stats.LongestSurvivalSeconds)
|
||||
stats.LongestSurvivalSeconds = result.SurvivalTimeSeconds;
|
||||
|
||||
// Win/loss tracking
|
||||
bool isWin = result.Result == MatchPlayerResultType.Won || result.Result == MatchPlayerResultType.Extracted;
|
||||
if (isWin)
|
||||
stats.Wins++;
|
||||
else
|
||||
stats.Losses++;
|
||||
|
||||
if (result.Result == MatchPlayerResultType.Extracted)
|
||||
stats.Extractions++;
|
||||
|
||||
// Simple Elo calculation (can be made more sophisticated)
|
||||
int eloChange = CalculateEloChange(stats.Elo, result.Placement, result.TotalPlayers, isWin);
|
||||
stats.Elo = Math.Max(0, stats.Elo + eloChange);
|
||||
|
||||
// Record match history
|
||||
var history = new Server.Data.MatchHistory
|
||||
{
|
||||
MatchId = matchId,
|
||||
AccountId = result.AccountId,
|
||||
Result = isWin
|
||||
? (result.Result == MatchPlayerResultType.Extracted
|
||||
? Server.Data.MatchResult.Extracted
|
||||
: Server.Data.MatchResult.Win)
|
||||
: Server.Data.MatchResult.Loss,
|
||||
Placement = result.Placement,
|
||||
TotalPlayers = result.TotalPlayers,
|
||||
Kills = result.Kills,
|
||||
Deaths = result.Deaths,
|
||||
DamageDealt = result.DamageDealt,
|
||||
DamageTaken = result.DamageTaken,
|
||||
ScrapCollected = result.ScrapCollected,
|
||||
EnergyCollected = result.EnergyCollected,
|
||||
RareCollected = result.RareCollected,
|
||||
ItemsCrafted = result.ItemsCrafted,
|
||||
SurvivalTimeSeconds = result.SurvivalTimeSeconds,
|
||||
MatchDurationSeconds = result.MatchDurationSeconds,
|
||||
EloChange = eloChange,
|
||||
EloAfter = stats.Elo,
|
||||
PlayedAt = DateTime.UtcNow
|
||||
};
|
||||
db.MatchHistory.Add(history);
|
||||
}
|
||||
|
||||
await db.SaveChangesAsync();
|
||||
_log.LogInformation("Persisted stats for match {MatchId}", matchId);
|
||||
}
|
||||
|
||||
private int CalculateEloChange(int currentElo, int placement, int totalPlayers, bool isWin)
|
||||
{
|
||||
// Simple Elo-like system based on placement
|
||||
// K-factor varies by Elo (higher K for lower Elo = faster adjustment)
|
||||
int kFactor = currentElo < 1200 ? 32 : (currentElo < 1600 ? 24 : 16);
|
||||
|
||||
// Expected score based on placement (1st = 1.0, last = 0.0)
|
||||
float expectedPlacement = totalPlayers / 2f;
|
||||
float actualScore = (totalPlayers - placement) / (float)(totalPlayers - 1);
|
||||
float expectedScore = 0.5f; // Assume average performance expected
|
||||
|
||||
// Bonus for winning
|
||||
if (isWin) actualScore = Math.Max(actualScore, 0.75f);
|
||||
|
||||
int change = (int)(kFactor * (actualScore - expectedScore));
|
||||
|
||||
// Clamp to reasonable range
|
||||
return Math.Clamp(change, -50, 50);
|
||||
}
|
||||
|
||||
private async Task BroadcastLobbyStateAsync(Lobby lobby)
|
||||
{
|
||||
var state = new
|
||||
{
|
||||
lobbyId = lobby.Id,
|
||||
phase = lobby.Phase.ToString(),
|
||||
countdownSeconds = lobby.CountdownSeconds,
|
||||
players = lobby.Players.Values.Select(p => new
|
||||
{
|
||||
accountId = p.AccountId,
|
||||
name = p.Name,
|
||||
ready = p.Ready
|
||||
}).ToArray()
|
||||
};
|
||||
|
||||
await BroadcastToLobbyAsync(lobby, GameOpCodes.LOBBY_STATE, state);
|
||||
}
|
||||
|
||||
private async Task BroadcastToLobbyAsync<T>(Lobby lobby, int opCode, T data)
|
||||
{
|
||||
var payload = _ser.Serialize(data);
|
||||
var wire = _ser.Serialize(new ServerMessage(opCode, payload));
|
||||
|
||||
foreach (var player in lobby.Players.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
await player.Connection.SendAsync(wire);
|
||||
}
|
||||
catch { /* ignore */ }
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_tickTimer.Dispose();
|
||||
_lobbyTimer.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
// ===== Lobby & Match Data Structures =====
|
||||
public sealed class Lobby
|
||||
{
|
||||
public string Id { get; set; } = "";
|
||||
public LobbyPhase Phase { get; set; } = LobbyPhase.Waiting;
|
||||
public int CountdownSeconds { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public Dictionary<ulong, LobbyPlayer> Players { get; } = new();
|
||||
}
|
||||
|
||||
public sealed class LobbyPlayer
|
||||
{
|
||||
public ulong AccountId { get; set; }
|
||||
public string Name { get; set; } = "";
|
||||
public bool Ready { get; set; }
|
||||
public IConnection Connection { get; set; } = null!;
|
||||
}
|
||||
|
||||
public enum LobbyPhase
|
||||
{
|
||||
Waiting,
|
||||
Countdown,
|
||||
Starting
|
||||
}
|
||||
|
||||
public sealed class MatchInstance
|
||||
{
|
||||
public string Id { get; set; } = "";
|
||||
public GameSimulation Simulation { get; set; } = null!;
|
||||
public DateTime StartedAt { get; set; }
|
||||
public Dictionary<ulong, IConnection> Connections { get; } = new();
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace VoidScavengers.Networking.Messages;
|
||||
namespace Server.Networking.Messages;
|
||||
|
||||
/// <summary>
|
||||
/// OpCodes for Void Scavengers game - extends base OpCodes
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,241 +0,0 @@
|
||||
namespace VoidScavengers.Game;
|
||||
|
||||
/// <summary>
|
||||
/// Item definitions for Void Scavengers
|
||||
/// </summary>
|
||||
public static class ItemDatabase
|
||||
{
|
||||
public static readonly Dictionary<int, ItemDef> Items = new()
|
||||
{
|
||||
// ===== Resources (1-99) =====
|
||||
[1] = new ItemDef(1, "Scrap Metal", ItemType.Resource, 0, "Basic salvage material", 1, true),
|
||||
[2] = new ItemDef(2, "Energy Cell", ItemType.Resource, 0, "Charged power source", 2, true),
|
||||
[3] = new ItemDef(3, "Rare Alloy", ItemType.Resource, 0, "Precious refined metal", 5, true),
|
||||
|
||||
// ===== Weapons (100-199) =====
|
||||
[100] = new ItemDef(100, "Pulse Pistol", ItemType.Weapon, 15, "Basic sidearm", 10, false)
|
||||
{
|
||||
Damage = 10,
|
||||
FireRate = 4f, // shots per second
|
||||
ProjectileSpeed = 400f,
|
||||
Range = 300f,
|
||||
AmmoType = 0 // energy-based, no ammo needed
|
||||
},
|
||||
[101] = new ItemDef(101, "Scatter Gun", ItemType.Weapon, 25, "Close-range devastation", 20, false)
|
||||
{
|
||||
Damage = 6, // per pellet, 5 pellets
|
||||
FireRate = 1.5f,
|
||||
ProjectileSpeed = 350f,
|
||||
Range = 150f,
|
||||
AmmoType = 0,
|
||||
PelletCount = 5,
|
||||
Spread = 0.4f
|
||||
},
|
||||
[102] = new ItemDef(102, "Rail Rifle", ItemType.Weapon, 40, "Long-range precision", 35, false)
|
||||
{
|
||||
Damage = 45,
|
||||
FireRate = 0.8f,
|
||||
ProjectileSpeed = 800f,
|
||||
Range = 600f,
|
||||
AmmoType = 0
|
||||
},
|
||||
[103] = new ItemDef(103, "Plasma Launcher", ItemType.Weapon, 60, "Area damage weapon", 50, false)
|
||||
{
|
||||
Damage = 30,
|
||||
FireRate = 0.5f,
|
||||
ProjectileSpeed = 250f,
|
||||
Range = 400f,
|
||||
AmmoType = 0,
|
||||
ExplosionRadius = 50f
|
||||
},
|
||||
|
||||
// ===== Tools (200-299) =====
|
||||
[200] = new ItemDef(200, "Mining Laser", ItemType.Tool, 15, "Harvests resources faster", 12, false)
|
||||
{
|
||||
HarvestMultiplier = 2.0f
|
||||
},
|
||||
[201] = new ItemDef(201, "Scanner", ItemType.Tool, 20, "Reveals nearby resources and players", 15, false)
|
||||
{
|
||||
ScanRadius = 200f,
|
||||
ScanCooldown = 10f
|
||||
},
|
||||
[202] = new ItemDef(202, "Portable Shield", ItemType.Tool, 35, "Deployable cover", 25, false)
|
||||
{
|
||||
ShieldHealth = 100,
|
||||
ShieldDuration = 15f
|
||||
},
|
||||
|
||||
// ===== Consumables (300-399) =====
|
||||
[300] = new ItemDef(300, "Repair Kit", ItemType.Consumable, 10, "Restores 30 health", 8, true)
|
||||
{
|
||||
HealAmount = 30
|
||||
},
|
||||
[301] = new ItemDef(301, "Shield Booster", ItemType.Consumable, 15, "Temporary damage reduction", 12, true)
|
||||
{
|
||||
ShieldBoostDuration = 10f,
|
||||
DamageReduction = 0.3f
|
||||
},
|
||||
[302] = new ItemDef(302, "Speed Stim", ItemType.Consumable, 12, "Temporary speed boost", 10, true)
|
||||
{
|
||||
SpeedBoostDuration = 8f,
|
||||
SpeedMultiplier = 1.5f
|
||||
},
|
||||
|
||||
// ===== Armor/Equipment (400-499) =====
|
||||
[400] = new ItemDef(400, "Light Suit", ItemType.Armor, 20, "+20 max health", 15, false)
|
||||
{
|
||||
HealthBonus = 20,
|
||||
SpeedPenalty = 0f
|
||||
},
|
||||
[401] = new ItemDef(401, "Heavy Suit", ItemType.Armor, 45, "+50 max health, slower", 35, false)
|
||||
{
|
||||
HealthBonus = 50,
|
||||
SpeedPenalty = 0.15f
|
||||
},
|
||||
[402] = new ItemDef(402, "Thruster Pack", ItemType.Armor, 30, "Dash ability", 25, false)
|
||||
{
|
||||
DashDistance = 100f,
|
||||
DashCooldown = 5f
|
||||
}
|
||||
};
|
||||
|
||||
public static ItemDef? Get(int id) => Items.TryGetValue(id, out var item) ? item : null;
|
||||
}
|
||||
|
||||
public sealed class ItemDef
|
||||
{
|
||||
public int Id { get; }
|
||||
public string Name { get; }
|
||||
public ItemType Type { get; }
|
||||
public int CraftCost { get; } // Total resource value to craft
|
||||
public string Description { get; }
|
||||
public int LootValue { get; } // Value when extracted
|
||||
public bool Stackable { get; }
|
||||
|
||||
// Weapon stats
|
||||
public int Damage { get; init; }
|
||||
public float FireRate { get; init; }
|
||||
public float ProjectileSpeed { get; init; }
|
||||
public float Range { get; init; }
|
||||
public int AmmoType { get; init; }
|
||||
public int PelletCount { get; init; } = 1;
|
||||
public float Spread { get; init; }
|
||||
public float ExplosionRadius { get; init; }
|
||||
|
||||
// Tool stats
|
||||
public float HarvestMultiplier { get; init; } = 1f;
|
||||
public float ScanRadius { get; init; }
|
||||
public float ScanCooldown { get; init; }
|
||||
public int ShieldHealth { get; init; }
|
||||
public float ShieldDuration { get; init; }
|
||||
|
||||
// Consumable stats
|
||||
public int HealAmount { get; init; }
|
||||
public float ShieldBoostDuration { get; init; }
|
||||
public float DamageReduction { get; init; }
|
||||
public float SpeedBoostDuration { get; init; }
|
||||
public float SpeedMultiplier { get; init; } = 1f;
|
||||
|
||||
// Armor stats
|
||||
public int HealthBonus { get; init; }
|
||||
public float SpeedPenalty { get; init; }
|
||||
public float DashDistance { get; init; }
|
||||
public float DashCooldown { get; init; }
|
||||
|
||||
public ItemDef(int id, string name, ItemType type, int craftCost, string desc, int lootValue, bool stackable)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
Type = type;
|
||||
CraftCost = craftCost;
|
||||
Description = desc;
|
||||
LootValue = lootValue;
|
||||
Stackable = stackable;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ItemType
|
||||
{
|
||||
Resource,
|
||||
Weapon,
|
||||
Tool,
|
||||
Consumable,
|
||||
Armor
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Crafting recipes
|
||||
/// </summary>
|
||||
public static class RecipeDatabase
|
||||
{
|
||||
public static readonly Dictionary<int, Recipe> Recipes = new()
|
||||
{
|
||||
// Basic weapons
|
||||
[1] = new Recipe(1, 100, new[] { (1, 5), (2, 2) }), // Pulse Pistol: 5 scrap + 2 energy
|
||||
[2] = new Recipe(2, 101, new[] { (1, 8), (2, 3) }), // Scatter Gun: 8 scrap + 3 energy
|
||||
[3] = new Recipe(3, 102, new[] { (1, 10), (2, 5), (3, 2) }), // Rail Rifle: 10 scrap + 5 energy + 2 rare
|
||||
[4] = new Recipe(4, 103, new[] { (1, 15), (2, 8), (3, 4) }), // Plasma Launcher
|
||||
|
||||
// Tools
|
||||
[10] = new Recipe(10, 200, new[] { (1, 6), (2, 3) }), // Mining Laser
|
||||
[11] = new Recipe(11, 201, new[] { (1, 8), (2, 4), (3, 1) }), // Scanner
|
||||
[12] = new Recipe(12, 202, new[] { (1, 12), (2, 6), (3, 2) }), // Portable Shield
|
||||
|
||||
// Consumables
|
||||
[20] = new Recipe(20, 300, new[] { (1, 3), (2, 2) }), // Repair Kit
|
||||
[21] = new Recipe(21, 301, new[] { (1, 4), (2, 3) }), // Shield Booster
|
||||
[22] = new Recipe(22, 302, new[] { (1, 3), (2, 4) }), // Speed Stim
|
||||
|
||||
// Armor
|
||||
[30] = new Recipe(30, 400, new[] { (1, 8), (3, 1) }), // Light Suit
|
||||
[31] = new Recipe(31, 401, new[] { (1, 15), (3, 3) }), // Heavy Suit
|
||||
[32] = new Recipe(32, 402, new[] { (1, 10), (2, 5), (3, 2) }), // Thruster Pack
|
||||
};
|
||||
|
||||
public static Recipe? Get(int id) => Recipes.TryGetValue(id, out var r) ? r : null;
|
||||
}
|
||||
|
||||
public sealed class Recipe
|
||||
{
|
||||
public int Id { get; }
|
||||
public int ResultItemId { get; }
|
||||
public (int ItemId, int Quantity)[] Ingredients { get; }
|
||||
|
||||
public Recipe(int id, int resultItemId, (int, int)[] ingredients)
|
||||
{
|
||||
Id = id;
|
||||
ResultItemId = resultItemId;
|
||||
Ingredients = ingredients;
|
||||
}
|
||||
|
||||
public bool CanCraft(int scrap, int energy, int rare)
|
||||
{
|
||||
foreach (var (itemId, qty) in Ingredients)
|
||||
{
|
||||
int available = itemId switch
|
||||
{
|
||||
1 => scrap,
|
||||
2 => energy,
|
||||
3 => rare,
|
||||
_ => 0
|
||||
};
|
||||
if (available < qty) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public (int scrap, int energy, int rare) GetCost()
|
||||
{
|
||||
int s = 0, e = 0, r = 0;
|
||||
foreach (var (itemId, qty) in Ingredients)
|
||||
{
|
||||
switch (itemId)
|
||||
{
|
||||
case 1: s += qty; break;
|
||||
case 2: e += qty; break;
|
||||
case 3: r += qty; break;
|
||||
}
|
||||
}
|
||||
return (s, e, r);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -3,9 +3,9 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace VoidScavengers.Game;
|
||||
namespace Server.Game;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for item data access
|
||||
|
||||
+60
-60
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -185,7 +185,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -223,7 +223,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -336,7 +336,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -368,7 +368,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -412,7 +412,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -456,7 +456,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -600,7 +600,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -629,7 +629,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -701,7 +701,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -736,7 +736,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -775,7 +775,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -894,7 +894,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -937,7 +937,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -981,7 +981,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1029,7 +1029,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1106,7 +1106,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1201,7 +1201,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1279,7 +1279,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1324,7 +1324,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1375,9 +1375,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1386,15 +1386,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1405,15 +1405,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1422,15 +1422,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1441,15 +1441,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1460,15 +1460,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1477,15 +1477,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1496,9 +1496,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1507,15 +1507,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1526,9 +1526,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1537,15 +1537,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1556,20 +1556,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1578,14 +1578,14 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("Inventory");
|
||||
|
||||
@@ -1594,7 +1594,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+63
-63
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -108,7 +108,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -209,7 +209,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -247,7 +247,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -360,7 +360,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -392,7 +392,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -436,7 +436,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -480,7 +480,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -624,7 +624,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -653,7 +653,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -725,7 +725,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -760,7 +760,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -799,7 +799,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -918,7 +918,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -961,7 +961,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1005,7 +1005,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1053,7 +1053,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1130,7 +1130,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1225,7 +1225,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1303,7 +1303,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1348,7 +1348,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1399,9 +1399,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1410,9 +1410,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1421,15 +1421,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1440,15 +1440,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1457,15 +1457,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1476,15 +1476,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1495,15 +1495,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1512,15 +1512,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1531,9 +1531,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1542,15 +1542,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1561,9 +1561,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1572,15 +1572,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1591,20 +1591,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1613,14 +1613,14 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("Inventory");
|
||||
|
||||
@@ -1629,7 +1629,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+63
-63
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -108,7 +108,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -212,7 +212,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -250,7 +250,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -363,7 +363,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -395,7 +395,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -439,7 +439,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -483,7 +483,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -627,7 +627,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -656,7 +656,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -728,7 +728,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -763,7 +763,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -802,7 +802,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -921,7 +921,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -964,7 +964,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1008,7 +1008,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1056,7 +1056,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1133,7 +1133,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1228,7 +1228,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1306,7 +1306,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1351,7 +1351,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1402,9 +1402,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1413,9 +1413,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1424,15 +1424,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1443,15 +1443,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1460,15 +1460,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1479,15 +1479,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1498,15 +1498,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1515,15 +1515,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1534,9 +1534,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1545,15 +1545,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1564,9 +1564,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1575,15 +1575,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1594,20 +1594,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1616,14 +1616,14 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("Inventory");
|
||||
|
||||
@@ -1632,7 +1632,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+72
-72
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -131,7 +131,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -166,7 +166,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chest_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -190,7 +190,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -294,7 +294,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -332,7 +332,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -445,7 +445,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -477,7 +477,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -521,7 +521,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -565,7 +565,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -709,7 +709,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -738,7 +738,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -810,7 +810,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -845,7 +845,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -884,7 +884,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1003,7 +1003,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1046,7 +1046,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1090,7 +1090,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1138,7 +1138,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1215,7 +1215,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1310,7 +1310,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1388,7 +1388,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1433,7 +1433,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1484,15 +1484,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerCharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimCharacterId");
|
||||
|
||||
@@ -1501,15 +1501,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("VictimCharacter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DeathChest", "DeathChest")
|
||||
b.HasOne("DataServer.Data.Entities.DeathChest", "DeathChest")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("DeathChestId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1520,9 +1520,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1531,9 +1531,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1542,15 +1542,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1561,15 +1561,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1578,15 +1578,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1597,15 +1597,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1616,15 +1616,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1633,15 +1633,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1652,9 +1652,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1663,15 +1663,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1682,9 +1682,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1693,15 +1693,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1712,20 +1712,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1734,19 +1734,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("Inventory");
|
||||
|
||||
@@ -1755,7 +1755,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+72
-72
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -131,7 +131,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -166,7 +166,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chest_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -190,7 +190,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -294,7 +294,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -332,7 +332,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -445,7 +445,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -477,7 +477,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -521,7 +521,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -565,7 +565,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -709,7 +709,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -738,7 +738,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -810,7 +810,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -845,7 +845,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -884,7 +884,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1003,7 +1003,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1046,7 +1046,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1090,7 +1090,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1138,7 +1138,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1215,7 +1215,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1310,7 +1310,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1388,7 +1388,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1433,7 +1433,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1484,15 +1484,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerCharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimCharacterId");
|
||||
|
||||
@@ -1501,15 +1501,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("VictimCharacter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DeathChest", "DeathChest")
|
||||
b.HasOne("DataServer.Data.Entities.DeathChest", "DeathChest")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("DeathChestId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1520,9 +1520,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1531,9 +1531,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1542,15 +1542,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1561,15 +1561,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1578,15 +1578,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1597,15 +1597,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1616,15 +1616,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1633,15 +1633,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1652,9 +1652,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1663,15 +1663,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1682,9 +1682,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1693,15 +1693,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1712,20 +1712,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1734,19 +1734,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("Inventory");
|
||||
|
||||
@@ -1755,7 +1755,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+75
-75
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -131,7 +131,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -166,7 +166,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chest_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -190,7 +190,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -294,7 +294,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -332,7 +332,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -445,7 +445,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -477,7 +477,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -521,7 +521,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -565,7 +565,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -709,7 +709,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -738,7 +738,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -800,7 +800,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_instances");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -872,7 +872,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -907,7 +907,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -946,7 +946,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1065,7 +1065,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1108,7 +1108,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1152,7 +1152,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1200,7 +1200,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1277,7 +1277,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1372,7 +1372,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1450,7 +1450,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1495,7 +1495,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1546,15 +1546,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerCharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimCharacterId");
|
||||
|
||||
@@ -1563,15 +1563,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("VictimCharacter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DeathChest", "DeathChest")
|
||||
b.HasOne("DataServer.Data.Entities.DeathChest", "DeathChest")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("DeathChestId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1582,9 +1582,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1593,9 +1593,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1604,15 +1604,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1623,15 +1623,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1640,15 +1640,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1659,15 +1659,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1678,24 +1678,24 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Creator")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId");
|
||||
|
||||
b.Navigation("Creator");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1704,15 +1704,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1723,9 +1723,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1734,15 +1734,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1753,9 +1753,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1764,15 +1764,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1783,20 +1783,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1805,19 +1805,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("Inventory");
|
||||
|
||||
@@ -1826,7 +1826,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+76
-76
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.ClientAsset", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.ClientAsset", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -136,7 +136,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("client_assets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -183,7 +183,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -218,7 +218,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chest_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -242,7 +242,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -346,7 +346,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -384,7 +384,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -505,7 +505,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -537,7 +537,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -581,7 +581,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -625,7 +625,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -753,7 +753,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -782,7 +782,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -844,7 +844,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_instances");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -916,7 +916,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -951,7 +951,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -990,7 +990,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1109,7 +1109,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1152,7 +1152,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1196,7 +1196,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1244,7 +1244,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1321,7 +1321,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1416,7 +1416,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1494,7 +1494,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1539,7 +1539,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1590,15 +1590,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerCharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimCharacterId");
|
||||
|
||||
@@ -1607,15 +1607,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("VictimCharacter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DeathChest", "DeathChest")
|
||||
b.HasOne("DataServer.Data.Entities.DeathChest", "DeathChest")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("DeathChestId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1626,9 +1626,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1637,9 +1637,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1648,15 +1648,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1667,15 +1667,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1684,15 +1684,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1703,15 +1703,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1722,24 +1722,24 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Creator")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId");
|
||||
|
||||
b.Navigation("Creator");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1748,15 +1748,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1767,9 +1767,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1778,15 +1778,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1797,9 +1797,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1808,15 +1808,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1827,20 +1827,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1849,19 +1849,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("Inventory");
|
||||
|
||||
@@ -1870,7 +1870,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+76
-76
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.ClientAsset", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.ClientAsset", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -136,7 +136,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("client_assets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -183,7 +183,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -218,7 +218,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chest_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -242,7 +242,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -346,7 +346,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -384,7 +384,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -505,7 +505,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -537,7 +537,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -581,7 +581,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -625,7 +625,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -742,7 +742,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -771,7 +771,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -833,7 +833,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_instances");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -905,7 +905,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -940,7 +940,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -979,7 +979,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1098,7 +1098,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1141,7 +1141,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1185,7 +1185,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1233,7 +1233,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1310,7 +1310,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1405,7 +1405,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1483,7 +1483,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1528,7 +1528,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1579,15 +1579,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerCharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimCharacterId");
|
||||
|
||||
@@ -1596,15 +1596,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("VictimCharacter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DeathChest", "DeathChest")
|
||||
b.HasOne("DataServer.Data.Entities.DeathChest", "DeathChest")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("DeathChestId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1615,9 +1615,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1626,9 +1626,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1637,15 +1637,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1656,15 +1656,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1673,15 +1673,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1692,15 +1692,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1711,24 +1711,24 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Creator")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId");
|
||||
|
||||
b.Navigation("Creator");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -1737,15 +1737,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1756,9 +1756,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1767,15 +1767,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1786,9 +1786,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1797,15 +1797,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -1816,20 +1816,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1838,19 +1838,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("Inventory");
|
||||
|
||||
@@ -1859,7 +1859,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+104
-104
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.ClientAsset", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.ClientAsset", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -136,7 +136,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("client_assets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -183,7 +183,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -218,7 +218,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chest_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -242,7 +242,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -346,7 +346,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -376,7 +376,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_crafting_skills");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -414,7 +414,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -437,7 +437,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_item_crafted_link");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -466,7 +466,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_known_recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftedItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftedItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -554,7 +554,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafted_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -613,7 +613,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafting_recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -642,7 +642,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafting_recipe_ingredients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -763,7 +763,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -795,7 +795,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -839,7 +839,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -883,7 +883,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1000,7 +1000,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1029,7 +1029,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1091,7 +1091,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_instances");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonRecipeScroll", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1114,7 +1114,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_recipe_scrolls");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1186,7 +1186,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1221,7 +1221,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1260,7 +1260,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1379,7 +1379,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1422,7 +1422,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1466,7 +1466,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1514,7 +1514,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1591,7 +1591,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1686,7 +1686,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1764,7 +1764,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1809,7 +1809,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1860,15 +1860,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerCharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimCharacterId");
|
||||
|
||||
@@ -1877,15 +1877,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("VictimCharacter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DeathChest", "DeathChest")
|
||||
b.HasOne("DataServer.Data.Entities.DeathChest", "DeathChest")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("DeathChestId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1896,9 +1896,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1907,9 +1907,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1918,9 +1918,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("CraftingSkills")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1929,15 +1929,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1948,15 +1948,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacterItem", "CharacterItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacterItem", "CharacterItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftedItem", "CraftedItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftedItem", "CraftedItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("CraftedItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1967,15 +1967,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("CraftedItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("KnownRecipes")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1986,19 +1986,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftedItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftedItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "BaseItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "BaseItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("BaseItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Crafter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Crafter")
|
||||
.WithMany()
|
||||
.HasForeignKey("CrafterId");
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId");
|
||||
|
||||
@@ -2009,24 +2009,24 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "OutputItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "OutputItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("OutputItemId");
|
||||
|
||||
b.Navigation("OutputItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany("Ingredients")
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2037,15 +2037,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -2054,15 +2054,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2073,15 +2073,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2092,24 +2092,24 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Creator")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId");
|
||||
|
||||
b.Navigation("Creator");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonRecipeScroll", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2120,15 +2120,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -2137,15 +2137,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2156,9 +2156,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2167,15 +2167,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2186,9 +2186,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2197,15 +2197,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2216,20 +2216,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2238,19 +2238,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("CraftingSkills");
|
||||
|
||||
@@ -2263,12 +2263,12 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.Navigation("Ingredients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+104
-104
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.ClientAsset", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.ClientAsset", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -136,7 +136,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("client_assets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -183,7 +183,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -218,7 +218,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chest_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -242,7 +242,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -346,7 +346,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -376,7 +376,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_crafting_skills");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -414,7 +414,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -437,7 +437,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_item_crafted_link");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -466,7 +466,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_known_recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftedItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftedItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -554,7 +554,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafted_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -628,7 +628,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafting_recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -657,7 +657,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafting_recipe_ingredients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -778,7 +778,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -810,7 +810,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -854,7 +854,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -898,7 +898,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1015,7 +1015,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1044,7 +1044,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1106,7 +1106,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_instances");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonRecipeScroll", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1129,7 +1129,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_recipe_scrolls");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1201,7 +1201,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1236,7 +1236,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1275,7 +1275,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1394,7 +1394,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1437,7 +1437,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1481,7 +1481,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1529,7 +1529,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1606,7 +1606,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1701,7 +1701,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1779,7 +1779,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1824,7 +1824,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1875,15 +1875,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerCharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimCharacterId");
|
||||
|
||||
@@ -1892,15 +1892,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("VictimCharacter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DeathChest", "DeathChest")
|
||||
b.HasOne("DataServer.Data.Entities.DeathChest", "DeathChest")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("DeathChestId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1911,9 +1911,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1922,9 +1922,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1933,9 +1933,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("CraftingSkills")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1944,15 +1944,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1963,15 +1963,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacterItem", "CharacterItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacterItem", "CharacterItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftedItem", "CraftedItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftedItem", "CraftedItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("CraftedItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1982,15 +1982,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("CraftedItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("KnownRecipes")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2001,19 +2001,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftedItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftedItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "BaseItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "BaseItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("BaseItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Crafter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Crafter")
|
||||
.WithMany()
|
||||
.HasForeignKey("CrafterId");
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId");
|
||||
|
||||
@@ -2024,24 +2024,24 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "OutputItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "OutputItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("OutputItemId");
|
||||
|
||||
b.Navigation("OutputItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany("Ingredients")
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2052,15 +2052,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -2069,15 +2069,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2088,15 +2088,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2107,24 +2107,24 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Creator")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId");
|
||||
|
||||
b.Navigation("Creator");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonRecipeScroll", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2135,15 +2135,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -2152,15 +2152,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2171,9 +2171,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2182,15 +2182,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2201,9 +2201,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2212,15 +2212,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2231,20 +2231,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2253,19 +2253,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("CraftingSkills");
|
||||
|
||||
@@ -2278,12 +2278,12 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.Navigation("Ingredients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
+104
-104
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -84,7 +84,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.ClientAsset", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.ClientAsset", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -136,7 +136,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("client_assets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -183,7 +183,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -218,7 +218,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chest_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -242,7 +242,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -346,7 +346,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -376,7 +376,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_crafting_skills");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -414,7 +414,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -437,7 +437,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_item_crafted_link");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -466,7 +466,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_known_recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftedItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftedItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -554,7 +554,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafted_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -625,7 +625,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafting_recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -654,7 +654,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafting_recipe_ingredients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -775,7 +775,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -807,7 +807,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -851,7 +851,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -895,7 +895,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1012,7 +1012,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1041,7 +1041,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1103,7 +1103,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_instances");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonRecipeScroll", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1126,7 +1126,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_recipe_scrolls");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1198,7 +1198,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1233,7 +1233,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1272,7 +1272,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1391,7 +1391,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1434,7 +1434,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1478,7 +1478,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1526,7 +1526,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1603,7 +1603,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1698,7 +1698,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1776,7 +1776,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1821,7 +1821,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1872,15 +1872,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerCharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimCharacterId");
|
||||
|
||||
@@ -1889,15 +1889,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("VictimCharacter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DeathChest", "DeathChest")
|
||||
b.HasOne("DataServer.Data.Entities.DeathChest", "DeathChest")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("DeathChestId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1908,9 +1908,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1919,9 +1919,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1930,9 +1930,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("CraftingSkills")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1941,15 +1941,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1960,15 +1960,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacterItem", "CharacterItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacterItem", "CharacterItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftedItem", "CraftedItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftedItem", "CraftedItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("CraftedItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1979,15 +1979,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("CraftedItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("KnownRecipes")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1998,19 +1998,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftedItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftedItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "BaseItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "BaseItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("BaseItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Crafter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Crafter")
|
||||
.WithMany()
|
||||
.HasForeignKey("CrafterId");
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId");
|
||||
|
||||
@@ -2021,9 +2021,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "OutputItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "OutputItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("OutputItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2032,15 +2032,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("OutputItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany("Ingredients")
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2051,15 +2051,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -2068,15 +2068,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2087,15 +2087,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2106,24 +2106,24 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Creator")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId");
|
||||
|
||||
b.Navigation("Creator");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonRecipeScroll", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2134,15 +2134,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -2151,15 +2151,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2170,9 +2170,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2181,15 +2181,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2200,9 +2200,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2211,15 +2211,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2230,20 +2230,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2252,19 +2252,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("CraftingSkills");
|
||||
|
||||
@@ -2277,12 +2277,12 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.Navigation("Ingredients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace SystemRevivalServer.Migrations
|
||||
|
||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -81,7 +81,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.ClientAsset", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.ClientAsset", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -133,7 +133,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("client_assets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -180,7 +180,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chests");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -215,7 +215,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_death_chest_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -239,7 +239,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_belt_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -343,7 +343,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_characters");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -373,7 +373,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_crafting_skills");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -411,7 +411,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -434,7 +434,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_item_crafted_link");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -463,7 +463,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_character_known_recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftedItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftedItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -551,7 +551,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafted_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -622,7 +622,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafting_recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -651,7 +651,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_crafting_recipe_ingredients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonItemDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonItemDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -772,7 +772,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_item_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -804,7 +804,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_learned_spells");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -848,7 +848,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -892,7 +892,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_loot_table_entries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1009,7 +1009,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1038,7 +1038,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_mob_loot_tables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1100,7 +1100,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_instances");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonRecipeScroll", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1123,7 +1123,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_recipe_scrolls");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonSpellDefinition", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1195,7 +1195,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_spell_definitions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1230,7 +1230,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("dungeon_stash_items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1269,7 +1269,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("equipment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameItem", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1388,7 +1388,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_items", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.HasColumnType("int");
|
||||
@@ -1431,7 +1431,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("game_recipes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1475,7 +1475,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("inventories", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.ItemTemplate", b =>
|
||||
modelBuilder.Entity("DataServer.Data.ItemTemplate", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1523,7 +1523,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("item_templates", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1600,7 +1600,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("match_history", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1695,7 +1695,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("characters", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1773,7 +1773,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("player_stats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1818,7 +1818,7 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("sessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Zone", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Zone", b =>
|
||||
{
|
||||
b.Property<ulong>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1869,15 +1869,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.ToTable("zones", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "OwnerCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerCharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "VictimCharacter")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimCharacterId");
|
||||
|
||||
@@ -1886,15 +1886,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("VictimCharacter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChestItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChestItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DeathChest", "DeathChest")
|
||||
b.HasOne("DataServer.Data.Entities.DeathChest", "DeathChest")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("DeathChestId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1905,9 +1905,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonBeltItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonBeltItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1916,9 +1916,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1927,9 +1927,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterCraftingSkill", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("CraftingSkills")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1938,15 +1938,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Inventory")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1957,15 +1957,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ItemDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterItemCraftedLink", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacterItem", "CharacterItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacterItem", "CharacterItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftedItem", "CraftedItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftedItem", "CraftedItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("CraftedItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1976,15 +1976,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("CraftedItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacterKnownRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("KnownRecipes")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1995,19 +1995,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftedItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftedItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "BaseItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "BaseItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("BaseItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Crafter")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Crafter")
|
||||
.WithMany()
|
||||
.HasForeignKey("CrafterId");
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId");
|
||||
|
||||
@@ -2018,9 +2018,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "OutputItem")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "OutputItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("OutputItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2029,15 +2029,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("OutputItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipeIngredient", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany("Ingredients")
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2048,15 +2048,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLearnedSpell", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLearnedSpell", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("LearnedSpells")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonSpellDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -2065,15 +2065,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTableEntry", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTableEntry", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany("Entries")
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2084,15 +2084,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("LootTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonMobLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonMobLootTable", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonLootTable", "LootTable")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonLootTable", "LootTable")
|
||||
.WithMany()
|
||||
.HasForeignKey("LootTableId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonMobDefinition", "MobDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("MobDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2103,24 +2103,24 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("MobDefinition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonPersistence", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Creator")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatorId");
|
||||
|
||||
b.Navigation("Creator");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonRecipeScroll", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonRecipeScroll", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "ItemDefinition")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemDefinitionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCraftingRecipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2131,15 +2131,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonStashItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonCharacter", "Character")
|
||||
.WithMany("Stash")
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
b.HasOne("DataServer.Data.Entities.DungeonItemDefinition", "Definition")
|
||||
.WithMany()
|
||||
.HasForeignKey("DefinitionId");
|
||||
|
||||
@@ -2148,15 +2148,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Definition");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.EquipmentSlot", b =>
|
||||
modelBuilder.Entity("DataServer.Data.EquipmentSlot", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2167,9 +2167,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.GameRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.GameRecipe", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.GameItem", "ResultItem")
|
||||
b.HasOne("DataServer.Data.GameItem", "ResultItem")
|
||||
.WithMany()
|
||||
.HasForeignKey("ResultItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2178,15 +2178,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("ResultItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.InventoryItem", b =>
|
||||
modelBuilder.Entity("DataServer.Data.InventoryItem", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Old_Character", "Old_Character")
|
||||
b.HasOne("DataServer.Data.Old_Character", "Old_Character")
|
||||
.WithMany()
|
||||
.HasForeignKey("CharacterId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.ItemTemplate", "ItemTemplate")
|
||||
b.HasOne("DataServer.Data.ItemTemplate", "ItemTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("ItemTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2197,9 +2197,9 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Old_Character");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.MatchHistory", b =>
|
||||
modelBuilder.Entity("DataServer.Data.MatchHistory", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany()
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2208,15 +2208,15 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Old_Character", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Old_Character", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Characters")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Server.Data.Zone", "Zone")
|
||||
b.HasOne("DataServer.Data.Zone", "Zone")
|
||||
.WithMany()
|
||||
.HasForeignKey("ZoneId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -2227,20 +2227,20 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Zone");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.PlayerStats", b =>
|
||||
modelBuilder.Entity("DataServer.Data.PlayerStats", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithOne()
|
||||
.HasForeignKey("Server.Data.PlayerStats", "AccountId")
|
||||
.HasForeignKey("DataServer.Data.PlayerStats", "AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Session", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Session", b =>
|
||||
{
|
||||
b.HasOne("Server.Data.Account", "Account")
|
||||
b.HasOne("DataServer.Data.Account", "Account")
|
||||
.WithMany("Sessions")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2249,19 +2249,19 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Account", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Account", b =>
|
||||
{
|
||||
b.Navigation("Characters");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DeathChest", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DeathChest", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCharacter", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCharacter", b =>
|
||||
{
|
||||
b.Navigation("CraftingSkills");
|
||||
|
||||
@@ -2274,12 +2274,12 @@ namespace SystemRevivalServer.Migrations
|
||||
b.Navigation("Stash");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonCraftingRecipe", b =>
|
||||
{
|
||||
b.Navigation("Ingredients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Server.Data.Entities.DungeonLootTable", b =>
|
||||
modelBuilder.Entity("DataServer.Data.Entities.DungeonLootTable", b =>
|
||||
{
|
||||
b.Navigation("Entries");
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace SystemRevivalServer.Networking.Messages
|
||||
namespace Server.Networking.Messages
|
||||
{
|
||||
public sealed record CharSummary(ulong CharacterId, string Name, int Level);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace SystemRevivalServer.Networking.Messages
|
||||
namespace Server.Networking.Messages
|
||||
{
|
||||
public sealed record WorldSpawnRequest(int ZoneId);
|
||||
public sealed record WorldSpawn(
|
||||
|
||||
+23
-22
@@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
using Server.Networking;
|
||||
using Server.Networking.Handling;
|
||||
using Server.Networking.Messages;
|
||||
@@ -15,7 +15,7 @@ using Server.Persistence;
|
||||
using Server.Redis;
|
||||
using Server.Services;
|
||||
using Server.Services.Auth;
|
||||
using VoidScavengers.Game;
|
||||
using Server.Game;
|
||||
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
@@ -73,8 +73,8 @@ builder.Services.AddSingleton<IMessageSerializer, JsonSerializerAdapter>();
|
||||
builder.Services.AddSingleton<IClientMessageHandler, AuthHandler>();
|
||||
|
||||
// Void Scavengers game
|
||||
builder.Services.AddSingleton<MatchManager>();
|
||||
builder.Services.AddSingleton<IClientMessageHandler, GameHandler>();
|
||||
//builder.Services.AddSingleton<MatchManager>();
|
||||
//builder.Services.AddSingleton<IClientMessageHandler, GameHandler>();
|
||||
builder.Services.AddSingleton<DungeonHandler>();
|
||||
builder.Services.AddSingleton<IClientMessageHandler>(sp => sp.GetRequiredService<DungeonHandler>());
|
||||
builder.Services.AddSingleton<LootService>();
|
||||
@@ -84,6 +84,7 @@ builder.Services.AddSingleton<MessageRouter>();
|
||||
builder.Services.AddSingleton<IItemService, CachedItemService>();
|
||||
builder.Services.AddSingleton<IAdminAuthService, AdminAuthService>();
|
||||
builder.Services.AddSingleton<ICdnBrowserService, MinioCdnBrowserService>();
|
||||
builder.Services.AddSingleton<IServerBroadcastService, ServerBroadcastService>();
|
||||
builder.Services.AddHttpClient(); // For CDN file hash computation
|
||||
|
||||
// Health checks
|
||||
@@ -122,25 +123,25 @@ catch (Exception ex)
|
||||
app.Logger.LogError(ex, "Failed to resolve IMessageSerializer");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var matchMgr = app.Services.GetRequiredService<MatchManager>();
|
||||
app.Logger.LogInformation("MatchManager resolved OK");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
app.Logger.LogError(ex, "Failed to resolve MatchManager");
|
||||
}
|
||||
//try
|
||||
//{
|
||||
// var matchMgr = app.Services.GetRequiredService<MatchManager>();
|
||||
// app.Logger.LogInformation("MatchManager resolved OK");
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// app.Logger.LogError(ex, "Failed to resolve MatchManager");
|
||||
//}
|
||||
|
||||
try
|
||||
{
|
||||
var gameHandler = app.Services.GetRequiredService<GameHandler>();
|
||||
app.Logger.LogInformation("GameHandler resolved OK, opcodes: {Ops}", string.Join(",", gameHandler.SupportedOpCodes));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
app.Logger.LogError(ex, "Failed to resolve GameHandler");
|
||||
}
|
||||
//try
|
||||
//{
|
||||
// var gameHandler = app.Services.GetRequiredService<GameHandler>();
|
||||
// app.Logger.LogInformation("GameHandler resolved OK, opcodes: {Ops}", string.Join(",", gameHandler.SupportedOpCodes));
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// app.Logger.LogError(ex, "Failed to resolve GameHandler");
|
||||
//}
|
||||
|
||||
var handlers = app.Services.GetServices<IClientMessageHandler>().ToList();
|
||||
app.Logger.LogInformation("IClientMessageHandler count: {Count}", handlers.Count);
|
||||
|
||||
@@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages;
|
||||
namespace Server.Services.Admin.Pages;
|
||||
|
||||
/// <summary>
|
||||
/// Base class for all admin pages that require authentication
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/admin/assets"
|
||||
@model Assets.IndexModel
|
||||
@using Server.Data.Entities
|
||||
@using DataServer.Data.Entities
|
||||
@{
|
||||
ViewData["Title"] = "CDN Assets";
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
using Server.Services;
|
||||
using System.Net.Http;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Assets;
|
||||
namespace Server.Services.Admin.Pages.Assets;
|
||||
|
||||
public class IndexModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
@page "/admin/broadcast"
|
||||
@model Broadcast.IndexModel
|
||||
@{
|
||||
ViewData["Title"] = "Server Broadcast";
|
||||
}
|
||||
|
||||
<div class="space-y-6 max-w-2xl">
|
||||
<div>
|
||||
<h1 class="text-3xl font-bold text-white">Server Broadcast</h1>
|
||||
<p class="text-gray-400 mt-1">Send messages to all connected players</p>
|
||||
</div>
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.Message))
|
||||
{
|
||||
<div class="p-4 rounded-lg @(Model.IsError ? "bg-red-900/50 border border-red-700 text-red-300" : "bg-green-900/50 border border-green-700 text-green-300")">
|
||||
@Model.Message
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Quick Messages -->
|
||||
<div class="card p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Quick Messages</h2>
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<form method="post" asp-page-handler="QuickMessage">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="type" value="maintenance" />
|
||||
<input type="hidden" name="message" value="Server maintenance in 5 minutes. Please find a safe spot!" />
|
||||
<button type="submit" class="btn bg-yellow-700 hover:bg-yellow-600 text-white w-full">
|
||||
⚠️ Maintenance Warning (5min)
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" asp-page-handler="QuickMessage">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="type" value="maintenance" />
|
||||
<input type="hidden" name="message" value="Server restarting in 1 minute!" />
|
||||
<button type="submit" class="btn bg-orange-700 hover:bg-orange-600 text-white w-full">
|
||||
🔄 Restart Warning (1min)
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" asp-page-handler="QuickMessage">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="type" value="event" />
|
||||
<input type="hidden" name="message" value="Double XP event is now active!" />
|
||||
<button type="submit" class="btn bg-green-700 hover:bg-green-600 text-white w-full">
|
||||
🎉 Double XP Active
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" asp-page-handler="QuickMessage">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="type" value="info" />
|
||||
<input type="hidden" name="message" value="New content has been added! Check it out!" />
|
||||
<button type="submit" class="btn bg-blue-700 hover:bg-blue-600 text-white w-full">
|
||||
📢 New Content
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom Message -->
|
||||
<form method="post" asp-page-handler="CustomMessage" class="card p-6">
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Custom Message</h2>
|
||||
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label class="label">Message Type</label>
|
||||
<select name="type" class="input">
|
||||
<option value="info">📢 Info (Blue)</option>
|
||||
<option value="warning">⚠️ Warning (Yellow)</option>
|
||||
<option value="error">❌ Error (Red)</option>
|
||||
<option value="success">✅ Success (Green)</option>
|
||||
<option value="event">🎉 Event (Purple)</option>
|
||||
<option value="maintenance">🔧 Maintenance (Orange)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="label">Message</label>
|
||||
<textarea name="message" class="input" rows="3" required placeholder="Enter your message..." maxlength="500"></textarea>
|
||||
<p class="text-xs text-gray-500 mt-1">Max 500 characters</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="label">Duration (seconds)</label>
|
||||
<input type="number" name="duration" value="10" class="input w-32" min="3" max="60" />
|
||||
<span class="text-gray-400 text-sm ml-2">How long the message displays on client</span>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Send Broadcast</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Asset Refresh -->
|
||||
<div class="card p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Client Commands</h2>
|
||||
|
||||
<div class="space-y-3">
|
||||
<form method="post" asp-page-handler="RefreshAssets" class="flex items-center justify-between p-3 bg-gray-800 rounded-lg">
|
||||
@Html.AntiForgeryToken()
|
||||
<div>
|
||||
<p class="text-white font-medium">Refresh Asset Manifest</p>
|
||||
<p class="text-xs text-gray-400">Tell all clients to re-download the asset manifest</p>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-secondary">Send</button>
|
||||
</form>
|
||||
|
||||
<form method="post" asp-page-handler="ForceReconnect" class="flex items-center justify-between p-3 bg-gray-800 rounded-lg">
|
||||
@Html.AntiForgeryToken()
|
||||
<div>
|
||||
<p class="text-white font-medium">Force Reconnect</p>
|
||||
<p class="text-xs text-gray-400">Disconnect all clients (they will auto-reconnect)</p>
|
||||
</div>
|
||||
<button type="submit" class="btn bg-red-700 hover:bg-red-600 text-white" onclick="return confirm('This will disconnect all players. Continue?')">Send</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Connected Players -->
|
||||
<div class="card p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Server Status</h2>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div class="bg-gray-800 rounded-lg p-4 text-center">
|
||||
<p class="text-3xl font-bold text-green-400">@Model.ConnectedPlayers</p>
|
||||
<p class="text-sm text-gray-400">Connected Players</p>
|
||||
</div>
|
||||
<div class="bg-gray-800 rounded-lg p-4 text-center">
|
||||
<p class="text-3xl font-bold text-blue-400">@Model.ActiveDungeons</p>
|
||||
<p class="text-sm text-gray-400">Active Dungeons</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,139 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Server.Redis;
|
||||
|
||||
namespace Server.Services.Admin.Pages.Broadcast;
|
||||
|
||||
public class IndexModel : AdminPageModel
|
||||
{
|
||||
private readonly IRedisManager _redis;
|
||||
private readonly ILogger<IndexModel> _logger;
|
||||
|
||||
public IndexModel(IRedisManager redis, ILogger<IndexModel> logger)
|
||||
{
|
||||
_redis = redis;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public int ConnectedPlayers { get; set; }
|
||||
public int ActiveDungeons { get; set; }
|
||||
|
||||
[TempData]
|
||||
public string? Message { get; set; }
|
||||
[TempData]
|
||||
public bool IsError { get; set; }
|
||||
|
||||
public async Task OnGetAsync()
|
||||
{
|
||||
await LoadStats();
|
||||
}
|
||||
|
||||
private async Task LoadStats()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Try to get connected player count from Redis
|
||||
var playerCount = await _redis.Db.StringGetAsync("server:player_count");
|
||||
if (playerCount.HasValue && int.TryParse(playerCount, out var count))
|
||||
ConnectedPlayers = count;
|
||||
|
||||
var dungeonCount = await _redis.Db.StringGetAsync("server:dungeon_count");
|
||||
if (dungeonCount.HasValue && int.TryParse(dungeonCount, out var dCount))
|
||||
ActiveDungeons = dCount;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Failed to load server stats from Redis");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostQuickMessageAsync(string type, string message)
|
||||
{
|
||||
return await SendBroadcast(type, message, 10);
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostCustomMessageAsync(string type, string message, int duration = 10)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(message))
|
||||
{
|
||||
Message = "Message cannot be empty.";
|
||||
IsError = true;
|
||||
return RedirectToPage();
|
||||
}
|
||||
|
||||
return await SendBroadcast(type, message, duration);
|
||||
}
|
||||
|
||||
private async Task<IActionResult> SendBroadcast(string type, string message, int duration)
|
||||
{
|
||||
try
|
||||
{
|
||||
var payload = System.Text.Json.JsonSerializer.Serialize(new
|
||||
{
|
||||
type = type,
|
||||
message = message,
|
||||
duration = duration,
|
||||
timestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
|
||||
});
|
||||
|
||||
// Publish to Redis channel that game servers listen to
|
||||
await _redis.Bus.PublishAsync("server:broadcast", payload);
|
||||
|
||||
_logger.LogInformation("Broadcast sent: {Type} - {Message}", type, message);
|
||||
Message = $"Broadcast sent to all connected players.";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Failed to send broadcast");
|
||||
Message = $"Failed to send broadcast: {ex.Message}";
|
||||
IsError = true;
|
||||
}
|
||||
|
||||
return RedirectToPage();
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostRefreshAssetsAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var payload = System.Text.Json.JsonSerializer.Serialize(new
|
||||
{
|
||||
command = "refresh_assets",
|
||||
timestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
|
||||
});
|
||||
|
||||
await _redis.Bus.PublishAsync("server:command", payload);
|
||||
Message = "Asset refresh command sent.";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Failed to send asset refresh command");
|
||||
Message = $"Failed: {ex.Message}";
|
||||
IsError = true;
|
||||
}
|
||||
|
||||
return RedirectToPage();
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostForceReconnectAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var payload = System.Text.Json.JsonSerializer.Serialize(new
|
||||
{
|
||||
command = "force_reconnect",
|
||||
timestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
|
||||
});
|
||||
|
||||
await _redis.Bus.PublishAsync("server:command", payload);
|
||||
Message = "Force reconnect command sent. All clients will reconnect.";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Failed to send force reconnect command");
|
||||
Message = $"Failed: {ex.Message}";
|
||||
IsError = true;
|
||||
}
|
||||
|
||||
return RedirectToPage();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages;
|
||||
namespace Server.Services.Admin.Pages;
|
||||
|
||||
public class IndexModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/admin/items/edit"
|
||||
@model Items.EditModel
|
||||
@using Server.Data.Enums
|
||||
@using DataServer.Data.Enums
|
||||
@{
|
||||
ViewData["Title"] = Model.IsNew ? "Create Item" : $"Edit: {Model.Item.Name}";
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
using DataServer.Data.Enums;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Items;
|
||||
namespace Server.Services.Admin.Pages.Items;
|
||||
|
||||
public class EditModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/admin/items"
|
||||
@model Items.IndexModel
|
||||
@using Server.Data.Enums
|
||||
@using DataServer.Data.Enums
|
||||
@{
|
||||
ViewData["Title"] = "Items";
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using Server.Data.Enums;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
using DataServer.Data.Enums;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Items;
|
||||
namespace Server.Services.Admin.Pages.Items;
|
||||
|
||||
public class IndexModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Admin Login - Void Scavengers</title>
|
||||
<title>Admin Login - Dungeon Divers</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
<body class="h-full flex items-center justify-center">
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
using Server.Services.Auth;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages;
|
||||
namespace Server.Services.Admin.Pages;
|
||||
|
||||
public class LoginModel : PageModel
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages;
|
||||
namespace Server.Services.Admin.Pages;
|
||||
|
||||
public class LogoutModel : PageModel
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.LootTables;
|
||||
namespace Server.Services.Admin.Pages.LootTables;
|
||||
|
||||
public class EditModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.LootTables;
|
||||
namespace Server.Services.Admin.Pages.LootTables;
|
||||
|
||||
public class IndexModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/admin/mobs/edit"
|
||||
@model Mobs.EditModel
|
||||
@using Server.Data.Enums
|
||||
@using DataServer.Data.Enums
|
||||
@{
|
||||
ViewData["Title"] = Model.IsNew ? "Create Mob" : $"Edit: {Model.Mob.Name}";
|
||||
}
|
||||
@@ -243,9 +243,9 @@
|
||||
<!-- Visual -->
|
||||
<div class="card">
|
||||
<div class="p-4 border-b border-gray-700">
|
||||
<h2 class="text-lg font-semibold text-white">Visual</h2>
|
||||
<h2 class="text-lg font-semibold text-white">Visual Settings</h2>
|
||||
</div>
|
||||
<div class="p-6 grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div class="p-6 grid grid-cols-1 md:grid-cols-4 gap-4">
|
||||
<div>
|
||||
<label class="label">Tint Color</label>
|
||||
<div class="flex gap-2">
|
||||
@@ -257,15 +257,71 @@
|
||||
<label class="label">Scale</label>
|
||||
<input type="number" name="Mob.Scale" value="@Model.Mob.Scale" class="input" min="0.1" step="0.1" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Frame Width</label>
|
||||
<input type="number" name="sprite_frameWidth" value="@Model.SpriteConfig.FrameWidth" class="input" min="8" step="8" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Frame Height</label>
|
||||
<input type="number" name="sprite_frameHeight" value="@Model.SpriteConfig.FrameHeight" class="input" min="8" step="8" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">FPS</label>
|
||||
<input type="number" name="sprite_fps" value="@Model.SpriteConfig.Fps" class="input" min="1" max="60" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Animation Speed</label>
|
||||
<input type="number" name="Mob.AnimationSpeed" value="@Model.Mob.AnimationSpeed" class="input" min="1" />
|
||||
</div>
|
||||
<div class="md:col-span-3">
|
||||
<label class="label">Sprite Config JSON</label>
|
||||
<textarea name="Mob.SpriteConfigJson" class="input font-mono text-sm" rows="4" placeholder='{"sprites":{"idle_front":"path.png"},"frameWidth":64,"frameHeight":64}'>@Model.Mob.SpriteConfigJson</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sprite Sheets -->
|
||||
<div class="card">
|
||||
<div class="p-4 border-b border-gray-700 flex items-center justify-between">
|
||||
<div>
|
||||
<h2 class="text-lg font-semibold text-white">Sprite Sheets</h2>
|
||||
<p class="text-sm text-gray-400">Configure sprite sheets for different directions and states</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<div id="spritesList" class="space-y-2 mb-4">
|
||||
@foreach (var sprite in Model.SpriteConfig.Sprites)
|
||||
{
|
||||
<div class="bg-gray-800 border border-gray-700 rounded-lg p-3 flex items-center gap-3 sprite-row">
|
||||
<select name="sprite_key[]" class="input w-36">
|
||||
@foreach (var key in new[] { "idle_front", "idle_back", "idle_left", "idle_right", "run_front", "run_back", "run_left", "run_right", "attack_front", "attack_back", "death" })
|
||||
{
|
||||
<option value="@key" selected="@(sprite.Key == key)">@key</option>
|
||||
}
|
||||
</select>
|
||||
<input type="text" name="sprite_path[]" value="@sprite.Value" class="input flex-1" placeholder="textures/mobs/skeleton_idle_front.png" />
|
||||
<input type="number" name="sprite_frames[]" value="@Model.SpriteConfig.GetFrameCount(sprite.Key)" class="input w-20" min="1" placeholder="Frames" title="Frame count" />
|
||||
<label class="flex items-center gap-1 text-sm text-gray-400">
|
||||
<input type="checkbox" name="sprite_loop[]" value="@sprite.Key" checked="@Model.SpriteConfig.IsLooping(sprite.Key)" class="rounded border-gray-600 bg-gray-800" />
|
||||
Loop
|
||||
</label>
|
||||
<button type="button" onclick="this.closest('.sprite-row').remove()" class="p-2 text-red-400 hover:text-red-300">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (!Model.SpriteConfig.Sprites.Any())
|
||||
{
|
||||
<p class="text-gray-500 text-sm mb-4">No sprites configured. Add sprite sheets below.</p>
|
||||
}
|
||||
|
||||
<button type="button" onclick="addSprite()" class="btn btn-secondary">
|
||||
<svg class="w-4 h-4 mr-1 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
|
||||
</svg>
|
||||
Add Sprite Sheet
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Save -->
|
||||
@@ -460,5 +516,37 @@
|
||||
customInput.classList.add('hidden');
|
||||
valueInput.value = '50';
|
||||
}
|
||||
|
||||
function addSprite() {
|
||||
const html = `
|
||||
<div class="bg-gray-800 border border-gray-700 rounded-lg p-3 flex items-center gap-3 sprite-row">
|
||||
<select name="sprite_key[]" class="input w-36">
|
||||
<option value="idle_front">idle_front</option>
|
||||
<option value="idle_back">idle_back</option>
|
||||
<option value="idle_left">idle_left</option>
|
||||
<option value="idle_right">idle_right</option>
|
||||
<option value="run_front">run_front</option>
|
||||
<option value="run_back">run_back</option>
|
||||
<option value="run_left">run_left</option>
|
||||
<option value="run_right">run_right</option>
|
||||
<option value="attack_front">attack_front</option>
|
||||
<option value="attack_back">attack_back</option>
|
||||
<option value="death">death</option>
|
||||
</select>
|
||||
<input type="text" name="sprite_path[]" value="" class="input flex-1" placeholder="textures/mobs/skeleton_idle_front.png" />
|
||||
<input type="number" name="sprite_frames[]" value="8" class="input w-20" min="1" placeholder="Frames" title="Frame count" />
|
||||
<label class="flex items-center gap-1 text-sm text-gray-400">
|
||||
<input type="checkbox" name="sprite_loop[]" value="new" checked class="rounded border-gray-600 bg-gray-800" />
|
||||
Loop
|
||||
</label>
|
||||
<button type="button" onclick="this.closest('.sprite-row').remove()" class="p-2 text-red-400 hover:text-red-300">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
document.getElementById('spritesList').insertAdjacentHTML('beforeend', html);
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -1,10 +1,29 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Mobs;
|
||||
namespace Server.Services.Admin.Pages.Mobs;
|
||||
|
||||
// Helper class for sprite configuration
|
||||
public class MobSpriteConfig
|
||||
{
|
||||
public Dictionary<string, string> Sprites { get; set; } = new();
|
||||
public Dictionary<string, SpriteAnimation> Animations { get; set; } = new();
|
||||
public int FrameWidth { get; set; } = 64;
|
||||
public int FrameHeight { get; set; } = 64;
|
||||
public int Fps { get; set; } = 8;
|
||||
|
||||
public int GetFrameCount(string key) => Animations.TryGetValue(key, out var anim) ? anim.Frames : 8;
|
||||
public bool IsLooping(string key) => !Animations.TryGetValue(key, out var anim) || anim.Loop;
|
||||
|
||||
public class SpriteAnimation
|
||||
{
|
||||
public int Frames { get; set; } = 8;
|
||||
public bool Loop { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
||||
public class EditModel : AdminPageModel
|
||||
{
|
||||
@@ -45,6 +64,21 @@ public class EditModel : AdminPageModel
|
||||
return value;
|
||||
return 0f;
|
||||
}
|
||||
|
||||
// Sprite config helper
|
||||
public MobSpriteConfig SpriteConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(Mob.SpriteConfigJson)) return new();
|
||||
var options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
|
||||
return JsonSerializer.Deserialize<MobSpriteConfig>(Mob.SpriteConfigJson, options) ?? new();
|
||||
}
|
||||
catch { return new(); }
|
||||
}
|
||||
}
|
||||
|
||||
public async Task OnGetAsync(int? id)
|
||||
{
|
||||
@@ -115,6 +149,39 @@ public class EditModel : AdminPageModel
|
||||
}
|
||||
}
|
||||
Mob.ResistancesJson = JsonSerializer.Serialize(resistances);
|
||||
|
||||
// Parse sprite config from form
|
||||
var spriteConfig = new MobSpriteConfig();
|
||||
if (int.TryParse(Request.Form["sprite_frameWidth"], out var fw)) spriteConfig.FrameWidth = fw;
|
||||
if (int.TryParse(Request.Form["sprite_frameHeight"], out var fh)) spriteConfig.FrameHeight = fh;
|
||||
if (int.TryParse(Request.Form["sprite_fps"], out var fps)) spriteConfig.Fps = fps;
|
||||
|
||||
var spriteKeys = Request.Form["sprite_key[]"].ToArray();
|
||||
var spritePaths = Request.Form["sprite_path[]"].ToArray();
|
||||
var spriteFrames = Request.Form["sprite_frames[]"].ToArray();
|
||||
var spriteLoops = Request.Form["sprite_loop[]"].ToArray();
|
||||
|
||||
for (int i = 0; i < spriteKeys.Length && i < spritePaths.Length; i++)
|
||||
{
|
||||
var key = spriteKeys[i]?.Trim();
|
||||
var path = spritePaths[i]?.Trim();
|
||||
if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(path))
|
||||
{
|
||||
spriteConfig.Sprites[key] = path;
|
||||
var frames = i < spriteFrames.Length && int.TryParse(spriteFrames[i], out var f) ? f : 8;
|
||||
var loop = spriteLoops.Contains(key) || spriteLoops.Contains("new");
|
||||
spriteConfig.Animations[key] = new MobSpriteConfig.SpriteAnimation { Frames = frames, Loop = loop };
|
||||
}
|
||||
}
|
||||
|
||||
if (spriteConfig.Sprites.Any())
|
||||
{
|
||||
Mob.SpriteConfigJson = JsonSerializer.Serialize(spriteConfig, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
|
||||
}
|
||||
else
|
||||
{
|
||||
Mob.SpriteConfigJson = null;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(Mob.Name))
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/admin/mobs"
|
||||
@model Mobs.IndexModel
|
||||
@using Server.Data.Enums
|
||||
@using DataServer.Data.Enums
|
||||
@{
|
||||
ViewData["Title"] = "Mobs";
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using Server.Data.Enums;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
using DataServer.Data.Enums;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Mobs;
|
||||
namespace Server.Services.Admin.Pages.Mobs;
|
||||
|
||||
public class IndexModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -1,222 +1,204 @@
|
||||
@page "/admin/players/character"
|
||||
@model Players.CharacterModel
|
||||
@using Server.Data.Entities
|
||||
@using Server.Data.Enums
|
||||
@using DataServer.Data.Entities
|
||||
@using DataServer.Data.Enums
|
||||
@{
|
||||
ViewData["Title"] = $"Character: {Model.Character.Name}";
|
||||
}
|
||||
|
||||
<div class="space-y-6">
|
||||
<div class="space-y-4">
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<a href="/admin/players/edit?id=@Model.Character.AccountId" class="text-gray-400 hover:text-white text-sm">← Back to Account</a>
|
||||
<h1 class="text-3xl font-bold text-white mt-2">@Model.Character.Name</h1>
|
||||
<p class="text-gray-400 mt-1">Level @Model.Character.Level • @Model.Character.Gold.ToString("N0") Gold • Character ID: @Model.Character.Id</p>
|
||||
<h1 class="text-2xl font-bold text-white mt-1">@Model.Character.Name</h1>
|
||||
<p class="text-gray-400 text-sm">Level @Model.Character.Level • @Model.Character.Gold.ToString("N0") Gold • ID: @Model.Character.Id</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.Message))
|
||||
{
|
||||
<div class="p-4 rounded-lg @(Model.IsError ? "bg-red-900/50 border border-red-700 text-red-300" : "bg-green-900/50 border border-green-700 text-green-300")">
|
||||
<div class="p-3 rounded-lg text-sm @(Model.IsError ? "bg-red-900/50 border border-red-700 text-red-300" : "bg-green-900/50 border border-green-700 text-green-300")">
|
||||
@Model.Message
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
||||
<!-- Left Column: Basic Info + Stats -->
|
||||
<div class="lg:col-span-2 space-y-6">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-4 gap-4">
|
||||
<!-- Left: Basic + Stats -->
|
||||
<div class="lg:col-span-3 space-y-4">
|
||||
<!-- Basic Info -->
|
||||
<form method="post" asp-page-handler="UpdateBasic" class="card p-6">
|
||||
<form method="post" asp-page-handler="UpdateBasic" class="card p-4">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="characterId" value="@Model.Character.Id" />
|
||||
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Basic Information</h2>
|
||||
<h2 class="text-md font-semibold text-white mb-3">Basic Information</h2>
|
||||
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-4">
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-3 mb-3">
|
||||
<div class="col-span-2">
|
||||
<label class="label">Character Name</label>
|
||||
<input type="text" name="name" value="@Model.Character.Name" class="input" required maxlength="32" />
|
||||
<label class="label text-xs">Name</label>
|
||||
<input type="text" name="name" value="@Model.Character.Name" class="input text-sm py-1" required maxlength="32" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Level</label>
|
||||
<input type="number" name="level" value="@Model.Character.Level" class="input" min="1" max="100" />
|
||||
<label class="label text-xs">Level</label>
|
||||
<input type="number" name="level" value="@Model.Character.Level" class="input text-sm py-1" min="1" max="100" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Experience</label>
|
||||
<input type="number" name="experience" value="@Model.Character.Experience" class="input" min="0" />
|
||||
<label class="label text-xs">Experience</label>
|
||||
<input type="number" name="experience" value="@Model.Character.Experience" class="input text-sm py-1" min="0" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Gold</label>
|
||||
<input type="number" name="gold" value="@Model.Character.Gold" class="input" min="0" />
|
||||
<label class="label text-xs">Gold</label>
|
||||
<input type="number" name="gold" value="@Model.Character.Gold" class="input text-sm py-1" min="0" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Unspent Points</label>
|
||||
<input type="number" name="unspentStatPoints" value="@Model.Character.UnspentStatPoints" class="input" min="0" />
|
||||
<label class="label text-xs">Unspent Pts</label>
|
||||
<input type="number" name="unspentStatPoints" value="@Model.Character.UnspentStatPoints" class="input text-sm py-1" min="0" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Current HP</label>
|
||||
<input type="number" name="currentHealth" value="@Model.Character.CurrentHealth" class="input" min="0" />
|
||||
<label class="label text-xs">HP</label>
|
||||
<input type="number" name="currentHealth" value="@Model.Character.CurrentHealth" class="input text-sm py-1" min="0" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Current Mana</label>
|
||||
<input type="number" name="currentMana" value="@Model.Character.CurrentMana" class="input" min="0" />
|
||||
<label class="label text-xs">Mana</label>
|
||||
<input type="number" name="currentMana" value="@Model.Character.CurrentMana" class="input text-sm py-1" min="0" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Save Basic Info</button>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Save Basic</button>
|
||||
</form>
|
||||
|
||||
<!-- Stats -->
|
||||
<form method="post" asp-page-handler="UpdateStats" class="card p-6">
|
||||
<form method="post" asp-page-handler="UpdateStats" class="card p-4">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="characterId" value="@Model.Character.Id" />
|
||||
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Character Stats</h2>
|
||||
<h2 class="text-md font-semibold text-white mb-3">Stats</h2>
|
||||
|
||||
<div class="grid grid-cols-2 md:grid-cols-5 gap-4 mb-4">
|
||||
<div class="grid grid-cols-5 gap-3 mb-3">
|
||||
<div>
|
||||
<label class="label">
|
||||
<span class="text-red-400">STR</span>
|
||||
<span class="text-xs text-gray-500 block">Phys Dmg</span>
|
||||
</label>
|
||||
<input type="number" name="strength" value="@Model.Character.Strength" class="input" min="1" />
|
||||
<label class="label text-xs text-red-400">STR</label>
|
||||
<input type="number" name="strength" value="@Model.Character.Strength" class="input text-sm py-1" min="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">
|
||||
<span class="text-blue-400">INT</span>
|
||||
<span class="text-xs text-gray-500 block">Spell Dmg</span>
|
||||
</label>
|
||||
<input type="number" name="intelligence" value="@Model.Character.Intelligence" class="input" min="1" />
|
||||
<label class="label text-xs text-blue-400">INT</label>
|
||||
<input type="number" name="intelligence" value="@Model.Character.Intelligence" class="input text-sm py-1" min="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">
|
||||
<span class="text-purple-400">WIS</span>
|
||||
<span class="text-xs text-gray-500 block">Mana, XP</span>
|
||||
</label>
|
||||
<input type="number" name="wisdom" value="@Model.Character.Wisdom" class="input" min="1" />
|
||||
<label class="label text-xs text-purple-400">WIS</label>
|
||||
<input type="number" name="wisdom" value="@Model.Character.Wisdom" class="input text-sm py-1" min="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">
|
||||
<span class="text-green-400">END</span>
|
||||
<span class="text-xs text-gray-500 block">HP, Regen</span>
|
||||
</label>
|
||||
<input type="number" name="endurance" value="@Model.Character.Endurance" class="input" min="1" />
|
||||
<label class="label text-xs text-green-400">END</label>
|
||||
<input type="number" name="endurance" value="@Model.Character.Endurance" class="input text-sm py-1" min="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">
|
||||
<span class="text-yellow-400">DEX</span>
|
||||
<span class="text-xs text-gray-500 block">Speed</span>
|
||||
</label>
|
||||
<input type="number" name="dexterity" value="@Model.Character.Dexterity" class="input" min="1" />
|
||||
<label class="label text-xs text-yellow-400">DEX</label>
|
||||
<input type="number" name="dexterity" value="@Model.Character.Dexterity" class="input text-sm py-1" min="1" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Derived Stats (Read-only) -->
|
||||
<div class="grid grid-cols-3 md:grid-cols-6 gap-3 mb-4 p-3 bg-gray-800 rounded-lg">
|
||||
<div class="text-center">
|
||||
<p class="text-xs text-gray-500">Max HP</p>
|
||||
<p class="text-white font-medium">@Model.Character.MaxHealth</p>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="text-xs text-gray-500">Max Mana</p>
|
||||
<p class="text-white font-medium">@Model.Character.MaxMana</p>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="text-xs text-gray-500">Max Stamina</p>
|
||||
<p class="text-white font-medium">@Model.Character.MaxStamina</p>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="text-xs text-gray-500">XP Bonus</p>
|
||||
<p class="text-white font-medium">+@(((Model.Character.XpBonus - 1) * 100).ToString("0"))%</p>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="text-xs text-gray-500">Move Speed</p>
|
||||
<p class="text-white font-medium">@Model.Character.MoveSpeed.ToString("0")</p>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="text-xs text-gray-500">Atk Speed</p>
|
||||
<p class="text-white font-medium">@Model.Character.AttackSpeed.ToString("0.00")</p>
|
||||
</div>
|
||||
<div class="grid grid-cols-6 gap-2 p-2 bg-gray-800 rounded text-center text-xs mb-3">
|
||||
<div><span class="text-gray-500">HP</span><br/><span class="text-white">@Model.Character.MaxHealth</span></div>
|
||||
<div><span class="text-gray-500">Mana</span><br/><span class="text-white">@Model.Character.MaxMana</span></div>
|
||||
<div><span class="text-gray-500">Stam</span><br/><span class="text-white">@Model.Character.MaxStamina</span></div>
|
||||
<div><span class="text-gray-500">XP+</span><br/><span class="text-white">@(((Model.Character.XpBonus - 1) * 100).ToString("0"))%</span></div>
|
||||
<div><span class="text-gray-500">Spd</span><br/><span class="text-white">@Model.Character.MoveSpeed.ToString("0")</span></div>
|
||||
<div><span class="text-gray-500">Atk</span><br/><span class="text-white">@Model.Character.AttackSpeed.ToString("0.0")</span></div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Save Stats</button>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Save Stats</button>
|
||||
</form>
|
||||
|
||||
<!-- Lifetime Stats (Read-only) -->
|
||||
<div class="card p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Lifetime Statistics</h2>
|
||||
<div class="grid grid-cols-2 md:grid-cols-5 gap-4">
|
||||
<div class="bg-gray-800 rounded-lg p-3 text-center">
|
||||
<p class="text-2xl font-bold text-white">@Model.Character.TotalKills</p>
|
||||
<p class="text-xs text-gray-500">Total Kills</p>
|
||||
</div>
|
||||
<div class="bg-gray-800 rounded-lg p-3 text-center">
|
||||
<p class="text-2xl font-bold text-white">@Model.Character.TotalDeaths</p>
|
||||
<p class="text-xs text-gray-500">Deaths</p>
|
||||
</div>
|
||||
<div class="bg-gray-800 rounded-lg p-3 text-center">
|
||||
<p class="text-2xl font-bold text-red-400">@Model.Character.PlayersKilled</p>
|
||||
<p class="text-xs text-gray-500">Players Killed</p>
|
||||
</div>
|
||||
<div class="bg-gray-800 rounded-lg p-3 text-center">
|
||||
<p class="text-2xl font-bold text-green-400">@Model.Character.DungeonsCompleted</p>
|
||||
<p class="text-xs text-gray-500">Dungeons</p>
|
||||
</div>
|
||||
<div class="bg-gray-800 rounded-lg p-3 text-center">
|
||||
<p class="text-2xl font-bold text-purple-400">@Model.Character.BossesKilled</p>
|
||||
<p class="text-xs text-gray-500">Bosses</p>
|
||||
</div>
|
||||
<!-- Inventory Grid - Compact -->
|
||||
<div class="card p-4">
|
||||
<h2 class="text-md font-semibold text-white mb-3">Inventory (@Model.InventoryItems.Count/30)</h2>
|
||||
|
||||
<div class="grid grid-cols-10 gap-1">
|
||||
@for (int i = 0; i < 30; i++)
|
||||
{
|
||||
var item = Model.InventoryItems.FirstOrDefault(it => it.SlotIndex == i);
|
||||
var rarityBorder = item?.ItemDefinition?.Rarity switch
|
||||
{
|
||||
ItemRarity.Uncommon => "border-green-500",
|
||||
ItemRarity.Rare => "border-blue-500",
|
||||
ItemRarity.Epic => "border-purple-500",
|
||||
ItemRarity.Legendary => "border-orange-500",
|
||||
_ => "border-gray-700"
|
||||
};
|
||||
<div class="w-10 h-10 bg-gray-900 rounded border @rarityBorder flex items-center justify-center relative group cursor-pointer"
|
||||
@if (item != null) { <text>onclick="showItemModal(@item.Id, @item.Quantity, @item.SlotIndex)"</text> }>
|
||||
@if (item?.ItemDefinition != null)
|
||||
{
|
||||
@if (!string.IsNullOrEmpty(item.ItemDefinition.SpritePath))
|
||||
{
|
||||
<img src="@Model.CdnBaseUrl/downloads/@item.ItemDefinition.SpritePath" class="w-8 h-8 object-contain" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-xs text-gray-400">@item.ItemDefinition.Name.Substring(0, Math.Min(2, item.ItemDefinition.Name.Length))</span>
|
||||
}
|
||||
@if (item.Quantity > 1)
|
||||
{
|
||||
<span class="absolute bottom-0 right-0 bg-black/80 text-white text-[10px] px-0.5 rounded-tl">@item.Quantity</span>
|
||||
}
|
||||
<div class="absolute left-full ml-1 top-0 z-50 hidden group-hover:block">
|
||||
@await Html.PartialAsync("_ItemTooltip", item.ItemDefinition)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Lifetime Stats -->
|
||||
<div class="card p-4">
|
||||
<h2 class="text-md font-semibold text-white mb-3">Lifetime Stats</h2>
|
||||
<div class="grid grid-cols-5 gap-2 text-center text-sm">
|
||||
<div class="bg-gray-800 rounded p-2"><span class="block text-lg font-bold text-white">@Model.Character.TotalKills</span><span class="text-xs text-gray-500">Kills</span></div>
|
||||
<div class="bg-gray-800 rounded p-2"><span class="block text-lg font-bold text-white">@Model.Character.TotalDeaths</span><span class="text-xs text-gray-500">Deaths</span></div>
|
||||
<div class="bg-gray-800 rounded p-2"><span class="block text-lg font-bold text-red-400">@Model.Character.PlayersKilled</span><span class="text-xs text-gray-500">PvP Kills</span></div>
|
||||
<div class="bg-gray-800 rounded p-2"><span class="block text-lg font-bold text-green-400">@Model.Character.DungeonsCompleted</span><span class="text-xs text-gray-500">Dungeons</span></div>
|
||||
<div class="bg-gray-800 rounded p-2"><span class="block text-lg font-bold text-purple-400">@Model.Character.BossesKilled</span><span class="text-xs text-gray-500">Bosses</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right Column: Equipment -->
|
||||
<div class="space-y-6">
|
||||
<!-- Equipment -->
|
||||
<div class="card p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Equipment</h2>
|
||||
|
||||
<div class="space-y-2">
|
||||
<!-- Right: Equipment -->
|
||||
<div class="space-y-4">
|
||||
<div class="card p-4">
|
||||
<h2 class="text-md font-semibold text-white mb-3">Equipment</h2>
|
||||
<div class="space-y-1">
|
||||
@foreach (var slot in new[] {
|
||||
("MainHand", "Weapon", Model.EquippedItems.FirstOrDefault(i => i.EquipSlot == DungeonEquipmentSlot.MainHand)),
|
||||
("OffHand", "Off-Hand", Model.EquippedItems.FirstOrDefault(i => i.EquipSlot == DungeonEquipmentSlot.OffHand)),
|
||||
("Head", "Head", Model.EquippedItems.FirstOrDefault(i => i.EquipSlot == DungeonEquipmentSlot.Head)),
|
||||
("Chest", "Chest", Model.EquippedItems.FirstOrDefault(i => i.EquipSlot == DungeonEquipmentSlot.Chest)),
|
||||
("Legs", "Legs", Model.EquippedItems.FirstOrDefault(i => i.EquipSlot == DungeonEquipmentSlot.Legs)),
|
||||
("Boots", "Boots", Model.EquippedItems.FirstOrDefault(i => i.EquipSlot == DungeonEquipmentSlot.Boots)),
|
||||
("Gloves", "Gloves", Model.EquippedItems.FirstOrDefault(i => i.EquipSlot == DungeonEquipmentSlot.Gloves)),
|
||||
("Accessory1", "Accessory", Model.EquippedItems.FirstOrDefault(i => i.EquipSlot == DungeonEquipmentSlot.Accessory1))
|
||||
(DungeonEquipmentSlot.MainHand, "Weapon"),
|
||||
(DungeonEquipmentSlot.OffHand, "Off-Hand"),
|
||||
(DungeonEquipmentSlot.Head, "Head"),
|
||||
(DungeonEquipmentSlot.Chest, "Chest"),
|
||||
(DungeonEquipmentSlot.Legs, "Legs"),
|
||||
(DungeonEquipmentSlot.Boots, "Boots"),
|
||||
(DungeonEquipmentSlot.Gloves, "Gloves"),
|
||||
(DungeonEquipmentSlot.Accessory1, "Accessory")
|
||||
})
|
||||
{
|
||||
<div class="flex items-center gap-3 p-2 bg-gray-800 rounded-lg group relative">
|
||||
<div class="w-10 h-10 bg-gray-900 rounded border border-gray-700 flex items-center justify-center flex-shrink-0">
|
||||
@if (slot.Item3?.ItemDefinition != null && !string.IsNullOrEmpty(slot.Item3.ItemDefinition.SpritePath))
|
||||
var item = Model.EquippedItems.FirstOrDefault(i => i.EquipSlot == slot.Item1);
|
||||
<div class="flex items-center gap-2 p-1.5 bg-gray-800 rounded group relative">
|
||||
<div class="w-8 h-8 bg-gray-900 rounded border border-gray-700 flex items-center justify-center flex-shrink-0">
|
||||
@if (item?.ItemDefinition != null && !string.IsNullOrEmpty(item.ItemDefinition.SpritePath))
|
||||
{
|
||||
<img src="@Model.CdnBaseUrl/downloads/@slot.Item3.ItemDefinition.SpritePath" class="w-8 h-8 object-contain" />
|
||||
<img src="@Model.CdnBaseUrl/downloads/@item.ItemDefinition.SpritePath" class="w-6 h-6 object-contain" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-gray-600 text-xs">@slot.Item2.Substring(0, 1)</span>
|
||||
<span class="text-gray-600 text-[10px]">@slot.Item2.Substring(0, 1)</span>
|
||||
}
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<p class="text-xs text-gray-500">@slot.Item2</p>
|
||||
@if (slot.Item3?.ItemDefinition != null)
|
||||
{
|
||||
<p class="text-sm text-white truncate">@slot.Item3.ItemDefinition.Name</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="text-sm text-gray-600 italic">Empty</p>
|
||||
}
|
||||
<p class="text-[10px] text-gray-500">@slot.Item2</p>
|
||||
<p class="text-xs @(item != null ? "text-white" : "text-gray-600 italic") truncate">
|
||||
@(item?.ItemDefinition?.Name ?? "Empty")
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@if (slot.Item3?.ItemDefinition != null)
|
||||
@if (item?.ItemDefinition != null)
|
||||
{
|
||||
<!-- Tooltip -->
|
||||
<div class="absolute left-full ml-2 top-0 z-50 hidden group-hover:block">
|
||||
@await Html.PartialAsync("_ItemTooltip", slot.Item3.ItemDefinition)
|
||||
<div class="absolute right-full mr-1 top-0 z-50 hidden group-hover:block">
|
||||
@await Html.PartialAsync("_ItemTooltip", item.ItemDefinition)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -225,119 +207,57 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Inventory Grid -->
|
||||
<div class="card p-6">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h2 class="text-lg font-semibold text-white">Inventory (@Model.InventoryItems.Count items)</h2>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-6 md:grid-cols-10 lg:grid-cols-15 gap-2">
|
||||
@for (int i = 0; i < 30; i++)
|
||||
{
|
||||
var item = Model.InventoryItems.FirstOrDefault(it => it.SlotIndex == i);
|
||||
<div class="aspect-square bg-gray-900 rounded border border-gray-700 flex items-center justify-center relative group cursor-pointer"
|
||||
@if (item != null) { <text>onclick="showItemModal(@item.Id)"</text> }>
|
||||
@if (item?.ItemDefinition != null)
|
||||
{
|
||||
@if (!string.IsNullOrEmpty(item.ItemDefinition.SpritePath))
|
||||
{
|
||||
<img src="@Model.CdnBaseUrl/downloads/@item.ItemDefinition.SpritePath"
|
||||
class="w-full h-full object-contain p-1"
|
||||
alt="@item.ItemDefinition.Name" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-xs text-gray-400">@item.ItemDefinition.Name.Substring(0, Math.Min(3, item.ItemDefinition.Name.Length))</span>
|
||||
}
|
||||
|
||||
@if (item.Quantity > 1)
|
||||
{
|
||||
<span class="absolute bottom-0 right-0 bg-black/80 text-white text-xs px-1 rounded-tl">@item.Quantity</span>
|
||||
}
|
||||
|
||||
<!-- Rarity border -->
|
||||
|
||||
var rarityBorder = item.ItemDefinition.Rarity switch
|
||||
{
|
||||
ItemRarity.Uncommon => "border-green-500",
|
||||
ItemRarity.Rare => "border-blue-500",
|
||||
ItemRarity.Epic => "border-purple-500",
|
||||
ItemRarity.Legendary => "border-orange-500",
|
||||
_ => "border-gray-700"
|
||||
};
|
||||
|
||||
<div class="absolute inset-0 border-2 @rarityBorder rounded pointer-events-none"></div>
|
||||
|
||||
<!-- Tooltip -->
|
||||
<div class="absolute left-full ml-2 top-0 z-50 hidden group-hover:block">
|
||||
@await Html.PartialAsync("_ItemTooltip", item.ItemDefinition)
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-xs text-gray-700">@i</span>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Item Edit Modal -->
|
||||
<div id="itemModal" class="fixed inset-0 bg-black/70 hidden items-center justify-center z-50">
|
||||
<div class="bg-gray-800 rounded-xl p-6 max-w-md w-full mx-4 border border-gray-700">
|
||||
<h3 class="text-lg font-semibold text-white mb-4">Edit Item</h3>
|
||||
<form method="post" asp-page-handler="UpdateItem" id="itemForm">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="characterId" value="@Model.Character.Id" />
|
||||
<input type="hidden" name="itemId" id="modalItemId" />
|
||||
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label class="label">Quantity</label>
|
||||
<input type="number" name="quantity" id="modalQuantity" class="input" min="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Slot Index</label>
|
||||
<input type="number" name="slotIndex" id="modalSlotIndex" class="input" min="0" max="29" />
|
||||
</div>
|
||||
<div class="bg-gray-800 rounded-xl p-4 max-w-xs w-full mx-4 border border-gray-700">
|
||||
<h3 class="text-md font-semibold text-white mb-3">Edit Item</h3>
|
||||
|
||||
<div class="space-y-3 mb-4">
|
||||
<div>
|
||||
<label class="label text-xs">Quantity</label>
|
||||
<input type="number" id="modalQuantity" class="input text-sm py-1" min="1" />
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between gap-3 pt-4 mt-4 border-t border-gray-700">
|
||||
<form method="post" asp-page-handler="DeleteItem" class="inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="characterId" value="@Model.Character.Id" />
|
||||
<input type="hidden" name="itemId" id="deleteItemId" />
|
||||
<button type="submit" class="btn bg-red-700 hover:bg-red-600 text-white" onclick="return confirm('Delete this item?')">Delete</button>
|
||||
</form>
|
||||
<div class="flex gap-3">
|
||||
<button type="button" onclick="closeItemModal()" class="btn btn-secondary">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label text-xs">Slot (0-29)</label>
|
||||
<input type="number" id="modalSlotIndex" class="input text-sm py-1" min="0" max="29" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between gap-2 pt-3 border-t border-gray-700">
|
||||
<button type="button" onclick="deleteItem()" class="btn bg-red-700 hover:bg-red-600 text-white btn-sm">Delete</button>
|
||||
<div class="flex gap-2">
|
||||
<button type="button" onclick="closeItemModal()" class="btn btn-secondary btn-sm">Cancel</button>
|
||||
<button type="button" onclick="saveItem()" class="btn btn-primary btn-sm">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hidden forms -->
|
||||
<form id="updateItemForm" method="post" asp-page-handler="UpdateItem" style="display:none">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="characterId" value="@Model.Character.Id" />
|
||||
<input type="hidden" name="itemId" id="updateItemId" />
|
||||
<input type="hidden" name="quantity" id="updateQuantity" />
|
||||
<input type="hidden" name="slotIndex" id="updateSlotIndex" />
|
||||
</form>
|
||||
|
||||
<form id="deleteItemForm" method="post" asp-page-handler="DeleteItem" style="display:none">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="characterId" value="@Model.Character.Id" />
|
||||
<input type="hidden" name="itemId" id="deleteItemId" />
|
||||
</form>
|
||||
|
||||
@section Scripts {
|
||||
<script>
|
||||
const itemData = {
|
||||
@foreach (var item in Model.InventoryItems)
|
||||
{
|
||||
<text>@item.Id: { quantity: @item.Quantity, slotIndex: @item.SlotIndex },</text>
|
||||
}
|
||||
};
|
||||
let currentItemId = null;
|
||||
|
||||
function showItemModal(itemId) {
|
||||
const data = itemData[itemId];
|
||||
if (!data) return;
|
||||
|
||||
document.getElementById('modalItemId').value = itemId;
|
||||
document.getElementById('deleteItemId').value = itemId;
|
||||
document.getElementById('modalQuantity').value = data.quantity;
|
||||
document.getElementById('modalSlotIndex').value = data.slotIndex;
|
||||
|
||||
function showItemModal(itemId, quantity, slotIndex) {
|
||||
currentItemId = itemId;
|
||||
document.getElementById('modalQuantity').value = quantity;
|
||||
document.getElementById('modalSlotIndex').value = slotIndex;
|
||||
document.getElementById('itemModal').classList.remove('hidden');
|
||||
document.getElementById('itemModal').classList.add('flex');
|
||||
}
|
||||
@@ -345,6 +265,22 @@
|
||||
function closeItemModal() {
|
||||
document.getElementById('itemModal').classList.add('hidden');
|
||||
document.getElementById('itemModal').classList.remove('flex');
|
||||
currentItemId = null;
|
||||
}
|
||||
|
||||
function saveItem() {
|
||||
if (!currentItemId) return;
|
||||
document.getElementById('updateItemId').value = currentItemId;
|
||||
document.getElementById('updateQuantity').value = document.getElementById('modalQuantity').value;
|
||||
document.getElementById('updateSlotIndex').value = document.getElementById('modalSlotIndex').value;
|
||||
document.getElementById('updateItemForm').submit();
|
||||
}
|
||||
|
||||
function deleteItem() {
|
||||
if (!currentItemId) return;
|
||||
if (!confirm('Delete this item permanently?')) return;
|
||||
document.getElementById('deleteItemId').value = currentItemId;
|
||||
document.getElementById('deleteItemForm').submit();
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', e => { if (e.key === 'Escape') closeItemModal(); });
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Players;
|
||||
namespace Server.Services.Admin.Pages.Players;
|
||||
|
||||
public class CharacterModel : AdminPageModel
|
||||
{
|
||||
@@ -20,7 +20,9 @@ public class CharacterModel : AdminPageModel
|
||||
|
||||
public string CdnBaseUrl { get; set; } = "https://assets.aeternalisgames.com";
|
||||
|
||||
[TempData]
|
||||
public string? Message { get; set; }
|
||||
[TempData]
|
||||
public bool IsError { get; set; }
|
||||
|
||||
public async Task<IActionResult> OnGetAsync(ulong? id)
|
||||
@@ -29,17 +31,13 @@ public class CharacterModel : AdminPageModel
|
||||
if (!string.IsNullOrEmpty(cdnUrl)) CdnBaseUrl = cdnUrl;
|
||||
|
||||
if (!id.HasValue)
|
||||
{
|
||||
return RedirectToPage("/Players/Index");
|
||||
}
|
||||
|
||||
var character = await _db.DungeonCharacters
|
||||
.FirstOrDefaultAsync(c => c.Id == id.Value && !c.IsDeleted);
|
||||
|
||||
if (character == null)
|
||||
{
|
||||
return RedirectToPage("/Players/Index");
|
||||
}
|
||||
|
||||
Character = character;
|
||||
await LoadItems();
|
||||
@@ -85,11 +83,8 @@ public class CharacterModel : AdminPageModel
|
||||
character.CurrentMana = currentMana;
|
||||
|
||||
await _db.SaveChangesAsync();
|
||||
|
||||
Character = character;
|
||||
await LoadItems();
|
||||
Message = "Basic info updated.";
|
||||
return Page();
|
||||
return RedirectToPage(new { id = characterId });
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostUpdateStatsAsync(
|
||||
@@ -115,11 +110,8 @@ public class CharacterModel : AdminPageModel
|
||||
character.Dexterity = Math.Max(1, dexterity);
|
||||
|
||||
await _db.SaveChangesAsync();
|
||||
|
||||
Character = character;
|
||||
await LoadItems();
|
||||
Message = "Stats updated.";
|
||||
return Page();
|
||||
return RedirectToPage(new { id = characterId });
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostUpdateItemAsync(
|
||||
@@ -144,13 +136,7 @@ public class CharacterModel : AdminPageModel
|
||||
Message = "Item updated.";
|
||||
}
|
||||
|
||||
var character = await _db.DungeonCharacters.FindAsync(characterId);
|
||||
if (character != null)
|
||||
{
|
||||
Character = character;
|
||||
await LoadItems();
|
||||
}
|
||||
return Page();
|
||||
return RedirectToPage(new { id = characterId });
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostDeleteItemAsync(ulong characterId, ulong itemId)
|
||||
@@ -164,13 +150,12 @@ public class CharacterModel : AdminPageModel
|
||||
await _db.SaveChangesAsync();
|
||||
Message = "Item deleted.";
|
||||
}
|
||||
|
||||
var character = await _db.DungeonCharacters.FindAsync(characterId);
|
||||
if (character != null)
|
||||
else
|
||||
{
|
||||
Character = character;
|
||||
await LoadItems();
|
||||
Message = "Item not found.";
|
||||
IsError = true;
|
||||
}
|
||||
return Page();
|
||||
|
||||
return RedirectToPage(new { id = characterId });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/admin/players/edit"
|
||||
@model Players.EditModel
|
||||
@using Server.Data
|
||||
@using DataServer.Data
|
||||
@{
|
||||
ViewData["Title"] = Model.IsNew ? "New Account" : $"Edit: {Model.Account.Username}";
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
using Server.Services.Auth;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Players;
|
||||
namespace Server.Services.Admin.Pages.Players;
|
||||
|
||||
public class EditModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/admin/players"
|
||||
@model Players.IndexModel
|
||||
@using Server.Data
|
||||
@using DataServer.Data
|
||||
@{
|
||||
ViewData["Title"] = "Players";
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Players;
|
||||
namespace Server.Services.Admin.Pages.Players;
|
||||
|
||||
public class IndexModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@model Server.Data.Entities.DungeonItemDefinition
|
||||
@using Server.Data.Enums
|
||||
@model DataServer.Data.Entities.DungeonItemDefinition
|
||||
@using DataServer.Data.Enums
|
||||
|
||||
@{
|
||||
var rarityColor = Model.Rarity switch
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/admin/recipes/edit"
|
||||
@model Recipes.EditModel
|
||||
@using Server.Data.Entities
|
||||
@using DataServer.Data.Entities
|
||||
@{
|
||||
ViewData["Title"] = Model.IsNew ? "Create Recipe" : $"Edit: {Model.Recipe.Name}";
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Recipes;
|
||||
namespace Server.Services.Admin.Pages.Recipes;
|
||||
|
||||
public class EditModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/admin/recipes"
|
||||
@model Recipes.IndexModel
|
||||
@using Server.Data.Entities
|
||||
@using DataServer.Data.Entities
|
||||
@{
|
||||
ViewData["Title"] = "Recipes";
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
|
||||
namespace VoidScavengers.Services.Admin.Pages.Recipes;
|
||||
namespace Server.Services.Admin.Pages.Recipes;
|
||||
|
||||
public class IndexModel : AdminPageModel
|
||||
{
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
@page "/admin/server"
|
||||
@model Server.IndexModel
|
||||
@{
|
||||
ViewData["Title"] = "Server";
|
||||
}
|
||||
|
||||
<div class="space-y-6">
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 class="text-3xl font-bold text-white">Server Management</h1>
|
||||
<p class="text-gray-400 mt-1">Broadcast messages and manage server state</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.Message))
|
||||
{
|
||||
<div class="p-4 rounded-lg @(Model.IsError ? "bg-red-900/50 border border-red-700 text-red-300" : "bg-green-900/50 border border-green-700 text-green-300")">
|
||||
@Model.Message
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Stats -->
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
<div class="card p-4">
|
||||
<p class="text-2xl font-bold text-green-400">@Model.ActiveConnections</p>
|
||||
<p class="text-sm text-gray-400">Active Connections</p>
|
||||
</div>
|
||||
<div class="card p-4">
|
||||
<p class="text-2xl font-bold text-white">@Model.TotalAccounts</p>
|
||||
<p class="text-sm text-gray-400">Total Accounts</p>
|
||||
</div>
|
||||
<div class="card p-4">
|
||||
<p class="text-2xl font-bold text-indigo-400">@Model.TotalCharacters</p>
|
||||
<p class="text-sm text-gray-400">Total Characters</p>
|
||||
</div>
|
||||
<div class="card p-4">
|
||||
<p class="text-2xl font-bold text-yellow-400">@Model.TrackedAssets</p>
|
||||
<p class="text-sm text-gray-400">Tracked Assets</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
||||
<!-- Broadcast Message -->
|
||||
<div class="card p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Broadcast Message</h2>
|
||||
<p class="text-sm text-gray-400 mb-4">Send a system message to all connected players.</p>
|
||||
|
||||
<form method="post" asp-page-handler="Broadcast" class="space-y-4">
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div>
|
||||
<label class="label">Message Type</label>
|
||||
<select name="messageType" class="input">
|
||||
<option value="system">System (Gray)</option>
|
||||
<option value="announcement">Announcement (Yellow)</option>
|
||||
<option value="alert">Alert (Red)</option>
|
||||
<option value="info">Info (Blue)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="label">Message</label>
|
||||
<textarea name="message" class="input" rows="3" required placeholder="Enter your message..."></textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary w-full">
|
||||
<svg class="w-4 h-4 mr-2 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z"/>
|
||||
</svg>
|
||||
Send Broadcast
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Quick Actions -->
|
||||
<div class="card p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Quick Actions</h2>
|
||||
|
||||
<div class="space-y-3">
|
||||
<form method="post" asp-page-handler="RefreshAssets">
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-secondary w-full flex items-center justify-center gap-2">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
|
||||
</svg>
|
||||
Signal Asset Refresh to Clients
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form method="post" asp-page-handler="MaintenanceWarning">
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn bg-yellow-700 hover:bg-yellow-600 text-white w-full flex items-center justify-center gap-2">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
|
||||
</svg>
|
||||
Send Maintenance Warning (5 min)
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<form method="post" asp-page-handler="ServerRestart">
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn bg-red-700 hover:bg-red-600 text-white w-full flex items-center justify-center gap-2" onclick="return confirm('Send server restart warning to all players?')">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
|
||||
</svg>
|
||||
Send Server Restart Warning
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recent Broadcasts -->
|
||||
<div class="card p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Recent Broadcasts</h2>
|
||||
|
||||
@if (Model.RecentBroadcasts.Any())
|
||||
{
|
||||
<div class="space-y-2">
|
||||
@foreach (var broadcast in Model.RecentBroadcasts)
|
||||
{
|
||||
var typeColor = broadcast.Type switch
|
||||
{
|
||||
"announcement" => "border-yellow-600 bg-yellow-900/20",
|
||||
"alert" => "border-red-600 bg-red-900/20",
|
||||
"info" => "border-blue-600 bg-blue-900/20",
|
||||
_ => "border-gray-600 bg-gray-800"
|
||||
};
|
||||
<div class="@typeColor border rounded-lg p-3">
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<span class="text-xs text-gray-400 uppercase">@broadcast.Type</span>
|
||||
<span class="text-xs text-gray-500">@broadcast.SentAt.ToString("HH:mm:ss")</span>
|
||||
</div>
|
||||
<p class="text-white">@broadcast.Message</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="text-gray-500 text-center py-4">No recent broadcasts.</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,114 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DataServer.Data;
|
||||
using DataServer.Data.Entities;
|
||||
using Server.Services;
|
||||
|
||||
namespace Server.Services.Admin.Pages.Server;
|
||||
|
||||
public class IndexModel : AdminPageModel
|
||||
{
|
||||
private readonly GameDbContext _db;
|
||||
private readonly IServerBroadcastService _broadcast;
|
||||
private static readonly List<BroadcastRecord> _recentBroadcasts = new();
|
||||
private static readonly object _lock = new();
|
||||
|
||||
public IndexModel(GameDbContext db, IServerBroadcastService broadcast)
|
||||
{
|
||||
_db = db;
|
||||
_broadcast = broadcast;
|
||||
}
|
||||
|
||||
public int ActiveConnections { get; set; }
|
||||
public int TotalAccounts { get; set; }
|
||||
public int TotalCharacters { get; set; }
|
||||
public int TrackedAssets { get; set; }
|
||||
|
||||
public List<BroadcastRecord> RecentBroadcasts { get; set; } = new();
|
||||
|
||||
public string? Message { get; set; }
|
||||
public bool IsError { get; set; }
|
||||
|
||||
public async Task OnGetAsync()
|
||||
{
|
||||
ActiveConnections = _broadcast.GetActiveConnectionCount();
|
||||
TotalAccounts = await _db.Accounts.CountAsync();
|
||||
TotalCharacters = await _db.DungeonCharacters.CountAsync(c => !c.IsDeleted);
|
||||
TrackedAssets = await _db.ClientAssets.CountAsync();
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
RecentBroadcasts = _recentBroadcasts.OrderByDescending(b => b.SentAt).Take(10).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostBroadcastAsync(string message, string messageType)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(message))
|
||||
{
|
||||
Message = "Message cannot be empty.";
|
||||
IsError = true;
|
||||
await OnGetAsync();
|
||||
return Page();
|
||||
}
|
||||
|
||||
_broadcast.QueueBroadcast(message, messageType);
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
_recentBroadcasts.Add(new BroadcastRecord(message, messageType, DateTime.UtcNow));
|
||||
// Keep only last 50
|
||||
while (_recentBroadcasts.Count > 50)
|
||||
_recentBroadcasts.RemoveAt(0);
|
||||
}
|
||||
|
||||
Message = $"Broadcast queued ({messageType}): {message}";
|
||||
await OnGetAsync();
|
||||
return Page();
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostRefreshAssetsAsync()
|
||||
{
|
||||
_broadcast.QueueAssetRefresh();
|
||||
_broadcast.QueueBroadcast("Asset update available. Your client will refresh automatically.", "info");
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
_recentBroadcasts.Add(new BroadcastRecord("Asset refresh signal sent", "system", DateTime.UtcNow));
|
||||
}
|
||||
|
||||
Message = "Asset refresh signal queued.";
|
||||
await OnGetAsync();
|
||||
return Page();
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostMaintenanceWarningAsync()
|
||||
{
|
||||
_broadcast.QueueBroadcast("⚠️ Server maintenance in 5 minutes. Please finish your current activities.", "announcement");
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
_recentBroadcasts.Add(new BroadcastRecord("Maintenance warning (5 min)", "announcement", DateTime.UtcNow));
|
||||
}
|
||||
|
||||
Message = "Maintenance warning sent.";
|
||||
await OnGetAsync();
|
||||
return Page();
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostServerRestartAsync()
|
||||
{
|
||||
_broadcast.QueueBroadcast("🔄 Server restart imminent. Please save your progress and return to hub.", "alert");
|
||||
|
||||
lock (_lock)
|
||||
{
|
||||
_recentBroadcasts.Add(new BroadcastRecord("Server restart warning", "alert", DateTime.UtcNow));
|
||||
}
|
||||
|
||||
Message = "Server restart warning sent.";
|
||||
await OnGetAsync();
|
||||
return Page();
|
||||
}
|
||||
|
||||
public record BroadcastRecord(string Message, string Type, DateTime SentAt);
|
||||
}
|
||||
@@ -33,6 +33,7 @@
|
||||
.btn-danger:hover { background-color: #b91c1c; }
|
||||
.btn-success { background-color: #16a34a; color: white; }
|
||||
.btn-success:hover { background-color: #15803d; }
|
||||
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
|
||||
.input { width: 100%; padding: 0.5rem 0.75rem; background-color: #1f2937; border: 1px solid #374151; border-radius: 0.5rem; color: #e5e7eb; }
|
||||
.input::placeholder { color: #6b7280; }
|
||||
.input:focus { outline: none; box-shadow: 0 0 0 2px #6366f1; border-color: transparent; }
|
||||
@@ -121,6 +122,13 @@
|
||||
</svg>
|
||||
Players
|
||||
</a>
|
||||
|
||||
<a href="/admin/broadcast" class="sidebar-link @(ViewContext.RouteData.Values["page"]?.ToString()?.StartsWith("/Broadcast") == true ? "active" : "")">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z"/>
|
||||
</svg>
|
||||
Broadcast
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<!-- User info -->
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
@namespace VoidScavengers.Services.Admin.Pages
|
||||
@namespace Server.Services.Admin.Pages
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace Server.Services.Auth;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace Server.Services.Auth;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
using Server.Redis;
|
||||
using StackExchange.Redis;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace Server.Services.Auth;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace Server.Services.Auth;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Server.Services.Characters/CharacterService.cs
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace Server.Services.Characters;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Server.Data;
|
||||
namespace DataServer.Data;
|
||||
|
||||
public interface ICharactersRepository
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace Server.Services.Characters;
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Server.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Service for broadcasting messages to connected game clients
|
||||
/// </summary>
|
||||
public interface IServerBroadcastService
|
||||
{
|
||||
/// <summary>
|
||||
/// Queue a system message to broadcast to all connected players
|
||||
/// </summary>
|
||||
void QueueBroadcast(string message, string messageType = "system");
|
||||
|
||||
/// <summary>
|
||||
/// Get and clear pending broadcasts
|
||||
/// </summary>
|
||||
List<BroadcastMessage> GetPendingBroadcasts();
|
||||
|
||||
/// <summary>
|
||||
/// Get count of active connections (for display)
|
||||
/// </summary>
|
||||
int GetActiveConnectionCount();
|
||||
|
||||
/// <summary>
|
||||
/// Register active connection count (called by game handlers)
|
||||
/// </summary>
|
||||
void SetActiveConnectionCount(int count);
|
||||
|
||||
/// <summary>
|
||||
/// Queue asset refresh signal
|
||||
/// </summary>
|
||||
void QueueAssetRefresh();
|
||||
|
||||
/// <summary>
|
||||
/// Check if asset refresh is pending
|
||||
/// </summary>
|
||||
bool IsAssetRefreshPending();
|
||||
|
||||
/// <summary>
|
||||
/// Clear asset refresh flag
|
||||
/// </summary>
|
||||
void ClearAssetRefresh();
|
||||
}
|
||||
|
||||
public record BroadcastMessage(string Message, string Type, DateTime QueuedAt);
|
||||
|
||||
public class ServerBroadcastService : IServerBroadcastService
|
||||
{
|
||||
private readonly ConcurrentQueue<BroadcastMessage> _pendingBroadcasts = new();
|
||||
private int _activeConnectionCount = 0;
|
||||
private bool _assetRefreshPending = false;
|
||||
|
||||
public void QueueBroadcast(string message, string messageType = "system")
|
||||
{
|
||||
_pendingBroadcasts.Enqueue(new BroadcastMessage(message, messageType, DateTime.UtcNow));
|
||||
}
|
||||
|
||||
public List<BroadcastMessage> GetPendingBroadcasts()
|
||||
{
|
||||
var broadcasts = new List<BroadcastMessage>();
|
||||
while (_pendingBroadcasts.TryDequeue(out var msg))
|
||||
{
|
||||
broadcasts.Add(msg);
|
||||
}
|
||||
return broadcasts;
|
||||
}
|
||||
|
||||
public int GetActiveConnectionCount() => _activeConnectionCount;
|
||||
|
||||
public void SetActiveConnectionCount(int count) => _activeConnectionCount = count;
|
||||
|
||||
public void QueueAssetRefresh() => _assetRefreshPending = true;
|
||||
|
||||
public bool IsAssetRefreshPending() => _assetRefreshPending;
|
||||
|
||||
public void ClearAssetRefresh() => _assetRefreshPending = false;
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
// Server.Services.World/WorldHandler.cs
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Networking;
|
||||
using Server.Networking.Handling;
|
||||
using Server.Networking.Messages;
|
||||
using Server.Services.Auth;
|
||||
using SystemRevivalServer.Networking.Messages;
|
||||
|
||||
namespace Server.Services.World;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Server.Services.World/WorldService.cs
|
||||
using System.Collections.Concurrent;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
using Server.World;
|
||||
using StackExchange.Redis;
|
||||
using SystemRevivalServer.Networking.Messages;
|
||||
using Server.Networking.Messages;
|
||||
|
||||
namespace Server.Services.World;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using SystemRevivalServer.Networking.Messages;
|
||||
using Server.Networking.Messages;
|
||||
|
||||
namespace Server.Services.World;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using MySqlConnector;
|
||||
|
||||
namespace Server.Data;
|
||||
namespace DataServer.Data;
|
||||
|
||||
public static class ConnectionStringFactory
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using MySqlConnector;
|
||||
|
||||
namespace Server.Data;
|
||||
namespace DataServer.Data;
|
||||
|
||||
public sealed class DatabaseHealthCheck : IHealthCheck
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MySqlConnector;
|
||||
|
||||
namespace Server.Data;
|
||||
namespace DataServer.Data;
|
||||
|
||||
public sealed class DatabaseManager : IDatabaseManager, IAsyncDisposable
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Server.Data;
|
||||
namespace DataServer.Data;
|
||||
|
||||
public sealed class DatabaseOptions
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace Server.Data;
|
||||
namespace DataServer.Data;
|
||||
|
||||
public sealed class DesignTimeDbContextFactory : IDesignTimeDbContextFactory<GameDbContext>
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Security.Principal;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Data.Entities;
|
||||
using DataServer.Data.Entities;
|
||||
|
||||
|
||||
namespace Server.Data;
|
||||
namespace DataServer.Data;
|
||||
|
||||
public sealed class GameDbContext : DbContext
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Server.Data;
|
||||
namespace DataServer.Data;
|
||||
|
||||
/// <summary>
|
||||
/// Central entry for DB access: resilient connections, optional transactions, and utility helpers.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Server.Data;
|
||||
using DataServer.Data;
|
||||
|
||||
namespace Server;
|
||||
namespace DataServer;
|
||||
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace Server.Data;
|
||||
namespace DataServer.Data;
|
||||
|
||||
public sealed class Account
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Server.Data;
|
||||
namespace DungeonCrawler.Data.Entities;
|
||||
using DataServer.Data;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Derived stats calculator - used at runtime
|
||||
@@ -153,34 +153,4 @@ public class Character
|
||||
public virtual ICollection<LearnedSpell> LearnedSpells { get; set; } = new List<LearnedSpell>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Experience required per level (exponential curve)
|
||||
/// </summary>
|
||||
public static class LevelSystem
|
||||
{
|
||||
public static long GetXpForLevel(int level)
|
||||
{
|
||||
// Base 100 XP for level 2, scaling exponentially
|
||||
return (long)(100 * Math.Pow(1.15, level - 1));
|
||||
}
|
||||
|
||||
public static long GetTotalXpForLevel(int level)
|
||||
{
|
||||
long total = 0;
|
||||
for (int i = 1; i < level; i++)
|
||||
total += GetXpForLevel(i);
|
||||
return total;
|
||||
}
|
||||
|
||||
public static int GetLevelForXp(long totalXp)
|
||||
{
|
||||
int level = 1;
|
||||
long xpNeeded = 0;
|
||||
while (xpNeeded <= totalXp)
|
||||
{
|
||||
xpNeeded += GetXpForLevel(level);
|
||||
if (xpNeeded <= totalXp) level++;
|
||||
}
|
||||
return level;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Tracks all client-side files that can be hot-updated from CDN.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// A crafted item with randomly rolled stats
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// A crafting recipe that can produce an item
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Server.Data.Enums;
|
||||
using DataServer.Data.Enums;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Types of crafting skills
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Tracks death chests spawned when loot exceeds player inventory.
|
||||
|
||||
@@ -1,481 +0,0 @@
|
||||
using Server.Data.Enums;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Default item definitions - seeded on first startup
|
||||
/// </summary>
|
||||
public static class DefaultDungeonItems
|
||||
{
|
||||
public static List<DungeonItemDefinition> GetDefaultItems()
|
||||
{
|
||||
return new List<DungeonItemDefinition>
|
||||
{
|
||||
// ==================== CRAFTING MATERIALS (1-10) ====================
|
||||
new()
|
||||
{
|
||||
Id = 1,
|
||||
Name = "Bone Fragment",
|
||||
Description = "A fragment of bone from the undead. Used in crafting.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Common,
|
||||
Stackable = true,
|
||||
MaxStack = 99,
|
||||
SpriteId = 1
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 2,
|
||||
Name = "Rotted Cloth",
|
||||
Description = "Decayed fabric from the walking dead.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Common,
|
||||
Stackable = true,
|
||||
MaxStack = 99,
|
||||
SpriteId = 2
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 3,
|
||||
Name = "Soul Essence",
|
||||
Description = "The captured essence of a departed spirit. Valuable for enchanting.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
Stackable = true,
|
||||
MaxStack = 50,
|
||||
SpriteId = 3
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 4,
|
||||
Name = "Beast Hide",
|
||||
Description = "Tough hide from a dungeon beast.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Common,
|
||||
Stackable = true,
|
||||
MaxStack = 99,
|
||||
SpriteId = 4
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 5,
|
||||
Name = "Beast Fang",
|
||||
Description = "A sharp fang from a predatory creature.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Common,
|
||||
Stackable = true,
|
||||
MaxStack = 99,
|
||||
SpriteId = 5
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 6,
|
||||
Name = "Beast Heart",
|
||||
Description = "The still-warm heart of a powerful beast.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
Stackable = true,
|
||||
MaxStack = 30,
|
||||
SpriteId = 6
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 7,
|
||||
Name = "Demon Essence",
|
||||
Description = "Dark energy condensed from demonic creatures.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
Stackable = true,
|
||||
MaxStack = 50,
|
||||
SpriteId = 7
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 8,
|
||||
Name = "Infernal Shard",
|
||||
Description = "A crystallized fragment of hellfire.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Rare,
|
||||
Stackable = true,
|
||||
MaxStack = 30,
|
||||
SpriteId = 8
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 9,
|
||||
Name = "Elemental Core",
|
||||
Description = "The magical core of an elemental being.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
Stackable = true,
|
||||
MaxStack = 50,
|
||||
SpriteId = 9
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 10,
|
||||
Name = "Arcane Dust",
|
||||
Description = "Fine magical particles. Essential for enchanting.",
|
||||
Type = ItemType.Material,
|
||||
Rarity = ItemRarity.Rare,
|
||||
Stackable = true,
|
||||
MaxStack = 99,
|
||||
SpriteId = 10
|
||||
},
|
||||
|
||||
// ==================== CONSUMABLES (11-20) ====================
|
||||
new()
|
||||
{
|
||||
Id = 11,
|
||||
Name = "Minor Health Potion",
|
||||
Description = "Restores a small amount of health.",
|
||||
Type = ItemType.Consumable,
|
||||
Rarity = ItemRarity.Common,
|
||||
Stackable = true,
|
||||
MaxStack = 20,
|
||||
HealAmount = 30,
|
||||
SpriteId = 11
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 12,
|
||||
Name = "Health Potion",
|
||||
Description = "Restores a moderate amount of health.",
|
||||
Type = ItemType.Consumable,
|
||||
Rarity = ItemRarity.Common,
|
||||
Stackable = true,
|
||||
MaxStack = 20,
|
||||
HealAmount = 75,
|
||||
SpriteId = 12
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 13,
|
||||
Name = "Greater Health Potion",
|
||||
Description = "Restores a large amount of health.",
|
||||
Type = ItemType.Consumable,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
Stackable = true,
|
||||
MaxStack = 10,
|
||||
HealAmount = 150,
|
||||
SpriteId = 13
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 14,
|
||||
Name = "Minor Mana Potion",
|
||||
Description = "Restores a small amount of mana.",
|
||||
Type = ItemType.Consumable,
|
||||
Rarity = ItemRarity.Common,
|
||||
Stackable = true,
|
||||
MaxStack = 20,
|
||||
ManaRestore = 25,
|
||||
SpriteId = 14
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 15,
|
||||
Name = "Mana Potion",
|
||||
Description = "Restores a moderate amount of mana.",
|
||||
Type = ItemType.Consumable,
|
||||
Rarity = ItemRarity.Common,
|
||||
Stackable = true,
|
||||
MaxStack = 20,
|
||||
ManaRestore = 60,
|
||||
SpriteId = 15
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 16,
|
||||
Name = "Scroll of Escape",
|
||||
Description = "Teleports you safely out of the dungeon.",
|
||||
Type = ItemType.Consumable,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
Stackable = true,
|
||||
MaxStack = 5,
|
||||
IsTeleportScroll = true,
|
||||
SpriteId = 16
|
||||
},
|
||||
|
||||
// ==================== WEAPONS (21-30) ====================
|
||||
new()
|
||||
{
|
||||
Id = 21,
|
||||
Name = "Iron Sword",
|
||||
Description = "A sturdy iron blade.",
|
||||
Type = ItemType.Weapon,
|
||||
Rarity = ItemRarity.Common,
|
||||
EquipSlot = DungeonEquipmentSlot.MainHand,
|
||||
MinDamage = 8,
|
||||
MaxDamage = 14,
|
||||
AttackRange = 40,
|
||||
RequiredLevel = 1,
|
||||
SpriteId = 21
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 22,
|
||||
Name = "Steel Sword",
|
||||
Description = "A well-forged steel blade.",
|
||||
Type = ItemType.Weapon,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.MainHand,
|
||||
MinDamage = 12,
|
||||
MaxDamage = 20,
|
||||
AttackRange = 40,
|
||||
RequiredLevel = 3,
|
||||
RequiredStrength = 5,
|
||||
SpriteId = 22
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 23,
|
||||
Name = "Wooden Air Staff",
|
||||
Description = "A simple staff channeling magical energy.",
|
||||
Type = ItemType.Weapon,
|
||||
Rarity = ItemRarity.Common,
|
||||
EquipSlot = DungeonEquipmentSlot.MainHand,
|
||||
MinDamage = 5,
|
||||
MaxDamage = 10,
|
||||
AttackRange = 100,
|
||||
DamageType = DamageType.Wind,
|
||||
BonusMana = 10,
|
||||
RequiredLevel = 1,
|
||||
SpriteId = 23
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 24,
|
||||
Name = "Enchanted Fire Staff",
|
||||
Description = "A staff imbued with arcane power.",
|
||||
Type = ItemType.Weapon,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.MainHand,
|
||||
MinDamage = 10,
|
||||
MaxDamage = 18,
|
||||
AttackRange = 120,
|
||||
DamageType = DamageType.Fire,
|
||||
BonusMana = 25,
|
||||
BonusIntelligence = 3,
|
||||
RequiredLevel = 4,
|
||||
RequiredIntelligence = 6,
|
||||
SpriteId = 24
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 25,
|
||||
Name = "Hunting Bow",
|
||||
Description = "A reliable ranged weapon.",
|
||||
Type = ItemType.Weapon,
|
||||
Rarity = ItemRarity.Common,
|
||||
EquipSlot = DungeonEquipmentSlot.MainHand,
|
||||
MinDamage = 6,
|
||||
MaxDamage = 12,
|
||||
AttackRange = 180,
|
||||
DamageType = DamageType.Physical,
|
||||
RequiredLevel = 1,
|
||||
RequiredDexterity = 3,
|
||||
SpriteId = 25
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 26,
|
||||
Name = "Shadow Dagger",
|
||||
Description = "A wickedly sharp blade that strikes from the shadows.",
|
||||
Type = ItemType.Weapon,
|
||||
Rarity = ItemRarity.Rare,
|
||||
EquipSlot = DungeonEquipmentSlot.MainHand,
|
||||
MinDamage = 15,
|
||||
MaxDamage = 25,
|
||||
AttackRange = 35,
|
||||
DamageType = DamageType.Physical,
|
||||
BonusDexterity = 5,
|
||||
RequiredLevel = 6,
|
||||
RequiredDexterity = 10,
|
||||
SpriteId = 26
|
||||
},
|
||||
|
||||
// ==================== ARMOR - CHEST (31-35) ====================
|
||||
new()
|
||||
{
|
||||
Id = 31,
|
||||
Name = "Leather Armor",
|
||||
Description = "Basic leather protection.",
|
||||
Type = ItemType.Armor,
|
||||
Rarity = ItemRarity.Common,
|
||||
EquipSlot = DungeonEquipmentSlot.Chest,
|
||||
Armor = 5,
|
||||
RequiredLevel = 1,
|
||||
SpriteId = 31
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 32,
|
||||
Name = "Chainmail",
|
||||
Description = "Interlocking metal rings provide solid defense.",
|
||||
Type = ItemType.Armor,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.Chest,
|
||||
Armor = 12,
|
||||
BonusEndurance = 2,
|
||||
RequiredLevel = 4,
|
||||
RequiredStrength = 5,
|
||||
SpriteId = 32
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 33,
|
||||
Name = "Mage Robes",
|
||||
Description = "Enchanted robes that enhance magical abilities.",
|
||||
Type = ItemType.Armor,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.Chest,
|
||||
Armor = 3,
|
||||
MagicResist = 10,
|
||||
BonusMana = 30,
|
||||
BonusIntelligence = 3,
|
||||
RequiredLevel = 3,
|
||||
RequiredIntelligence = 5,
|
||||
SpriteId = 33
|
||||
},
|
||||
|
||||
// ==================== ARMOR - HEAD (36-38) ====================
|
||||
new()
|
||||
{
|
||||
Id = 36,
|
||||
Name = "Leather Cap",
|
||||
Description = "A simple leather head covering.",
|
||||
Type = ItemType.Armor,
|
||||
Rarity = ItemRarity.Common,
|
||||
EquipSlot = DungeonEquipmentSlot.Head,
|
||||
Armor = 2,
|
||||
RequiredLevel = 1,
|
||||
SpriteId = 36
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 37,
|
||||
Name = "Iron Helm",
|
||||
Description = "A sturdy metal helmet.",
|
||||
Type = ItemType.Armor,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.Head,
|
||||
Armor = 6,
|
||||
BonusEndurance = 1,
|
||||
RequiredLevel = 3,
|
||||
RequiredStrength = 3,
|
||||
SpriteId = 37
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 38,
|
||||
Name = "Wizard Hat",
|
||||
Description = "A pointed hat crackling with magical energy.",
|
||||
Type = ItemType.Armor,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.Head,
|
||||
Armor = 1,
|
||||
MagicResist = 5,
|
||||
BonusMana = 15,
|
||||
BonusWisdom = 2,
|
||||
RequiredLevel = 3,
|
||||
RequiredIntelligence = 3,
|
||||
SpriteId = 38
|
||||
},
|
||||
|
||||
// ==================== ARMOR - OFFHAND (41-43) ====================
|
||||
new()
|
||||
{
|
||||
Id = 41,
|
||||
Name = "Wooden Shield",
|
||||
Description = "A basic wooden shield.",
|
||||
Type = ItemType.Armor,
|
||||
Rarity = ItemRarity.Common,
|
||||
EquipSlot = DungeonEquipmentSlot.OffHand,
|
||||
Armor = 4,
|
||||
RequiredLevel = 1,
|
||||
SpriteId = 41
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 42,
|
||||
Name = "Iron Shield",
|
||||
Description = "A solid iron shield.",
|
||||
Type = ItemType.Armor,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.OffHand,
|
||||
Armor = 10,
|
||||
BonusEndurance = 2,
|
||||
RequiredLevel = 4,
|
||||
RequiredStrength = 6,
|
||||
SpriteId = 42
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 43,
|
||||
Name = "Tome of Knowledge",
|
||||
Description = "An ancient tome that enhances magical power.",
|
||||
Type = ItemType.Armor,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.OffHand,
|
||||
MagicResist = 5,
|
||||
BonusMana = 20,
|
||||
BonusIntelligence = 2,
|
||||
RequiredLevel = 3,
|
||||
RequiredIntelligence = 4,
|
||||
SpriteId = 43
|
||||
},
|
||||
|
||||
// ==================== ACCESSORIES (51-55) ====================
|
||||
new()
|
||||
{
|
||||
Id = 51,
|
||||
Name = "Ring of Health",
|
||||
Description = "A simple ring that bolsters vitality.",
|
||||
Type = ItemType.Accessory,
|
||||
Rarity = ItemRarity.Common,
|
||||
EquipSlot = DungeonEquipmentSlot.Accessory1,
|
||||
BonusHealth = 25,
|
||||
RequiredLevel = 2,
|
||||
SpriteId = 51
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 52,
|
||||
Name = "Ring of Power",
|
||||
Description = "A ring pulsing with physical might.",
|
||||
Type = ItemType.Accessory,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.Accessory1,
|
||||
BonusStrength = 3,
|
||||
RequiredLevel = 3,
|
||||
SpriteId = 52
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 53,
|
||||
Name = "Amulet of Wisdom",
|
||||
Description = "An amulet that sharpens the mind.",
|
||||
Type = ItemType.Accessory,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.Accessory2,
|
||||
BonusWisdom = 3,
|
||||
BonusMana = 15,
|
||||
RequiredLevel = 3,
|
||||
SpriteId = 53
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 54,
|
||||
Name = "Pendant of Swiftness",
|
||||
Description = "A pendant that enhances agility.",
|
||||
Type = ItemType.Accessory,
|
||||
Rarity = ItemRarity.Uncommon,
|
||||
EquipSlot = DungeonEquipmentSlot.Accessory2,
|
||||
BonusDexterity = 4,
|
||||
RequiredLevel = 3,
|
||||
SpriteId = 54
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,228 +0,0 @@
|
||||
using Server.Data.Enums;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Default mob templates for seeding the database
|
||||
/// </summary>
|
||||
public static class DefaultDungeonMobs
|
||||
{
|
||||
public static List<DungeonMobDefinition> GetDefaultMobs() => new()
|
||||
{
|
||||
// Tier 1 - Basic enemies
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 1,
|
||||
Name = "Skeleton",
|
||||
Description = "A reanimated pile of bones",
|
||||
Type = MobType.Normal,
|
||||
Category = MobCategory.Undead,
|
||||
MinTier = 1,
|
||||
BaseHealth = 40,
|
||||
BasePhysicalDamage = 5,
|
||||
BaseArmor = 5,
|
||||
MoveSpeed = 55f,
|
||||
AttackRange = 40f,
|
||||
AttackSpeed = 0.8f,
|
||||
AggroRange = 120f,
|
||||
BaseXp = 15,
|
||||
ResistancesJson = """{"poison": 1.0, "holy": -0.5}""",
|
||||
//SpriteSheet = "mobs/skeleton.png"
|
||||
},
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 2,
|
||||
Name = "Zombie",
|
||||
Description = "A shambling corpse",
|
||||
Type = MobType.Normal,
|
||||
Category = MobCategory.Undead,
|
||||
MinTier = 1,
|
||||
BaseHealth = 60,
|
||||
BasePhysicalDamage = 8,
|
||||
BaseArmor = 0,
|
||||
MoveSpeed = 35f,
|
||||
AttackRange = 35f,
|
||||
AttackSpeed = 0.5f,
|
||||
AggroRange = 100f,
|
||||
BaseXp = 12,
|
||||
ResistancesJson = """{"poison": 1.0, "fire": -0.25, "holy": -0.5}""",
|
||||
//SpriteSheet = "mobs/zombie.png"
|
||||
},
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 3,
|
||||
Name = "Giant Rat",
|
||||
Description = "An oversized rodent",
|
||||
Type = MobType.Swarm,
|
||||
Category = MobCategory.Beast,
|
||||
MinTier = 1,
|
||||
BaseHealth = 20,
|
||||
BasePhysicalDamage = 3,
|
||||
BaseArmor = 0,
|
||||
MoveSpeed = 80f,
|
||||
AttackRange = 30f,
|
||||
AttackSpeed = 1.5f,
|
||||
AggroRange = 80f,
|
||||
BaseXp = 5,
|
||||
ResistancesJson = """{"poison": 0.5}""",
|
||||
//SpriteSheet = "mobs/rat.png"
|
||||
},
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 4,
|
||||
Name = "Giant Spider",
|
||||
Description = "A venomous arachnid",
|
||||
Type = MobType.Normal,
|
||||
Category = MobCategory.Beast,
|
||||
MinTier = 1,
|
||||
BaseHealth = 35,
|
||||
BasePhysicalDamage = 4,
|
||||
BaseMagicDamage = 3, // Poison
|
||||
BaseArmor = 2,
|
||||
MoveSpeed = 70f,
|
||||
AttackRange = 35f,
|
||||
AttackSpeed = 1.2f,
|
||||
AggroRange = 130f,
|
||||
BaseXp = 18,
|
||||
ResistancesJson = """{"poison": 1.0}""",
|
||||
AbilitiesJson = """{"poisonOnHit": true, "poisonDamage": 2, "poisonDuration": 3}""",
|
||||
//SpriteSheet = "mobs/spider.png"
|
||||
},
|
||||
|
||||
// Tier 1 Elite
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 10,
|
||||
Name = "Skeleton Knight",
|
||||
Description = "An armored skeleton warrior",
|
||||
Type = MobType.Elite,
|
||||
Category = MobCategory.Undead,
|
||||
MinTier = 1,
|
||||
BaseHealth = 120,
|
||||
BasePhysicalDamage = 12,
|
||||
BaseArmor = 20,
|
||||
MoveSpeed = 50f,
|
||||
AttackRange = 45f,
|
||||
AttackSpeed = 0.7f,
|
||||
AggroRange = 150f,
|
||||
BaseXp = 50,
|
||||
ResistancesJson = """{"poison": 1.0, "holy": -0.5, "physical": 0.1}""",
|
||||
//SpriteSheet = "mobs/skeleton_knight.png"
|
||||
},
|
||||
|
||||
// Tier 1 Boss
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 100,
|
||||
Name = "The Bone Lord",
|
||||
Description = "A massive skeleton wielding dark magic",
|
||||
Type = MobType.Boss,
|
||||
Category = MobCategory.Undead,
|
||||
MinTier = 1,
|
||||
MaxTier = 2,
|
||||
BaseHealth = 500,
|
||||
BaseMana = 100,
|
||||
BasePhysicalDamage = 20,
|
||||
BaseMagicDamage = 15,
|
||||
BaseArmor = 30,
|
||||
BaseMagicResist = 20,
|
||||
MoveSpeed = 40f,
|
||||
AttackRange = 50f,
|
||||
AttackSpeed = 0.6f,
|
||||
AggroRange = 300f,
|
||||
LeashRange = 800f,
|
||||
BaseXp = 500,
|
||||
ResistancesJson = """{"poison": 1.0, "dark": 0.5, "holy": -0.75}""",
|
||||
AbilitiesJson = """{"summonSkeletons": true, "summonCount": 3, "summonCooldown": 15}""",
|
||||
//SpriteSheet = "mobs/bone_lord.png",
|
||||
//SpriteWidth = 64,
|
||||
//SpriteHeight = 64
|
||||
},
|
||||
|
||||
// Tier 2 - Intermediate enemies
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 20,
|
||||
Name = "Imp",
|
||||
Description = "A small demonic creature",
|
||||
Type = MobType.Normal,
|
||||
Category = MobCategory.Demon,
|
||||
MinTier = 2,
|
||||
BaseHealth = 45,
|
||||
BaseMagicDamage = 8,
|
||||
BaseMagicResist = 15,
|
||||
MoveSpeed = 75f,
|
||||
AttackRange = 100f, // Ranged
|
||||
AttackSpeed = 1.0f,
|
||||
AggroRange = 180f,
|
||||
BaseXp = 25,
|
||||
ResistancesJson = """{"fire": 0.75, "holy": -0.5}""",
|
||||
//SpriteSheet = "mobs/imp.png"
|
||||
},
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 21,
|
||||
Name = "Cultist",
|
||||
Description = "A dark magic practitioner",
|
||||
Type = MobType.Normal,
|
||||
Category = MobCategory.Humanoid,
|
||||
MinTier = 2,
|
||||
BaseHealth = 50,
|
||||
BaseMagicDamage = 10,
|
||||
BaseArmor = 5,
|
||||
BaseMagicResist = 10,
|
||||
MoveSpeed = 55f,
|
||||
AttackRange = 120f, // Ranged
|
||||
AttackSpeed = 0.8f,
|
||||
AggroRange = 200f,
|
||||
BaseXp = 30,
|
||||
ResistancesJson = """{"dark": 0.25, "holy": -0.25}""",
|
||||
//SpriteSheet = "mobs/cultist.png"
|
||||
},
|
||||
|
||||
// Tier 3 - Advanced enemies
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 30,
|
||||
Name = "Stone Golem",
|
||||
Description = "An animated statue",
|
||||
Type = MobType.Elite,
|
||||
Category = MobCategory.Construct,
|
||||
MinTier = 3,
|
||||
BaseHealth = 300,
|
||||
BasePhysicalDamage = 25,
|
||||
BaseArmor = 50,
|
||||
BaseMagicResist = 30,
|
||||
MoveSpeed = 30f,
|
||||
AttackRange = 50f,
|
||||
AttackSpeed = 0.4f,
|
||||
AggroRange = 100f,
|
||||
BaseXp = 100,
|
||||
ResistancesJson = """{"poison": 1.0, "physical": 0.3, "lightning": -0.25}""",
|
||||
//SpriteSheet = "mobs/golem.png",
|
||||
//SpriteWidth = 48,
|
||||
//SpriteHeight = 48
|
||||
},
|
||||
new DungeonMobDefinition
|
||||
{
|
||||
Id = 31,
|
||||
Name = "Fire Elemental",
|
||||
Description = "A living flame",
|
||||
Type = MobType.Normal,
|
||||
Category = MobCategory.Elemental,
|
||||
MinTier = 3,
|
||||
BaseHealth = 80,
|
||||
BaseMagicDamage = 18,
|
||||
BaseMagicResist = 25,
|
||||
MoveSpeed = 65f,
|
||||
AttackRange = 80f,
|
||||
AttackSpeed = 1.2f,
|
||||
AggroRange = 160f,
|
||||
BaseXp = 45,
|
||||
ResistancesJson = """{"fire": 1.0, "ice": -0.75, "physical": 0.5}""",
|
||||
AbilitiesJson = """{"burnOnHit": true, "burnDamage": 5, "burnDuration": 4}""",
|
||||
//SpriteSheet = "mobs/fire_elemental.png",
|
||||
TintColor = "#ff6600"
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DungeonCrawler.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Active dungeon instance (persists until cleared)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Hotbar/belt item slot assignment for quick item access
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Persistent player character with stats and equipment for dungeon crawler
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Server.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
|
||||
public class DungeonCharacterCombatStats
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Server.Data.Enums;
|
||||
using DataServer.Data.Enums;
|
||||
|
||||
namespace Server.Data.Entities;
|
||||
namespace DataServer.Data.Entities;
|
||||
/// <summary>
|
||||
/// Actual item instance owned by a character (inventory or equipped)
|
||||
/// </summary>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user