mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ namespace Dalamud.Data.TransientSheet
|
|||
public ushort Key;
|
||||
|
||||
|
||||
public int RowId { get; set; }
|
||||
public int SubRowId { get; set; }
|
||||
public uint RowId { get; set; }
|
||||
public uint SubRowId { get; set; }
|
||||
|
||||
public void PopulateData( RowParser parser, Lumina.Lumina lumina )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -592,8 +592,8 @@ namespace Dalamud.Data.TransientSheet
|
|||
public bool unknown62_40 => (packed62 & 0x40) == 0x40;
|
||||
|
||||
|
||||
public int RowId { get; set; }
|
||||
public int SubRowId { get; set; }
|
||||
public uint RowId { get; set; }
|
||||
public uint SubRowId { get; set; }
|
||||
|
||||
public void PopulateData(RowParser parser, Lumina.Lumina lumina)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -239,8 +239,8 @@ namespace Dalamud.Data.TransientSheet
|
|||
public bool AlwaysCollectable => (packeda0 & 0x1) == 0x1;
|
||||
|
||||
|
||||
public int RowId { get; set; }
|
||||
public int SubRowId { get; set; }
|
||||
public uint RowId { get; set; }
|
||||
public uint SubRowId { get; set; }
|
||||
|
||||
public void PopulateData(RowParser parser, global::Lumina.Lumina lumina)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -198,8 +198,8 @@ namespace Dalamud.Data.TransientSheet
|
|||
public ushort unknown80;
|
||||
|
||||
|
||||
public int RowId { get; set; }
|
||||
public int SubRowId { get; set; }
|
||||
public uint RowId { get; set; }
|
||||
public uint SubRowId { get; set; }
|
||||
|
||||
public void PopulateData( RowParser parser, Lumina.Lumina lumina )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue