feat: re-write persistent object ID tracker

Features:
- Remove random objectIDs entirely
- Replace random objectIDs with persistentIDs
- Remove the need to contact the MASTER server for a persistent ID
- Add persistent ID logic to WorldServers that use transactions to guarantee unique IDs no matter when they are generated
- Default character xml version to be the most recent one

Fixes:
- Return optional from GetModel (and check for nullopt where it may exist)
- Regenerate inventory item ids on first login to be unique item IDs (fixes all those random IDs

Pet IDs and subkeys are left alone and are assumed to be reserved (checks are there to prevent this)
There is also duplicate check logic in place for properties and UGC/Models
This commit is contained in:
David Markowitz
2025-09-28 20:30:59 -07:00
parent b5a3cc9187
commit 151d05e853
43 changed files with 676 additions and 656 deletions

View File

@@ -8,9 +8,6 @@
class dServer;
namespace MasterPackets {
void SendPersistentIDRequest(dServer* server, uint64_t requestID); //Called from the World server
void SendPersistentIDResponse(dServer* server, const SystemAddress& sysAddr, uint64_t requestID, uint32_t objID);
void SendZoneTransferRequest(dServer* server, uint64_t requestID, bool mythranShift, uint32_t zoneID, uint32_t cloneID);
void SendZoneTransferResponse(dServer* server, const SystemAddress& sysAddr, uint64_t requestID, bool mythranShift, uint32_t zoneID, uint32_t zoneInstance, uint32_t zoneClone, const std::string& serverIP, uint32_t serverPort);
@@ -22,8 +19,6 @@ namespace MasterPackets {
void SendZoneRequestPrivate(dServer* server, uint64_t requestID, bool mythranShift, const std::string& password);
void SendWorldReady(dServer* server, LWOMAPID zoneId, LWOINSTANCEID instanceId);
void HandleSetSessionKey(Packet* packet);
}
#endif // MASTERPACKETS_H