World changes
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user