Miese Corona Zeiten push für Lenhardt

This commit is contained in:
Siga
2020-05-10 19:19:53 +02:00
parent 15e4cec8ee
commit efbff34c21
159 changed files with 8042 additions and 8695 deletions

View File

@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GTANetworkAPI;
using ReallifeGamemode.Database.Entities.Saves;
using ReallifeGamemode.Database.Models;
@@ -11,59 +9,57 @@ using ReallifeGamemode.Server.Shop.SevenEleven;
namespace ReallifeGamemode.Server.Managers
{
public class ShopManager
{
public static List<ClotheShop> clotheStores = new List<ClotheShop>();
public static List<ItemShop> itemShops = new List<ItemShop>();
public static void LoadClotheShops()
{
using(var dbContext = new DatabaseContext())
{
List<SavedBlip> discount = dbContext.Blips.ToList().FindAll(s => s.Name == "Binco" || s.Name == "Discount Store");
List<SavedBlip> midclass = dbContext.Blips.ToList().FindAll(s => s.Name == "Suburban");
List<SavedBlip> luxury = dbContext.Blips.ToList().FindAll(s => s.Name == "Ponsonbys");
public static List<ClotheShop> clotheStores = new List<ClotheShop>();
public static List<ItemShop> itemShops = new List<ItemShop>();
foreach(var store in discount) {
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
ClotheShop newShop = new ClotheShop(1, pos);
clotheStores.Add(newShop);
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
}
foreach(var store in midclass)
public static void LoadClotheShops()
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
ClotheShop newShop = new ClotheShop(2, pos);
clotheStores.Add(newShop);
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
using (var dbContext = new DatabaseContext())
{
List<SavedBlip> discount = dbContext.Blips.ToList().FindAll(s => s.Name == "Binco" || s.Name == "Discount Store");
List<SavedBlip> midclass = dbContext.Blips.ToList().FindAll(s => s.Name == "Suburban");
List<SavedBlip> luxury = dbContext.Blips.ToList().FindAll(s => s.Name == "Ponsonbys");
foreach (var store in discount)
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
ClotheShop newShop = new ClotheShop(1, pos);
clotheStores.Add(newShop);
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
}
foreach (var store in midclass)
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
ClotheShop newShop = new ClotheShop(2, pos);
clotheStores.Add(newShop);
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
}
foreach (var store in luxury)
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
ClotheShop newShop = new ClotheShop(3, pos);
clotheStores.Add(newShop);
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
}
}
}
foreach (var store in luxury)
public static void LoadItemShops()
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
ClotheShop newShop = new ClotheShop(3, pos);
clotheStores.Add(newShop);
NAPI.Util.ConsoleOutput($"Loading ClotheShop {store.Name}");
using (var dbContext = new DatabaseContext())
{
int id = 0;
List<SavedBlip> shops = dbContext.Blips.ToList().FindAll(s => s.Name == "24/7");
foreach (var store in shops)
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
ItemShop newShop = new ItemShop(pos, id);
itemShops.Add(newShop);
id++;
}
NAPI.Util.ConsoleOutput($"Loaded {itemShops.Count}x 24/7");
}
}
}
}
public static void LoadItemShops()
{
using(var dbContext = new DatabaseContext())
{
int id = 0;
List<SavedBlip> shops = dbContext.Blips.ToList().FindAll(s => s.Name == "24/7");
foreach(var store in shops)
{
Vector3 pos = new Vector3(store.PositionX, store.PositionY, store.PositionZ);
ItemShop newShop = new ItemShop(pos, id);
itemShops.Add(newShop);
id++;
}
NAPI.Util.ConsoleOutput($"Loaded {itemShops.Count}x 24/7");
}
}
}
}