Skip to content

Commit

Permalink
Fixed buff condition
Browse files Browse the repository at this point in the history
  • Loading branch information
sychotixdev committed Sep 14, 2019
1 parent 6110613 commit 0064851
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Binary file modified BasicFlaskRoutine.dll
Binary file not shown.
Binary file modified BasicFlaskRoutine.pdb
Binary file not shown.
Expand Up @@ -89,7 +89,20 @@ public override Func<bool> GetCondition(ExtensionParameter extensionParameter)
{
return () =>
{
return extensionParameter.Plugin.GameController.Game.IngameState.Data.LocalPlayer.Buffs.Any(x => x.Name == HasBuffReady && (x.Timer >= RemainingDuration * 1000) && x.Charges >= MinimumCharges);
if (extensionParameter.Plugin.Settings.Debug)
{
var foundBuff = extensionParameter.Plugin.GameController.Game.IngameState.Data.LocalPlayer.Buffs.FirstOrDefault(x =>
x.Name == HasBuffReady);
if (foundBuff != null)
{
extensionParameter.Plugin.LogMessage(
$"Found buff {HasBuffReady}. Timer: {foundBuff.Timer} (eval:{(foundBuff.Timer >= RemainingDuration * 1000)}) Charges: {foundBuff.Charges} (eval:{(foundBuff.Charges >= MinimumCharges)})");
}
else extensionParameter.Plugin.LogMessage($"Buff {HasBuffReady} not found.");
}
return extensionParameter.Plugin.GameController.Game.IngameState.Data.LocalPlayer.Buffs.Any(x => x.Name == HasBuffReady && (x.Timer >= (1.0 * RemainingDuration / 1000)) && x.Charges >= MinimumCharges);
};
}

Expand Down

0 comments on commit 0064851

Please sign in to comment.