Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add the missed obsolete method.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 14, 2023
1 parent 483b813 commit 1289409
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/BaseAction_ActionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private bool WillCooldown
{
if (IsRealGCD)
{
if (!WillHaveOneChargeGCD()) return false;
if (!WillHaveOneChargeGCD(0, 0)) return false;
}
else
{
Expand Down
6 changes: 6 additions & 0 deletions RotationSolver.Basic/Actions/BaseAction_Cooldown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,19 @@ public bool ElapsedAfter(float time)
return CooldownHelper.ElapsedAfter(elapsed, time);
}


public bool WillHaveOneChargeGCD(uint gcdCount = 0, int abilityCount = 0)
{
if (HasOneCharge) return true;
var recast = RecastTimeRemainOneCharge;
return CooldownHelper.RecastAfterGCD(recast, gcdCount, abilityCount);
}

[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Please use the int abilityCoune one.", true)]
public bool WillHaveOneChargeGCD(uint gcdCount = 0, uint abilityCount = 0)
=> WillHaveOneChargeGCD(gcdCount, (int)abilityCount);

public bool WillHaveOneCharge(float remain) => WillHaveOneCharge(remain, true);

private bool WillHaveOneCharge(float remain, bool addWeaponRemain)
Expand Down
5 changes: 5 additions & 0 deletions RotationSolver.Basic/Helpers/StatusHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ internal record Burst2MinsInfo( StatusID status, bool isOnHostile, byte level, p

public static bool NeedHealing(this BattleChara p) => p.WillStatusEndGCD(2, 0, false, NoNeedHealingStatus);

[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Please Use the abilityCount int one please.", true)]
public static bool WillStatusEndGCD(this BattleChara obj, uint gcdCount = 0, uint abilityCount = 0, bool isFromSelf = true, params StatusID[] statusIDs)
=> obj.WillStatusEndGCD(gcdCount, (int)abilityCount, isFromSelf, statusIDs);

/// <summary>
/// Will any of <paramref name="statusIDs"/> be end after <paramref name="gcdCount"/> gcds and <paramref name="abilityCount"/> abilities?
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Watcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ private static void ActionFromEnemy(uint sourceId, ActionEffectSet set)
if (source == null) return;
if (source is not BattleChara battle) return;
if (battle is PlayerCharacter) return;
if (battle.SubKind == 9) return; //Friend!

ShowStrEnemy = set.ToString();
}
Expand Down

0 comments on commit 1289409

Please sign in to comment.