forked from aly/qstbak
47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using Questionable.Functions;
|
|
using Questionable.Model.Questing;
|
|
using SmartNav;
|
|
using SmartNav.Model;
|
|
|
|
namespace Questionable.Navigation;
|
|
|
|
internal sealed class QuestionablePlayerContext(Configuration configuration, QuestFunctions questFunctions, AetheryteFunctions aetheryteFunctions, GameFunctions gameFunctions) : IPlayerContext
|
|
{
|
|
public uint? CurrentMsqQuestId
|
|
{
|
|
get
|
|
{
|
|
if (!(questFunctions.GetMainScenarioQuest().Item1.CurrentQuest is QuestId questId))
|
|
{
|
|
return null;
|
|
}
|
|
return questId.Value;
|
|
}
|
|
}
|
|
|
|
public int GilReserve => configuration.Navigation.GilReserve;
|
|
|
|
public bool PreferFreeTravel => configuration.Navigation.PreferFreeTravel;
|
|
|
|
public bool UseTeleportTickets => configuration.Navigation.UseTeleportTickets;
|
|
|
|
public bool IsAetheryteUnlocked(EAetheryteLocation aetheryte)
|
|
{
|
|
return aetheryteFunctions.IsAetheryteUnlocked(aetheryte);
|
|
}
|
|
|
|
public bool IsFlyingUnlocked(uint territoryId)
|
|
{
|
|
return gameFunctions.IsFlyingUnlockedPersistent(territoryId);
|
|
}
|
|
|
|
public bool IsTeleportUnlocked()
|
|
{
|
|
return aetheryteFunctions.IsTeleportUnlocked();
|
|
}
|
|
|
|
public bool IsReturnAvailable()
|
|
{
|
|
return aetheryteFunctions.IsReturnAvailable();
|
|
}
|
|
}
|