diff --git a/ReallifeGamemode.Server/Events/UpdateCharacterCloth.cs b/ReallifeGamemode.Server/Events/UpdateCharacterCloth.cs index 6ada1da5..375057c5 100644 --- a/ReallifeGamemode.Server/Events/UpdateCharacterCloth.cs +++ b/ReallifeGamemode.Server/Events/UpdateCharacterCloth.cs @@ -110,7 +110,7 @@ namespace ReallifeGamemode.Server.Events { for (var x = 0; x < slotType.Length; x++) { - var loopCloth = context.CharacterClothes.FirstOrDefault(u => u.UserId == user.Id && u.SlotType == (byte)slotType[x] && u.SlotId == slotId[x]); + var loopCloth = context.CharacterClothes.FirstOrDefault(u => u.UserId == user.Id && u.SlotType == (byte)slotType[x] && u.SlotId == slotId[x] && u.Duty); if (loopCloth == null) { @@ -125,8 +125,8 @@ namespace ReallifeGamemode.Server.Events loopCloth.ClothId = clothId[x]; } - CharacterCloth torso = context.CharacterClothes.FirstOrDefault(u => u.UserId == user.Id && u.SlotType == 0 && u.SlotId == 3); - CharacterCloth undershirt = context.CharacterClothes.FirstOrDefault(u => u.UserId == user.Id && u.SlotType == 0 && u.SlotId == 8); + CharacterCloth torso = context.CharacterClothes.FirstOrDefault(u => u.UserId == user.Id && u.SlotType == 0 && u.SlotId == 3 && u.Duty); + CharacterCloth undershirt = context.CharacterClothes.FirstOrDefault(u => u.UserId == user.Id && u.SlotType == 0 && u.SlotId == 8 && u.Duty); torso.ClothId = context.ClothCombinations.FirstOrDefault(c => c.Top == clothId[1] && c.Gender == character.Gender).Torso; undershirt.ClothId = context.ClothCombinations.FirstOrDefault(c => c.Top == clothId[1] && c.Gender == character.Gender).Undershirt;