@@ -172,41 +172,36 @@ public ActionBasicInfo(IBaseAction action, bool isDutyAction)
172
172
/// <returns>True if the action passes the basic check; otherwise, false.</returns>
173
173
internal readonly bool BasicCheck ( bool skipStatusProvideCheck , bool skipComboCheck , bool skipCastingCheck , bool checkActionManager = false )
174
174
{
175
- if ( Player . Object . StatusList == null )
176
- {
177
- return false ;
178
- }
179
175
180
- if ( NeedsCasting ( ! skipCastingCheck ) && DataCenter . IsMoving && Service . Config . BmrLock )
176
+ // 1. Player and action slot checks
177
+ if ( Player . Object . StatusList == null )
181
178
{
182
179
return false ;
183
180
}
184
-
185
181
if ( ! IsActionEnabled ( ) || ! IsOnSlot )
186
182
{
187
183
return false ;
188
184
}
189
185
190
- if ( IsLimitBreak && ! DataCenter . IsPvP )
191
- {
192
- return true ;
193
- }
194
-
186
+ // 2. Basic requirements: not disabled, enough level, enough MP, spell unlocked
195
187
if ( IsActionDisabled ( ) || ! EnoughLevel || ! HasEnoughMP ( ) || ! SpellUnlocked )
196
188
{
197
189
return false ;
198
190
}
199
191
192
+ // 3. Status checks: need or provide
200
193
if ( IsStatusNeeded ( ) || IsStatusProvided ( skipStatusProvideCheck ) )
201
194
{
202
195
return false ;
203
196
}
204
197
205
- if ( IsLimitBreakLevelLow ( ) || ! IsComboValid ( skipComboCheck ) || ! IsRoleActionValid ( ) )
198
+ // 4. Combo and role checks
199
+ if ( ! IsComboValid ( skipComboCheck ) || ! IsRoleActionValid ( ) )
206
200
{
207
201
return false ;
208
202
}
209
203
204
+ // 5. Optional: ask the game directly if the action is usable
210
205
// In terms of "whether we can cast something" this check functionally negates everything else as we're asking the game directly if this is usable
211
206
// That *said* there is a lot of logic elsewhere here for prioritizing things, so we're simply going to add this as an optional check for handling abilities we want to verify are usable
212
207
if ( checkActionManager && ! ActionManagerStatusValid ( ) )
@@ -217,6 +212,29 @@ internal readonly bool BasicCheck(bool skipStatusProvideCheck, bool skipComboChe
217
212
return ! NeedsCasting ( skipCastingCheck ) && ( ! IsGeneralGCD || ! IsStatusProvidedDuringGCD ( ) ) && IsActionCheckValid ( ) && IsRotationCheckValid ( ) ;
218
213
}
219
214
215
+ private bool NeedsCasting ( bool skipCastingCheck )
216
+ {
217
+ // Must have a cast time
218
+ if ( CastTime <= 0f )
219
+ return false ;
220
+
221
+ // Must not have a instant cast status
222
+ if ( ! Player . Object . WillStatusEnd ( 0 , true , StatusHelper . SwiftcastStatus ) )
223
+ return false ;
224
+
225
+ // Must not be in the no-cast list
226
+ if ( ActionsNoNeedCasting . Contains ( ID ) )
227
+ return false ;
228
+
229
+ // Must be in a state where casting is not possible
230
+ if ( DataCenter . SpecialType == SpecialCommandType . NoCasting ||
231
+ ( DateTime . Now > DataCenter . KnockbackStart && DateTime . Now < DataCenter . KnockbackFinished ) ||
232
+ ( DataCenter . NoPoslock && DataCenter . IsMoving && ! skipCastingCheck ) )
233
+ return true ;
234
+
235
+ return false ;
236
+ }
237
+
220
238
/// <summary>
221
239
/// Determines whether the spell is unlocked for the player.
222
240
/// </summary>
@@ -247,11 +265,6 @@ private bool IsStatusProvided(bool skipStatusProvideCheck)
247
265
return Player . Object . StatusList != null && ! skipStatusProvideCheck && _action . Setting . StatusProvide != null && ! Player . Object . WillStatusEndGCD ( _action . Config . StatusGcdCount , 0 , _action . Setting . StatusFromSelf , _action . Setting . StatusProvide ) ;
248
266
}
249
267
250
- private bool IsLimitBreakLevelLow ( )
251
- {
252
- return _action . Action . ActionCategory . RowId == 15 && CustomRotation . LimitBreakLevel <= 1 ;
253
- }
254
-
255
268
private bool IsComboValid ( bool skipComboCheck )
256
269
{
257
270
return skipComboCheck || ! IsGeneralGCD || CheckForCombo ( ) ;
@@ -267,29 +280,6 @@ private bool IsRotationCheckValid()
267
280
return IBaseAction . ForceEnable || ( _action . Setting . RotationCheck ? . Invoke ( ) ?? true ) ;
268
281
}
269
282
270
- private bool NeedsCasting ( bool skipCastingCheck )
271
- {
272
- // Must have a cast time
273
- if ( CastTime <= 0 )
274
- return false ;
275
-
276
- // Must not have a instant cast status
277
- if ( ! Player . Object . WillStatusEnd ( 0 , true , StatusHelper . SwiftcastStatus ) )
278
- return false ;
279
-
280
- // Must not be in the no-cast list
281
- if ( ActionsNoNeedCasting . Contains ( ID ) )
282
- return false ;
283
-
284
- // Must be in a state where casting is not possible
285
- if ( DataCenter . SpecialType == SpecialCommandType . NoCasting ||
286
- ( DateTime . Now > DataCenter . KnockbackStart && DateTime . Now < DataCenter . KnockbackFinished ) ||
287
- ( DataCenter . NoPoslock && DataCenter . IsMoving && ! skipCastingCheck ) )
288
- return true ;
289
-
290
- return false ;
291
- }
292
-
293
283
private bool IsStatusProvidedDuringGCD ( )
294
284
{
295
285
return _action . Setting . StatusProvide ? . Length > 0 && _action . Setting . IsFriendly && IActionHelper . IsLastGCD ( true , _action ) && DataCenter . TimeSinceLastAction . TotalSeconds < 3 ;
0 commit comments