diff --git a/Dalamud/Game/ClientState/Conditions/Condition.cs b/Dalamud/Game/ClientState/Conditions/Condition.cs index 6f61ab246..99748f71b 100644 --- a/Dalamud/Game/ClientState/Conditions/Condition.cs +++ b/Dalamud/Game/ClientState/Conditions/Condition.cs @@ -18,7 +18,7 @@ internal sealed class Condition : IInternalDisposableService, ICondition /// /// Gets the current max number of conditions. You can get this just by looking at the condition sheet and how many rows it has. /// - internal const int MaxConditionEntries = 112; + internal const int MaxConditionEntries = 104; [ServiceManager.ServiceDependency] private readonly Framework framework = Service.Get(); diff --git a/Dalamud/Game/ClientState/Conditions/ConditionFlag.cs b/Dalamud/Game/ClientState/Conditions/ConditionFlag.cs index b5894d891..19451dd5c 100644 --- a/Dalamud/Game/ClientState/Conditions/ConditionFlag.cs +++ b/Dalamud/Game/ClientState/Conditions/ConditionFlag.cs @@ -520,17 +520,4 @@ public enum ConditionFlag PilotingMech = 102, // Unknown103 = 103, - - /// - /// Unable to execute command while editing a strategy board. - /// - EditingStrategyBoard = 104, - - // Unknown105 = 105, - // Unknown106 = 106, - // Unknown107 = 107, - // Unknown108 = 108, - // Unknown109 = 109, - // Unknown110 = 110, - // Unknown111 = 111, } diff --git a/Dalamud/Game/Gui/ContextMenu/ContextMenu.cs b/Dalamud/Game/Gui/ContextMenu/ContextMenu.cs index aada374ec..7512f4160 100644 --- a/Dalamud/Game/Gui/ContextMenu/ContextMenu.cs +++ b/Dalamud/Game/Gui/ContextMenu/ContextMenu.cs @@ -31,7 +31,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM private static readonly ModuleLog Log = new("ContextMenu"); private readonly Hook atkModuleVf22OpenAddonByAgentHook; - private readonly Hook addonContextMenuOnMenuSelectedHook; + private readonly Hook addonContextMenuOnMenuSelectedHook; private uint? addonContextSubNameId; @@ -40,7 +40,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM { var raptureAtkModuleVtable = (nint*)RaptureAtkModule.StaticVirtualTablePointer; this.atkModuleVf22OpenAddonByAgentHook = Hook.FromAddress(raptureAtkModuleVtable[22], this.AtkModuleVf22OpenAddonByAgentDetour); - this.addonContextMenuOnMenuSelectedHook = Hook.FromAddress((nint)AddonContextMenu.StaticVirtualTablePointer->OnMenuSelected, this.AddonContextMenuOnMenuSelectedDetour); + this.addonContextMenuOnMenuSelectedHook = Hook.FromAddress((nint)AddonContextMenu.StaticVirtualTablePointer->OnMenuSelected, this.AddonContextMenuOnMenuSelectedDetour); this.atkModuleVf22OpenAddonByAgentHook.Enable(); this.addonContextMenuOnMenuSelectedHook.Enable(); @@ -48,6 +48,10 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM private delegate ushort AtkModuleVf22OpenAddonByAgentDelegate(AtkModule* module, byte* addonName, int valueCount, AtkValue* values, AgentInterface* agent, nint a7, bool a8); + private delegate bool AddonContextMenuOnMenuSelectedDelegate(AddonContextMenu* addon, int selectedIdx, byte a3); + + private delegate ushort RaptureAtkModuleOpenAddonDelegate(RaptureAtkModule* a1, uint addonNameId, uint valueCount, AtkValue* values, AgentInterface* parentAgent, ulong unk, ushort parentAddonId, int unk2); + /// public event IContextMenu.OnMenuOpenedDelegate? OnMenuOpened; @@ -181,7 +185,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM values[0].ChangeType(ValueType.UInt); values[0].UInt = 0; values[1].ChangeType(ValueType.String); - values[1].SetManagedString(name.EncodeWithNullTerminator()); + values[1].SetManagedString(name.Encode().NullTerminate()); values[2].ChangeType(ValueType.Int); values[2].Int = x; values[3].ChangeType(ValueType.Int); @@ -261,7 +265,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM submenuMask |= 1u << i; nameData[i].ChangeType(ValueType.String); - nameData[i].SetManagedString(this.GetPrefixedName(item).EncodeWithNullTerminator()); + nameData[i].SetManagedString(this.GetPrefixedName(item).Encode().NullTerminate()); } for (var i = 0; i < prefixMenuSize; ++i) @@ -291,9 +295,8 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM // 2: UInt = Return Mask (?) // 3: UInt = Submenu Mask // 4: UInt = OpenAtCursorPosition ? 2 : 1 - // 5: UInt = ? - // 6: UInt = ? - // 7: UInt = ? + // 5: UInt = 0 + // 6: UInt = 0 foreach (var item in items) { @@ -309,7 +312,7 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM } } - this.SetupGenericMenu(8, 0, 2, 3, items, ref valueCount, ref values); + this.SetupGenericMenu(7, 0, 2, 3, items, ref valueCount, ref values); } private void SetupContextSubMenu(IReadOnlyList items, ref int valueCount, ref AtkValue* values) diff --git a/Dalamud/Game/Gui/HoverActionKind.cs b/Dalamud/Game/Gui/HoverActionKind.cs index b786f12ee..ef8fe6400 100644 --- a/Dalamud/Game/Gui/HoverActionKind.cs +++ b/Dalamud/Game/Gui/HoverActionKind.cs @@ -14,145 +14,140 @@ public enum HoverActionKind /// /// A regular action is hovered. /// - Action = 29, + Action = 28, /// /// A crafting action is hovered. /// - CraftingAction = 30, + CraftingAction = 29, /// /// A general action is hovered. /// - GeneralAction = 31, + GeneralAction = 30, /// /// A companion order type of action is hovered. /// - CompanionOrder = 32, // Game Term: BuddyOrder + CompanionOrder = 31, // Game Term: BuddyOrder /// /// A main command type of action is hovered. /// - MainCommand = 33, + MainCommand = 32, /// /// An extras command type of action is hovered. /// - ExtraCommand = 34, + ExtraCommand = 33, /// /// A companion action is hovered. /// - Companion = 35, + Companion = 34, /// /// A pet order type of action is hovered. /// - PetOrder = 36, + PetOrder = 35, /// /// A trait is hovered. /// - Trait = 37, + Trait = 36, /// /// A buddy action is hovered. /// - BuddyAction = 38, + BuddyAction = 37, /// /// A company action is hovered. /// - CompanyAction = 39, + CompanyAction = 38, /// /// A mount is hovered. /// - Mount = 40, + Mount = 39, /// /// A chocobo race action is hovered. /// - ChocoboRaceAction = 41, + ChocoboRaceAction = 40, /// /// A chocobo race item is hovered. /// - ChocoboRaceItem = 42, + ChocoboRaceItem = 41, /// /// A deep dungeon equipment is hovered. /// - DeepDungeonEquipment = 43, + DeepDungeonEquipment = 42, /// /// A deep dungeon equipment 2 is hovered. /// - DeepDungeonEquipment2 = 44, + DeepDungeonEquipment2 = 43, /// /// A deep dungeon item is hovered. /// - DeepDungeonItem = 45, + DeepDungeonItem = 44, /// /// A quick chat is hovered. /// - QuickChat = 46, + QuickChat = 45, /// /// An action combo route is hovered. /// - ActionComboRoute = 47, + ActionComboRoute = 46, /// /// A pvp trait is hovered. /// - PvPSelectTrait = 48, + PvPSelectTrait = 47, /// /// A squadron action is hovered. /// - BgcArmyAction = 49, + BgcArmyAction = 48, /// /// A perform action is hovered. /// - Perform = 50, + Perform = 49, /// /// A deep dungeon magic stone is hovered. /// - DeepDungeonMagicStone = 51, + DeepDungeonMagicStone = 50, /// /// A deep dungeon demiclone is hovered. /// - DeepDungeonDemiclone = 52, + DeepDungeonDemiclone = 51, /// /// An eureka magia action is hovered. /// - EurekaMagiaAction = 53, + EurekaMagiaAction = 52, /// /// An island sanctuary temporary item is hovered. /// - MYCTemporaryItem = 54, + MYCTemporaryItem = 53, /// /// An ornament is hovered. /// - Ornament = 55, + Ornament = 54, /// /// Glasses are hovered. /// - Glasses = 56, - - /// - /// Phantom Job Trait is hovered. - /// - MKDTrait = 58, + Glasses = 55, } diff --git a/lib/FFXIVClientStructs b/lib/FFXIVClientStructs index 305c1629e..995e14fc2 160000 --- a/lib/FFXIVClientStructs +++ b/lib/FFXIVClientStructs @@ -1 +1 @@ -Subproject commit 305c1629eed0b1cdca5efb102e37de93d592d155 +Subproject commit 995e14fc2c4cf2060aa138aef60f639f374832dc