Merge branch 'master' of https://github.com/goatcorp/Dalamud into master

This commit is contained in:
goat 2021-04-28 14:24:20 +02:00
commit 0448c9e36a
No known key found for this signature in database
GPG key ID: F18F057873895461
2 changed files with 8 additions and 3 deletions

View file

@ -35,7 +35,7 @@ namespace Dalamud.Game.Internal.Gui.Structs {
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
private readonly byte[] header2;
private readonly uint unknownInt1;
internal readonly uint contentIdLower;
private readonly ushort unknownShort1;
private readonly ushort unknownShort2;
@ -123,6 +123,10 @@ namespace Dalamud.Game.Internal.Gui.Structs {
/// </summary>
public uint Id { get; }
/// <summary>
/// The lower bits of the player's content ID.
/// </summary>
public uint ContentIdLower { get; }
/// <summary>
/// The name of the player hosting this listing.
/// </summary>
public SeString Name { get; }
@ -256,6 +260,7 @@ namespace Dalamud.Game.Internal.Gui.Structs {
this.jobsPresent = listing.jobsPresent;
Id = listing.id;
ContentIdLower = listing.contentIdLower;
Name = seStringManager.Parse(listing.name.TakeWhile(b => b != 0).ToArray());
Description = seStringManager.Parse(listing.description.TakeWhile(b => b != 0).ToArray());
World = new Lazy<World>(() => dataManager.GetExcelSheet<World>().GetRow(listing.world));

View file

@ -126,9 +126,9 @@ namespace Dalamud
/// <param name="key">The string key to be returned.</param>
/// <param name="fallBack">The fallback string, usually your source language.</param>
/// <returns>The localized string, fallback or string key if not found.</returns>
public string Localize(string key, string fallBack)
public static string Localize(string key, string fallBack)
{
return Loc.Localize(key, fallBack, this.assembly);
return Loc.Localize(key, fallBack, Assembly.GetCallingAssembly());
}
private string ReadLocData(string langCode)