forked from aly/qstbak
muffin v7.4.10
This commit is contained in:
parent
2df81c5d15
commit
b8dd142c23
47 changed files with 3604 additions and 1058 deletions
|
|
@ -135,25 +135,28 @@ internal static class Duty
|
|||
{
|
||||
throw new TaskException("Failed to get territory ID for content finder condition");
|
||||
}
|
||||
InventoryManager* intPtr = InventoryManager.Instance();
|
||||
if (intPtr == null)
|
||||
if (base.Task.DutyMode != AutoDutyIpc.DutyMode.UnsyncRegular)
|
||||
{
|
||||
throw new TaskException("Inventory unavailable");
|
||||
}
|
||||
InventoryContainer* inventoryContainer = intPtr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
throw new TaskException("Equipped items unavailable");
|
||||
}
|
||||
short num = gearStatsCalculator.CalculateAverageItemLevel(inventoryContainer);
|
||||
if (contentFinderConditionData.RequiredItemLevel > num)
|
||||
{
|
||||
string text = $"Could not use AutoDuty to queue for {contentFinderConditionData.Name}, required item level: {contentFinderConditionData.RequiredItemLevel}, current item level: {num}.";
|
||||
if (!sendNotificationExecutor.Start(new SendNotification.Task(EInteractionType.Duty, text)))
|
||||
InventoryManager* intPtr = InventoryManager.Instance();
|
||||
if (intPtr == null)
|
||||
{
|
||||
chatGui.PrintError(text, "Questionable", 576);
|
||||
throw new TaskException("Inventory unavailable");
|
||||
}
|
||||
InventoryContainer* inventoryContainer = intPtr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
throw new TaskException("Equipped items unavailable");
|
||||
}
|
||||
short num = gearStatsCalculator.CalculateAverageItemLevel(inventoryContainer);
|
||||
if (contentFinderConditionData.RequiredItemLevel > num)
|
||||
{
|
||||
string text = $"Could not use AutoDuty to queue for {contentFinderConditionData.Name}, required item level: {contentFinderConditionData.RequiredItemLevel}, current item level: {num}.";
|
||||
if (!sendNotificationExecutor.Start(new SendNotification.Task(EInteractionType.Duty, text)))
|
||||
{
|
||||
chatGui.PrintError(text, "Questionable", 576);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
autoDutyIpc.StartInstance(base.Task.ContentFinderConditionId, base.Task.DutyMode);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue