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:
+4
-4
@@ -19,7 +19,7 @@
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/features.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/strings.h"
|
||||
|
||||
#include "client.h"
|
||||
#include "data_bucket.h"
|
||||
@@ -1160,7 +1160,7 @@ uint8 Client::GetCharMaxLevelFromQGlobal() {
|
||||
|
||||
for (const auto& global : global_map) {
|
||||
if (global.name == "CharMaxLevel") {
|
||||
if (StringIsNumber(global.value)) {
|
||||
if (Strings::IsNumber(global.value)) {
|
||||
return static_cast<uint8>(std::stoul(global.value));
|
||||
}
|
||||
}
|
||||
@@ -1178,7 +1178,7 @@ uint8 Client::GetCharMaxLevelFromBucket()
|
||||
|
||||
auto bucket_value = DataBucket::GetData(new_bucket_name);
|
||||
if (!bucket_value.empty()) {
|
||||
if (StringIsNumber(bucket_value)) {
|
||||
if (Strings::IsNumber(bucket_value)) {
|
||||
return static_cast<uint8>(std::stoul(bucket_value));
|
||||
}
|
||||
}
|
||||
@@ -1190,7 +1190,7 @@ uint8 Client::GetCharMaxLevelFromBucket()
|
||||
|
||||
bucket_value = DataBucket::GetData(old_bucket_name);
|
||||
if (!bucket_value.empty()) {
|
||||
if (StringIsNumber(bucket_value)) {
|
||||
if (Strings::IsNumber(bucket_value)) {
|
||||
return static_cast<uint8>(std::stoul(bucket_value));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user