minor fixes
This commit is contained in:
@@ -13,9 +13,9 @@ namespace Pilz.Dalamud.Nameplates.Tools
|
||||
|
||||
public NameplateChanges()
|
||||
{
|
||||
changes.Add(NameplateElements.Title, new StringChangesProps());
|
||||
changes.Add(NameplateElements.Name, new StringChangesProps());
|
||||
changes.Add(NameplateElements.FreeCompany, new StringChangesProps());
|
||||
changes.Add(NameplateElements.Title, new());
|
||||
changes.Add(NameplateElements.Name, new());
|
||||
changes.Add(NameplateElements.FreeCompany, new());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -33,8 +33,12 @@ namespace Pilz.Dalamud.Nameplates.Tools
|
||||
|
||||
if (fontIcon != null)
|
||||
{
|
||||
// Set new font icon as string change
|
||||
var iconPayload = new IconPayload(fontIcon.Value);
|
||||
stringChange.Payloads.Insert(0, iconPayload);
|
||||
|
||||
// Use new status icon as status icon
|
||||
statusIcon = newStatusIcon;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ namespace Pilz.Dalamud.Tools.Strings
|
||||
/// <summary>
|
||||
/// The changes that should be applied to the destination.
|
||||
/// </summary>
|
||||
public StringChanges StringChanges { get; set; }
|
||||
public StringChanges StringChanges { get; set; } = new();
|
||||
/// <summary>
|
||||
/// Payloads to use as anchor where the changes should be applied to.
|
||||
/// </summary>
|
||||
public List<Payload> AnchorPayloads { get; set; }
|
||||
public List<Payload> AnchorPayloads { get; set; } = new();
|
||||
/// <summary>
|
||||
/// A single payload to use as anchor where the changes should be applied to.
|
||||
/// This property will only be used if StringChange.ForceSingleAnchorPayload is true.
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Pilz.Dalamud.Tools.Strings
|
||||
{
|
||||
public static void ApplyStringChanges(StringChangesProps props)
|
||||
{
|
||||
if (props.StringChanges.Any())
|
||||
if (props.StringChanges != null && props.StringChanges.Any())
|
||||
{
|
||||
var seString = props.Destination;
|
||||
List<StringPosition> stringPositionsOrdered = GetOrderedStringPositions(props);
|
||||
|
||||
Reference in New Issue
Block a user