frakcar sellen

This commit is contained in:
hydrant
2020-05-06 21:56:54 +02:00
parent ce0eac5967
commit 89e341a4cd
10 changed files with 1952 additions and 14 deletions

View File

@@ -132,6 +132,13 @@ namespace ReallifeGamemode.Server.Events
Price = v.Price ?? 0
});
var factionVehicles = dbContext.FactionVehicles.ToList().Where(f => f.GetOwners().Contains(u.FactionId ?? -1)).Select(f => new
{
f.Id,
f.Model,
Price = f.BuyPrice
});
Paycheck paycheck = null;
if (Economy.Paychecks.ContainsKey(u.Id)) paycheck = Economy.Paychecks[u.Id];
@@ -143,6 +150,7 @@ namespace ReallifeGamemode.Server.Events
adminLevel = u.AdminLevel.GetName(),
points = u.Points,
faction = u.Faction?.Name ?? "Zivilist",
stateFaction = u.Faction?.StateOwned,
factionRank = u.GetFactionRank().RankName,
group = u.Group?.Name ?? "Keine",
groupRank = u.GroupRank.GetName(),
@@ -150,6 +158,7 @@ namespace ReallifeGamemode.Server.Events
paycheck,
licenses,
vehicles,
factionVehicles = u.FactionLeader ? factionVehicles : null,
nextPayday = u.PaydayTimer
};