add friseur

This commit is contained in:
michael.reiswich
2021-01-25 14:17:57 +01:00
parent fe1916c60a
commit b8815f79e9
14 changed files with 608 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ using System.Linq;
using GTANetworkAPI;
using ReallifeGamemode.Server.Shop.Clothing;
using ReallifeGamemode.Server.Shop.SevenEleven;
using ReallifeGamemode.Server.Shop.Friseur;
namespace ReallifeGamemode.Server.Managers
{
@@ -17,6 +18,8 @@ namespace ReallifeGamemode.Server.Managers
public static List<ElevatorPoint> ElevatorPoints = new List<ElevatorPoint>();
public static List<ClotheshopPoint> clotheshopPoints = new List<ClotheshopPoint>();
public static List<FriseurPoint> friseurPoints = new List<FriseurPoint>();
public static List<ItemshopPoint> itemshopPoints = new List<ItemshopPoint>();
@@ -233,6 +236,24 @@ namespace ReallifeGamemode.Server.Managers
NAPI.TextLabel.CreateTextLabel("Kleiderladen - Dr\u00fccke ~y~E", s.Position, 7, 1, 0, new Color(255, 255, 255), false, 0);
}
foreach (var shop in ShopManager.FriseurStores)
{
shop.LoadClothes();
FriseurPoint shopPoint = new FriseurPoint()
{
Position = shop.vector,
friseurShop = shop
};
friseurPoints.Add(shopPoint);
}
foreach (FriseurPoint s in friseurPoints)
{
NAPI.Marker.CreateMarker(1, new Vector3(s.Position.X, s.Position.Y, s.Position.Z - 2), new Vector3(s.Position.X, s.Position.Y, s.Position.Z + 1),
new Vector3(0, 0, 0), 2, new Color(255, 255, 255, 50), false, 0);
NAPI.TextLabel.CreateTextLabel("Friseur - Dr\u00fccke ~y~E", s.Position, 7, 1, 0, new Color(255, 255, 255), false, 0);
}
foreach (var shop in ShopManager.itemShops)
{
shop.LoadItems();
@@ -358,6 +379,12 @@ public class ItemshopPoint
public ItemShop itemShop { get; set; }
}
public class FriseurPoint
{
public Vector3 Position { get; set; }
public Friseur friseurShop { get; set; }
}
public class JobPoint
{
public Vector3 Position { get; set; }

View File

@@ -5,6 +5,7 @@ using ReallifeGamemode.Database.Entities.Saves;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Shop.Clothing;
using ReallifeGamemode.Server.Shop.SevenEleven;
using ReallifeGamemode.Server.Shop.Friseur;
namespace ReallifeGamemode.Server.Managers
{
@@ -12,6 +13,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 void LoadClotheShops()
{
@@ -61,5 +63,23 @@ namespace ReallifeGamemode.Server.Managers
NAPI.Util.ConsoleOutput($"Loaded {itemShops.Count}x 24/7");
}
}
public static void LoadFriseur()
{
using (var dbContext = new DatabaseContext())
{
List<SavedBlip> friseur = dbContext.Blips.ToList().FindAll(s => s.Name == "Friseur");
foreach (var store in friseur)
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
Friseur newShop = new Friseur(10, pos);
FriseurStores.Add(newShop);
NAPI.Util.ConsoleOutput($"Loading Friseur {store.Name}");
}
}
}
}
}