mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Use EarlyLoadedService instead of BlockingEarlyLoadedService
This commit is contained in:
parent
7d6432da05
commit
6f4c6514a4
1 changed files with 7 additions and 7 deletions
|
|
@ -14,7 +14,7 @@ namespace Dalamud.Game.DutyState;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PluginInterface]
|
[PluginInterface]
|
||||||
[InterfaceVersion("1.0")]
|
[InterfaceVersion("1.0")]
|
||||||
[ServiceManager.BlockingEarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
public unsafe class DutyState : IDisposable, IServiceType
|
public unsafe class DutyState : IDisposable, IServiceType
|
||||||
{
|
{
|
||||||
private readonly DutyStateAddressResolver address;
|
private readonly DutyStateAddressResolver address;
|
||||||
|
|
@ -104,25 +104,25 @@ public unsafe class DutyState : IDisposable, IServiceType
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
// Duty Commenced
|
// Duty Commenced
|
||||||
case 0x40000001:
|
case 0x4000_0001:
|
||||||
this.IsDutyStarted = true;
|
this.IsDutyStarted = true;
|
||||||
this.DutyStarted.InvokeSafely(this, this.clientState.TerritoryType);
|
this.DutyStarted.InvokeSafely(this, this.clientState.TerritoryType);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Party Wipe
|
// Party Wipe
|
||||||
case 0x40000005:
|
case 0x4000_0005:
|
||||||
this.IsDutyStarted = false;
|
this.IsDutyStarted = false;
|
||||||
this.DutyWiped.InvokeSafely(this, this.clientState.TerritoryType);
|
this.DutyWiped.InvokeSafely(this, this.clientState.TerritoryType);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Duty Recommence
|
// Duty Recommence
|
||||||
case 0x40000006:
|
case 0x4000_0006:
|
||||||
this.IsDutyStarted = true;
|
this.IsDutyStarted = true;
|
||||||
this.DutyRecommenced.InvokeSafely(this, this.clientState.TerritoryType);
|
this.DutyRecommenced.InvokeSafely(this, this.clientState.TerritoryType);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Duty Completed
|
// Duty Completed
|
||||||
case 0x40000003:
|
case 0x4000_0003:
|
||||||
this.IsDutyStarted = false;
|
this.IsDutyStarted = false;
|
||||||
this.CompletedThisTerritory = true;
|
this.CompletedThisTerritory = true;
|
||||||
this.DutyCompleted.InvokeSafely(this, this.clientState.TerritoryType);
|
this.DutyCompleted.InvokeSafely(this, this.clientState.TerritoryType);
|
||||||
|
|
@ -145,9 +145,9 @@ public unsafe class DutyState : IDisposable, IServiceType
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fallback event handler in the case that we missed the duty started event.
|
/// Fallback event handler in the case that we missed the duty started event.
|
||||||
/// Joining a duty in progress, or disconnecting and reconnecting will cause the player to miss the event
|
/// Joining a duty in progress, or disconnecting and reconnecting will cause the player to miss the event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="framework1">Framework reference</param>
|
/// <param name="framework1">Framework reference.</param>
|
||||||
private void FrameworkOnUpdateEvent(Framework framework1)
|
private void FrameworkOnUpdateEvent(Framework framework1)
|
||||||
{
|
{
|
||||||
// If the duty hasn't been started, and has not been completed yet this territory
|
// If the duty hasn't been started, and has not been completed yet this territory
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue