Bug #424: Too many bytes in Map::Msg(NPC *from, std::string message)
ID | #424 |
---|---|
Submitter | insomniac |
Product | EOSERV |
Severity | Trivial |
Status | OPEN, CONFIRMED |
Submitted | 8th Aug 2016 |
Updated | 6th Nov 2016 |
builder.AddShort(from->index); needs to be switched to builder.AddChar(from->index);
from
void Map::Msg(NPC *from, std::string message)
{
message = util::text_cap(message, static_cast<int>(this->world->config["ChatMaxWidth"]) - util::text_width(util::ucfirst(from->ENF().name) + " "));
PacketBuilder builder(PACKET_NPC, PACKET_PLAYER, 4 + message.length());
builder.AddByte(255);
builder.AddByte(255);
builder.AddShort(from->index);
builder.AddChar(message.length());
builder.AddString(message);
UTIL_FOREACH(this->characters, character)
{
character->Send(builder);
}
}
to
void Map::Msg(NPC *from, std::string message)
{
message = util::text_cap(message, static_cast<int>(this->world->config["ChatMaxWidth"]) - util::text_width(util::ucfirst(from->ENF().name) + " "));
PacketBuilder builder(PACKET_NPC, PACKET_PLAYER, 4 + message.length());
builder.AddByte(255);
builder.AddByte(255);
builder.AddChar(from->index);
builder.AddChar(message.length());
builder.AddString(message);
UTIL_FOREACH(this->characters, character)
{
character->Send(builder);
}
}
Comments
This code doesn't even exist in EOSERV.
Updated Status to CLOSED, INVALID
Yes it does http://svn.eoserv.net/eoserv/trunk/src/map.cpp on line 843
Oops, it exists, it's just not used anywhere.
Add Comment
Please don't post unless you have something relevant to the bug to say.
Do not comment to say "thanks" or "fix this please".
Please log in to add comments. EOSERV Bug Tracker > Bug #424: Too many bytes in Map::Msg(NPC *from, std::string message)