From 2b4f4bc9fd7903a54b5420a67ded5e72e3778a12 Mon Sep 17 00:00:00 2001 From: Raymond Date: Mon, 23 Aug 2021 17:32:45 -0400 Subject: [PATCH] Change Framework.OnUpdateEvent to Update --- Dalamud/Game/ClientState/ClientState.cs | 4 ++-- Dalamud/Game/Framework.cs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs index 2e574afa2..3e50ffc38 100644 --- a/Dalamud/Game/ClientState/ClientState.cs +++ b/Dalamud/Game/ClientState/ClientState.cs @@ -66,7 +66,7 @@ namespace Dalamud.Game.ClientState this.setupTerritoryTypeHook = new Hook(this.address.SetupTerritoryType, this.SetupTerritoryTypeDetour); var framework = Service.Get(); - framework.OnUpdateEvent += this.FrameworkOnOnUpdateEvent; + framework.Update += this.FrameworkOnOnUpdateEvent; var networkHandlers = Service.Get(); networkHandlers.CfPop += this.NetworkHandlersOnCfPop; @@ -136,7 +136,7 @@ namespace Dalamud.Game.ClientState { this.setupTerritoryTypeHook.Dispose(); Service.Get().Dispose(); - Service.Get().OnUpdateEvent -= this.FrameworkOnOnUpdateEvent; + Service.Get().Update -= this.FrameworkOnOnUpdateEvent; Service.Get().CfPop -= this.NetworkHandlersOnCfPop; } diff --git a/Dalamud/Game/Framework.cs b/Dalamud/Game/Framework.cs index e98b76584..c801f85d4 100644 --- a/Dalamud/Game/Framework.cs +++ b/Dalamud/Game/Framework.cs @@ -49,7 +49,7 @@ namespace Dalamud.Game } /// - /// A delegate type used with the event. + /// A delegate type used with the event. /// /// The Framework instance. public delegate void OnUpdateDelegate(Framework framework); @@ -75,7 +75,7 @@ namespace Dalamud.Game /// /// Event that gets fired every time the game framework updates. /// - public event OnUpdateDelegate OnUpdateEvent; + public event OnUpdateDelegate Update; /// /// 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)