[DiscordArchive] did you add the html tag?
[DiscordArchive] did you add the html tag?
Archived author: Foe • Posted: 2023-01-19T23:09:25.199000+00:00
Original source
```The remainder of the file can be straight text or simple, properly formed html (one or the other, but not both). The file should always end with a carriage return of the last character will not be processed (and in the case of html data, this will invalidate the html).```
Archived author: Foe • Posted: 2023-01-19T23:09:34.655000+00:00
Original source
See the carriage return specifically
Archived author: Anchy • Posted: 2023-01-19T23:10:36.430000+00:00
Original source
okay it works now
![[Image: image.png?ex=690bd97c&is=690a87fc&hm=362...4e14fc5f3&]](https://cdn.discordapp.com/attachments/284406375495368704/1065770350744436908/image.png?ex=690bd97c&is=690a87fc&hm=3622c5b2cda20c0e9d1d8bb5d579bd23c24d0a277478a27ce11f2cd4e14fc5f3&)
Archived author: Anchy • Posted: 2023-01-19T23:10:52.739000+00:00
Original source
![[Image: image.png?ex=690bd97c&is=690a87fc&hm=362...4e14fc5f3&]](https://cdn.discordapp.com/attachments/284406375495368704/1065770350744436908/image.png?ex=690bd97c&is=690a87fc&hm=3622c5b2cda20c0e9d1d8bb5d579bd23c24d0a277478a27ce11f2cd4e14fc5f3&)
Archived author: Foe • Posted: 2023-01-19T23:10:58.319000+00:00
Original source
Nice
tring alertHtml = "<html><body><h1 align=\"left\">Test</h1><p>body text here</p></body></html>";
tring breakingNewsPayload = Acore::StringFormatFmt("local saf = ServerAlertFrame;saf:SetParent(CharacterSelect);ServerAlertText:SetText('{}');saf:Show();", alertHtml);Archived author: Anchy • Posted: 2023-01-19T23:11:08.711000+00:00
Original source
```cpp
class MyServerScript : ServerScript
{
public:
MyServerScript() : ServerScript("MyServerScript") { }
bool CanPacketSend(WorldSession* session, WorldPacket& packet) override
{
if (packet.GetOpcode() == SMSG_CHAR_ENUM)
{
WardenWin* warden = (WardenWin*)session->GetWarden();
if (!warden)
{
return true;
}
std:
tring alertHtml = "<html><body><h1 align=\"left\">Test</h1><p>body text here</p></body></html>";
std:
tring breakingNewsPayload = Acore::StringFormatFmt("local saf = ServerAlertFrame;saf:SetParent(CharacterSelect);ServerAlertText:SetText('{}');saf:Show();", alertHtml);
warden->SendChunkedPayload(breakingNewsPayload, 64);
}
return true;
}
}```
Archived author: Foe • Posted: 2023-01-19T23:11:57.288000+00:00
Original source
Pretty sure it also defaults center the headers
Archived author: Anchy • Posted: 2023-01-19T23:12:12.362000+00:00
Original source
SendChunkedPayload Forces behind the scenes btw
Archived author: Anchy • Posted: 2023-01-19T23:12:20.321000+00:00
Original source
it might make sense to force it here since sometimes the payloads are slow
Archived author: Foe • Posted: 2023-01-19T23:12:32.141000+00:00
Original source
Yeah I would definitely do that for this use case