Continue Ammunation

This commit is contained in:
VegaZ
2021-04-13 21:46:11 +02:00
parent 8e5e1ca093
commit 1f00619366
4 changed files with 48 additions and 18 deletions

View File

@@ -6,6 +6,7 @@ using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Shop.Clothing;
using ReallifeGamemode.Server.Shop.SevenEleven;
using ReallifeGamemode.Server.Shop.Friseur;
using ReallifeGamemode.Server.Shop.Ammunation;
namespace ReallifeGamemode.Server.Managers
{
@@ -14,7 +15,7 @@ namespace ReallifeGamemode.Server.Managers
public static List<ClotheShop> clotheStores = new List<ClotheShop>();
public static List<ItemShop> itemShops = new List<ItemShop>();
public static List<Friseur> FriseurStores = new List<Friseur>();
public static List<AmmunationPoint> Ammunations = new List<Ammunation>();
public static List<Ammunation> Ammunations = new List<Ammunation>();
public static void LoadClotheShops()
{
@@ -82,5 +83,20 @@ namespace ReallifeGamemode.Server.Managers
}
}
public static void LoadAmmunations()
{
using (var dbContext = new DatabaseContext())
{
List<SavedBlip> ammunations = dbContext.Blips.ToList().FindAll(s => s.Name == "Ammunation");
foreach (var store in ammunations)
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
Ammunation newShop = new Ammunation(pos);
Ammunations.Add(newShop);
}
NAPI.Util.ConsoleOutput($"Loading {ammunations.Count} Ammunations");
}
}
}
}