4
4
using Dalamud . Utility ;
5
5
using Dalamud . Utility . Signatures ;
6
6
using FFXIVClientStructs . FFXIV . Client . Game . UI ;
7
- using FFXIVClientStructs . FFXIV . Client . System . Framework ;
8
7
using FFXIVClientStructs . FFXIV . Client . System . Memory ;
8
+ using FFXIVClientStructs . FFXIV . Client . UI ;
9
9
using FFXIVClientStructs . FFXIV . Component . GUI ;
10
10
using Lumina . Excel . GeneratedSheets ;
11
11
using SimpleTweaksPlugin . Events ;
@@ -36,13 +36,13 @@ public DutyFinderSettingDisplay(DutyFinderSetting setting, int icon, uint toolti
36
36
private SimpleEvent eventManager ;
37
37
38
38
private void HideTooltip ( AtkUnitBase * unitBase ) {
39
- AtkStage . GetSingleton ( ) ->TooltipManager . HideTooltip ( unitBase ->ID ) ;
39
+ AtkStage . Instance ( ) ->TooltipManager . HideTooltip ( unitBase ->Id ) ;
40
40
}
41
41
42
42
private void ShowTooltip ( AtkUnitBase * unitBase , AtkResNode * node ) {
43
43
var tooltipId = GetTooltip ( ) ;
44
44
var tooltip = Service . Data . GetExcelSheet < Addon > ( ) ? . GetRow ( tooltipId ) ? . Text . ToDalamudString ( ) ? . TextValue ?? $ "{ Setting } ";
45
- AtkStage . GetSingleton ( ) ->TooltipManager . ShowTooltip ( unitBase ->ID , node , tooltip ) ;
45
+ AtkStage . Instance ( ) ->TooltipManager . ShowTooltip ( unitBase ->Id , node , tooltip ) ;
46
46
}
47
47
48
48
public SimpleEvent Event {
@@ -128,9 +128,9 @@ private void SetupAddon(AtkUnitBase* unitBase) {
128
128
var container = IMemorySpace . GetUISpace ( ) ->Create < AtkResNode > ( ) ;
129
129
container ->SetWidth ( defaultContainer ->GetWidth ( ) ) ;
130
130
container ->SetHeight ( defaultContainer ->GetHeight ( ) ) ;
131
- container ->SetPositionFloat ( defaultContainer ->GetX ( ) , defaultContainer ->GetY ( ) ) ;
131
+ container ->SetPositionFloat ( defaultContainer ->GetXFloat ( ) , defaultContainer ->GetYFloat ( ) ) ;
132
132
container ->SetScale ( 1 , 1 ) ;
133
- container ->NodeID = CustomNodes . Get ( $ "{ nameof ( ImprovedDutyFinderSettings ) } _Container") ;
133
+ container ->NodeId = CustomNodes . Get ( $ "{ nameof ( ImprovedDutyFinderSettings ) } _Container") ;
134
134
container ->Type = NodeType . Res ;
135
135
container ->ToggleVisibility ( true ) ;
136
136
UiHelper . LinkNodeAfterTargetNode ( container , unitBase , defaultContainer ) ;
@@ -144,7 +144,7 @@ private void SetupAddon(AtkUnitBase* unitBase) {
144
144
var imgNode = UiHelper . MakeImageNode ( CustomNodes . Get ( $ "{ nameof ( ImprovedDutyFinderSettings ) } _Icon_{ settingDetail . Setting } ") , new UiHelper . PartInfo ( 0 , 0 , 24 , 24 ) ) ;
145
145
UiHelper . LinkNodeAtEnd ( imgNode , container , unitBase ) ;
146
146
147
- imgNode ->AtkResNode . SetPositionFloat ( basedOn ->GetX ( ) , basedOn ->GetY ( ) ) ;
147
+ imgNode ->AtkResNode . SetPositionFloat ( basedOn ->GetXFloat ( ) , basedOn ->GetYFloat ( ) ) ;
148
148
imgNode ->AtkResNode . SetWidth ( basedOn ->GetWidth ( ) ) ;
149
149
imgNode ->AtkResNode . SetHeight ( basedOn ->GetHeight ( ) ) ;
150
150
@@ -290,7 +290,7 @@ private enum DutyFinderSetting {
290
290
LimitedLevelingRoulette = 11 ,
291
291
}
292
292
293
- [ Signature ( "E8 ?? ?? ?? ?? 48 8B 07 33 F6 " ) ]
293
+ [ Signature ( "E8 ?? ?? ?? ?? 49 8B 06 33 ED " ) ]
294
294
private static delegate * unmanaged< byte * , nint , void > _setContentsFinderSettings ;
295
295
296
296
private static byte GetCurrentSettingValue ( DutyFinderSetting dutyFinderSetting ) {
@@ -314,8 +314,8 @@ private static byte GetCurrentSettingValue(DutyFinderSetting dutyFinderSetting)
314
314
315
315
private void ToggleSetting ( DutyFinderSetting setting ) {
316
316
// block setting change if queued for a duty
317
- if ( Service . Condition [ ConditionFlag . BoundToDuty97 ] ) {
318
- var condition = Service. Data . GetExcelSheet < Lumina . Excel . GeneratedSheets . Condition > ( ) ? . GetRow ( ( uint ) ConditionFlag . BoundToDuty97 ) ? . LogMessage ? . Value ? . Text ? . ToDalamudString ( ) ;
317
+ if ( Service . Condition [ ConditionFlag . InDutyQueue ] ) {
318
+ var condition = Service. Data . GetExcelSheet < Condition > ( ) ? . GetRow ( ( uint ) ConditionFlag . InDutyQueue ) ? . LogMessage ? . Value ? . Text ? . ToDalamudString ( ) ;
319
319
Service . Toasts . ShowError ( condition ?? "Unable to execute command while bound by duty." ) ;
320
320
return ;
321
321
}
@@ -348,7 +348,7 @@ private void ToggleSetting(DutyFinderSetting setting) {
348
348
}
349
349
350
350
fixed ( byte * arrayPtr = array ) {
351
- _setContentsFinderSettings ( arrayPtr , ( nint ) Framework . Instance ( ) -> GetUiModule ( ) ) ;
351
+ _setContentsFinderSettings ( arrayPtr , ( nint ) UIModule . Instance ( ) ) ;
352
352
}
353
353
}
354
354
0 commit comments