SeString Creator and Evaluator fixes (#2250)

* Fix SeString Creator example

* SeStringEvaluator: Don't print auto translation brackets for categories

* SeStringEvaluator: Fix map id mask

MapId is a ushort, not a byte.
This commit is contained in:
Haselnussbomber 2025-04-21 14:02:26 +02:00 committed by GitHub
parent 39ac9f9dad
commit 61a17dac28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View file

@ -1066,8 +1066,8 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator
if (!enu.MoveNext() || !this.TryResolveUInt(in context, enu.Current, out var placeNameIdInt))
return false;
var instance = packedIds >> 0x10;
var mapId = packedIds & 0xFF;
var instance = packedIds >> 16;
var mapId = packedIds & 0xFFFF;
if (this.dataManager.GetExcelSheet<TerritoryType>(context.Language)
.TryGetRow(territoryTypeId, out var territoryTypeRow))
@ -1355,8 +1355,6 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator
var group = (uint)(e0Val + 1);
var rowId = (uint)e1Val;
using var icons = new SeStringBuilderIconWrap(context.Builder, 54, 55);
if (!this.dataManager.GetExcelSheet<Completion>(context.Language).TryGetFirst(
row => row.Group == group && !row.LookupTable.IsEmpty,
out var groupRow))
@ -1381,6 +1379,8 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator
return true;
}
using var icons = new SeStringBuilderIconWrap(context.Builder, 54, 55);
// CategoryDataCache
if (lookupTable.Equals("#"))
{

View file

@ -135,8 +135,8 @@ internal class SeStringCreatorWidget : IDataWindowWidget
new TextEntry(TextEntryType.Macro, "<colortype(17)>"),
new TextEntry(TextEntryType.Macro, "<edgecolortype(19)>"),
new TextEntry(TextEntryType.String, "Dalamud"),
new TextEntry(TextEntryType.Macro, "<edgecolor(0)>"),
new TextEntry(TextEntryType.Macro, "<colortype(0)>"),
new TextEntry(TextEntryType.Macro, "<edgecolor(stackcolor)>"),
new TextEntry(TextEntryType.Macro, "<color(stackcolor)>"),
new TextEntry(TextEntryType.Macro, " <string(lstr1)>"),
];