fix(ui): restore retail vitals and window interactions
This commit is contained in:
parent
4d84456c21
commit
1bd2b30291
36 changed files with 1462 additions and 86 deletions
|
|
@ -132,9 +132,12 @@ public sealed class CursorFeedbackController
|
|||
// found flag driving the Default/Combat/Use/Examine/Busy Found
|
||||
// variants too.
|
||||
RetailCursorTargetMode targetMode = ModeFromInteraction(_itemInteraction);
|
||||
uint hoverTarget = hover is null
|
||||
? _worldTargetProvider?.Invoke() ?? 0u
|
||||
: FindHoveredItemSlot(hover)?.ItemId ?? 0u;
|
||||
UiItemSlot? hoveredItem = FindHoveredItemSlot(hover);
|
||||
uint hoverTarget = hoveredItem is not null
|
||||
? hoveredItem.ItemId
|
||||
: FindRepresentedObject(hover) is { } represented
|
||||
? represented
|
||||
: _worldTargetProvider?.Invoke() ?? 0u;
|
||||
bool? hoverTargetCompatible = targetMode == RetailCursorTargetMode.UseTarget
|
||||
&& hoverTarget != 0
|
||||
? _itemInteraction?.IsCurrentTargetCompatible(hoverTarget)
|
||||
|
|
@ -377,4 +380,19 @@ public sealed class CursorFeedbackController
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static uint? FindRepresentedObject(UiElement? element)
|
||||
{
|
||||
while (element is not null)
|
||||
{
|
||||
if (element.FoundObjectGuidProvider is { } provider)
|
||||
{
|
||||
uint guid = provider();
|
||||
if (guid != 0u)
|
||||
return guid;
|
||||
}
|
||||
element = element.Parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue