mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
[Cleanup] Remove bool return from GetSharedPlatinum() (#3191)
# Notes - This was returning `false` and implicitly converting it to an integer.
This commit is contained in:
parent
457ce85746
commit
8afbc585da
@ -425,17 +425,13 @@ bool SharedDatabase::DeleteSharedBankSlot(uint32 char_id, int16 slot_id) {
|
|||||||
|
|
||||||
int32 SharedDatabase::GetSharedPlatinum(uint32 account_id)
|
int32 SharedDatabase::GetSharedPlatinum(uint32 account_id)
|
||||||
{
|
{
|
||||||
const std::string query = StringFormat("SELECT sharedplat FROM account WHERE id = '%i'", account_id);
|
const auto query = fmt::format("SELECT sharedplat FROM account WHERE id = {}", account_id);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success() || !results.RowCount()) {
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (results.RowCount() != 1)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
auto& row = results.begin();
|
|
||||||
|
|
||||||
|
auto row = results.begin();
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user