mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-20 07:34:29 +01:00
Update for CS.
This commit is contained in:
parent
8986ed8e4d
commit
4dddd46a72
2 changed files with 5 additions and 4 deletions
|
|
@ -104,10 +104,10 @@ public readonly unsafe struct Actor : IEquatable<Actor>
|
||||||
=> ((CharacterArmor*)&AsCharacter->DrawData.Head)[slot.ToIndex()];
|
=> ((CharacterArmor*)&AsCharacter->DrawData.Head)[slot.ToIndex()];
|
||||||
|
|
||||||
public CharacterWeapon GetMainhand()
|
public CharacterWeapon GetMainhand()
|
||||||
=> *(CharacterWeapon*)&AsCharacter->DrawData.MainHandModel;
|
=> new(AsCharacter->DrawData.Weapon(DrawDataContainer.WeaponSlot.MainHand).ModelId.Value);
|
||||||
|
|
||||||
public CharacterWeapon GetOffhand()
|
public CharacterWeapon GetOffhand()
|
||||||
=> *(CharacterWeapon*)&AsCharacter->DrawData.OffHandModel;
|
=> new(AsCharacter->DrawData.Weapon(DrawDataContainer.WeaponSlot.OffHand).ModelId.Value);
|
||||||
|
|
||||||
public Customize GetCustomize()
|
public Customize GetCustomize()
|
||||||
=> *(Customize*)&AsCharacter->DrawData.CustomizeData;
|
=> *(Customize*)&AsCharacter->DrawData.CustomizeData;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
||||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
|
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
|
||||||
using Glamourer.Customization;
|
using Glamourer.Customization;
|
||||||
using Penumbra.GameData.Enums;
|
using Penumbra.GameData.Enums;
|
||||||
|
|
@ -143,14 +144,14 @@ public readonly unsafe struct Model : IEquatable<Model>
|
||||||
if (!Valid || !actor.IsCharacter || actor.Model.Address != Address)
|
if (!Valid || !actor.IsCharacter || actor.Model.Address != Address)
|
||||||
return (Null, Null, CharacterWeapon.Empty, CharacterWeapon.Empty);
|
return (Null, Null, CharacterWeapon.Empty, CharacterWeapon.Empty);
|
||||||
|
|
||||||
Model main = *((nint*)&actor.AsCharacter->DrawData.MainHand + 1);
|
Model main = actor.AsCharacter->DrawData.Weapon(DrawDataContainer.WeaponSlot.MainHand).DrawObject;
|
||||||
var mainData = CharacterWeapon.Empty;
|
var mainData = CharacterWeapon.Empty;
|
||||||
if (main.IsWeapon)
|
if (main.IsWeapon)
|
||||||
mainData = new CharacterWeapon(main.AsWeapon->ModelSetId, main.AsWeapon->SecondaryId, (Variant)main.AsWeapon->Variant,
|
mainData = new CharacterWeapon(main.AsWeapon->ModelSetId, main.AsWeapon->SecondaryId, (Variant)main.AsWeapon->Variant,
|
||||||
(StainId)main.AsWeapon->ModelUnknown);
|
(StainId)main.AsWeapon->ModelUnknown);
|
||||||
else
|
else
|
||||||
main = Null;
|
main = Null;
|
||||||
Model off = *((nint*)&actor.AsCharacter->DrawData.OffHand + 1);
|
Model off = actor.AsCharacter->DrawData.Weapon(DrawDataContainer.WeaponSlot.OffHand).DrawObject;
|
||||||
var offData = CharacterWeapon.Empty;
|
var offData = CharacterWeapon.Empty;
|
||||||
if (off.IsWeapon)
|
if (off.IsWeapon)
|
||||||
offData = new CharacterWeapon(off.AsWeapon->ModelSetId, off.AsWeapon->SecondaryId, (Variant)off.AsWeapon->Variant,
|
offData = new CharacterWeapon(off.AsWeapon->ModelSetId, off.AsWeapon->SecondaryId, (Variant)off.AsWeapon->Variant,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue