punish v6.8.18.0
This commit is contained in:
commit
060278c1b7
317 changed files with 554155 additions and 0 deletions
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Numerics;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Questionable.Model.Questing;
|
||||
|
||||
namespace Questionable.Controller.Steps.Shared;
|
||||
|
||||
internal sealed class ExtraConditionUtils
|
||||
{
|
||||
private readonly IClientState _clientState;
|
||||
|
||||
public ExtraConditionUtils(IClientState clientState)
|
||||
{
|
||||
_clientState = clientState;
|
||||
}
|
||||
|
||||
public bool MatchesExtraCondition(EExtraSkipCondition skipCondition)
|
||||
{
|
||||
Vector3? vector = _clientState.LocalPlayer?.Position;
|
||||
if (vector.HasValue && _clientState.TerritoryType != 0)
|
||||
{
|
||||
return MatchesExtraCondition(skipCondition, vector.Value, _clientState.TerritoryType);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool MatchesExtraCondition(EExtraSkipCondition skipCondition, Vector3 position, ushort territoryType)
|
||||
{
|
||||
return skipCondition switch
|
||||
{
|
||||
EExtraSkipCondition.WakingSandsMainArea => territoryType == 212 && position.X < 24f,
|
||||
EExtraSkipCondition.WakingSandsSolar => territoryType == 212 && position.X >= 24f,
|
||||
EExtraSkipCondition.RisingStonesSolar => territoryType == 351 && position.Z <= -28f,
|
||||
EExtraSkipCondition.RoguesGuild => territoryType == 129 && position.Y <= -115f,
|
||||
EExtraSkipCondition.NotRoguesGuild => territoryType == 129 && position.Y > -115f,
|
||||
EExtraSkipCondition.DockStorehouse => territoryType == 137 && position.Y <= -20f,
|
||||
_ => throw new ArgumentOutOfRangeException("skipCondition", skipCondition, null),
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue