mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 04:34:19 +01:00
Some cleanup
This commit is contained in:
parent
80edfe7804
commit
fee3f500c5
3 changed files with 17 additions and 8 deletions
|
|
@ -104,9 +104,10 @@ public readonly unsafe struct CharacterEquip
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Write( IntPtr target )
|
|
||||||
|
public void Load( CharacterEquip source )
|
||||||
{
|
{
|
||||||
Functions.MemCpyUnchecked( ( void* )target, _armor, sizeof( CharacterArmor ) * 10 );
|
Functions.MemCpyUnchecked( _armor, source._armor, sizeof( CharacterArmor ) * 10 );
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Equals( CharacterEquip other )
|
public bool Equals( CharacterEquip other )
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,14 @@ public readonly struct CharacterWeapon : IEquatable< CharacterWeapon >
|
||||||
Stain = stain;
|
Stain = stain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CharacterWeapon( ulong value )
|
||||||
|
{
|
||||||
|
Set = ( SetId )value;
|
||||||
|
Type = ( WeaponType )( value >> 16 );
|
||||||
|
Variant = ( ushort )( value >> 32 );
|
||||||
|
Stain = ( StainId )( value >> 48 );
|
||||||
|
}
|
||||||
|
|
||||||
public static readonly CharacterWeapon Empty = new(0, 0, 0, 0);
|
public static readonly CharacterWeapon Empty = new(0, 0, 0, 0);
|
||||||
|
|
||||||
public bool Equals( CharacterWeapon other )
|
public bool Equals( CharacterWeapon other )
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ public unsafe partial class PathResolver
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
ret = _loadTimelineResourcesHook!.Original( timeline );
|
ret = _loadTimelineResourcesHook.Original( timeline );
|
||||||
}
|
}
|
||||||
|
|
||||||
_animationLoadCollection = old;
|
_animationLoadCollection = old;
|
||||||
|
|
@ -145,7 +145,7 @@ public unsafe partial class PathResolver
|
||||||
var last = _animationLoadCollection;
|
var last = _animationLoadCollection;
|
||||||
_animationLoadCollection = _drawObjectState.LastCreatedCollection
|
_animationLoadCollection = _drawObjectState.LastCreatedCollection
|
||||||
?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
?? ( FindParent( drawObject, out var collection ) != null ? collection : Penumbra.CollectionManager.Default );
|
||||||
_characterBaseLoadAnimationHook!.Original( drawObject );
|
_characterBaseLoadAnimationHook.Original( drawObject );
|
||||||
_animationLoadCollection = last;
|
_animationLoadCollection = last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -159,7 +159,7 @@ public unsafe partial class PathResolver
|
||||||
{
|
{
|
||||||
var last = _animationLoadCollection;
|
var last = _animationLoadCollection;
|
||||||
_animationLoadCollection = IdentifyCollection( ( GameObject* )gameObject );
|
_animationLoadCollection = IdentifyCollection( ( GameObject* )gameObject );
|
||||||
var ret = _loadSomeAvfxHook!.Original( a1, gameObject, gameObject2, unk1, unk2, unk3 );
|
var ret = _loadSomeAvfxHook.Original( a1, gameObject, gameObject2, unk1, unk2, unk3 );
|
||||||
_animationLoadCollection = last;
|
_animationLoadCollection = last;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
@ -184,7 +184,7 @@ public unsafe partial class PathResolver
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_loadSomePapHook!.Original( a1, a2, a3, a4 );
|
_loadSomePapHook.Original( a1, a2, a3, a4 );
|
||||||
_animationLoadCollection = last;
|
_animationLoadCollection = last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -196,7 +196,7 @@ public unsafe partial class PathResolver
|
||||||
{
|
{
|
||||||
var last = _animationLoadCollection;
|
var last = _animationLoadCollection;
|
||||||
_animationLoadCollection = IdentifyCollection( ( GameObject* )gameObject );
|
_animationLoadCollection = IdentifyCollection( ( GameObject* )gameObject );
|
||||||
_someActionLoadHook!.Original( gameObject );
|
_someActionLoadHook.Original( gameObject );
|
||||||
_animationLoadCollection = last;
|
_animationLoadCollection = last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -208,7 +208,7 @@ public unsafe partial class PathResolver
|
||||||
var last = _animationLoadCollection;
|
var last = _animationLoadCollection;
|
||||||
var gameObject = ( GameObject* )( unk - 0x8B0 );
|
var gameObject = ( GameObject* )( unk - 0x8B0 );
|
||||||
_animationLoadCollection = IdentifyCollection( gameObject );
|
_animationLoadCollection = IdentifyCollection( gameObject );
|
||||||
_someOtherAvfxHook!.Original( unk );
|
_someOtherAvfxHook.Original( unk );
|
||||||
_animationLoadCollection = last;
|
_animationLoadCollection = last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue