mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-19 05:57:42 +01:00
make shit compile.
This commit is contained in:
parent
10631341cb
commit
4eb46a9fff
14 changed files with 56 additions and 63 deletions
|
|
@ -82,10 +82,10 @@ public unsafe partial struct Actor : IEquatable<Actor>, IDesignable
|
|||
=> ObjectKind == ObjectKind.Companion ? *(ushort*)((byte*)Pointer + 0x1AAC) : (ushort)0;
|
||||
|
||||
public Customize Customize
|
||||
=> new((CustomizeData*)Pointer->CustomizeData);
|
||||
=> new(*(CustomizeData*)&Pointer->DrawData.CustomizeData);
|
||||
|
||||
public CharacterEquip Equip
|
||||
=> new((CharacterArmor*)Pointer->EquipSlotData);
|
||||
=> new((CharacterArmor*)&Pointer->DrawData.Head);
|
||||
|
||||
public CharacterWeapon MainHand
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public unsafe partial struct DrawObject : IEquatable<DrawObject>, IDesignable
|
|||
=> (*(delegate* unmanaged<Human*, uint>**)Pointer)[50](Pointer);
|
||||
|
||||
public Customize Customize
|
||||
=> new((CustomizeData*)Pointer->CustomizeData);
|
||||
=> *(Customize*)Pointer->CustomizeData;
|
||||
|
||||
public CharacterEquip Equip
|
||||
=> new((CharacterArmor*)Pointer->EquipSlotData);
|
||||
|
|
|
|||
|
|
@ -56,20 +56,19 @@ public unsafe partial class RedrawManager : IDisposable
|
|||
|
||||
// Compare game object customize data against draw object customize data for transformations.
|
||||
// Apply customization if they correspond and there is customization to apply.
|
||||
var gameObjectCustomize = new Customize((CustomizeData*)actor.Pointer->CustomizeData);
|
||||
var gameObjectCustomize = new Customize(*(CustomizeData*)&actor.Pointer->DrawData.CustomizeData);
|
||||
if (gameObjectCustomize.Equals(customize))
|
||||
customize.Load(save!.Customize);
|
||||
customize.Load(save.ModelData.Customize);
|
||||
|
||||
// Compare game object equip data against draw object equip data for transformations.
|
||||
// Apply each piece of equip that should be applied if they correspond.
|
||||
var gameObjectEquip = new CharacterEquip((CharacterArmor*)actor.Pointer->EquipSlotData);
|
||||
var gameObjectEquip = new CharacterEquip((CharacterArmor*)&actor.Pointer->DrawData.Head);
|
||||
if (gameObjectEquip.Equals(equip))
|
||||
{
|
||||
var saveEquip = save!.Equipment;
|
||||
foreach (var slot in EquipSlotExtensions.EqdpSlots)
|
||||
{
|
||||
(_, equip[slot]) =
|
||||
_items.ResolveRestrictedGear(saveEquip[slot], slot, customize.Race, customize.Gender);
|
||||
_items.ResolveRestrictedGear(save.ModelData.Armor(slot), slot, customize.Race, customize.Gender);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -78,7 +77,7 @@ public unsafe partial class RedrawManager : IDisposable
|
|||
{
|
||||
try
|
||||
{
|
||||
OnCharacterRedraw(gameObject, (uint*)modelId, new Customize((CustomizeData*)customize),
|
||||
OnCharacterRedraw(gameObject, (uint*)modelId, new Customize(*(CustomizeData*)customize),
|
||||
new CharacterEquip((CharacterArmor*)equipData));
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue