mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-14 20:54:17 +01:00
Try to handle transformations a bit better, maybe.
This commit is contained in:
parent
8b8b14f2b6
commit
30c5cd0bdb
4 changed files with 45 additions and 23 deletions
|
|
@ -92,10 +92,7 @@ public unsafe class FunModule : IDisposable
|
|||
|
||||
public void ApplyFun(Actor actor, ref CharacterArmor armor, EquipSlot slot)
|
||||
{
|
||||
if (!actor.IsCharacter || actor.AsObject->ObjectKind is not (byte)ObjectKind.Player)
|
||||
return;
|
||||
|
||||
if (actor.AsCharacter->CharacterData.ModelCharaId != 0)
|
||||
if (!ValidFunTarget(actor))
|
||||
return;
|
||||
|
||||
if (_config.DisableFestivals == 0 && _festivalSet != null
|
||||
|
|
@ -112,10 +109,7 @@ public unsafe class FunModule : IDisposable
|
|||
|
||||
public void ApplyFun(Actor actor, Span<CharacterArmor> armor, ref Customize customize)
|
||||
{
|
||||
if (!actor.IsCharacter || actor.AsObject->ObjectKind is not (byte)ObjectKind.Player)
|
||||
return;
|
||||
|
||||
if (actor.AsCharacter->CharacterData.ModelCharaId != 0)
|
||||
if (!ValidFunTarget(actor))
|
||||
return;
|
||||
|
||||
if (_config.DisableFestivals == 0 && _festivalSet != null)
|
||||
|
|
@ -140,16 +134,19 @@ public unsafe class FunModule : IDisposable
|
|||
|
||||
public void ApplyFun(Actor actor, ref CharacterWeapon weapon, EquipSlot slot)
|
||||
{
|
||||
if (!actor.IsCharacter || actor.AsObject->ObjectKind is not (byte)ObjectKind.Player)
|
||||
return;
|
||||
|
||||
if (actor.AsCharacter->CharacterData.ModelCharaId != 0)
|
||||
if (!ValidFunTarget(actor))
|
||||
return;
|
||||
|
||||
if (_codes.EnabledWorld)
|
||||
_worldSets.Apply(actor, _rng, ref weapon, slot);
|
||||
}
|
||||
|
||||
private static bool ValidFunTarget(Actor actor)
|
||||
=> actor.IsCharacter
|
||||
&& actor.AsObject->ObjectKind is (byte)ObjectKind.Player
|
||||
&& !actor.IsTransformed
|
||||
&& actor.AsCharacter->CharacterData.ModelCharaId == 0;
|
||||
|
||||
public void ApplyClown(Span<CharacterArmor> armors)
|
||||
{
|
||||
if (!_codes.EnabledClown)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue