mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 06:40:26 +00:00
[Cleanup] Nuke Make/AppendAnyLenString (#1251)
* Add a std::string overload for Database::SetMQDetectionFlag * Replace calls to MakeAnyLenString in client_packet.cpp At least the SetMQDetectionFlag ones * Replace MakeAnyLenString calls in client_process At least SetMQDectectionFlag ones * Replace MakeAnyLenString in embparser fmtlib actually is gross here, oh well. * Replace MakeAnyLenString in merc * Replace MakeAnyLenString in inventory Also if'd out an unfinished implementation of Client::GetItemLinkHash * Replace AppendAnyLenString in zonelist * Replace AppendAnyLenString in zonelist * Replace MakeAnyLenString in clientlist * Nuke MakeAnyLenString/AppendAnyLenString * Fix formatting string in zonelist
This commit is contained in:
committed by
GitHub
parent
7a46a6595c
commit
86ce506956
+14
-16
@@ -1262,11 +1262,10 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
||||
NPC *banker = entity_list.GetClosestBanker(this, distance);
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(coin move) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
auto hacked_string = fmt::format("Player tried to make use of a banker(coin move) but "
|
||||
"{} is non-existant or too far away ({} units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
safe_delete_array(hacked_string);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1294,11 +1293,11 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
||||
NPC *banker = entity_list.GetClosestBanker(this, distance);
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(shared coin move) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
auto hacked_string =
|
||||
fmt::format("Player tried to make use of a banker(shared coin move) but {} is "
|
||||
"non-existant or too far away ({} units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
safe_delete_array(hacked_string);
|
||||
return;
|
||||
}
|
||||
if(mc->cointype1 == COINTYPE_PP) // there's only platinum here
|
||||
@@ -1350,11 +1349,10 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
||||
NPC *banker = entity_list.GetClosestBanker(this, distance);
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(coin move) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
auto hacked_string = fmt::format("Player tried to make use of a banker(coin move) but "
|
||||
"{} is non-existant or too far away ({} units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
safe_delete_array(hacked_string);
|
||||
return;
|
||||
}
|
||||
switch(mc->cointype2)
|
||||
@@ -1394,11 +1392,11 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
|
||||
NPC *banker = entity_list.GetClosestBanker(this, distance);
|
||||
if(!banker || distance > USE_NPC_RANGE2)
|
||||
{
|
||||
char *hacked_string = nullptr;
|
||||
MakeAnyLenString(&hacked_string, "Player tried to make use of a banker(shared coin move) but %s is non-existant or too far away (%u units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
auto hacked_string =
|
||||
fmt::format("Player tried to make use of a banker(shared coin move) but {} is "
|
||||
"non-existant or too far away ({} units).",
|
||||
banker ? banker->GetName() : "UNKNOWN NPC", distance);
|
||||
database.SetMQDetectionFlag(AccountName(), GetName(), hacked_string, zone->GetShortName());
|
||||
safe_delete_array(hacked_string);
|
||||
return;
|
||||
}
|
||||
if(mc->cointype2 == COINTYPE_PP) // there's only platinum here
|
||||
|
||||
Reference in New Issue
Block a user