mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: work around bad assembly version in chat extender json
This commit is contained in:
parent
9b591e71d2
commit
62ef6034ee
1 changed files with 17 additions and 13 deletions
|
|
@ -100,19 +100,6 @@ namespace Dalamud.Plugin
|
|||
JsonConvert.DeserializeObject<PluginDefinition>(
|
||||
File.ReadAllText(defJsonFile.FullName));
|
||||
|
||||
// Don't wanna fuck this up
|
||||
// This is a fix for earlier Chat Extender versions, since they break command handlers
|
||||
try {
|
||||
if (dllFile.Name.Contains("ChatExtender") &&
|
||||
int.Parse(pluginDef.AssemblyVersion.Replace(".", "")) < 1410) {
|
||||
Log.Information("Found banned ChatExtender, skipping...");
|
||||
return false;
|
||||
}
|
||||
} catch (Exception) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
|
||||
if (pluginDef.ApplicableVersion != this.dalamud.StartInfo.GameVersion && pluginDef.ApplicableVersion != "any")
|
||||
{
|
||||
Log.Information("Plugin {0} has not applicable version.", dllFile.FullName);
|
||||
|
|
@ -135,6 +122,23 @@ namespace Dalamud.Plugin
|
|||
// Assembly.Load() by name here will not load multiple versions with the same name, in the case of updates
|
||||
var pluginAssembly = Assembly.LoadFile(dllFile.FullName);
|
||||
|
||||
// Don't wanna fuck this up
|
||||
// This is a fix for earlier Chat Extender versions, since they break command handlers
|
||||
try
|
||||
{
|
||||
var ver = int.Parse(pluginAssembly.GetName().Version.ToString().Replace(".", ""));
|
||||
if (dllFile.Name.Contains("ChatExtender") &&
|
||||
ver < 1410)
|
||||
{
|
||||
Log.Information($"Found banned v{ver} ChatExtender, skipping...");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
if (pluginAssembly != null)
|
||||
{
|
||||
Log.Information("Loading types for {0}", pluginAssembly.FullName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue