vehicle sync OHNE FEHLER

This commit is contained in:
hydrant
2020-05-09 01:41:39 +02:00
parent 93540e721b
commit 2e91fe76ee
12 changed files with 163 additions and 429 deletions

View File

@@ -291,7 +291,7 @@ namespace ReallifeGamemode.Server.Events
using (var context = new DatabaseContext())
{
bool unloadedWeaponPackage = false;
List<UserItem> fItem = context.UserItems.Where(u => u.UserId == user.Id).ToList();
foreach (var item in fItem)
@@ -309,6 +309,11 @@ namespace ReallifeGamemode.Server.Events
}
context.SaveChanges();
if (unloadedWeaponPackage)
{
return;
}
List<FactionWeapon> weapons = context.FactionWeapons.Where(w => w.FactionId == user.FactionId).ToList();
Database.Entities.Faction faction = context.Factions.Where(fac => fac.Id == user.FactionId).FirstOrDefault();