feat(network): migra entityId int32→int64 nos delegates do ZeusNetwork
V3 Server Meshing (server-side) precisa entityId 64-bit (high32 = FNV-1a do worldId, low32 = counter local) pra evitar collision cross-ZS. Os delegates do plugin (OnPlayerSpawned, OnPlayerDespawned, OnCharInfoReceived, OnPlayerStateUpdate, OnHpSpUpdate, OnLevelUp) e os métodos TryGetLast* migram pra int64; handlers em ZMMOPlayerCharacter, ZMMOWorldSubsystem, UIFrontEndFlowSubsystem e ZMMOAttributeNetworkHandler acompanham. FCachedSpawn::EntityId, FZMMOAttributesSnapshot::EntityId e SeedEntityId também viram int64. Wire S_SPAWN_PLAYER ainda carrega uint32 (server faz XOR high32^low32 pra manter unicidade estatística entre ZSs); ampliação do opcode pra uint64 fica pra PR futuro. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -64,7 +64,7 @@ public:
|
||||
/// chegar, garantindo que o NetworkHandler consiga rotear via lookup
|
||||
/// por EntityId desde o inicio.
|
||||
UFUNCTION(BlueprintCallable, Category = "Zeus|Attributes")
|
||||
void SeedEntityId(int32 InEntityId) { Current.EntityId = InEntityId; }
|
||||
void SeedEntityId(int64 InEntityId) { Current.EntityId = InEntityId; }
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "Zeus|Attributes")
|
||||
const FZMMOAttributesSnapshot& GetSnapshot() const { return Current; }
|
||||
|
||||
@@ -34,8 +34,8 @@ public:
|
||||
|
||||
private:
|
||||
void HandleAttributeSnapshotFull(const FZeusAttributesPayload& Payload);
|
||||
void HandleHpSpUpdate(int32 EntityId, int32 Hp, int32 Sp);
|
||||
void HandleLevelUp(int32 EntityId, int32 NewBaseLevel, int32 StatusPointDelta);
|
||||
void HandleHpSpUpdate(int64 EntityId, int32 Hp, int32 Sp);
|
||||
void HandleLevelUp(int64 EntityId, int32 NewBaseLevel, int32 StatusPointDelta);
|
||||
void HandleStatAllocReply(bool bAccepted, int32 Reason);
|
||||
|
||||
UZeusNetworkSubsystem* GetZeusNetSubsystem() const;
|
||||
|
||||
@@ -20,7 +20,7 @@ struct ZMMOATTRIBUTES_API FZMMOAttributesSnapshot
|
||||
GENERATED_BODY()
|
||||
|
||||
// === Identidade + classe ===
|
||||
UPROPERTY(BlueprintReadOnly, Category = "Zeus|Attributes") int32 EntityId = 0;
|
||||
UPROPERTY(BlueprintReadOnly, Category = "Zeus|Attributes") int64 EntityId = 0;
|
||||
UPROPERTY(BlueprintReadOnly, Category = "Zeus|Attributes") int32 ClassId = 0;
|
||||
|
||||
// === Progressao ===
|
||||
|
||||
Reference in New Issue
Block a user