feat: convert character ids to 64 bits

remove all usages of the PERSISTENT bit with regards to storing of playerIDs on the server.  the bit does not exist and was a phantom in the first place.
Tested that a full playthrough of ag, ns and gf was still doable.  slash commands work, ugc works, friends works, ignore list works, properties work and have names, teaming works.
migrating an old mysql database works . need to test an old sqlite database
This commit is contained in:
David Markowitz
2025-09-18 21:48:28 -07:00
parent 68f2e2dee2
commit 922a9ef5ea
56 changed files with 327 additions and 270 deletions

View File

@@ -76,8 +76,8 @@ void LogAndSaveFailedAntiCheatCheck(const LWOOBJID& id, const SystemAddress& sys
auto* user = UserManager::Instance()->GetUser(sysAddr);
if (user) {
LOG("User at system address (%s) (%s) (%llu) sent a packet as (%i) which is not an id they own.",
sysAddr.ToString(), user->GetLastUsedChar()->GetName().c_str(), user->GetLastUsedChar()->GetObjectID(), static_cast<int32_t>(id));
LOG("User at system address (%s) (%s) (%llu) sent a packet as (%llu) which is not an id they own.",
sysAddr.ToString(), user->GetLastUsedChar()->GetName().c_str(), user->GetLastUsedChar()->GetObjectID(), id);
// Can't know sending player. Just log system address for IP banning.
} else {
LOG("No user found for system address (%s).", sysAddr.ToString());
@@ -117,7 +117,7 @@ bool CheatDetection::VerifyLwoobjidIsSender(const LWOOBJID& id, const SystemAddr
return false;
}
invalidPacket = true;
const uint32_t characterId = static_cast<uint32_t>(id);
const auto characterId = id;
// Check to make sure the ID provided is one of the user's characters.
for (const auto& character : sendingUser->GetCharacters()) {
if (character && character->GetID() == characterId) {