evtl fix character
This commit is contained in:
@@ -47,12 +47,12 @@ namespace ReallifeGamemode.Server.Extensions
|
|||||||
{
|
{
|
||||||
using (context = new DatabaseContext())
|
using (context = new DatabaseContext())
|
||||||
{
|
{
|
||||||
return context.Characters.FirstOrDefault(u => u.UserId == user.Id);
|
return context.Characters.FirstOrDefault(u => u.Id == user.CharacterId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return context.Characters.FirstOrDefault(u => u.UserId == user.Id);
|
return context.Characters.FirstOrDefault(u => u.Id == user.CharacterId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,14 @@ namespace ReallifeGamemode.Server.Shop.Clothing
|
|||||||
|
|
||||||
public void LoadShopNUI(Player client)
|
public void LoadShopNUI(Player client)
|
||||||
{
|
{
|
||||||
bool gender = client.GetUser().GetCharacter().Gender;
|
User u = client.GetUser();
|
||||||
|
|
||||||
|
if (u == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool gender = u.GetCharacter().Gender;
|
||||||
List<ShopClothe> tops = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 11);
|
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> 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> shoes = clotheList.ToList().FindAll(c => c.Gender == gender && c.ComponentId == 6);
|
||||||
|
|||||||
Reference in New Issue
Block a user