mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Merge pull request #497 from daemitus/event
Change Framework.OnUpdateEvent to Update
This commit is contained in:
commit
1c1a007e41
2 changed files with 7 additions and 7 deletions
|
|
@ -66,7 +66,7 @@ namespace Dalamud.Game.ClientState
|
|||
this.setupTerritoryTypeHook = new Hook<SetupTerritoryTypeDelegate>(this.address.SetupTerritoryType, this.SetupTerritoryTypeDetour);
|
||||
|
||||
var framework = Service<Framework>.Get();
|
||||
framework.OnUpdateEvent += this.FrameworkOnOnUpdateEvent;
|
||||
framework.Update += this.FrameworkOnOnUpdateEvent;
|
||||
|
||||
var networkHandlers = Service<NetworkHandlers>.Get();
|
||||
networkHandlers.CfPop += this.NetworkHandlersOnCfPop;
|
||||
|
|
@ -136,7 +136,7 @@ namespace Dalamud.Game.ClientState
|
|||
{
|
||||
this.setupTerritoryTypeHook.Dispose();
|
||||
Service<GamepadState>.Get().Dispose();
|
||||
Service<Framework>.Get().OnUpdateEvent -= this.FrameworkOnOnUpdateEvent;
|
||||
Service<Framework>.Get().Update -= this.FrameworkOnOnUpdateEvent;
|
||||
Service<NetworkHandlers>.Get().CfPop -= this.NetworkHandlersOnCfPop;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace Dalamud.Game
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// A delegate type used with the <see cref="OnUpdateEvent"/> event.
|
||||
/// A delegate type used with the <see cref="Update"/> event.
|
||||
/// </summary>
|
||||
/// <param name="framework">The Framework instance.</param>
|
||||
public delegate void OnUpdateDelegate(Framework framework);
|
||||
|
|
@ -75,7 +75,7 @@ namespace Dalamud.Game
|
|||
/// <summary>
|
||||
/// Event that gets fired every time the game framework updates.
|
||||
/// </summary>
|
||||
public event OnUpdateDelegate OnUpdateEvent;
|
||||
public event OnUpdateDelegate Update;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the collection of stats is enabled.
|
||||
|
|
@ -175,10 +175,10 @@ namespace Dalamud.Game
|
|||
{
|
||||
try
|
||||
{
|
||||
if (StatsEnabled && this.OnUpdateEvent != null)
|
||||
if (StatsEnabled && this.Update != null)
|
||||
{
|
||||
// Stat Tracking for Framework Updates
|
||||
var invokeList = this.OnUpdateEvent.GetInvocationList();
|
||||
var invokeList = this.Update.GetInvocationList();
|
||||
var notUpdated = StatsHistory.Keys.ToList();
|
||||
// Individually invoke OnUpdate handlers and time them.
|
||||
foreach (var d in invokeList)
|
||||
|
|
@ -211,7 +211,7 @@ namespace Dalamud.Game
|
|||
}
|
||||
else
|
||||
{
|
||||
this.OnUpdateEvent?.Invoke(this);
|
||||
this.Update?.Invoke(this);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue