heave fewer redraws as main method for data application, minor fixes
This commit is contained in:
@@ -173,7 +173,7 @@ public class DalamudUtilService : IHostedService
|
||||
|
||||
public async Task<string> GetPlayerNameHashedAsync()
|
||||
{
|
||||
return await RunOnFrameworkThread(() => (GetPlayerName() + GetWorldId()).GetHash256()).ConfigureAwait(false);
|
||||
return await RunOnFrameworkThread(() => (GetPlayerName() + GetHomeWorldId()).GetHash256()).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public IntPtr GetPlayerPointer()
|
||||
@@ -187,17 +187,28 @@ public class DalamudUtilService : IHostedService
|
||||
return await RunOnFrameworkThread(GetPlayerPointer).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public uint GetWorldId()
|
||||
public uint GetHomeWorldId()
|
||||
{
|
||||
EnsureIsOnFramework();
|
||||
return _clientState.LocalPlayer!.HomeWorld.Id;
|
||||
}
|
||||
|
||||
public uint GetWorldId()
|
||||
{
|
||||
EnsureIsOnFramework();
|
||||
return _clientState.LocalPlayer!.CurrentWorld.Id;
|
||||
}
|
||||
|
||||
public async Task<uint> GetWorldIdAsync()
|
||||
{
|
||||
return await RunOnFrameworkThread(GetWorldId).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task<uint> GetHomeWorldIdAsync()
|
||||
{
|
||||
return await RunOnFrameworkThread(GetHomeWorldId).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public unsafe bool IsGameObjectPresent(IntPtr key)
|
||||
{
|
||||
return _objectTable.Any(f => f.Address == key);
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ServerConfigurationManager
|
||||
}
|
||||
|
||||
var charaName = _dalamudUtil.GetPlayerNameAsync().GetAwaiter().GetResult();
|
||||
var worldId = _dalamudUtil.GetWorldIdAsync().GetAwaiter().GetResult();
|
||||
var worldId = _dalamudUtil.GetHomeWorldIdAsync().GetAwaiter().GetResult();
|
||||
if (!currentServer.Authentications.Any() && currentServer.SecretKeys.Any())
|
||||
{
|
||||
currentServer.Authentications.Add(new Authentication()
|
||||
@@ -136,7 +136,7 @@ public class ServerConfigurationManager
|
||||
server.Authentications.Add(new Authentication()
|
||||
{
|
||||
CharacterName = _dalamudUtil.GetPlayerNameAsync().GetAwaiter().GetResult(),
|
||||
WorldId = _dalamudUtil.GetWorldIdAsync().GetAwaiter().GetResult(),
|
||||
WorldId = _dalamudUtil.GetHomeWorldIdAsync().GetAwaiter().GetResult(),
|
||||
SecretKeyIdx = addLastSecretKey ? server.SecretKeys.Last().Key : -1,
|
||||
});
|
||||
Save();
|
||||
|
||||
Reference in New Issue
Block a user