Add Client::SendColoredText(uint32 color, std::string message)

This will send a message (arbitrary size limit of 512) to the client
of the provided color. The MT colors should work here.
This commit is contained in:
Michael Cook (mackal)
2014-09-24 13:14:20 -04:00
parent a445d7e39f
commit 34496c49b4
2 changed files with 16 additions and 0 deletions
+15
View File
@@ -8313,3 +8313,18 @@ float Client::GetQuiverHaste()
quiver_haste = 1.0f / (1.0f + static_cast<float>(quiver_haste) / 100.0f);
return quiver_haste;
}
void Client::SendColoredText(uint32 color, std::string message)
{
// arbitrary size limit
if (message.size() > 512) // live does send this with empty strings sometimes ...
return;
EQApplicationPacket *outapp = new EQApplicationPacket(OP_ColoredText,
sizeof(ColoredText_Struct) + message.size());
ColoredText_Struct *cts = (ColoredText_Struct *)outapp->pBuffer;
cts->color = color;
strcpy(cts->msg, message.c_str());
QueuePacket(outapp);
safe_delete(outapp);
}