本文整理汇总了C#中ExGatherTag.ResolveGatherItem方法的典型用法代码示例。如果您正苦于以下问题:C# ExGatherTag.ResolveGatherItem方法的具体用法?C# ExGatherTag.ResolveGatherItem怎么用?C# ExGatherTag.ResolveGatherItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExGatherTag
的用法示例。
在下文中一共展示了ExGatherTag.ResolveGatherItem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Gather
public virtual async Task<bool> Gather(ExGatherTag tag)
{
tag.StatusText = "Gathering items";
while (tag.Node.CanGather && GatheringManager.SwingsRemaining > tag.SwingsRemaining && Behaviors.ShouldContinue)
{
await Wait();
if (Memory.Gathering.HqChain == 2 && GatheringManager.SwingsRemaining > tag.SwingsRemaining)
{
await tag.Cast(Ability.Luck);
await Wait();
}
if (GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > tag.SwingsRemaining)
{
await tag.Cast(Ability.IncreaseGatherChanceQuality100);
await Wait();
}
if (!await tag.ResolveGatherItem())
{
return false;
}
var swingsRemaining = GatheringManager.SwingsRemaining - 1;
if (!tag.GatherItem.TryGatherItem())
{
return false;
}
var ticks = 0;
while (swingsRemaining != GatheringManager.SwingsRemaining && ticks++ < 60 && Behaviors.ShouldContinue)
{
await Coroutine.Yield();
}
}
tag.StatusText = "Gathering items complete";
return true;
}
示例2: Gather
public override async Task<bool> Gather(ExGatherTag tag)
{
tag.StatusText = "Gathering items";
while (tag.Node.CanGather && GatheringManager.SwingsRemaining > tag.SwingsRemaining && Behaviors.ShouldContinue)
{
await Wait();
if (GatheringManager.GatheringCombo == 4 && GatheringManager.SwingsRemaining > tag.SwingsRemaining)
{
await tag.Cast(Ability.IncreaseGatherChanceQuality100);
await tag.Cast(Ability.IncreaseGatherYieldOnce);
await Wait();
}
// No way to tell if we missed the first swing afaik... so we have to check if we have a combo of 0 anytime after the second swing.
if (GatheringManager.GatheringCombo == 0 && GatheringManager.SwingsRemaining < 5 && !Core.Player.HasAura(220))
{
await tag.Cast(Ability.IncreaseGatherQuality10);
}
if (!await tag.ResolveGatherItem())
{
return false;
}
var swingsRemaining = GatheringManager.SwingsRemaining - 1;
if (!tag.GatherItem.TryGatherItem())
{
return false;
}
var ticks = 0;
while (swingsRemaining != GatheringManager.SwingsRemaining && ticks++ < 60 && Behaviors.ShouldContinue)
{
await Coroutine.Yield();
}
}
tag.StatusText = "Gathering items complete";
return true;
}