mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 12:23:39 +01:00
update to lumina 2.0.0, fix related breakages in dalamud
This commit is contained in:
parent
75b722eae0
commit
2bbe4fc4ba
19 changed files with 69 additions and 49 deletions
|
|
@ -5,6 +5,7 @@ using System.Diagnostics;
|
|||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Dalamud.Data.LuminaExtensions;
|
||||
using Lumina.Data;
|
||||
|
|
@ -21,7 +22,7 @@ namespace Dalamud.Data
|
|||
/// <summary>
|
||||
/// This class provides data for Dalamud-internal features, but can also be used by plugins if needed.
|
||||
/// </summary>
|
||||
public class DataManager {
|
||||
public class DataManager : IDisposable {
|
||||
/// <summary>
|
||||
/// OpCodes sent by the server to the client.
|
||||
/// </summary>
|
||||
|
|
@ -50,6 +51,8 @@ namespace Dalamud.Data
|
|||
|
||||
private const string IconFileFormat = "ui/icon/{0:D3}000/{1}{2:D6}.tex";
|
||||
|
||||
private Thread luminaResourceThread;
|
||||
|
||||
public DataManager(ClientLanguage language)
|
||||
{
|
||||
// Set up default values so plugins do not null-reference when data is being loaded.
|
||||
|
|
@ -96,6 +99,17 @@ namespace Dalamud.Data
|
|||
Log.Information("Lumina is ready: {0}", gameData.DataPath);
|
||||
|
||||
IsDataReady = true;
|
||||
|
||||
this.luminaResourceThread = new Thread( () =>
|
||||
{
|
||||
while( true )
|
||||
{
|
||||
gameData.ProcessFileHandleQueue();
|
||||
Thread.Yield();
|
||||
}
|
||||
// ReSharper disable once FunctionNeverReturns
|
||||
});
|
||||
this.luminaResourceThread.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -211,5 +225,10 @@ namespace Dalamud.Data
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
this.luminaResourceThread.Abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue