haus system auf core geändert
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Core.API;
|
||||
using ReallifeGamemode.Server.Core.RageMP;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
@@ -28,11 +30,17 @@ namespace ReallifeGamemode.Database.Entities
|
||||
[NotMapped]
|
||||
public Vector3 Position => new Vector3(X, Y, Z);
|
||||
|
||||
[NotMapped]
|
||||
public Position NewPosition => new Position(X, Y, Z);
|
||||
|
||||
[ForeignKey("Owner")]
|
||||
public int? OwnerId { get; set; }
|
||||
public User Owner { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Player User => Owner?.Player;
|
||||
|
||||
[NotMapped]
|
||||
public IPlayer OwnerPlayer => new RagePlayer(User);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Core.API;
|
||||
using ReallifeGamemode.Server.Core.RageMP;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
/**
|
||||
@@ -104,6 +106,9 @@ namespace ReallifeGamemode.Database.Entities
|
||||
get => NAPI.Pools.GetAllPlayers().Where(c => c.Name.ToLower() == this.Name.ToLower()).FirstOrDefault();
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public IPlayer NewPlayer => new RagePlayer(Player);
|
||||
|
||||
public override string BankAccountName => Name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ReallifeGamemode.Server.Core.API\ReallifeGamemode.Server.Core.API.csproj" />
|
||||
<ProjectReference Include="..\ReallifeGamemode.Server.Core.RageMP\ReallifeGamemode.Server.Core.RageMP.csproj" />
|
||||
<ProjectReference Include="..\ReallifeGamemode.Server.Types\ReallifeGamemode.Server.Types.csproj" />
|
||||
<ProjectReference Include="..\ReallifeGamemode.Services\ReallifeGamemode.Services.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user