muffin v7.5.13
This commit is contained in:
parent
911ed68baa
commit
acf3e3cb18
69 changed files with 2731 additions and 1425 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects.Enums;
|
||||
|
|
@ -16,12 +17,13 @@ using Questionable.Controller.Utils;
|
|||
using Questionable.Functions;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.Questing;
|
||||
using SmartNav.Data;
|
||||
|
||||
namespace Questionable.Controller.Steps.Interactions;
|
||||
|
||||
internal static class Interact
|
||||
{
|
||||
internal sealed class Factory(Configuration configuration) : ITaskFactory
|
||||
internal sealed class Factory(Configuration configuration, WarpDataService warpDataService) : ITaskFactory
|
||||
{
|
||||
public IEnumerable<ITask> CreateAllTasks(Quest quest, QuestSequence sequence, QuestStep step)
|
||||
{
|
||||
|
|
@ -63,6 +65,25 @@ internal static class Interact
|
|||
{
|
||||
yield return new WaitAtEnd.WaitDelay();
|
||||
}
|
||||
ushort? targetTerritoryId = step.TargetTerritoryId;
|
||||
List<uint> list;
|
||||
if (targetTerritoryId.HasValue)
|
||||
{
|
||||
ushort targetTerritoryId2 = targetTerritoryId.GetValueOrDefault();
|
||||
list = (from x in warpDataService.Warps
|
||||
where x.NpcDataId == step.DataId && x.SourceTerritoryId == step.TerritoryId && x.DestTerritoryId == targetTerritoryId2
|
||||
select x.RowId).Distinct().Take(2).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
list = new List<uint>();
|
||||
}
|
||||
List<uint> list2 = list;
|
||||
if (list2.Count == 1)
|
||||
{
|
||||
yield return new WarpInteract.Task(step.DataId.Value, list2[0], step.TerritoryId, step.TargetTerritoryId.Value);
|
||||
yield break;
|
||||
}
|
||||
uint value = step.DataId.Value;
|
||||
EInteractionType interactionType2 = step.InteractionType;
|
||||
int skipMarkerCheck;
|
||||
|
|
@ -74,20 +95,17 @@ internal static class Interact
|
|||
SkipStepConditions stepIf = skipConditions.StepIf;
|
||||
if (stepIf != null && stepIf.Never)
|
||||
{
|
||||
goto IL_024a;
|
||||
goto IL_03d7;
|
||||
}
|
||||
}
|
||||
if (step.InteractionType != EInteractionType.PurchaseItem)
|
||||
{
|
||||
skipMarkerCheck = ((step.DataId == 1052475) ? 1 : 0);
|
||||
goto IL_024b;
|
||||
goto IL_03d8;
|
||||
}
|
||||
}
|
||||
goto IL_024a;
|
||||
IL_024a:
|
||||
skipMarkerCheck = 1;
|
||||
goto IL_024b;
|
||||
IL_024b:
|
||||
goto IL_03d7;
|
||||
IL_03d8:
|
||||
uint? pickUpItemId = step.PickUpItemId ?? step.GCPurchase?.ItemId;
|
||||
byte? taxiStandId = step.TaxiStandId;
|
||||
SkipStepConditions? skipConditions2 = step.SkipConditions?.StepIf;
|
||||
|
|
@ -95,6 +113,10 @@ internal static class Interact
|
|||
uint? purchaseItemId = ((step.InteractionType == EInteractionType.PurchaseItem) ? step.ItemId : ((uint?)null));
|
||||
int purchaseItemCount = ((step.InteractionType == EInteractionType.PurchaseItem) ? step.ItemCount.GetValueOrDefault() : 0);
|
||||
yield return new Task(value, quest, interactionType2, (byte)skipMarkerCheck != 0, pickUpItemId, taxiStandId, skipConditions2, completionQuestVariablesFlags, null, purchaseItemId, purchaseItemCount);
|
||||
yield break;
|
||||
IL_03d7:
|
||||
skipMarkerCheck = 1;
|
||||
goto IL_03d8;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue