v1.0.3.0: Alliance frames fixes, PvP support, shared hotbar persistence, config save on teleport

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-01-31 20:35:25 -05:00
parent bda3762ac8
commit 11b4c268f0
17 changed files with 1145 additions and 77 deletions
+15 -5
View File
@@ -290,16 +290,26 @@ namespace HSUI.Config.Tree
Type type = ConfigObject.GetType();
ImportData? importData = ProfilesManager.Instance?.DefaultImportData(type);
if (importData == null)
PluginConfigObject? config = null;
if (importData != null)
{
Plugin.Logger.Error("Error finding default import data for type " + type.ToString());
return;
config = importData.GetObject();
}
PluginConfigObject? config = importData.GetObject();
if (config == null)
{
Plugin.Logger.Error("Error importing default import data for type " + type.ToString());
// Fallback: invoke static DefaultConfig() when no import data (e.g. new config types not yet in Default.HSUI)
MethodInfo? defaultConfigMethod = type.GetMethod("DefaultConfig", BindingFlags.Public | BindingFlags.Static);
if (defaultConfigMethod != null && defaultConfigMethod.ReturnType != typeof(void))
{
object? result = defaultConfigMethod.Invoke(null, null);
config = result as PluginConfigObject;
}
}
if (config == null)
{
Plugin.Logger.Error("Error resetting config for type " + type.ToString() + " (no import data and no DefaultConfig)");
return;
}