Some compatibility

This commit is contained in:
Ottermandias 2024-05-02 00:59:03 +02:00
parent 9d18707cb7
commit 8fff09f92e
3 changed files with 32 additions and 30 deletions

View file

@ -82,7 +82,9 @@ public unsafe class ModelEvaluationPanel(
ImGuiUtil.DrawTableColumn("Scale");
ImGuiUtil.DrawTableColumn(actor.Valid ? actor.AsObject->Scale.ToString(CultureInfo.InvariantCulture) : "No Character");
ImGuiUtil.DrawTableColumn(model.Valid ? model.AsDrawObject->Object.Scale.ToString() : "No Model");
ImGuiUtil.DrawTableColumn(model.IsCharacterBase ? $"{*(float*)(model.Address + 0x270)} {*(float*)(model.Address + 0x274)}" : "No CharacterBase");
ImGuiUtil.DrawTableColumn(model.IsCharacterBase
? $"{*(float*)(model.Address + 0x270)} {*(float*)(model.Address + 0x274)}"
: "No CharacterBase");
}
private void DrawParameters(Actor actor, Model model)
@ -229,7 +231,7 @@ public unsafe class ModelEvaluationPanel(
? *(CustomizeArray*)&actor.AsCharacter->DrawData.CustomizeData
: new CustomizeArray();
var modelCustomize = model.IsHuman
? *(CustomizeArray*)model.AsHuman->Customize.Data
? *(CustomizeArray*)&model.AsHuman->Customize
: new CustomizeArray();
foreach (var type in Enum.GetValues<CustomizeIndex>())
{

View file

@ -73,18 +73,18 @@ public sealed unsafe class InventoryService : IDisposable, IRequiredService
}
var plate = MirageManager.Instance()->GlamourPlatesSpan[glamourPlateId - 1];
Add(EquipSlot.MainHand, plate.ItemIds[0], plate.StainIds[0], ref entry->MainHand);
Add(EquipSlot.OffHand, plate.ItemIds[1], plate.StainIds[10], ref entry->OffHand);
Add(EquipSlot.Head, plate.ItemIds[2], plate.StainIds[2], ref entry->Head);
Add(EquipSlot.Body, plate.ItemIds[3], plate.StainIds[3], ref entry->Body);
Add(EquipSlot.Hands, plate.ItemIds[4], plate.StainIds[4], ref entry->Hands);
Add(EquipSlot.Legs, plate.ItemIds[5], plate.StainIds[5], ref entry->Legs);
Add(EquipSlot.Feet, plate.ItemIds[6], plate.StainIds[6], ref entry->Feet);
Add(EquipSlot.Ears, plate.ItemIds[7], plate.StainIds[7], ref entry->Ears);
Add(EquipSlot.Neck, plate.ItemIds[8], plate.StainIds[8], ref entry->Neck);
Add(EquipSlot.Wrists, plate.ItemIds[9], plate.StainIds[9], ref entry->Wrists);
Add(EquipSlot.RFinger, plate.ItemIds[10], plate.StainIds[10], ref entry->RingRight);
Add(EquipSlot.LFinger, plate.ItemIds[11], plate.StainIds[11], ref entry->RingLeft);
Add(EquipSlot.MainHand, plate.ItemIds[0], plate.StainIds[0], ref entry->ItemsSpan[0]);
Add(EquipSlot.OffHand, plate.ItemIds[1], plate.StainIds[1], ref entry->ItemsSpan[1]);
Add(EquipSlot.Head, plate.ItemIds[2], plate.StainIds[2], ref entry->ItemsSpan[2]);
Add(EquipSlot.Body, plate.ItemIds[3], plate.StainIds[3], ref entry->ItemsSpan[3]);
Add(EquipSlot.Hands, plate.ItemIds[4], plate.StainIds[4], ref entry->ItemsSpan[5]);
Add(EquipSlot.Legs, plate.ItemIds[5], plate.StainIds[5], ref entry->ItemsSpan[6]);
Add(EquipSlot.Feet, plate.ItemIds[6], plate.StainIds[6], ref entry->ItemsSpan[7]);
Add(EquipSlot.Ears, plate.ItemIds[7], plate.StainIds[7], ref entry->ItemsSpan[8]);
Add(EquipSlot.Neck, plate.ItemIds[8], plate.StainIds[8], ref entry->ItemsSpan[9]);
Add(EquipSlot.Wrists, plate.ItemIds[9], plate.StainIds[9], ref entry->ItemsSpan[10]);
Add(EquipSlot.RFinger, plate.ItemIds[10], plate.StainIds[10], ref entry->ItemsSpan[11]);
Add(EquipSlot.LFinger, plate.ItemIds[11], plate.StainIds[11], ref entry->ItemsSpan[12]);
}
else
{
@ -98,18 +98,18 @@ public sealed unsafe class InventoryService : IDisposable, IRequiredService
_itemList.Add((slot, FixId(item.ItemID), item.Stain));
}
Add(EquipSlot.MainHand, ref entry->MainHand);
Add(EquipSlot.OffHand, ref entry->OffHand);
Add(EquipSlot.Head, ref entry->Head);
Add(EquipSlot.Body, ref entry->Body);
Add(EquipSlot.Hands, ref entry->Hands);
Add(EquipSlot.Legs, ref entry->Legs);
Add(EquipSlot.Feet, ref entry->Feet);
Add(EquipSlot.Ears, ref entry->Ears);
Add(EquipSlot.Neck, ref entry->Neck);
Add(EquipSlot.Wrists, ref entry->Wrists);
Add(EquipSlot.RFinger, ref entry->RingRight);
Add(EquipSlot.LFinger, ref entry->RingLeft);
Add(EquipSlot.MainHand, ref entry->ItemsSpan[0]);
Add(EquipSlot.OffHand, ref entry->ItemsSpan[1]);
Add(EquipSlot.Head, ref entry->ItemsSpan[2]);
Add(EquipSlot.Body, ref entry->ItemsSpan[3]);
Add(EquipSlot.Hands, ref entry->ItemsSpan[5]);
Add(EquipSlot.Legs, ref entry->ItemsSpan[6]);
Add(EquipSlot.Feet, ref entry->ItemsSpan[7]);
Add(EquipSlot.Ears, ref entry->ItemsSpan[8]);
Add(EquipSlot.Neck, ref entry->ItemsSpan[9]);
Add(EquipSlot.Wrists, ref entry->ItemsSpan[10]);
Add(EquipSlot.RFinger, ref entry->ItemsSpan[11]);
Add(EquipSlot.LFinger, ref entry->ItemsSpan[12]);
}
_movedItemsEvent.Invoke(_itemList.ToArray());

View file

@ -139,6 +139,6 @@ public unsafe class ScalingService : IDisposable
character->DrawData.CustomizeData.Sex = gender;
character->DrawData.CustomizeData.BodyType = bodyType;
character->DrawData.CustomizeData.Tribe = clan;
character->DrawData.CustomizeData.Data[(int)CustomizeIndex.Height] = height;
character->DrawData.CustomizeData.Height = height;
}
}