World changes

This commit is contained in:
dingo
2026-02-17 11:18:55 -05:00
parent cae32f6157
commit 14d74fa9ce
23 changed files with 3029 additions and 157 deletions
+1
View File
@@ -55,6 +55,7 @@ public class DungeonCharacter
public int? WorldRegionId { get; set; }
public int? WorldZoneX { get; set; }
public int? WorldZoneY { get; set; }
public int? WorldZoneZ { get; set; }
public int? WorldChunkX { get; set; }
public int? WorldChunkY { get; set; }
public float? WorldX { get; set; }
+3 -1
View File
@@ -39,10 +39,12 @@ public class WorldZone
public int ZoneX { get; set; }
public int ZoneY { get; set; }
public int ZoneZ { get; set; } = 0; // 0 = ground, positive = upper floors, negative = basements
[MaxLength(64)]
public string Name { get; set; } = "";
public bool IsPvpEnabled { get; set; } = false;
public bool IsEnabled { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
@@ -166,7 +168,7 @@ public sealed class WorldZoneConfig : IEntityTypeConfiguration<WorldZone>
{
public void Configure(EntityTypeBuilder<WorldZone> e)
{
e.HasIndex(x => new { x.RegionId, x.ZoneX, x.ZoneY }).IsUnique();
e.HasIndex(x => new { x.RegionId, x.ZoneX, x.ZoneY, x.ZoneZ }).IsUnique();
e.HasOne(x => x.Region)
.WithMany()
.HasForeignKey(x => x.RegionId)