Changed lower content id to full content id
This commit is contained in:
@@ -429,7 +429,7 @@ namespace PlayerTags.GameInterface.ContextMenus
|
||||
else
|
||||
{
|
||||
var agentContext = (AgentContext*)agent;
|
||||
if (agentContext->GameObjectLowerContentId != 0 || agentContext->GameObjectWorldId != 0)
|
||||
if (agentContext->GameObjectContentId != 0 || agentContext->GameObjectWorldId != 0)
|
||||
{
|
||||
SeString objectName;
|
||||
unsafe
|
||||
@@ -437,7 +437,7 @@ namespace PlayerTags.GameInterface.ContextMenus
|
||||
objectName = GameInterfaceHelper.ReadSeString((IntPtr)agentContext->ObjectName.StringPtr);
|
||||
}
|
||||
|
||||
gameObjectContext = new GameObjectContext(agentContext->GameObjectId, agentContext->GameObjectLowerContentId, objectName, agentContext->GameObjectWorldId);
|
||||
gameObjectContext = new GameObjectContext(agentContext->GameObjectId, agentContext->GameObjectContentId, objectName, agentContext->GameObjectWorldId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ namespace PlayerTags.GameInterface.ContextMenus
|
||||
{
|
||||
PluginLog.Debug($"ContextMenuItemSelectedImplementation");
|
||||
|
||||
if (m_CurrentContextMenuOpenedArgs == null)
|
||||
if (m_CurrentContextMenuOpenedArgs == null || selectedIndex == -1)
|
||||
{
|
||||
m_CurrentContextMenuOpenedArgs = null;
|
||||
m_CurrentSelectedItem = null;
|
||||
@@ -508,8 +508,12 @@ namespace PlayerTags.GameInterface.ContextMenus
|
||||
ContextMenuReaderWriter contextMenuReaderWriter = new ContextMenuReaderWriter(m_CurrentContextMenuAgent, addonContext->AtkValuesCount, addonContext->AtkValues);
|
||||
var gameContextMenuItems = contextMenuReaderWriter.Read();
|
||||
var gameSelectedItem = gameContextMenuItems.ElementAtOrDefault(selectedIndex);
|
||||
|
||||
// This should be impossible
|
||||
if (gameSelectedItem == null)
|
||||
{
|
||||
m_CurrentContextMenuOpenedArgs = null;
|
||||
m_CurrentSelectedItem = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace FFXIVClientStructs.FFXIV.Client.UI.Agent
|
||||
[FieldOffset(0xD08)] public byte* SubContextMenuTitle;
|
||||
[FieldOffset(0xD18)] public unsafe AgentContextItemData* ItemData;
|
||||
[FieldOffset(0xE08)] public Utf8String ObjectName;
|
||||
[FieldOffset(0xEE0)] public uint GameObjectLowerContentId;
|
||||
[FieldOffset(0xEE0)] public ulong GameObjectContentId;
|
||||
[FieldOffset(0xEF0)] public uint GameObjectId;
|
||||
[FieldOffset(0xF00)] public ushort GameObjectWorldId;
|
||||
[FieldOffset(0x1740)] public bool IsSubContextMenu;
|
||||
|
||||
@@ -13,9 +13,9 @@ namespace PlayerTags.GameInterface.ContextMenus
|
||||
public uint Id { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The lower content id of the game object.
|
||||
/// The content id of the game object.
|
||||
/// </summary>
|
||||
public uint LowerContentId { get; }
|
||||
public ulong ContentId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of the game object.
|
||||
@@ -31,13 +31,13 @@ namespace PlayerTags.GameInterface.ContextMenus
|
||||
/// Initializes a new instance of the <see cref="GameObjectContext"/> class.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the game object.</param>
|
||||
/// <param name="lowerContentId">The lower content id of the game object.</param>
|
||||
/// <param name="contentId">The lower content id of the game object.</param>
|
||||
/// <param name="name">The name of the game object.</param>
|
||||
/// <param name="worldId">The world id of the game object.</param>
|
||||
public GameObjectContext(uint id, uint lowerContentId, SeString name, ushort worldId)
|
||||
public GameObjectContext(uint id, ulong contentId, SeString name, ushort worldId)
|
||||
{
|
||||
Id = id;
|
||||
LowerContentId = lowerContentId;
|
||||
ContentId = contentId;
|
||||
Name = name;
|
||||
WorldId = worldId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user