Remove ref passing, but keep devirtualizations

This commit is contained in:
Asriel Camora
2024-03-16 13:24:26 -07:00
parent 3223bdcbfb
commit ec77f1d021
48 changed files with 411 additions and 787 deletions
+8 -17
View File
@@ -1,25 +1,16 @@
namespace Craftimizer.Simulator.Actions;
internal sealed class TricksOfTheTrade : BaseAction
internal sealed class TricksOfTheTrade() : BaseAction(
ActionCategory.Other, 13, 100371,
durabilityCost: 0,
defaultCPCost: 0
)
{
public TricksOfTheTrade()
{
Category = ActionCategory.Other;
Level = 13;
ActionId = 100371;
DurabilityCost = 0;
}
public override void CPCost(Simulator s, ref int cost)
{
cost = 0;
}
public override bool CouldUse(Simulator s, ref int cost) =>
public override bool CouldUse(Simulator s) =>
(s.Condition == Condition.Good || s.Condition == Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
&& base.CouldUse(s, ref cost);
&& base.CouldUse(s);
public override void UseSuccess(Simulator s, ref int eff)
public override void UseSuccess(Simulator s)
{
s.RestoreCP(20);
if (s.Condition != Condition.Good && s.Condition != Condition.Excellent)