[Databuckets] Fix issue with expired databuckets not being expired and returned properly (#3504)

This commit is contained in:
Chris Miles
2023-07-18 17:18:36 -05:00
committed by GitHub
parent fb3159b657
commit 4c2f9a4423
5 changed files with 35 additions and 57 deletions
+4 -4
View File
@@ -1276,10 +1276,10 @@ uint8 Client::GetCharMaxLevelFromBucket()
DataBucketKey k = GetScopedBucketKeys();
k.key = "CharMaxLevel";
auto bucket_value = DataBucket::GetData(k);
if (!bucket_value.empty()) {
if (Strings::IsNumber(bucket_value)) {
return static_cast<uint8>(Strings::ToUnsignedInt(bucket_value));
auto b = DataBucket::GetData(k);
if (!b.value.empty()) {
if (Strings::IsNumber(b.value)) {
return static_cast<uint8>(Strings::ToUnsignedInt(b.value));
}
}