mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
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:
parent
a445d7e39f
commit
34496c49b4
@ -8313,3 +8313,18 @@ float Client::GetQuiverHaste()
|
|||||||
quiver_haste = 1.0f / (1.0f + static_cast<float>(quiver_haste) / 100.0f);
|
quiver_haste = 1.0f / (1.0f + static_cast<float>(quiver_haste) / 100.0f);
|
||||||
return quiver_haste;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -255,6 +255,7 @@ public:
|
|||||||
const char *message7 = nullptr, const char *message8 = nullptr,
|
const char *message7 = nullptr, const char *message8 = nullptr,
|
||||||
const char *message9 = nullptr);
|
const char *message9 = nullptr);
|
||||||
void Tell_StringID(uint32 string_id, const char *who, const char *message);
|
void Tell_StringID(uint32 string_id, const char *who, const char *message);
|
||||||
|
void SendColoredText(uint32 color, std::string message);
|
||||||
void SendBazaarResults(uint32 trader_id,uint32 class_,uint32 race,uint32 stat,uint32 slot,uint32 type,char name[64],uint32 minprice,uint32 maxprice);
|
void SendBazaarResults(uint32 trader_id,uint32 class_,uint32 race,uint32 stat,uint32 slot,uint32 type,char name[64],uint32 minprice,uint32 maxprice);
|
||||||
void SendTraderItem(uint32 item_id,uint16 quantity);
|
void SendTraderItem(uint32 item_id,uint16 quantity);
|
||||||
uint16 FindTraderItem(int32 SerialNumber,uint16 Quantity);
|
uint16 FindTraderItem(int32 SerialNumber,uint16 Quantity);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user