Change Emperor Code functionality.

This commit is contained in:
Ottermandias 2023-07-15 15:00:27 +02:00
parent fa4a426b79
commit 4b7eba793f

View file

@ -72,20 +72,20 @@ public unsafe class FunModule
if (!_codes.EnabledEmperor) if (!_codes.EnabledEmperor)
return; return;
if (armors.Length == 1) void SetItem(EquipSlot slot2, ref CharacterArmor armor)
{ {
ref var piece = ref armors[0]; var list = _items.ItemService.AwaitedService[slot2.ToEquipType()];
piece.Variant = 1; var rng = _rng.Next(0, list.Count - 1);
piece.Set = (SetId)(slot.IsAccessory() ? 53 : 279); var item = list[rng];
return; armor.Set = item.ModelId;
armor.Variant = item.Variant;
} }
for (var i = 0; i < armors.Length; ++i) if (armors.Length == 1)
{ SetItem(slot, ref armors[0]);
ref var piece = ref armors[i]; else
piece.Variant = 1; for (var i = 0u; i < armors.Length; ++i)
piece.Set = (SetId)(i < 5 ? 279 : 53); SetItem(i.ToEquipSlot(), ref armors[(int)i]);
}
} }
public void ApplyOops(ref Customize customize) public void ApplyOops(ref Customize customize)