File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public void Execute(Actor player, Actor master)
36
36
return ;
37
37
38
38
// keep master in focus
39
- FocusMaster ( master ) ;
39
+ // FocusMaster(master);
40
40
41
41
_afkMode = ! master . InCombat && ( _autorot . WorldState . CurrentTime - _masterLastMoved ) . TotalSeconds > 10 ;
42
42
bool forbidActions = _forbidActions || _ctrl . IsMounted || _afkMode || _autorot . ClassActions == null || _autorot . ClassActions . AutoAction >= CommonActions . AutoActionFirstCustom ;
Original file line number Diff line number Diff line change @@ -9,12 +9,13 @@ namespace BossMod.AI
9
9
{
10
10
class AIManager : IDisposable
11
11
{
12
- private Autorotation _autorot ;
12
+ public Autorotation _autorot ;
13
13
private AIController _controller ;
14
14
private AIConfig _config ;
15
15
private int _masterSlot = PartyState . PlayerSlot ; // non-zero means corresponding player is master
16
16
private AIBehaviour ? _beh ;
17
17
private UISimpleWindow _ui ;
18
+ public bool _nft = false ;
18
19
19
20
public AIManager ( Autorotation autorot )
20
21
{
@@ -71,7 +72,7 @@ private void DrawOverlay()
71
72
}
72
73
}
73
74
74
- private void SwitchToIdle ( )
75
+ public void SwitchToIdle ( )
75
76
{
76
77
_beh ? . Dispose ( ) ;
77
78
_beh = null ;
@@ -80,7 +81,7 @@ private void SwitchToIdle()
80
81
_controller . Clear ( ) ;
81
82
}
82
83
83
- private void SwitchToFollow ( int masterSlot )
84
+ public void SwitchToFollow ( int masterSlot )
84
85
{
85
86
SwitchToIdle ( ) ;
86
87
_masterSlot = masterSlot ;
Original file line number Diff line number Diff line change @@ -161,6 +161,23 @@ private void OnCommand(string cmd, string args)
161
161
case "r" :
162
162
_wndReplay . SetVisible ( ! _wndReplay . IsOpen ) ;
163
163
break ;
164
+ case "aion" :
165
+ //turn ai on
166
+ var leader = Service . PartyList [ ( int ) Service . PartyList . PartyLeaderIndex ] ;
167
+ int leaderSlot = leader != null ? _ai . _autorot . WorldState . Party . ContentIDs . IndexOf ( ( ulong ) leader . ContentId ) : - 1 ;
168
+ _ai . SwitchToFollow ( leaderSlot >= 0 ? leaderSlot : PartyState . PlayerSlot ) ;
169
+ break ;
170
+ case "aionnf" :
171
+ //turn ai on no follow
172
+ var leader2 = Service . PartyList [ ( int ) Service . PartyList . PartyLeaderIndex ] ;
173
+ int leaderSlot2 = leader2 != null ? _ai . _autorot . WorldState . Party . ContentIDs . IndexOf ( ( ulong ) leader2 . ContentId ) : - 1 ;
174
+ _ai . SwitchToFollow ( leaderSlot2 >= 0 ? leaderSlot2 : PartyState . PlayerSlot ) ;
175
+ _ai . SwitchToFollow ( PartyState . PlayerSlot ) ;
176
+ break ;
177
+ case "aioff" :
178
+ //turn ai off
179
+ _ai . SwitchToIdle ( ) ;
180
+ break ;
164
181
}
165
182
}
166
183
You can’t perform that action at this time.
0 commit comments