From a0022f63583c9e64aaa1b1fbb5b901b8659c2b79 Mon Sep 17 00:00:00 2001
From: goat <16760685+goaaats@users.noreply.github.com>
Date: Fri, 15 Jul 2022 19:03:42 +0200
Subject: [PATCH] feat: add EffectiveVersion attrib to LocalPluginManifest
---
Dalamud/Plugin/Internal/Types/LocalPluginManifest.cs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Dalamud/Plugin/Internal/Types/LocalPluginManifest.cs b/Dalamud/Plugin/Internal/Types/LocalPluginManifest.cs
index 0853b19be..a3d89fd3b 100644
--- a/Dalamud/Plugin/Internal/Types/LocalPluginManifest.cs
+++ b/Dalamud/Plugin/Internal/Types/LocalPluginManifest.cs
@@ -1,3 +1,4 @@
+using System;
using System.IO;
using Dalamud.Utility;
@@ -36,6 +37,11 @@ internal record LocalPluginManifest : PluginManifest
///
public bool IsThirdParty => !this.InstalledFromUrl.IsNullOrEmpty() && this.InstalledFromUrl != PluginRepository.MainRepoUrl;
+ ///
+ /// Gets the effective version of this plugin.
+ ///
+ public Version EffectiveVersion => this.Testing && this.TestingAssemblyVersion != null ? this.TestingAssemblyVersion : this.AssemblyVersion;
+
///
/// Save a plugin manifest to file.
///