fix dutycloth ^2

This commit is contained in:
hydrant
2020-05-10 19:00:24 +02:00
parent 2f0be46377
commit bc737a4ac1

View File

@@ -110,7 +110,7 @@ namespace ReallifeGamemode.Server.Events
{ {
for (var x = 0; x < slotType.Length; x++) 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) if (loopCloth == null)
{ {
@@ -125,8 +125,8 @@ namespace ReallifeGamemode.Server.Events
loopCloth.ClothId = clothId[x]; loopCloth.ClothId = clothId[x];
} }
CharacterCloth torso = context.CharacterClothes.FirstOrDefault(u => u.UserId == user.Id && u.SlotType == 0 && u.SlotId == 3); 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); 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; 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; undershirt.ClothId = context.ClothCombinations.FirstOrDefault(c => c.Top == clothId[1] && c.Gender == character.Gender).Undershirt;