Miese Corona Zeiten push für Lenhardt
This commit is contained in:
@@ -10,35 +10,35 @@ using ReallifeGamemode.Server.Extensions;
|
||||
namespace ReallifeGamemode.Server.Shop.Clothing
|
||||
{
|
||||
public class ClotheShop
|
||||
{
|
||||
public int category { get; set; }
|
||||
public Vector3 vector { get; set; }
|
||||
public List<ShopClothe> clotheList = new List<ShopClothe>();
|
||||
|
||||
public ClotheShop(int category, Vector3 vector)
|
||||
{
|
||||
this.category = category;
|
||||
this.vector = vector;
|
||||
LoadClothes();
|
||||
}
|
||||
public int category { get; set; }
|
||||
public Vector3 vector { get; set; }
|
||||
public List<ShopClothe> clotheList = new List<ShopClothe>();
|
||||
|
||||
public void LoadClothes()
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
clotheList = dbContext.ShopClothes.ToList().FindAll(c => c.Category == category);
|
||||
}
|
||||
}
|
||||
public ClotheShop(int category, Vector3 vector)
|
||||
{
|
||||
this.category = category;
|
||||
this.vector = vector;
|
||||
LoadClothes();
|
||||
}
|
||||
|
||||
public void LoadShopNUI(Player client)
|
||||
{
|
||||
bool gender = client.GetUser().GetCharacter().Gender;
|
||||
List<ShopClothe> tops = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 11);
|
||||
List<ShopClothe> legs = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 4);
|
||||
List<ShopClothe> shoes = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 6);
|
||||
List<ShopClothe> accessoires = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 7);
|
||||
public void LoadClothes()
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
clotheList = dbContext.ShopClothes.ToList().FindAll(c => c.Category == category);
|
||||
}
|
||||
}
|
||||
|
||||
List<Array> clothes = new List<Array>
|
||||
public void LoadShopNUI(Player client)
|
||||
{
|
||||
bool gender = client.GetUser().GetCharacter().Gender;
|
||||
List<ShopClothe> tops = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 11);
|
||||
List<ShopClothe> legs = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 4);
|
||||
List<ShopClothe> shoes = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 6);
|
||||
List<ShopClothe> accessoires = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 7);
|
||||
|
||||
List<Array> clothes = new List<Array>
|
||||
{
|
||||
tops.ToArray(),
|
||||
legs.ToArray(),
|
||||
@@ -46,7 +46,7 @@ namespace ReallifeGamemode.Server.Shop.Clothing
|
||||
accessoires.ToArray()
|
||||
};
|
||||
|
||||
client.TriggerEvent("clothesMenu:updateData", JsonConvert.SerializeObject(category), JsonConvert.SerializeObject(clothes.ToArray()), gender);
|
||||
client.TriggerEvent("clothesMenu:updateData", JsonConvert.SerializeObject(category), JsonConvert.SerializeObject(clothes.ToArray()), gender);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user