mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:27:21 +01:00
move building character data to main framework thread
This commit is contained in:
parent
6bf16e1d56
commit
f785288971
3 changed files with 17 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.ClientState;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
|
|
@ -189,6 +190,11 @@ namespace MareSynchronos.Utils
|
|||
return null;
|
||||
}
|
||||
|
||||
public async Task<T> RunOnFrameworkThread<T>(Func<T> func)
|
||||
{
|
||||
return await _framework.RunOnFrameworkThread(func);
|
||||
}
|
||||
|
||||
public unsafe void WaitWhileCharacterIsDrawing(string name, IntPtr characterAddress, CancellationToken? ct = null)
|
||||
{
|
||||
if (!_clientState.IsLoggedIn || characterAddress == IntPtr.Zero) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue