Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop

This commit is contained in:
hydrant
2018-11-21 19:20:48 +01:00

View File

@@ -174,19 +174,17 @@ namespace reallife_gamemode.Server.Events
using (var context = new DatabaseContext())
{
List<CharacterCloth> charClothes = context.CharacterClothes.ToList().FindAll(c => c.UserId == user.Id && c.Duty == false);
player.ClearAccessory(0);
player.ClearAccessory(1);
player.ClearAccessory(2);
player.ClearAccessory(6);
player.ClearAccessory(7);
foreach(var cloth in charClothes)
foreach (var cloth in charClothes)
{
if(cloth.SlotType == 1)
{
if (cloth.ClothId == -1)
{
player.ClearAccessory(cloth.SlotId);
}
else
{
player.SetAccessories(cloth.SlotId, cloth.ClothId, 0);
}
player.SetAccessories(cloth.SlotId, cloth.ClothId, 0);
}
else
{