mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-18 05:27:43 +01:00
make shit compile.
This commit is contained in:
parent
10631341cb
commit
4eb46a9fff
14 changed files with 56 additions and 63 deletions
|
|
@ -15,6 +15,7 @@ public partial class Design : DesignData, ISavable
|
|||
{
|
||||
public const int FileVersion = 1;
|
||||
|
||||
|
||||
public Guid Identifier { get; internal init; }
|
||||
public DateTimeOffset CreationDate { get; internal init; }
|
||||
public LowerString Name { get; internal set; } = LowerString.Empty;
|
||||
|
|
@ -85,7 +86,7 @@ public partial class Design : DesignData, ISavable
|
|||
[nameof(Description)] = Description,
|
||||
[nameof(Tags)] = JArray.FromObject(Tags),
|
||||
[nameof(WriteProtected)] = WriteProtected,
|
||||
[nameof(ModelData.Equipment)] = SerializeEquipment(),
|
||||
["Equipment"] = SerializeEquipment(),
|
||||
[nameof(ModelData.Customize)] = SerializeCustomize(),
|
||||
};
|
||||
return ret;
|
||||
|
|
@ -269,15 +270,15 @@ public partial class Design : DesignData, ISavable
|
|||
UpdateMainhand(items, data.MainHand);
|
||||
UpdateOffhand(items, data.OffHand);
|
||||
foreach (var slot in EquipSlotExtensions.EqdpSlots)
|
||||
UpdateArmor(items, slot, data.Equipment[slot], true);
|
||||
ModelData.CustomizeData = data.CustomizeData;
|
||||
ApplyEquip = applyEquip;
|
||||
ApplyCustomize = applyCustomize;
|
||||
WriteProtected = writeProtected;
|
||||
Wetness = wet;
|
||||
Hat = hat;
|
||||
Visor = visor;
|
||||
Weapon = weapon;
|
||||
UpdateArmor(items, slot, data.Armor(slot), true);
|
||||
ModelData.Customize = data.Customize;
|
||||
ApplyEquip = applyEquip;
|
||||
ApplyCustomize = applyCustomize;
|
||||
WriteProtected = writeProtected;
|
||||
Wetness = wet;
|
||||
Hat = hat;
|
||||
Visor = visor;
|
||||
Weapon = weapon;
|
||||
}
|
||||
|
||||
public static Design CreateTemporaryFromBase64(ItemManager items, string base64, bool customize, bool equip)
|
||||
|
|
|
|||
|
|
@ -1,14 +1,10 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Glamourer.Customization;
|
||||
using Glamourer.Interop;
|
||||
using Glamourer.Services;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui;
|
||||
using Penumbra.GameData.Data;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Structs;
|
||||
using CustomizeData = FFXIVClientStructs.FFXIV.Client.Game.Character.CustomizeData;
|
||||
|
||||
namespace Glamourer.Designs;
|
||||
|
||||
|
|
@ -218,7 +214,6 @@ public class DesignData
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
private bool SetArmor(EquipSlot slot, SetId set, byte variant, string name, uint id)
|
||||
{
|
||||
var changes = false;
|
||||
|
|
@ -373,13 +368,16 @@ public static class DesignBase64Migration
|
|||
{
|
||||
fixed (byte* ptr = bytes)
|
||||
{
|
||||
data.CustomizeData.Read(ptr + 4);
|
||||
data.Customize.Load(*(Customize*) (ptr + 4));
|
||||
var cur = (CharacterWeapon*)(ptr + 30);
|
||||
data.MainHand = cur[0];
|
||||
data.OffHand = cur[1];
|
||||
var eq = (CharacterArmor*)(cur + 2);
|
||||
foreach (var (slot, idx) in EquipSlotExtensions.EqdpSlots.WithIndex())
|
||||
data.Equipment[slot] = eq[idx];
|
||||
{
|
||||
var mdl = eq[idx];
|
||||
data.SetPiece(slot, mdl.Set, mdl.Variant, mdl.Stain, out _);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -409,7 +407,7 @@ public static class DesignBase64Migration
|
|||
| (equipFlags.HasFlag(EquipFlag.Wrist) ? 0x02 : 0)
|
||||
| (equipFlags.HasFlag(EquipFlag.RFinger) ? 0x04 : 0)
|
||||
| (equipFlags.HasFlag(EquipFlag.LFinger) ? 0x08 : 0));
|
||||
save.CustomizeData.Write(data + 4);
|
||||
save.Customize.Load(*(Customize*) (data + 4));
|
||||
((CharacterWeapon*)(data + 30))[0] = save.MainHand;
|
||||
((CharacterWeapon*)(data + 30))[1] = save.OffHand;
|
||||
((CharacterArmor*)(data + 44))[0] = save.Head;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,13 @@ using Penumbra.String.Functions;
|
|||
|
||||
namespace Glamourer.Designs;
|
||||
|
||||
public struct ItemPiece
|
||||
{
|
||||
public string Name;
|
||||
public uint ItemId;
|
||||
public SetId ModelId;
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum ModelFlags : ushort
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue