Merge pull request #36
* Close item tooltip with event to support Dalamud HandleItemOut hook * Greatly simplify tooltip close event logic
This commit is contained in:
@@ -204,13 +204,11 @@ internal unsafe class GameFunctions : IDisposable
|
|||||||
var agent = Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.ItemDetail);
|
var agent = Framework.Instance()->GetUiModule()->GetAgentModule()->GetAgentByInternalId(AgentId.ItemDetail);
|
||||||
if (agent != null)
|
if (agent != null)
|
||||||
{
|
{
|
||||||
Plugin.Log.Information("close and clean was called");
|
var eventData = stackalloc AtkValue[1];
|
||||||
agent->Hide();
|
var atkValues = stackalloc AtkValue[1];
|
||||||
|
atkValues->Type = ValueType.Int;
|
||||||
// The game sets them to 0 whenever tooltips aren't hovered anymore
|
atkValues->Int = -1;
|
||||||
var agentPtr = (nint)agent;
|
agent->ReceiveEvent(eventData, atkValues, 1, 1);
|
||||||
*(uint*) (agentPtr + 0x138) = 0;
|
|
||||||
*(uint*) (agentPtr + 0x13C) = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user