diff --git a/Glamourer/State/FunEquipSet.cs b/Glamourer/State/FunEquipSet.cs index 435262a..c2618b0 100644 --- a/Glamourer/State/FunEquipSet.cs +++ b/Glamourer/State/FunEquipSet.cs @@ -77,7 +77,8 @@ internal class FunEquipSet new Group(0000, 0, 0137, 1, 0000, 0, 0000, 0, 0000, 0), // Howling Spirit new Group(0000, 0, 0137, 2, 0000, 0, 0000, 0, 0000, 0), // Wailing Spirit new Group(0232, 1, 0232, 1, 0279, 1, 0232, 1, 0232, 1), // Eerie Attire - new Group(0232, 1, 6036, 1, 0279, 1, 0232, 1, 0232, 1) // Vampire + new Group(0232, 1, 6036, 1, 0279, 1, 0232, 1, 0232, 1), // Vampire + new Group(0505, 6, 0505, 6, 0505, 6, 0505, 6, 0505, 6) // Manusya Casting ); public static readonly FunEquipSet AprilFirst = new diff --git a/Glamourer/State/FunModule.cs b/Glamourer/State/FunModule.cs index 0bbbe49..06ed9ef 100644 --- a/Glamourer/State/FunModule.cs +++ b/Glamourer/State/FunModule.cs @@ -98,8 +98,16 @@ public unsafe class FunModule : IDisposable if (actor.AsCharacter->CharacterData.ModelCharaId != 0) return; - ApplyEmperor(new Span(ref armor), slot); - ApplyClown(new Span(ref armor)); + if (_config.DisableFestivals == 0 && _festivalSet != null + || _codes.EnabledWorld && actor.Index != 0) + { + armor = actor.Model.GetArmor(slot); + } + else + { + ApplyEmperor(new Span(ref armor), slot); + ApplyClown(new Span(ref armor)); + } } public void ApplyFun(Actor actor, Span armor, ref Customize customize) @@ -244,11 +252,12 @@ public unsafe class FunModule : IDisposable try { var tmp = _designManager.CreateTemporary(); - tmp.DesignData = _stateManager.FromActor(actor, true); + tmp.DesignData = _stateManager.FromActor(actor, true, true); tmp.FixCustomizeApplication(_customizations, CustomizeFlagExtensions.AllRelevant); var data = _designConverter.ShareBase64(tmp); ImGui.SetClipboardText(data); - Glamourer.Messager.NotificationMessage($"Copied current actual design of {actor.Utf8Name} to clipboard.", NotificationType.Info, false); + Glamourer.Messager.NotificationMessage($"Copied current actual design of {actor.Utf8Name} to clipboard.", NotificationType.Info, + false); } catch { diff --git a/Glamourer/State/StateListener.cs b/Glamourer/State/StateListener.cs index a99c690..6e1d060 100644 --- a/Glamourer/State/StateListener.cs +++ b/Glamourer/State/StateListener.cs @@ -468,7 +468,7 @@ public class StateListener : IDisposable // Always use the actor for the base data. var isHuman = _humans.IsHuman(modelId); if (isHuman) - state.BaseData = _manager.FromActor(actor, false); + state.BaseData = _manager.FromActor(actor, false, false); else state.BaseData.LoadNonHuman(modelId, *(Customize*)customizeData, equipData); diff --git a/Glamourer/State/StateManager.cs b/Glamourer/State/StateManager.cs index 07e4fc0..4a85112 100644 --- a/Glamourer/State/StateManager.cs +++ b/Glamourer/State/StateManager.cs @@ -83,8 +83,8 @@ public class StateManager : IReadOnlyDictionary // and the draw objects data for the model data (where possible). state = new ActorState(identifier) { - ModelData = FromActor(actor, true), - BaseData = FromActor(actor, false), + ModelData = FromActor(actor, true, false), + BaseData = FromActor(actor, false, false), LastJob = (byte)(actor.IsCharacter ? actor.AsCharacter->CharacterData.ClassJob : 0), LastTerritory = _clientState.TerritoryType, }; @@ -104,7 +104,7 @@ public class StateManager : IReadOnlyDictionary /// This uses the draw object if available and where possible, /// and the game object where necessary. /// - public unsafe DesignData FromActor(Actor actor, bool useModel) + public unsafe DesignData FromActor(Actor actor, bool useModel, bool ignoreHatState) { var ret = new DesignData(); // If the given actor is not a character, just return a default character. @@ -143,7 +143,7 @@ public class StateManager : IReadOnlyDictionary ret.Customize = model.GetCustomize(); // We can not use the head slot data from the draw object if the hat is hidden. - var head = ret.IsHatVisible() ? model.GetArmor(EquipSlot.Head) : actor.GetArmor(EquipSlot.Head); + var head = ret.IsHatVisible() || ignoreHatState ? model.GetArmor(EquipSlot.Head) : actor.GetArmor(EquipSlot.Head); var headItem = _items.Identify(EquipSlot.Head, head.Set, head.Variant); ret.SetItem(EquipSlot.Head, headItem); ret.SetStain(EquipSlot.Head, head.Stain);