punish v6.8.18.0
This commit is contained in:
commit
cfb4dea47e
316 changed files with 554088 additions and 0 deletions
45
Questionable/Questionable.External/LifestreamIpc.cs
Normal file
45
Questionable/Questionable.External/LifestreamIpc.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Ipc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Model.Common;
|
||||
|
||||
namespace Questionable.External;
|
||||
|
||||
internal sealed class LifestreamIpc
|
||||
{
|
||||
private readonly ILogger<LifestreamIpc> _logger;
|
||||
|
||||
private readonly ICallGateSubscriber<uint, bool> _aethernetTeleportByPlaceNameId;
|
||||
|
||||
private readonly ICallGateSubscriber<uint, bool> _aethernetTeleportById;
|
||||
|
||||
private readonly ICallGateSubscriber<bool> _aethernetTeleportToFirmament;
|
||||
|
||||
public LifestreamIpc(IDalamudPluginInterface pluginInterface, ILogger<LifestreamIpc> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
_aethernetTeleportByPlaceNameId = pluginInterface.GetIpcSubscriber<uint, bool>("Lifestream.AethernetTeleportByPlaceNameId");
|
||||
_aethernetTeleportById = pluginInterface.GetIpcSubscriber<uint, bool>("Lifestream.AethernetTeleportById");
|
||||
_aethernetTeleportToFirmament = pluginInterface.GetIpcSubscriber<bool>("Lifestream.AethernetTeleportToFirmament");
|
||||
}
|
||||
|
||||
public bool Teleport(EAetheryteLocation aetheryteLocation)
|
||||
{
|
||||
_logger.LogInformation("Teleporting to '{Name}'", aetheryteLocation);
|
||||
return aetheryteLocation switch
|
||||
{
|
||||
EAetheryteLocation.IshgardFirmament => _aethernetTeleportToFirmament.InvokeFunc(),
|
||||
EAetheryteLocation.FirmamentMendicantsCourt => _aethernetTeleportByPlaceNameId.InvokeFunc(3436u),
|
||||
EAetheryteLocation.FirmamentMattock => _aethernetTeleportByPlaceNameId.InvokeFunc(3473u),
|
||||
EAetheryteLocation.FirmamentNewNest => _aethernetTeleportByPlaceNameId.InvokeFunc(3475u),
|
||||
EAetheryteLocation.FirmanentSaintRoellesDais => _aethernetTeleportByPlaceNameId.InvokeFunc(3474u),
|
||||
EAetheryteLocation.FirmamentFeatherfall => _aethernetTeleportByPlaceNameId.InvokeFunc(3525u),
|
||||
EAetheryteLocation.FirmamentHoarfrostHall => _aethernetTeleportByPlaceNameId.InvokeFunc(3528u),
|
||||
EAetheryteLocation.FirmamentWesternRisensongQuarter => _aethernetTeleportByPlaceNameId.InvokeFunc(3646u),
|
||||
EAetheryteLocation.FIrmamentEasternRisensongQuarter => _aethernetTeleportByPlaceNameId.InvokeFunc(3645u),
|
||||
EAetheryteLocation.None => throw new ArgumentOutOfRangeException("aetheryteLocation"),
|
||||
_ => _aethernetTeleportById.InvokeFunc((uint)aetheryteLocation),
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue