mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-24 21:52:26 +00:00
Merge pull request #58 from Valorith/copilot/sub-pr-55-another-one
Fix false error log in SaveBuffs due to REPLACE INTO row count semantics
This commit is contained in:
commit
8adfc97088
@ -895,7 +895,7 @@ inline void TestClientBuffPersistence()
|
||||
Client loader;
|
||||
loader.SetCharacterId(test_character_id);
|
||||
loader.SetName("buff-persistence-load");
|
||||
loader.SetClientVersion(ClientVersion::RoF2);
|
||||
loader.SetClientVersion(EQ::versions::ClientVersion::RoF2);
|
||||
database.LoadBuffs(&loader);
|
||||
|
||||
auto loaded_buffs = loader.GetBuffs();
|
||||
|
||||
@ -2935,9 +2935,9 @@ void ZoneDatabase::SaveBuffs(Client *client)
|
||||
|
||||
if (!v.empty()) {
|
||||
const auto saved_count = CharacterBuffsRepository::ReplaceMany(database, v);
|
||||
if (saved_count != static_cast<int>(v.size())) {
|
||||
if (saved_count < static_cast<int>(v.size())) {
|
||||
LogError(
|
||||
"Failed to save all buffs for character [{}] [{}]. Expected [{}] rows, saved [{}]. Verify the `character_buffs` schema is up to date.",
|
||||
"Failed to save all buffs for character [{}] [{}]. Expected at least [{}] rows saved, got [{}]. Verify the `character_buffs` schema is up to date.",
|
||||
client->GetCleanName(),
|
||||
client->CharacterID(),
|
||||
v.size(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user