Code cleanup
This commit is contained in:
@@ -353,7 +353,7 @@ namespace PlayerTags.GameInterface.ContextMenus
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// The important things to make this work are:
|
||||
// 1. Allocate a temporary sub context menu title. The value doesn't matter, we'll set it later.
|
||||
// 2. Context menu item count must equal 1 to tell the game there is enough space for the "< Return" item.
|
||||
@@ -383,6 +383,9 @@ namespace PlayerTags.GameInterface.ContextMenus
|
||||
var atkValues = &agentContext->ItemData->AtkValues;
|
||||
atkValues[0].UInt = 1;
|
||||
|
||||
// This isn't needed by the game, it's needed by ContextMenuReaderWriter which uses this to check if it's a context menu
|
||||
m_AtkValueChangeType(&atkValues[1], FFXIVClientStructs.FFXIV.Component.GUI.ValueType.String);
|
||||
|
||||
ContextMenuReaderWriter contextMenuReaderWriter = new ContextMenuReaderWriter(agent, agentContext->ItemData->AtkValuesCount, atkValues);
|
||||
*(&agentContext->ItemData->AtkValuesCount) = (ushort)contextMenuReaderWriter.FirstContextMenuItemIndex;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace PlayerTags.GameInterface.ContextMenus
|
||||
|| (int)m_AtkValues[1].Type == 38
|
||||
|| m_AtkValues[1].Type == FFXIVClientStructs.FFXIV.Component.GUI.ValueType.String;
|
||||
|
||||
return isStringType && m_AtkValues[1].Int != 0;
|
||||
return isStringType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user