use RawPayload.LinkTerminator to terminate PlayerPayload

This commit is contained in:
2022-09-06 11:48:33 +02:00
parent a3197d89cf
commit cd4ccac194

View File

@@ -103,7 +103,10 @@ namespace PlayerTags.Features
// effectively doubling up the player name.
// For now, don't follow up with a text payload. Only use a player payload.
var playerPayload = new PlayerPayload(playerName, PluginServices.ClientState.LocalPlayer.HomeWorld.Id);
seString.Payloads.Insert(seString.Payloads.IndexOf(playerTextPayload), playerPayload);
var playerPayloadIndex = seString.Payloads.IndexOf(playerTextPayload);
seString.Payloads.Insert(playerPayloadIndex++, playerPayload);
// Normally used to end PlayerPayload linking. But for the own player it has no affect. Anyway, use it, just because. Maybe it's needed in the future somewhere else.
seString.Payloads.Insert(playerPayloadIndex++, RawPayload.LinkTerminator);
seString.Payloads.Remove(playerTextPayload);
}
}