[Character] Convert Load/Save of Character Buffs to Repositories (#3855)

* [Character] Convert Load/Save of Character Buffs to Repositories

# Notes
- Convert `LoadBuffs` to repositories.
- `SaveBuffs` was already using repositories, cleanup logic.

# Images
## Load

## Save

* Update repository.

* Update zonedb.cpp
This commit is contained in:
Alex King
2024-01-07 01:05:27 -05:00
committed by GitHub
parent f3de3e8c31
commit 164fe31fa8
4 changed files with 203 additions and 123 deletions
+6 -6
View File
@@ -1814,14 +1814,14 @@ void EntityList::DuelMessage(Mob *winner, Mob *loser, bool flee)
}
}
Client *EntityList::GetClientByName(const char *checkname)
Client *EntityList::GetClientByName(const char* name)
{
auto it = client_list.begin();
while (it != client_list.end()) {
if (strcasecmp(it->second->GetName(), checkname) == 0)
return it->second;
++it;
for (const auto& e : client_list) {
if (e.second && Strings::EqualFold(e.second->GetName(), name)) {
return e.second;
}
}
return nullptr;
}