mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint * More functions converted * Commify * More functions * Fin * Sort declarations * Split functions between files * Bots * Update strings.h * Split * Revert find replaces * Repository template * Money * Misc function * Update CMakeLists.txt * Saylink * Update strings.cpp * Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database * API casings
This commit is contained in:
+7
-7
@@ -23,7 +23,7 @@
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/seperator.h"
|
||||
#include "../common/spdat.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/emu_versions.h"
|
||||
#include "../common/features.h"
|
||||
#include "../common/item_instance.h"
|
||||
@@ -703,7 +703,7 @@ void NPC::QueryLoot(Client* to, bool is_pet_query)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Money | {}",
|
||||
ConvertMoneyToString(
|
||||
Strings::Money(
|
||||
platinum,
|
||||
gold,
|
||||
silver,
|
||||
@@ -1212,8 +1212,8 @@ void NPC::SpawnGridNodeNPC(const glm::vec4 &position, int32 grid_id, int32 grid_
|
||||
auto npc_type = new NPCType;
|
||||
memset(npc_type, 0, sizeof(NPCType));
|
||||
|
||||
std::string str_zoffset = numberToWords(zoffset);
|
||||
std::string str_number = numberToWords(grid_number);
|
||||
std::string str_zoffset = Strings::NumberToWords(zoffset);
|
||||
std::string str_number = Strings::NumberToWords(grid_number);
|
||||
|
||||
strcpy(npc_type->name, str_number.c_str());
|
||||
if (zoffset != 0) {
|
||||
@@ -1551,7 +1551,7 @@ uint32 ZoneDatabase::AddNewNPCSpawnGroupCommand(
|
||||
std::string query = fmt::format(
|
||||
"INSERT INTO spawngroup (name) VALUES('{}{}{}')",
|
||||
zone,
|
||||
EscapeString(spawn->GetName()),
|
||||
Strings::Escape(spawn->GetName()),
|
||||
Timer::GetCurrentTime()
|
||||
);
|
||||
|
||||
@@ -2424,7 +2424,7 @@ void NPC::SetLevel(uint8 in_level, bool command)
|
||||
|
||||
void NPC::ModifyNPCStat(const char *identifier, const char *new_value)
|
||||
{
|
||||
std::string id = str_tolower(identifier);
|
||||
std::string id = Strings::ToLower(identifier);
|
||||
std::string val = new_value;
|
||||
|
||||
std::string variable_key = StringFormat("modify_stat_%s", id.c_str());
|
||||
@@ -2650,7 +2650,7 @@ void NPC::ModifyNPCStat(const char *identifier, const char *new_value)
|
||||
|
||||
float NPC::GetNPCStat(const char *identifier)
|
||||
{
|
||||
std::string id = str_tolower(identifier);
|
||||
std::string id = Strings::ToLower(identifier);
|
||||
|
||||
if (id == "ac") {
|
||||
return AC;
|
||||
|
||||
Reference in New Issue
Block a user