[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:
Michael Cook (mackal)
2021-02-23 19:32:19 -05:00
committed by GitHub
parent 7a46a6595c
commit 86ce506956
12 changed files with 128 additions and 212 deletions
+1 -8
View File
@@ -2154,16 +2154,9 @@ bool Merc::AICastSpell(int8 iChance, uint32 iSpellTypes) {
}
if(castedSpell) {
char* gmsg = nullptr;
if(tar && tar != this) { // [tar] was implicitly valid at this point..this change is to catch any bad logic
//we don't need spam of bots healing themselves
MakeAnyLenString(&gmsg, "Casting %s on %s.", spells[selectedMercSpell.spellid].name, tar->GetCleanName());
if(gmsg)
{
MercGroupSay(this, gmsg);
safe_delete_array(gmsg);
}
MercGroupSay(this, "Casting %s on %s.", spells[selectedMercSpell.spellid].name, tar->GetCleanName());
}
}