Some quests in Battle for Azeroth are displaying multi-paragraph emotes that aren't currently supported in Storyline (as it is only checking for a < at the start of the text).
What this new code does :
It builds a new array, stillEmote, of the size of the texts array. For each text index, it is true if the previous text was an emote left open, else false.
The first index is always false, as there is no emote left open before the first text.
If the current text isn't continuation of an existing emote and we have more < than >, we set the next index to be a continuation of an existing emote. If we have the same number, there is either no emote or it was closed in the same paragraph, so next index isn't a continuation either.
If the current text is a continuation of an existing emote and we have more > than <, we set the next index to not be a continuation, as the emote is closed in the current text. If we have the same number, the emote still hasn't been closed, so next index is a continuation as well.
I'll have to run through quests again to check if they ever open an emote in the middle of a text, as I don't think this behaviour is currently supported by Storyline. The multi-paragraph code would work, but I'm not 100% sure the color would be applied to the beginning of the emote.
This code doesn't expect Blizzard to make nested emotes. I'm calling the police if they do.
Some quests in Battle for Azeroth are displaying multi-paragraph emotes that aren't currently supported in Storyline (as it is only checking for a
<
at the start of the text).What this new code does :
It builds a new array,
stillEmote
, of the size of the texts array. For each text index, it is true if the previous text was an emote left open, else false.The first index is always false, as there is no emote left open before the first text.
<
than>
, we set the next index to be a continuation of an existing emote. If we have the same number, there is either no emote or it was closed in the same paragraph, so next index isn't a continuation either.>
than<
, we set the next index to not be a continuation, as the emote is closed in the current text. If we have the same number, the emote still hasn't been closed, so next index is a continuation as well.Video of the code working in Boralus
I'll have to run through quests again to check if they ever open an emote in the middle of a text, as I don't think this behaviour is currently supported by Storyline. The multi-paragraph code would work, but I'm not 100% sure the color would be applied to the beginning of the emote.
This code doesn't expect Blizzard to make nested emotes. I'm calling the police if they do.