mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-19 14:07:43 +01:00
tmp
This commit is contained in:
parent
a40b710d25
commit
89f2e78690
7 changed files with 43 additions and 24 deletions
|
|
@ -5,6 +5,7 @@ using Glamourer.Interop.Penumbra;
|
|||
using Glamourer.Interop.Structs;
|
||||
using Glamourer.Services;
|
||||
using Penumbra.Api.Enums;
|
||||
using Penumbra.GameData.Actors;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Structs;
|
||||
|
||||
|
|
@ -69,9 +70,7 @@ public class StateApplier
|
|||
|
||||
var flags = Customize.Compare(mdl.GetCustomize(), customize);
|
||||
if (!flags.RequiresRedraw() || !mdl.IsHuman)
|
||||
{
|
||||
_changeCustomize.UpdateCustomize(mdl, customize.Data);
|
||||
}
|
||||
else
|
||||
_penumbra.RedrawObject(actor, RedrawType.Redraw);
|
||||
}
|
||||
|
|
@ -165,11 +164,15 @@ public class StateApplier
|
|||
}
|
||||
|
||||
/// <inheritdoc cref="ChangeWeapon(ActorData,EquipSlot,EquipItem,StainId)"/>
|
||||
public ActorData ChangeWeapon(ActorState state, EquipSlot slot, bool apply)
|
||||
public ActorData ChangeWeapon(ActorState state, EquipSlot slot, bool apply, bool onlyGPose)
|
||||
{
|
||||
var data = GetData(state);
|
||||
if (apply)
|
||||
{
|
||||
if (onlyGPose)
|
||||
data.Objects.RemoveAll(a => a.Index is < (int)ScreenActor.GPosePlayer or >= (int)ScreenActor.CutsceneEnd);
|
||||
ChangeWeapon(data, slot, state.ModelData.Item(slot), state.ModelData.Stain(slot));
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
@ -185,11 +188,15 @@ public class StateApplier
|
|||
}
|
||||
|
||||
/// <inheritdoc cref="ChangeMainhand(ActorData,EquipItem,StainId)"/>
|
||||
public ActorData ChangeMainhand(ActorState state, bool apply)
|
||||
public ActorData ChangeMainhand(ActorState state, bool apply, bool onlyGPose)
|
||||
{
|
||||
var data = GetData(state);
|
||||
if (apply)
|
||||
{
|
||||
if (onlyGPose)
|
||||
data.Objects.RemoveAll(a => a.Index is < (int)ScreenActor.GPosePlayer or >= (int)ScreenActor.CutsceneEnd);
|
||||
ChangeMainhand(data, state.ModelData.Item(EquipSlot.MainHand), state.ModelData.Stain(EquipSlot.MainHand));
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
@ -203,11 +210,16 @@ public class StateApplier
|
|||
}
|
||||
|
||||
/// <inheritdoc cref="ChangeOffhand(ActorData,EquipItem,StainId)"/>
|
||||
public ActorData ChangeOffhand(ActorState state, bool apply)
|
||||
public ActorData ChangeOffhand(ActorState state, bool apply, bool onlyGPose)
|
||||
{
|
||||
var data = GetData(state);
|
||||
if (apply)
|
||||
{
|
||||
if (onlyGPose)
|
||||
data.Objects.RemoveAll(a => a.Index is < (int)ScreenActor.GPosePlayer or >= (int)ScreenActor.CutsceneEnd);
|
||||
ChangeOffhand(data, state.ModelData.Item(EquipSlot.OffHand), state.ModelData.Stain(EquipSlot.OffHand));
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue