From 6a6a28a086f93f003c60a910895c5358e284a972 Mon Sep 17 00:00:00 2001 From: Mateus Rodrigues Date: Tue, 2 Jun 2026 17:24:38 -0300 Subject: [PATCH] =?UTF-8?q?refactor:=20prefixo=20ZMMO=20->=20Zeus=20em=20c?= =?UTF-8?q?lasses/m=C3=B3dulos=20C++=20do=20cliente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renomeia ~50 classes UCLASS/USTRUCT/UENUM/UINTERFACE pra Zeus* (AZeusGameMode, AZeusCharacter, UZeusGameInstance, IZeusEntityInterface, UZeusWorldSubsystem, FZeusEntitySnapshot, etc.) - Encurta AZMMOPlayerCharacter -> AZeusCharacter - Renomeia módulos satélite ZMMOAttributes -> ZeusAttributes e ZMMOJobs -> ZeusJobs (pasta + .Build.cs + .uproject) - Mantém módulo principal ZMMO (renomeia depois quando jogo ganhar nome) - DefaultEngine.ini: ActiveClassRedirects ZMMOX -> ZeusX (preserva BPs/assets) - DefaultGame.ini: sections atualizadas pra ZeusThemeSubsystem/ZeusPlayerState - Category="ZMMO|..." -> "Zeus|..." em UPROPERTYs - Preserva LogZMMO, ZMMO_API, /Script/ZMMO., /Game/ZMMO/, classes Target Co-Authored-By: Claude Opus 4.7 --- Config/DefaultEngine.ini | 35 ++++- Config/DefaultGame.ini | 22 +-- Source/ZMMO/Data/UI/FrontEndTypes.h | 8 +- Source/ZMMO/Data/UI/InGameTypes.h | 4 +- Source/ZMMO/Data/UI/LoadingTypes.h | 12 +- Source/ZMMO/Data/UI/ThemeKeys.h | 2 +- Source/ZMMO/Data/UI/UILayerTags.cpp | 2 +- Source/ZMMO/Data/UI/UILayerTags.h | 2 +- Source/ZMMO/Data/UI/UIStyleRow.h | 4 +- Source/ZMMO/Data/UI/UIStyleTypes.h | 2 +- Source/ZMMO/Data/World/MapDef.h | 14 +- ...r.cpp => ZeusFrontEndPlayerController.cpp} | 6 +- ...oller.h => ZeusFrontEndPlayerController.h} | 10 +- ...ontroller.cpp => ZeusPlayerController.cpp} | 28 ++-- ...yerController.h => ZeusPlayerController.h} | 10 +- .../Game/Entity/ZMMOProxyMovementComponent.h | 25 ---- ...OPlayerCharacter.cpp => ZeusCharacter.cpp} | 139 +++++++++--------- ...{ZMMOPlayerCharacter.h => ZeusCharacter.h} | 47 +++--- .../Entity/{ZMMOEntity.cpp => ZeusEntity.cpp} | 14 +- .../Entity/{ZMMOEntity.h => ZeusEntity.h} | 42 +++--- ...ntityInterface.h => ZeusEntityInterface.h} | 30 ++-- .../{ZMMOEntityTypes.h => ZeusEntityTypes.h} | 30 ++-- ...MMOPlayerProxy.cpp => ZeusPlayerProxy.cpp} | 48 +++--- .../{ZMMOPlayerProxy.h => ZeusPlayerProxy.h} | 68 +++++---- .../Game/Entity/ZeusProxyMovementComponent.h | 24 +++ .../ZMMO/Game/Modes/ZMMOFrontEndGameMode.cpp | 10 -- Source/ZMMO/Game/Modes/ZMMOGameMode.cpp | 14 -- .../ZMMO/Game/Modes/ZeusFrontEndGameMode.cpp | 10 ++ ...ntEndGameMode.h => ZeusFrontEndGameMode.h} | 10 +- ...OGameInstance.cpp => ZeusGameInstance.cpp} | 38 ++--- ...{ZMMOGameInstance.h => ZeusGameInstance.h} | 14 +- Source/ZMMO/Game/Modes/ZeusGameMode.cpp | 14 ++ .../Modes/{ZMMOGameMode.h => ZeusGameMode.h} | 14 +- .../Game/Modes/{ZMMOHUD.cpp => ZeusHUD.cpp} | 10 +- .../ZMMO/Game/Modes/{ZMMOHUD.h => ZeusHUD.h} | 14 +- ...MMOPlayerState.cpp => ZeusPlayerState.cpp} | 40 ++--- .../{ZMMOPlayerState.h => ZeusPlayerState.h} | 52 +++---- ...ldSubsystem.cpp => ZeusWorldSubsystem.cpp} | 94 ++++++------ ...OWorldSubsystem.h => ZeusWorldSubsystem.h} | 34 ++--- .../Game/UI/Common/UIDraggableWindow_Base.cpp | 6 +- .../Game/UI/Common/UIDraggableWindow_Base.h | 4 +- .../UI/Common/UILoadingProfilesDataAsset.cpp | 6 +- .../UI/Common/UILoadingProfilesDataAsset.h | 8 +- .../Game/UI/Common/UILoadingScreen_Base.cpp | 56 +++---- .../Game/UI/Common/UILoadingScreen_Base.h | 22 +-- Source/ZMMO/Game/UI/Common/UILoadingTipRow.h | 4 +- .../ZMMO/Game/UI/Common/UIWindowSaveGame.cpp | 16 +- Source/ZMMO/Game/UI/Common/UIWindowSaveGame.h | 8 +- .../ZMMO/Game/UI/FrontEnd/CharServerOpcodes.h | 10 +- .../UI/FrontEnd/UIActivatableScreen_Base.cpp | 16 +- .../UI/FrontEnd/UIActivatableScreen_Base.h | 6 +- .../Game/UI/FrontEnd/UIBootScreen_Base.cpp | 4 +- .../ZMMO/Game/UI/FrontEnd/UICharCard_Base.cpp | 6 +- .../ZMMO/Game/UI/FrontEnd/UICharCard_Base.h | 22 +-- .../FrontEnd/UICharacterCreatePage_Base.cpp | 12 +- .../UI/FrontEnd/UICharacterCreatePage_Base.h | 8 +- .../UI/FrontEnd/UIFrontEndFlowSubsystem.cpp | 100 ++++++------- .../UI/FrontEnd/UIFrontEndFlowSubsystem.h | 40 ++--- .../Game/UI/FrontEnd/UIFrontEndScreenSet.cpp | 4 +- .../Game/UI/FrontEnd/UIFrontEndScreenSet.h | 8 +- .../Game/UI/FrontEnd/UILoginScreen_Base.cpp | 40 ++--- .../UI/FrontEnd/UIPrimaryGameLayout_Base.cpp | 8 +- .../Game/UI/FrontEnd/UIServerCard_Base.cpp | 2 +- .../ZMMO/Game/UI/FrontEnd/UIServerCard_Base.h | 12 +- .../UI/FrontEnd/UIServerSelectScreen_Base.cpp | 26 ++-- .../UI/FrontEnd/UIServerSelectScreen_Base.h | 4 +- .../UI/FrontEnd/UIUserLobbyScreen_Base.cpp | 54 +++---- .../Game/UI/FrontEnd/UIUserLobbyScreen_Base.h | 4 +- Source/ZMMO/Game/UI/FrontEnd/WireHelpers.h | 2 +- .../Game/UI/FrontEnd/ZMMOLoginSaveGame.cpp | 3 - .../{ZMMOCharSummary.h => ZeusCharSummary.h} | 12 +- .../Game/UI/FrontEnd/ZeusLoginSaveGame.cpp | 3 + ...MMOLoginSaveGame.h => ZeusLoginSaveGame.h} | 4 +- .../{ZMMORealmEntry.h => ZeusRealmEntry.h} | 8 +- .../Game/UI/InGame/UIInGameFlowSubsystem.cpp | 54 +++---- .../Game/UI/InGame/UIInGameFlowSubsystem.h | 22 +-- .../ZMMO/Game/UI/InGame/UIInGameScreenSet.cpp | 2 +- .../ZMMO/Game/UI/InGame/UIInGameScreenSet.h | 6 +- ...dget.cpp => ZeusHudPlayerVitalsWidget.cpp} | 12 +- ...lsWidget.h => ZeusHudPlayerVitalsWidget.h} | 18 +-- .../{ZMMOHudWidget.cpp => ZeusHudWidget.cpp} | 70 ++++----- .../{ZMMOHudWidget.h => ZeusHudWidget.h} | 48 +++--- .../ZMMO/Game/UI/Widgets/UICheckBox_Base.cpp | 8 +- Source/ZMMO/Game/UI/Widgets/UICheckBox_Base.h | 2 +- .../Game/UI/Widgets/UICommonText_Base.cpp | 4 +- .../ZMMO/Game/UI/Widgets/UICommonText_Base.h | 2 +- Source/ZMMO/Game/UI/Widgets/UIInput_Base.cpp | 8 +- Source/ZMMO/Game/UI/Widgets/UIPanel_Base.cpp | 8 +- Source/ZMMO/Game/UI/Widgets/UIPanel_Base.h | 2 +- .../Game/UI/Widgets/UIPlayerStatus_StatRow.h | 4 +- .../Game/UI/Widgets/UIPlayerStatus_Window.cpp | 38 ++--- .../Game/UI/Widgets/UIPlayerStatus_Window.h | 14 +- .../Game/UI/Widgets/UIProgressBar_Base.cpp | 8 +- .../ZMMO/Game/UI/Widgets/UISpinner_Base.cpp | 8 +- Source/ZMMO/Game/UI/Widgets/UISpinner_Base.h | 2 +- Source/ZMMO/Game/UI/ZMMOThemeDataAsset.cpp | 11 -- Source/ZMMO/Game/UI/ZeusThemeDataAsset.cpp | 11 ++ ...OThemeDataAsset.h => ZeusThemeDataAsset.h} | 10 +- ...meSubsystem.cpp => ZeusThemeSubsystem.cpp} | 38 ++--- ...OThemeSubsystem.h => ZeusThemeSubsystem.h} | 32 ++-- Source/ZMMO/ZMMO.Build.cs | 4 +- .../Private/ZMMOAttributesModule.cpp | 13 -- Source/ZMMOJobs/Private/ZMMOJobsModule.cpp | 13 -- .../Private/ZeusAttributeComponent.cpp} | 14 +- .../Private/ZeusAttributeNetworkHandler.cpp} | 60 ++++---- .../Private/ZeusAttributesModule.cpp | 13 ++ .../Private/ZeusHudHpSpWidget.cpp} | 8 +- .../Public/ZeusAttributeComponent.h} | 38 ++--- .../Public/ZeusAttributeNetworkHandler.h} | 12 +- .../Public/ZeusAttributeTypes.h} | 4 +- .../Public/ZeusAttributesModule.h} | 2 +- .../Public/ZeusHudHpSpWidget.h} | 26 ++-- .../ZeusAttributes.Build.cs} | 4 +- .../module.json | 10 +- .../Private/ZeusJobChangeNetworkHandler.cpp} | 28 ++-- .../Private/ZeusJobDataAsset.cpp} | 2 +- .../Private/ZeusJobsLibrary.cpp} | 36 ++--- Source/ZeusJobs/Private/ZeusJobsModule.cpp | 13 ++ .../Private/ZeusJobsSubsystem.cpp} | 42 +++--- .../Public/ZeusJobChangeNetworkHandler.h} | 12 +- .../Public/ZeusJobDataAsset.h} | 16 +- .../Public/ZeusJobTypes.h} | 6 +- .../Public/ZeusJobsLibrary.h} | 16 +- .../Public/ZeusJobsModule.h} | 6 +- .../Public/ZeusJobsSubsystem.h} | 28 ++-- .../ZeusJobs.Build.cs} | 6 +- Source/{ZMMOJobs => ZeusJobs}/module.json | 12 +- ZMMO.uproject | 4 +- 128 files changed, 1224 insertions(+), 1210 deletions(-) rename Source/ZMMO/Game/Controller/{ZMMOFrontEndPlayerController.cpp => ZeusFrontEndPlayerController.cpp} (68%) rename Source/ZMMO/Game/Controller/{ZMMOFrontEndPlayerController.h => ZeusFrontEndPlayerController.h} (66%) rename Source/ZMMO/Game/Controller/{ZMMOPlayerController.cpp => ZeusPlayerController.cpp} (83%) rename Source/ZMMO/Game/Controller/{ZMMOPlayerController.h => ZeusPlayerController.h} (88%) delete mode 100644 Source/ZMMO/Game/Entity/ZMMOProxyMovementComponent.h rename Source/ZMMO/Game/Entity/{ZMMOPlayerCharacter.cpp => ZeusCharacter.cpp} (72%) rename Source/ZMMO/Game/Entity/{ZMMOPlayerCharacter.h => ZeusCharacter.h} (78%) rename Source/ZMMO/Game/Entity/{ZMMOEntity.cpp => ZeusEntity.cpp} (53%) rename Source/ZMMO/Game/Entity/{ZMMOEntity.h => ZeusEntity.h} (59%) rename Source/ZMMO/Game/Entity/{ZMMOEntityInterface.h => ZeusEntityInterface.h} (71%) rename Source/ZMMO/Game/Entity/{ZMMOEntityTypes.h => ZeusEntityTypes.h} (63%) rename Source/ZMMO/Game/Entity/{ZMMOPlayerProxy.cpp => ZeusPlayerProxy.cpp} (88%) rename Source/ZMMO/Game/Entity/{ZMMOPlayerProxy.h => ZeusPlayerProxy.h} (76%) create mode 100644 Source/ZMMO/Game/Entity/ZeusProxyMovementComponent.h delete mode 100644 Source/ZMMO/Game/Modes/ZMMOFrontEndGameMode.cpp delete mode 100644 Source/ZMMO/Game/Modes/ZMMOGameMode.cpp create mode 100644 Source/ZMMO/Game/Modes/ZeusFrontEndGameMode.cpp rename Source/ZMMO/Game/Modes/{ZMMOFrontEndGameMode.h => ZeusFrontEndGameMode.h} (63%) rename Source/ZMMO/Game/Modes/{ZMMOGameInstance.cpp => ZeusGameInstance.cpp} (60%) rename Source/ZMMO/Game/Modes/{ZMMOGameInstance.h => ZeusGameInstance.h} (88%) create mode 100644 Source/ZMMO/Game/Modes/ZeusGameMode.cpp rename Source/ZMMO/Game/Modes/{ZMMOGameMode.h => ZeusGameMode.h} (53%) rename Source/ZMMO/Game/Modes/{ZMMOHUD.cpp => ZeusHUD.cpp} (82%) rename Source/ZMMO/Game/Modes/{ZMMOHUD.h => ZeusHUD.h} (70%) rename Source/ZMMO/Game/Modes/{ZMMOPlayerState.cpp => ZeusPlayerState.cpp} (66%) rename Source/ZMMO/Game/Modes/{ZMMOPlayerState.h => ZeusPlayerState.h} (74%) rename Source/ZMMO/Game/Network/{ZMMOWorldSubsystem.cpp => ZeusWorldSubsystem.cpp} (72%) rename Source/ZMMO/Game/Network/{ZMMOWorldSubsystem.h => ZeusWorldSubsystem.h} (75%) delete mode 100644 Source/ZMMO/Game/UI/FrontEnd/ZMMOLoginSaveGame.cpp rename Source/ZMMO/Game/UI/FrontEnd/{ZMMOCharSummary.h => ZeusCharSummary.h} (94%) create mode 100644 Source/ZMMO/Game/UI/FrontEnd/ZeusLoginSaveGame.cpp rename Source/ZMMO/Game/UI/FrontEnd/{ZMMOLoginSaveGame.h => ZeusLoginSaveGame.h} (91%) rename Source/ZMMO/Game/UI/FrontEnd/{ZMMORealmEntry.h => ZeusRealmEntry.h} (87%) rename Source/ZMMO/Game/UI/InGame/{ZMMOHudPlayerVitalsWidget.cpp => ZeusHudPlayerVitalsWidget.cpp} (88%) rename Source/ZMMO/Game/UI/InGame/{ZMMOHudPlayerVitalsWidget.h => ZeusHudPlayerVitalsWidget.h} (87%) rename Source/ZMMO/Game/UI/InGame/{ZMMOHudWidget.cpp => ZeusHudWidget.cpp} (67%) rename Source/ZMMO/Game/UI/InGame/{ZMMOHudWidget.h => ZeusHudWidget.h} (79%) delete mode 100644 Source/ZMMO/Game/UI/ZMMOThemeDataAsset.cpp create mode 100644 Source/ZMMO/Game/UI/ZeusThemeDataAsset.cpp rename Source/ZMMO/Game/UI/{ZMMOThemeDataAsset.h => ZeusThemeDataAsset.h} (67%) rename Source/ZMMO/Game/UI/{ZMMOThemeSubsystem.cpp => ZeusThemeSubsystem.cpp} (79%) rename Source/ZMMO/Game/UI/{ZMMOThemeSubsystem.h => ZeusThemeSubsystem.h} (80%) delete mode 100644 Source/ZMMOAttributes/Private/ZMMOAttributesModule.cpp delete mode 100644 Source/ZMMOJobs/Private/ZMMOJobsModule.cpp rename Source/{ZMMOAttributes/Private/ZMMOAttributeComponent.cpp => ZeusAttributes/Private/ZeusAttributeComponent.cpp} (73%) rename Source/{ZMMOAttributes/Private/ZMMOAttributeNetworkHandler.cpp => ZeusAttributes/Private/ZeusAttributeNetworkHandler.cpp} (73%) create mode 100644 Source/ZeusAttributes/Private/ZeusAttributesModule.cpp rename Source/{ZMMOAttributes/Private/ZMMOHudHpSpWidget.cpp => ZeusAttributes/Private/ZeusHudHpSpWidget.cpp} (78%) rename Source/{ZMMOAttributes/Public/ZMMOAttributeComponent.h => ZeusAttributes/Public/ZeusAttributeComponent.h} (76%) rename Source/{ZMMOAttributes/Public/ZMMOAttributeNetworkHandler.h => ZeusAttributes/Public/ZeusAttributeNetworkHandler.h} (80%) rename Source/{ZMMOAttributes/Public/ZMMOAttributeTypes.h => ZeusAttributes/Public/ZeusAttributeTypes.h} (98%) rename Source/{ZMMOAttributes/Public/ZMMOAttributesModule.h => ZeusAttributes/Public/ZeusAttributesModule.h} (89%) rename Source/{ZMMOAttributes/Public/ZMMOHudHpSpWidget.h => ZeusAttributes/Public/ZeusHudHpSpWidget.h} (79%) rename Source/{ZMMOAttributes/ZMMOAttributes.Build.cs => ZeusAttributes/ZeusAttributes.Build.cs} (85%) rename Source/{ZMMOAttributes => ZeusAttributes}/module.json (75%) rename Source/{ZMMOJobs/Private/ZMMOJobChangeNetworkHandler.cpp => ZeusJobs/Private/ZeusJobChangeNetworkHandler.cpp} (64%) rename Source/{ZMMOJobs/Private/ZMMOJobDataAsset.cpp => ZeusJobs/Private/ZeusJobDataAsset.cpp} (85%) rename Source/{ZMMOJobs/Private/ZMMOJobsLibrary.cpp => ZeusJobs/Private/ZeusJobsLibrary.cpp} (61%) create mode 100644 Source/ZeusJobs/Private/ZeusJobsModule.cpp rename Source/{ZMMOJobs/Private/ZMMOJobsSubsystem.cpp => ZeusJobs/Private/ZeusJobsSubsystem.cpp} (59%) rename Source/{ZMMOJobs/Public/ZMMOJobChangeNetworkHandler.h => ZeusJobs/Public/ZeusJobChangeNetworkHandler.h} (83%) rename Source/{ZMMOJobs/Public/ZMMOJobDataAsset.h => ZeusJobs/Public/ZeusJobDataAsset.h} (89%) rename Source/{ZMMOJobs/Public/ZMMOJobTypes.h => ZeusJobs/Public/ZeusJobTypes.h} (95%) rename Source/{ZMMOJobs/Public/ZMMOJobsLibrary.h => ZeusJobs/Public/ZeusJobsLibrary.h} (85%) rename Source/{ZMMOJobs/Public/ZMMOJobsModule.h => ZeusJobs/Public/ZeusJobsModule.h} (75%) rename Source/{ZMMOJobs/Public/ZMMOJobsSubsystem.h => ZeusJobs/Public/ZeusJobsSubsystem.h} (71%) rename Source/{ZMMOJobs/ZMMOJobs.Build.cs => ZeusJobs/ZeusJobs.Build.cs} (80%) rename Source/{ZMMOJobs => ZeusJobs}/module.json (73%) diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index a8a5ba5..e2f127d 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -2,9 +2,9 @@ GameDefaultMap=/Game/ZMMO/Maps/FrontEnd/L_FrontEnd.L_FrontEnd EditorStartupMap=/Game/ZMMO/Maps/FrontEnd/L_FrontEnd.L_FrontEnd ; GameMode/PlayerController/PlayerCharacter agora moram em C++ (Game/Modes/Entity/Controller). -; O motor pode spawnar AZMMOGameMode directamente; um BP filho continua opcional. -GlobalDefaultGameMode=/Script/ZMMO.ZMMOGameMode -GameInstanceClass=/Script/ZMMO.ZMMOGameInstance +; O motor pode spawnar AZeusGameMode directamente; um BP filho continua opcional. +GlobalDefaultGameMode=/Script/ZMMO.ZeusGameMode +GameInstanceClass=/Script/ZMMO.ZeusGameInstance [/Script/Engine.RendererSettings] r.ReflectionMethod=1 @@ -80,11 +80,30 @@ GameViewportClientClassName=/Script/CommonUI.CommonGameViewportClient +ActiveGameNameRedirects=(OldGameName="TP_ThirdPerson",NewGameName="/Script/ZMMO") +ActiveGameNameRedirects=(OldGameName="/Script/TP_ThirdPerson",NewGameName="/Script/ZMMO") ; Redirects do template antigo para a nova arquitectura (Game/Modes/Entity/Controller). -; ZMMOCharacter foi reescrito como ZMMOPlayerCharacter (ACharacter local com CMC livre). -+ActiveClassRedirects=(OldClassName="TP_ThirdPersonPlayerController",NewClassName="ZMMOPlayerController") -+ActiveClassRedirects=(OldClassName="TP_ThirdPersonGameMode",NewClassName="ZMMOGameMode") -+ActiveClassRedirects=(OldClassName="TP_ThirdPersonCharacter",NewClassName="ZMMOPlayerCharacter") -+ActiveClassRedirects=(OldClassName="ZMMOCharacter",NewClassName="ZMMOPlayerCharacter") +; Pipeline: TP_ThirdPerson* -> ZMMO* (legado) -> Zeus* (atual). Os redirects de +; ZMMO*->Zeus* preservam asset/BP refs criadas durante o periodo ZMMO* (Batches 1-3). ++ActiveClassRedirects=(OldClassName="TP_ThirdPersonPlayerController",NewClassName="ZeusPlayerController") ++ActiveClassRedirects=(OldClassName="TP_ThirdPersonGameMode",NewClassName="ZeusGameMode") ++ActiveClassRedirects=(OldClassName="TP_ThirdPersonCharacter",NewClassName="ZeusCharacter") ++ActiveClassRedirects=(OldClassName="ZMMOCharacter",NewClassName="ZeusCharacter") ++ActiveClassRedirects=(OldClassName="ZMMOPlayerCharacter",NewClassName="ZeusCharacter") ++ActiveClassRedirects=(OldClassName="ZMMOPlayerController",NewClassName="ZeusPlayerController") ++ActiveClassRedirects=(OldClassName="ZMMOFrontEndPlayerController",NewClassName="ZeusFrontEndPlayerController") ++ActiveClassRedirects=(OldClassName="ZMMOGameMode",NewClassName="ZeusGameMode") ++ActiveClassRedirects=(OldClassName="ZMMOFrontEndGameMode",NewClassName="ZeusFrontEndGameMode") ++ActiveClassRedirects=(OldClassName="ZMMOGameInstance",NewClassName="ZeusGameInstance") ++ActiveClassRedirects=(OldClassName="ZMMOHUD",NewClassName="ZeusHUD") ++ActiveClassRedirects=(OldClassName="ZMMOPlayerState",NewClassName="ZeusPlayerState") ++ActiveClassRedirects=(OldClassName="ZMMOEntity",NewClassName="ZeusEntity") ++ActiveClassRedirects=(OldClassName="ZMMOPlayerProxy",NewClassName="ZeusPlayerProxy") ++ActiveClassRedirects=(OldClassName="ZMMOProxyMovementComponent",NewClassName="ZeusProxyMovementComponent") ++ActiveClassRedirects=(OldClassName="ZMMOWorldSubsystem",NewClassName="ZeusWorldSubsystem") ++ActiveClassRedirects=(OldClassName="ZMMOThemeDataAsset",NewClassName="ZeusThemeDataAsset") ++ActiveClassRedirects=(OldClassName="ZMMOThemeSubsystem",NewClassName="ZeusThemeSubsystem") ++ActiveClassRedirects=(OldClassName="ZMMOLoginSaveGame",NewClassName="ZeusLoginSaveGame") ++ActiveClassRedirects=(OldClassName="ZMMOHudWidget",NewClassName="ZeusHudWidget") ++ActiveClassRedirects=(OldClassName="ZMMOHudPlayerVitalsWidget",NewClassName="ZeusHudPlayerVitalsWidget") ++ActiveClassRedirects=(OldClassName="ZMMOLoadingProfilesDataAsset",NewClassName="ZeusLoadingProfilesDataAsset") [CoreRedirects] ; Migração v1→v2 do FUIStylePanel: TMap (Enum) → TMap. diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini index 656ea4d..1ba23a4 100644 --- a/Config/DefaultGame.ini +++ b/Config/DefaultGame.ini @@ -3,10 +3,10 @@ ProjectID=FC3E256F43B2AFD43009F4949B0814BE ProjectName=Third Person Game Template ; ----------------------------------------------------------------------------- -; ZMMO Theme subsystem (see Source/ZMMO/Game/UI/ZMMOThemeSubsystem.h and +; ZMMO Theme subsystem (see Source/ZMMO/Game/UI/ZeusThemeSubsystem.h and ; ARQUITETURA.md §1.10 / §4.7). ; -; - DefaultThemeAsset is the fallback theme (must define every EZMMOThemeKey). +; - DefaultThemeAsset is the fallback theme (must define every EZeusThemeKey). ; - ThemeRegistry maps ThemeId -> seasonal DA_Theme_* asset. ; - CalendarTable points to DT_ThemeCalendar (FThemeCalendarRow rows). ; - UIStyleTable points to DT_UI_Styles (FUIStyleRow rows): tokens de estilo @@ -18,7 +18,7 @@ ProjectName=Third Person Game Template ; assets are actually created in the editor. ; ----------------------------------------------------------------------------- -[/Script/ZMMO.ZMMOThemeSubsystem] +[/Script/ZMMO.ZeusThemeSubsystem] ;DefaultThemeAsset=/Game/ZMMO/UI/Themes/DA_Theme_Default.DA_Theme_Default ;+ThemeRegistry=(("Christmas", "/Game/ZMMO/UI/Themes/DA_Theme_Christmas.DA_Theme_Christmas")) ;+ThemeRegistry=(("Halloween", "/Game/ZMMO/UI/Themes/DA_Theme_Halloween.DA_Theme_Halloween")) @@ -33,20 +33,20 @@ ScreenSetAsset=/Game/ZMMO/UI/FrontEnd/DA_FrontEndScreenSet.DA_FrontEndScreenSet ; Fase 4 — char spawn DB-driven. DT_Maps espelha o `maps_config.json` do ; server (Server/ZeusServerEngine/Config/DataTables/maps_config.json) — o -; cliente resolve `mapId -> ClientLevel/spawns` via FZMMOMapDef rows. +; cliente resolve `mapId -> ClientLevel/spawns` via FZeusMapDef rows. MapsTableAsset=/Game/ZMMO/Data/World/DT_Maps.DT_Maps ; Loading dinâmico (etapas + dicas). DA_LoadingProfiles tem 1 perfil por -; contexto (EZMMOLoadingContext); DT_LoadingTips rotaciona durante o load. +; contexto (EZeusLoadingContext); DT_LoadingTips rotaciona durante o load. ; Cliente local marca etapas via eventos (sem opcode novo). LoadingProfilesAsset=/Game/ZMMO/Data/UI/Loading/DA_LoadingProfiles.DA_LoadingProfiles LoadingTipsAsset=/Game/ZMMO/Data/UI/Loading/DT_LoadingTips.DT_LoadingTips ; ----------------------------------------------------------------------------- ; UI in-game (PR 19+). Espelho do front-end pattern: -; - ScreenSetAsset mapeia EZMMOInGameUIState -> WBP (Playing -> WBP_HUD, +; - ScreenSetAsset mapeia EZeusInGameUIState -> WBP (Playing -> WBP_HUD, ; StatusWindow -> WBP_StatusWindow, etc.) -; - Subsystem orquestra: AZMMOHUD::BeginPlay chama StartInGame que vai pra +; - Subsystem orquestra: AZeusHUD::BeginPlay chama StartInGame que vai pra ; Playing. ; Asset criado via MCP em /Game/ZMMO/UI/InGame/DA_InGameScreenSet. ; ----------------------------------------------------------------------------- @@ -56,16 +56,16 @@ ScreenSetAsset=/Game/ZMMO/UI/InGame/DA_InGameScreenSet.DA_InGameScreenSet ; ----------------------------------------------------------------------------- ; PlayerState Component Registry (PR 19+). Cada módulo MMO registra seus -; UActorComponent aqui. O AZMMOPlayerState lê esta lista no construtor e +; UActorComponent aqui. O AZeusPlayerState lê esta lista no construtor e ; instancia cada classe como subobject — pattern Open-Closed: adicionar -; Inventory/Skills/Guild = mais uma linha aqui, sem editar AZMMOPlayerState. +; Inventory/Skills/Guild = mais uma linha aqui, sem editar AZeusPlayerState. ; ; Convenção: usa o path /Script/. (sem o "U" do prefixo ; C++; UClass resolve pelo nome curto). ; ----------------------------------------------------------------------------- -[/Script/ZMMO.ZMMOPlayerState] -+ComponentClasses=/Script/ZMMOAttributes.ZMMOAttributeComponent +[/Script/ZMMO.ZeusPlayerState] ++ComponentClasses=/Script/ZeusAttributes.ZeusAttributeComponent [/Script/Engine.AssetManagerSettings] -PrimaryAssetTypesToScan=(PrimaryAssetType="Map",AssetBaseClass=/Script/Engine.World,bHasBlueprintClasses=False,bIsEditorOnly=True,Directories=((Path="/Game/Maps")),SpecificAssets=,Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=Unknown)) diff --git a/Source/ZMMO/Data/UI/FrontEndTypes.h b/Source/ZMMO/Data/UI/FrontEndTypes.h index 3eb7066..aa8d33b 100644 --- a/Source/ZMMO/Data/UI/FrontEndTypes.h +++ b/Source/ZMMO/Data/UI/FrontEndTypes.h @@ -10,17 +10,17 @@ * * Fluxo: Boot → Connecting → Login → ServerSelect → Lobby → EnteringWorld * → InWorld. O Lobby é o hub principal logado; suas páginas internas são - * EZMMOLobbyPage (não são estados de topo — ver ARQUITETURA.md §4.8). + * EZeusLobbyPage (não são estados de topo — ver ARQUITETURA.md §4.8). */ UENUM(BlueprintType) -enum class EZMMOFrontEndState : uint8 +enum class EZeusFrontEndState : uint8 { None, Boot, // splash inicial enquanto subsistemas sobem Connecting, // conectando ao servidor Zeus (UDP) Login, // autenticação ServerSelect, // escolha de servidor/realm - Lobby, // hub principal logado (host das EZMMOLobbyPage) + Lobby, // hub principal logado (host das EZeusLobbyPage) EnteringWorld, // loading/handoff: OpenLevel do mapa de mundo InWorld // no mundo (HUD de gameplay assume) }; @@ -30,7 +30,7 @@ enum class EZMMOFrontEndState : uint8 * de Lobby ("Switch principal"), não pelo fluxo de topo. */ UENUM(BlueprintType) -enum class EZMMOLobbyPage : uint8 +enum class EZeusLobbyPage : uint8 { None, CharacterSelect, diff --git a/Source/ZMMO/Data/UI/InGameTypes.h b/Source/ZMMO/Data/UI/InGameTypes.h index a48125b..1ba12e8 100644 --- a/Source/ZMMO/Data/UI/InGameTypes.h +++ b/Source/ZMMO/Data/UI/InGameTypes.h @@ -7,7 +7,7 @@ * Estados da UI in-game. Dirigidos pelo UUIInGameFlowSubsystem; cada estado * resolve uma tela (UCommonActivatableWidget) via DA_InGameScreenSet. * - * Espelha simetricamente EZMMOFrontEndState (Data/UI/FrontEndTypes.h): + * Espelha simetricamente EZeusFrontEndState (Data/UI/FrontEndTypes.h): * - Front-end usa estados pra Login/ServerSelect/Lobby (UI.Layer.Menu) * - In-game usa estados pra HUD/Status/Inventory/Skills (UI.Layer.Game + GameMenu) * @@ -22,7 +22,7 @@ * Layer.GameMenu por cima dele. */ UENUM(BlueprintType) -enum class EZMMOInGameUIState : uint8 +enum class EZeusInGameUIState : uint8 { None, ///< Antes do player local spawnar; UI in-game inativa. Playing, ///< HUD principal visivel (HP/SP/level/etc). diff --git a/Source/ZMMO/Data/UI/LoadingTypes.h b/Source/ZMMO/Data/UI/LoadingTypes.h index 11e90e9..1b973ba 100644 --- a/Source/ZMMO/Data/UI/LoadingTypes.h +++ b/Source/ZMMO/Data/UI/LoadingTypes.h @@ -5,14 +5,14 @@ /** * Contexto do loading screen genérico. Cada contexto resolve um perfil - * (lista de etapas) no UZMMOLoadingProfilesDataAsset. + * (lista de etapas) no UZeusLoadingProfilesDataAsset. * * Cliente local rastreia o progresso assinando eventos próprios * (HandlePostLoadMap, OnPlayerSpawned, etc) — server não envia opcode de * progresso, ver decisão em [[project_ui_loading_dynamic]]. */ UENUM(BlueprintType) -enum class EZMMOLoadingContext : uint8 +enum class EZeusLoadingContext : uint8 { None, FrontEndEnteringWorld, ///< FrontEnd → mundo (handoff CharServer→WorldServer + spawn). @@ -21,7 +21,7 @@ enum class EZMMOLoadingContext : uint8 }; UENUM(BlueprintType) -enum class EZMMOLoadingStepStatus : uint8 +enum class EZeusLoadingStepStatus : uint8 { Pending, ///< Ainda não começou. Running, ///< Em andamento (o "barber pole"). @@ -34,7 +34,7 @@ enum class EZMMOLoadingStepStatus : uint8 * pra chamar MarkStepDone(StepId); Label é o texto localizado mostrado. */ USTRUCT(BlueprintType) -struct FZMMOLoadingStepDef +struct FZeusLoadingStepDef { GENERATED_BODY() @@ -52,13 +52,13 @@ struct FZMMOLoadingStepDef * consulta StepId pra avançar etapa. */ USTRUCT(BlueprintType) -struct FZMMOLoadingProfile +struct FZeusLoadingProfile { GENERATED_BODY() /** Etapas em ordem. ProgressBar = #Done / #Steps. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Loading") - TArray Steps; + TArray Steps; /** Título da tela (vazio = usa default da classe). */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Loading") diff --git a/Source/ZMMO/Data/UI/ThemeKeys.h b/Source/ZMMO/Data/UI/ThemeKeys.h index c7b2eca..f3990a4 100644 --- a/Source/ZMMO/Data/UI/ThemeKeys.h +++ b/Source/ZMMO/Data/UI/ThemeKeys.h @@ -4,7 +4,7 @@ #include "ThemeKeys.generated.h" UENUM(BlueprintType) -enum class EZMMOThemeKey : uint8 +enum class EZeusThemeKey : uint8 { // HUD HUD_Frame UMETA(DisplayName = "HUD - Frame"), diff --git a/Source/ZMMO/Data/UI/UILayerTags.cpp b/Source/ZMMO/Data/UI/UILayerTags.cpp index 9b6f8e0..ac6d845 100644 --- a/Source/ZMMO/Data/UI/UILayerTags.cpp +++ b/Source/ZMMO/Data/UI/UILayerTags.cpp @@ -1,6 +1,6 @@ #include "UI/UILayerTags.h" -namespace ZMMOUITags +namespace ZeusUITags { UE_DEFINE_GAMEPLAY_TAG(UI_Layer_Game, "UI.Layer.Game"); UE_DEFINE_GAMEPLAY_TAG(UI_Layer_GameMenu, "UI.Layer.GameMenu"); diff --git a/Source/ZMMO/Data/UI/UILayerTags.h b/Source/ZMMO/Data/UI/UILayerTags.h index ef7263f..2938cd6 100644 --- a/Source/ZMMO/Data/UI/UILayerTags.h +++ b/Source/ZMMO/Data/UI/UILayerTags.h @@ -12,7 +12,7 @@ * UI.Layer.Menu — front-end (Boot/Login/ServerSelect/Lobby) * UI.Layer.Modal — diálogos/loading por cima de tudo */ -namespace ZMMOUITags +namespace ZeusUITags { ZMMO_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(UI_Layer_Game); ZMMO_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(UI_Layer_GameMenu); diff --git a/Source/ZMMO/Data/UI/UIStyleRow.h b/Source/ZMMO/Data/UI/UIStyleRow.h index 44ff112..538797c 100644 --- a/Source/ZMMO/Data/UI/UIStyleRow.h +++ b/Source/ZMMO/Data/UI/UIStyleRow.h @@ -73,7 +73,7 @@ struct ZMMO_API FUIStyle /** * Linha de DT_UI_Styles. O Row Name é o ThemeId (ex.: "Default", "RPG"), * espelhando DT_ThemeCalendar e ThemeRegistry — assim a camada de estilo - * é consumidora do ThemeId já resolvido pelo UZMMOThemeSubsystem. + * é consumidora do ThemeId já resolvido pelo UZeusThemeSubsystem. */ USTRUCT(BlueprintType) struct ZMMO_API FUIStyleRow : public FTableRowBase @@ -87,7 +87,7 @@ struct ZMMO_API FUIStyleRow : public FTableRowBase UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style") EUITheme Theme = EUITheme::None; - /** Ponte para o ThemeId resolvido pelo UZMMOThemeSubsystem. */ + /** Ponte para o ThemeId resolvido pelo UZeusThemeSubsystem. */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style") FName ThemeId; diff --git a/Source/ZMMO/Data/UI/UIStyleTypes.h b/Source/ZMMO/Data/UI/UIStyleTypes.h index 029850e..a72e5d7 100644 --- a/Source/ZMMO/Data/UI/UIStyleTypes.h +++ b/Source/ZMMO/Data/UI/UIStyleTypes.h @@ -7,7 +7,7 @@ * Enums do sistema de UI Style (tokens de tema visual). * * Espelha ThemeKeys.h: enums fortes, BlueprintType, primeiro valor None. - * O conceito de "tema ativo" continua sendo do UZMMOThemeSubsystem + * O conceito de "tema ativo" continua sendo do UZeusThemeSubsystem * (resolvido por FName ThemeId). EUITheme é apenas validação tipada de * design-time ao preencher DT_UI_Styles — não é a chave de runtime. */ diff --git a/Source/ZMMO/Data/World/MapDef.h b/Source/ZMMO/Data/World/MapDef.h index 9309b7c..2b509d1 100644 --- a/Source/ZMMO/Data/World/MapDef.h +++ b/Source/ZMMO/Data/World/MapDef.h @@ -7,7 +7,7 @@ #include "MapDef.generated.h" /** - * FZMMOMapSpawn + * FZeusMapSpawn * * Ponto de spawn dentro de um mapa, identificado por `Tag`. Usado pelo * server pra decidir onde materializar um char quando ele entra: @@ -15,12 +15,12 @@ * - Char saindo de raid: pode pedir tag="raid_return" * - Char morto: pode pedir tag="graveyard" * - * ZeusEditorTools pode auto-popular o `Spawns[]` do FZMMOMapDef varrendo - * todos APlayerStart (ou ator custom AZMMOMapSpawnPoint) presentes no + * ZeusEditorTools pode auto-popular o `Spawns[]` do FZeusMapDef varrendo + * todos APlayerStart (ou ator custom AZeusMapSpawnPoint) presentes no * `.umap` do `ClientLevel` — botao "Sync from level". */ USTRUCT(BlueprintType) -struct ZMMO_API FZMMOMapSpawn +struct ZMMO_API FZeusMapSpawn { GENERATED_BODY() @@ -38,7 +38,7 @@ struct ZMMO_API FZMMOMapSpawn }; /** - * FZMMOMapDef + * FZeusMapDef * * Definicao canonica de um mapa do MMO. Linha da DT_Maps no cliente. * Exportada para `Server/ZeusServerEngine/Config/DataTables/maps_config.json` @@ -55,7 +55,7 @@ struct ZMMO_API FZMMOMapSpawn * `mapName` (string), evitando ~10-30 bytes por handoff. */ USTRUCT(BlueprintType) -struct ZMMO_API FZMMOMapDef : public FTableRowBase +struct ZMMO_API FZeusMapDef : public FTableRowBase { GENERATED_BODY() @@ -77,7 +77,7 @@ struct ZMMO_API FZMMOMapDef : public FTableRowBase * Pelo menos um com Tag="default" e esperado. */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Map|Spawns") - TArray Spawns; + TArray Spawns; /** Regras PvP/Safe/Dungeon. Reusa enum de FZoneRow. */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Map") diff --git a/Source/ZMMO/Game/Controller/ZMMOFrontEndPlayerController.cpp b/Source/ZMMO/Game/Controller/ZeusFrontEndPlayerController.cpp similarity index 68% rename from Source/ZMMO/Game/Controller/ZMMOFrontEndPlayerController.cpp rename to Source/ZMMO/Game/Controller/ZeusFrontEndPlayerController.cpp index 11aa832..9c2c398 100644 --- a/Source/ZMMO/Game/Controller/ZMMOFrontEndPlayerController.cpp +++ b/Source/ZMMO/Game/Controller/ZeusFrontEndPlayerController.cpp @@ -1,14 +1,14 @@ -#include "ZMMOFrontEndPlayerController.h" +#include "ZeusFrontEndPlayerController.h" #include "UIFrontEndFlowSubsystem.h" #include "Engine/GameInstance.h" -AZMMOFrontEndPlayerController::AZMMOFrontEndPlayerController() +AZeusFrontEndPlayerController::AZeusFrontEndPlayerController() { bShowMouseCursor = true; } -void AZMMOFrontEndPlayerController::BeginPlay() +void AZeusFrontEndPlayerController::BeginPlay() { Super::BeginPlay(); diff --git a/Source/ZMMO/Game/Controller/ZMMOFrontEndPlayerController.h b/Source/ZMMO/Game/Controller/ZeusFrontEndPlayerController.h similarity index 66% rename from Source/ZMMO/Game/Controller/ZMMOFrontEndPlayerController.h rename to Source/ZMMO/Game/Controller/ZeusFrontEndPlayerController.h index e12bc43..33abd53 100644 --- a/Source/ZMMO/Game/Controller/ZMMOFrontEndPlayerController.h +++ b/Source/ZMMO/Game/Controller/ZeusFrontEndPlayerController.h @@ -2,24 +2,24 @@ #include "CoreMinimal.h" #include "GameFramework/PlayerController.h" -#include "ZMMOFrontEndPlayerController.generated.h" +#include "ZeusFrontEndPlayerController.generated.h" /** - * AZMMOFrontEndPlayerController + * AZeusFrontEndPlayerController * - * Controller do mapa de front-end. Não herda de AZMMOPlayerController (sem + * Controller do mapa de front-end. Não herda de AZeusPlayerController (sem * Enhanced Input de gameplay/touch). Em BeginPlay arranca o fluxo de * front-end (UUIFrontEndFlowSubsystem) — feito aqui, e não no * GameInstance::Init, porque os subsistemas já existem neste ponto (ver * aviso no header do ZeusNetworkSubsystem). */ UCLASS(Blueprintable, BlueprintType) -class ZMMO_API AZMMOFrontEndPlayerController : public APlayerController +class ZMMO_API AZeusFrontEndPlayerController : public APlayerController { GENERATED_BODY() public: - AZMMOFrontEndPlayerController(); + AZeusFrontEndPlayerController(); protected: virtual void BeginPlay() override; diff --git a/Source/ZMMO/Game/Controller/ZMMOPlayerController.cpp b/Source/ZMMO/Game/Controller/ZeusPlayerController.cpp similarity index 83% rename from Source/ZMMO/Game/Controller/ZMMOPlayerController.cpp rename to Source/ZMMO/Game/Controller/ZeusPlayerController.cpp index 0433b8a..410177d 100644 --- a/Source/ZMMO/Game/Controller/ZMMOPlayerController.cpp +++ b/Source/ZMMO/Game/Controller/ZeusPlayerController.cpp @@ -1,4 +1,4 @@ -#include "ZMMOPlayerController.h" +#include "ZeusPlayerController.h" #include "Blueprint/UserWidget.h" #include "Components/InputComponent.h" @@ -13,11 +13,11 @@ #include "UI/InGame/UIInGameFlowSubsystem.h" #include "UI/InGameTypes.h" -AZMMOPlayerController::AZMMOPlayerController() +AZeusPlayerController::AZeusPlayerController() { // Defaults dos Input Mapping Contexts (alinhados ao ZClientMMO). Permitem - // instanciar AZMMOPlayerController directamente como - // `PlayerControllerClass` do AZMMOGameMode sem exigir um BP filho. Se o + // instanciar AZeusPlayerController directamente como + // `PlayerControllerClass` do AZeusGameMode sem exigir um BP filho. Se o // projeto adicionar mais IMCs, podemos extender via BP filho ou via // arquivos de Config (UPROPERTY EditAnywhere abaixo). static ConstructorHelpers::FObjectFinder DefaultImc( @@ -35,7 +35,7 @@ AZMMOPlayerController::AZMMOPlayerController() } } -void AZMMOPlayerController::BeginPlay() +void AZeusPlayerController::BeginPlay() { Super::BeginPlay(); @@ -43,7 +43,7 @@ void AZMMOPlayerController::BeginPlay() { // Limpa estado de input herdado da UI do FrontEnd (UIManagerSubsystem // e LocalPlayerSubsystem — sobrevive ao travel, e o controller anterior - // (AZMMOFrontEndPlayerController) tinha setado FInputModeUIOnly + + // (AZeusFrontEndPlayerController) tinha setado FInputModeUIOnly + // bShowMouseCursor=true). Sem este reset, WASD/Look podem nao chegar // ao pawn porque o Slate ainda esta com foco no widget antigo. FInputModeGameOnly InputMode; @@ -67,7 +67,7 @@ void AZMMOPlayerController::BeginPlay() } } -void AZMMOPlayerController::SetupInputComponent() +void AZeusPlayerController::SetupInputComponent() { Super::SetupInputComponent(); @@ -101,7 +101,7 @@ void AZMMOPlayerController::SetupInputComponent() FInputKeyBinding& Binding = InputComponent->BindKey( FInputChord(EKeys::A, /*bShift*/ false, /*bCtrl*/ false, /*bAlt*/ true, /*bCmd*/ false), IE_Pressed, - this, &AZMMOPlayerController::ToggleStatusWindow); + this, &AZeusPlayerController::ToggleStatusWindow); Binding.bConsumeInput = true; Binding.bExecuteWhenPaused = true; // dispara mesmo com StatusWindow aberto (CommonUI menu mode) @@ -109,35 +109,35 @@ void AZMMOPlayerController::SetupInputComponent() FInputKeyBinding& JobBinding = InputComponent->BindKey( FInputChord(EKeys::J, /*bShift*/ false, /*bCtrl*/ false, /*bAlt*/ false, /*bCmd*/ false), IE_Pressed, - this, &AZMMOPlayerController::ToggleJobChangePanel); + this, &AZeusPlayerController::ToggleJobChangePanel); JobBinding.bConsumeInput = true; JobBinding.bExecuteWhenPaused = true; } } -void AZMMOPlayerController::ToggleStatusWindow() +void AZeusPlayerController::ToggleStatusWindow() { if (UGameInstance* GI = GetGameInstance()) { if (UUIInGameFlowSubsystem* Flow = GI->GetSubsystem()) { - Flow->ToggleScreen(EZMMOInGameUIState::StatusWindow); + Flow->ToggleScreen(EZeusInGameUIState::StatusWindow); } } } -void AZMMOPlayerController::ToggleJobChangePanel() +void AZeusPlayerController::ToggleJobChangePanel() { if (UGameInstance* GI = GetGameInstance()) { if (UUIInGameFlowSubsystem* Flow = GI->GetSubsystem()) { - Flow->ToggleScreen(EZMMOInGameUIState::JobChangePanel); + Flow->ToggleScreen(EZeusInGameUIState::JobChangePanel); } } } -bool AZMMOPlayerController::ShouldUseTouchControls() const +bool AZeusPlayerController::ShouldUseTouchControls() const { return SVirtualJoystick::ShouldDisplayTouchInterface() || bForceTouchControls; } diff --git a/Source/ZMMO/Game/Controller/ZMMOPlayerController.h b/Source/ZMMO/Game/Controller/ZeusPlayerController.h similarity index 88% rename from Source/ZMMO/Game/Controller/ZMMOPlayerController.h rename to Source/ZMMO/Game/Controller/ZeusPlayerController.h index 689db8d..2006057 100644 --- a/Source/ZMMO/Game/Controller/ZMMOPlayerController.h +++ b/Source/ZMMO/Game/Controller/ZeusPlayerController.h @@ -2,26 +2,26 @@ #include "CoreMinimal.h" #include "GameFramework/PlayerController.h" -#include "ZMMOPlayerController.generated.h" +#include "ZeusPlayerController.generated.h" class UInputMappingContext; class UUserWidget; /** - * AZMMOPlayerController + * AZeusPlayerController * * Player controller do cliente Zeus MMO. Responsavel apenas pela camada de * input do Unreal (Enhanced Input Mapping Contexts e widget opcional de * controlos touch). Toda a logica de identidade Zeus, envio de input e - * reconciliacao vive em `AZMMOPlayerCharacter`. + * reconciliacao vive em `AZeusCharacter`. */ UCLASS(Blueprintable, BlueprintType) -class ZMMO_API AZMMOPlayerController : public APlayerController +class ZMMO_API AZeusPlayerController : public APlayerController { GENERATED_BODY() public: - AZMMOPlayerController(); + AZeusPlayerController(); protected: /** Mapping contexts default (sempre adicionados). */ diff --git a/Source/ZMMO/Game/Entity/ZMMOProxyMovementComponent.h b/Source/ZMMO/Game/Entity/ZMMOProxyMovementComponent.h deleted file mode 100644 index e889c1e..0000000 --- a/Source/ZMMO/Game/Entity/ZMMOProxyMovementComponent.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "CoreMinimal.h" -#include "GameFramework/CharacterMovementComponent.h" - -#include "ZMMOProxyMovementComponent.generated.h" - -/** - * CMC customizado para AZMMOPlayerProxy. Expõe escrita direta de Acceleration - * (protected na base) para que o AnimBP veja Acceleration!=0 quando o proxy - * recebe snapshots, alimentando a fórmula ShouldMove e a transição Jump_Start - * do ABP_Unarmed (ambas dependem de aceleração não-nula). Espelha - * UZeusProxyMovementComponent do ZClientMMO. - */ -UCLASS(ClassGroup = (ZMMO), meta = (BlueprintSpawnableComponent)) -class ZMMO_API UZMMOProxyMovementComponent : public UCharacterMovementComponent -{ - GENERATED_BODY() - -public: - void SetZMMOExternalAcceleration(const FVector& InAccelerationCmS2) - { - Acceleration = InAccelerationCmS2; - } -}; diff --git a/Source/ZMMO/Game/Entity/ZMMOPlayerCharacter.cpp b/Source/ZMMO/Game/Entity/ZeusCharacter.cpp similarity index 72% rename from Source/ZMMO/Game/Entity/ZMMOPlayerCharacter.cpp rename to Source/ZMMO/Game/Entity/ZeusCharacter.cpp index 5cbe9f8..d4fae78 100644 --- a/Source/ZMMO/Game/Entity/ZMMOPlayerCharacter.cpp +++ b/Source/ZMMO/Game/Entity/ZeusCharacter.cpp @@ -1,4 +1,4 @@ -#include "ZMMOPlayerCharacter.h" +#include "ZeusCharacter.h" #include "Animation/AnimInstance.h" #include "Camera/CameraComponent.h" @@ -17,15 +17,15 @@ #include "Subsystems/WorldSubsystem.h" #include "UObject/ConstructorHelpers.h" #include "ZMMO.h" -#include "ZMMOAttributeComponent.h" -#include "ZMMOPlayerState.h" -#include "ZMMOWorldSubsystem.h" +#include "ZeusAttributeComponent.h" +#include "ZeusPlayerState.h" +#include "ZeusWorldSubsystem.h" #include "ZeusNetworkSubsystem.h" #include "UI/FrontEnd/UIFrontEndFlowSubsystem.h" -DEFINE_LOG_CATEGORY(LogZMMOPlayer); +DEFINE_LOG_CATEGORY(LogZeusPlayer); -AZMMOPlayerCharacter::AZMMOPlayerCharacter() +AZeusCharacter::AZeusCharacter() { PrimaryActorTick.bCanEverTick = true; PrimaryActorTick.bStartWithTickEnabled = true; @@ -55,13 +55,12 @@ AZMMOPlayerCharacter::AZMMOPlayerCharacter() FollowCamera->SetupAttachment(CameraBoom, USpringArmComponent::SocketName); FollowCamera->bUsePawnControlRotation = false; - // AttributeComponent migrou pro PlayerState (AZMMOPlayerState + Component + // AttributeComponent migrou pro PlayerState (AZeusPlayerState + Component // Registry config-driven). Pawn fica leve — so' movement/input/camera. - // Defaults visuais (mesh + AnimBP) — alinhados ao ZClientMMO. Permitem ao - // motor spawnar AZMMOPlayerCharacter directamente como DefaultPawnClass do - // AZMMOGameMode sem exigir um BP filho. Um BP filho continua opcional para - // trocar mesh/AnimBP por mapa. + // Defaults visuais (mesh + AnimBP). Permitem ao motor spawnar AZeusCharacter + // directamente como DefaultPawnClass do AZeusGameMode sem exigir um BP filho. + // Um BP filho continua opcional para trocar mesh/AnimBP por mapa. if (USkeletalMeshComponent* MeshComponent = GetMesh()) { static ConstructorHelpers::FObjectFinder QuinnMesh( @@ -77,7 +76,7 @@ AZMMOPlayerCharacter::AZMMOPlayerCharacter() } else { - UE_LOG(LogZMMOPlayer, Warning, TEXT("Default mesh SKM_Quinn_Simple not found for AZMMOPlayerCharacter.")); + UE_LOG(LogZeusPlayer, Warning, TEXT("Default mesh SKM_Quinn_Simple not found for AZeusCharacter.")); } if (QuinnAnimBp.Succeeded()) @@ -87,12 +86,12 @@ AZMMOPlayerCharacter::AZMMOPlayerCharacter() } else { - UE_LOG(LogZMMOPlayer, Warning, TEXT("Default anim blueprint ABP_Unarmed not found for AZMMOPlayerCharacter.")); + UE_LOG(LogZeusPlayer, Warning, TEXT("Default anim blueprint ABP_Unarmed not found for AZeusCharacter.")); } } // Input Actions defaults (Enhanced Input) — IMCs sao adicionados pelo - // AZMMOPlayerController. As IAs aqui resolvem o asset por path; um BP filho + // AZeusPlayerController. As IAs aqui resolvem o asset por path; um BP filho // pode sobrescrever caso queira inputs custom. static ConstructorHelpers::FObjectFinder MoveActionAsset( TEXT("/Game/Input/Actions/IA_Move.IA_Move")); @@ -109,7 +108,7 @@ AZMMOPlayerCharacter::AZMMOPlayerCharacter() if (JumpActionAsset.Succeeded()) { JumpAction = JumpActionAsset.Object; } } -void AZMMOPlayerCharacter::BeginPlay() +void AZeusCharacter::BeginPlay() { Super::BeginPlay(); ResolveZeusNetworkSubsystem(); @@ -134,77 +133,77 @@ void AZMMOPlayerCharacter::BeginPlay() { C->SetControlRotation(NewRot); } - UE_LOG(LogZMMOPlayer, Log, - TEXT("AZMMOPlayerCharacter: pawn reposicionado pra pos do DB (%s) yaw=%.1f"), + UE_LOG(LogZeusPlayer, Log, + TEXT("AZeusCharacter: pawn reposicionado pra pos do DB (%s) yaw=%.1f"), *PosCm.ToString(), YawDeg); } } } } -void AZMMOPlayerCharacter::EndPlay(const EEndPlayReason::Type EndPlayReason) +void AZeusCharacter::EndPlay(const EEndPlayReason::Type EndPlayReason) { UnbindZeusSpawnDelegate(); ZeusNetwork = nullptr; Super::EndPlay(EndPlayReason); } -void AZMMOPlayerCharacter::Tick(const float DeltaSeconds) +void AZeusCharacter::Tick(const float DeltaSeconds) { Super::Tick(DeltaSeconds); FlushInputAxisToServer(DeltaSeconds); } -void AZMMOPlayerCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) +void AZeusCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) { if (UEnhancedInputComponent* EnhancedInputComponent = Cast(PlayerInputComponent)) { - EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Started, this, &AZMMOPlayerCharacter::OnJumpPressed); - EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Completed, this, &AZMMOPlayerCharacter::OnJumpReleased); + EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Started, this, &AZeusCharacter::OnJumpPressed); + EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Completed, this, &AZeusCharacter::OnJumpReleased); - EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AZMMOPlayerCharacter::Move); - EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Completed, this, &AZMMOPlayerCharacter::MoveCompleted); + EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AZeusCharacter::Move); + EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Completed, this, &AZeusCharacter::MoveCompleted); - EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &AZMMOPlayerCharacter::Look); - EnhancedInputComponent->BindAction(MouseLookAction, ETriggerEvent::Triggered, this, &AZMMOPlayerCharacter::Look); + EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &AZeusCharacter::Look); + EnhancedInputComponent->BindAction(MouseLookAction, ETriggerEvent::Triggered, this, &AZeusCharacter::Look); } else { - UE_LOG(LogZMMOPlayer, Error, TEXT("'%s' Failed to find an Enhanced Input component."), *GetNameSafe(this)); + UE_LOG(LogZeusPlayer, Error, TEXT("'%s' Failed to find an Enhanced Input component."), *GetNameSafe(this)); } } -void AZMMOPlayerCharacter::Move(const FInputActionValue& Value) +void AZeusCharacter::Move(const FInputActionValue& Value) { const FVector2D MovementVector = Value.Get(); DoMove(MovementVector.X, MovementVector.Y); } -void AZMMOPlayerCharacter::MoveCompleted(const FInputActionValue& Value) +void AZeusCharacter::MoveCompleted(const FInputActionValue& Value) { (void)Value; DoMove(0.0f, 0.0f); } -void AZMMOPlayerCharacter::Look(const FInputActionValue& Value) +void AZeusCharacter::Look(const FInputActionValue& Value) { const FVector2D LookAxisVector = Value.Get(); DoLook(LookAxisVector.X, LookAxisVector.Y); } -void AZMMOPlayerCharacter::OnJumpPressed() +void AZeusCharacter::OnJumpPressed() { bPendingJumpPressed = true; DoJumpStart(); } -void AZMMOPlayerCharacter::OnJumpReleased() +void AZeusCharacter::OnJumpReleased() { bPendingJumpReleased = true; DoJumpEnd(); } -void AZMMOPlayerCharacter::DoMove(const float Right, const float Forward) +void AZeusCharacter::DoMove(const float Right, const float Forward) { PendingMoveRight = FMath::Clamp(Right, -1.0f, 1.0f); PendingMoveForward = FMath::Clamp(Forward, -1.0f, 1.0f); @@ -220,7 +219,7 @@ void AZMMOPlayerCharacter::DoMove(const float Right, const float Forward) } } -void AZMMOPlayerCharacter::DoLook(const float Yaw, const float Pitch) +void AZeusCharacter::DoLook(const float Yaw, const float Pitch) { if (GetController() != nullptr) { @@ -229,29 +228,29 @@ void AZMMOPlayerCharacter::DoLook(const float Yaw, const float Pitch) } } -void AZMMOPlayerCharacter::DoJumpStart() +void AZeusCharacter::DoJumpStart() { Jump(); } -void AZMMOPlayerCharacter::DoJumpEnd() +void AZeusCharacter::DoJumpEnd() { StopJumping(); } -void AZMMOPlayerCharacter::ApplyEntitySnapshot(const FZMMOEntitySnapshot& /*Snapshot*/) +void AZeusCharacter::ApplyEntitySnapshot(const FZeusEntitySnapshot& /*Snapshot*/) { // Cliente local solto: o servidor nao reconcilia posicao em V0 (ADR 0038). // Quando colisao de objetos chegar, podemos ligar uma reconciliacao opcional // horizontal aqui (XY only), preservando o Z do CMC local. } -void AZMMOPlayerCharacter::SetEntityRelevant(bool /*bRelevant*/) +void AZeusCharacter::SetEntityRelevant(bool /*bRelevant*/) { // Nunca despawnamos o jogador local via AOI. } -void AZMMOPlayerCharacter::ResolveZeusNetworkSubsystem() +void AZeusCharacter::ResolveZeusNetworkSubsystem() { if (ZeusNetwork) { @@ -267,7 +266,7 @@ void AZMMOPlayerCharacter::ResolveZeusNetworkSubsystem() ZeusNetwork = GI->GetSubsystem(); } -void AZMMOPlayerCharacter::BindZeusSpawnDelegate() +void AZeusCharacter::BindZeusSpawnDelegate() { if (bSpawnDelegateBound || !IsLocallyControlled()) { @@ -278,24 +277,24 @@ void AZMMOPlayerCharacter::BindZeusSpawnDelegate() return; } - ZeusNetwork->OnPlayerSpawned.AddDynamic(this, &AZMMOPlayerCharacter::HandleZeusPlayerSpawned); - ZeusNetwork->OnCharInfoReceived.AddDynamic(this, &AZMMOPlayerCharacter::HandleZeusCharInfo); + ZeusNetwork->OnPlayerSpawned.AddDynamic(this, &AZeusCharacter::HandleZeusPlayerSpawned); + ZeusNetwork->OnCharInfoReceived.AddDynamic(this, &AZeusCharacter::HandleZeusCharInfo); bSpawnDelegateBound = true; } -void AZMMOPlayerCharacter::UnbindZeusSpawnDelegate() +void AZeusCharacter::UnbindZeusSpawnDelegate() { if (!bSpawnDelegateBound || !ZeusNetwork) { bSpawnDelegateBound = false; return; } - ZeusNetwork->OnPlayerSpawned.RemoveDynamic(this, &AZMMOPlayerCharacter::HandleZeusPlayerSpawned); - ZeusNetwork->OnCharInfoReceived.RemoveDynamic(this, &AZMMOPlayerCharacter::HandleZeusCharInfo); + ZeusNetwork->OnPlayerSpawned.RemoveDynamic(this, &AZeusCharacter::HandleZeusPlayerSpawned); + ZeusNetwork->OnCharInfoReceived.RemoveDynamic(this, &AZeusCharacter::HandleZeusCharInfo); bSpawnDelegateBound = false; } -void AZMMOPlayerCharacter::TryRegisterLocalEntityFromCachedSpawn() +void AZeusCharacter::TryRegisterLocalEntityFromCachedSpawn() { if (!ZeusNetwork) { @@ -316,19 +315,19 @@ void AZMMOPlayerCharacter::TryRegisterLocalEntityFromCachedSpawn() TryApplyCachedCharInfo(); } -void AZMMOPlayerCharacter::HandleZeusPlayerSpawned(const int64 InEntityId, const bool bIsLocal, +void AZeusCharacter::HandleZeusPlayerSpawned(const int64 InEntityId, const bool bIsLocal, const FVector PosCm, const float YawDeg, const int64 ServerTimeMs) { if (!bIsLocal) { - // Remote spawns sao tratados pelo `UZMMOWorldSubsystem`; aqui so reagimos + // Remote spawns sao tratados pelo `UZeusWorldSubsystem`; aqui so reagimos // ao spawn do pawn possessivel local (S_SPAWN_PLAYER com bIsLocal=true). return; } HandleLocalSpawnReady(InEntityId, PosCm, YawDeg, ServerTimeMs); } -void AZMMOPlayerCharacter::HandleLocalSpawnReady(const int64 InEntityId, const FVector PosCm, +void AZeusCharacter::HandleLocalSpawnReady(const int64 InEntityId, const FVector PosCm, const float YawDeg, const int64 ServerTimeMs) { if (InEntityId == 0) @@ -337,20 +336,20 @@ void AZMMOPlayerCharacter::HandleLocalSpawnReady(const int64 InEntityId, const F } // PR-HANDOFF-007 — InEntityId é int64 (era int32) - if (ZMMOEntityId == InEntityId) + if (ZeusEntityId == InEntityId) { return; } - ZMMOEntityId = InEntityId; + ZeusEntityId = InEntityId; - UE_LOG(LogZMMOPlayer, Log, - TEXT("AZMMOPlayerCharacter: local spawn captured EntityId=%lld pos=(%s) yaw=%.1f t=%lld"), + UE_LOG(LogZeusPlayer, Log, + TEXT("AZeusCharacter: local spawn captured EntityId=%lld pos=(%s) yaw=%.1f t=%lld"), InEntityId, *PosCm.ToString(), YawDeg, ServerTimeMs); if (UWorld* World = GetWorld()) { - if (UZMMOWorldSubsystem* WorldSubsystem = World->GetSubsystem()) + if (UZeusWorldSubsystem* WorldSubsystem = World->GetSubsystem()) { WorldSubsystem->RegisterLocalEntity(InEntityId, this); } @@ -358,16 +357,16 @@ void AZMMOPlayerCharacter::HandleLocalSpawnReady(const int64 InEntityId, const F // Identidade publica (EntityId) + seed no AttributeComponent. CharName/Guild // vem separado via S_CHAR_INFO -> HandleZeusCharInfo. AttributeComponent vive - // como subobject e recebe seed pra que o ZMMOAttributeNetworkHandler consiga + // como subobject e recebe seed pra que o ZeusAttributeNetworkHandler consiga // rotear o snapshot por EntityId desde o primeiro pacote. if (APlayerState* PS = GetPlayerState()) { - if (AZMMOPlayerState* ZMMOPs = Cast(PS)) + if (AZeusPlayerState* ZeusPs = Cast(PS)) { - ZMMOPs->SetPublicIdentity(InEntityId, /*CharId*/ FString(), + ZeusPs->SetPublicIdentity(InEntityId, /*CharId*/ FString(), /*BaseLevel*/ 1, /*ClassId*/ 0); } - if (UZMMOAttributeComponent* AttrComp = PS->FindComponentByClass()) + if (UZeusAttributeComponent* AttrComp = PS->FindComponentByClass()) { AttrComp->SeedEntityId(InEntityId); } @@ -376,16 +375,16 @@ void AZMMOPlayerCharacter::HandleLocalSpawnReady(const int64 InEntityId, const F // Aplica char info cacheada (caso S_CHAR_INFO tenha chegado antes do PS existir). TryApplyCachedCharInfo(); - // UI in-game e' responsabilidade do AZMMOHUD (GameMode.HUDClass), nao do + // UI in-game e' responsabilidade do AZeusHUD (GameMode.HUDClass), nao do // Pawn. AHUD::BeginPlay chama UUIInGameFlowSubsystem::StartInGame, que - // pushea WBP_HUD em UI.Layer.Game. UZMMOHudWidget::NativeOnActivated auto-binda - // no UZMMOAttributeComponent via PlayerState. + // pushea WBP_HUD em UI.Layer.Game. UZeusHudWidget::NativeOnActivated auto-binda + // no UZeusAttributeComponent via PlayerState. } -void AZMMOPlayerCharacter::HandleZeusCharInfo(const int64 InEntityId, const FString& CharName, const FString& GuildName) +void AZeusCharacter::HandleZeusCharInfo(const int64 InEntityId, const FString& CharName, const FString& GuildName) { - UE_LOG(LogZMMOPlayer, Log, - TEXT("AZMMOPlayerCharacter: S_CHAR_INFO recebido EntityId=%lld name=%s guild=%s"), + UE_LOG(LogZeusPlayer, Log, + TEXT("AZeusCharacter: S_CHAR_INFO recebido EntityId=%lld name=%s guild=%s"), InEntityId, *CharName, *GuildName); APlayerState* PS = GetPlayerState(); @@ -396,13 +395,13 @@ void AZMMOPlayerCharacter::HandleZeusCharInfo(const int64 InEntityId, const FStr // HandleLocalSpawnReady ou em outra oportunidade. return; } - if (AZMMOPlayerState* ZMMOPs = Cast(PS)) + if (AZeusPlayerState* ZeusPs = Cast(PS)) { - ZMMOPs->SetCharInfo(CharName, GuildName); + ZeusPs->SetCharInfo(CharName, GuildName); } } -void AZMMOPlayerCharacter::TryApplyCachedCharInfo() +void AZeusCharacter::TryApplyCachedCharInfo() { if (!ZeusNetwork) { @@ -417,14 +416,14 @@ void AZMMOPlayerCharacter::TryApplyCachedCharInfo() } if (APlayerState* PS = GetPlayerState()) { - if (AZMMOPlayerState* ZMMOPs = Cast(PS)) + if (AZeusPlayerState* ZeusPs = Cast(PS)) { - ZMMOPs->SetCharInfo(CachedCharName, CachedGuildName); + ZeusPs->SetCharInfo(CachedCharName, CachedGuildName); } } } -void AZMMOPlayerCharacter::FlushInputAxisToServer(const float DeltaSeconds) +void AZeusCharacter::FlushInputAxisToServer(const float DeltaSeconds) { ResolveZeusNetworkSubsystem(); if (!ZeusNetwork || !ZeusNetwork->IsConnected()) diff --git a/Source/ZMMO/Game/Entity/ZMMOPlayerCharacter.h b/Source/ZMMO/Game/Entity/ZeusCharacter.h similarity index 78% rename from Source/ZMMO/Game/Entity/ZMMOPlayerCharacter.h rename to Source/ZMMO/Game/Entity/ZeusCharacter.h index 40bd923..c86ae0a 100644 --- a/Source/ZMMO/Game/Entity/ZMMOPlayerCharacter.h +++ b/Source/ZMMO/Game/Entity/ZeusCharacter.h @@ -3,9 +3,9 @@ #include "CoreMinimal.h" #include "GameFramework/Character.h" #include "Logging/LogMacros.h" -#include "ZMMOEntityInterface.h" -#include "ZMMOEntityTypes.h" -#include "ZMMOPlayerCharacter.generated.h" +#include "ZeusEntityInterface.h" +#include "ZeusEntityTypes.h" +#include "ZeusCharacter.generated.h" class USpringArmComponent; class UCameraComponent; @@ -13,13 +13,12 @@ class UInputAction; class UZeusNetworkSubsystem; struct FInputActionValue; -DECLARE_LOG_CATEGORY_EXTERN(LogZMMOPlayer, Log, All); +DECLARE_LOG_CATEGORY_EXTERN(LogZeusPlayer, Log, All); /** - * AZMMOPlayerCharacter + * AZeusCharacter * - * Personagem do jogador local. Diferente do template `ThirdPersonCharacter` - * e do antigo `AZMMOCharacter`, este ator e parte do pipeline de rede Zeus: + * Personagem do jogador local. Parte do pipeline de rede Zeus: * * - Continua a usar o `UCharacterMovementComponent` LIVRE para correr a * fisica do landscape (ADR 0038): o cliente e autoritativo localmente @@ -27,15 +26,15 @@ DECLARE_LOG_CATEGORY_EXTERN(LogZMMOPlayer, Log, All); * - Envia `C_INPUT_AXIS` ao `UZeusNetworkSubsystem` na cadencia * `InputSendRateHz` (com heartbeat 5 Hz quando parado para evitar * starvation do `MovementSystem` no servidor). - * - Implementa `IZMMOEntityInterface` para participar do registry do - * `UZMMOWorldSubsystem`, mas `ApplyEntitySnapshot` e `SetEntityRelevant` + * - Implementa `IZeusEntityInterface` para participar do registry do + * `UZeusWorldSubsystem`, mas `ApplyEntitySnapshot` e `SetEntityRelevant` * sao no-op em V0 — o cliente local nao reconcilia (cliente solto). * * TODO V1: reconciliacao opcional XY quando colisao de objetos chegar; AOI * debug spheres; visual smoothing apos correcao do servidor. */ UCLASS(Blueprintable, BlueprintType) -class ZMMO_API AZMMOPlayerCharacter : public ACharacter, public IZMMOEntityInterface +class ZMMO_API AZeusCharacter : public ACharacter, public IZeusEntityInterface { GENERATED_BODY() @@ -47,8 +46,8 @@ class ZMMO_API AZMMOPlayerCharacter : public ACharacter, public IZMMOEntityInter UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components", meta = (AllowPrivateAccess = "true")) UCameraComponent* FollowCamera; - // AttributeComponent vive no PlayerState (AZMMOPlayerState + Component Registry). - // Acesso: GetPlayerState()->GetZMMOComponent(). + // AttributeComponent vive no PlayerState (AZeusPlayerState + Component Registry). + // Acesso: GetPlayerState()->GetZeusComponent(). protected: UPROPERTY(EditAnywhere, Category = "Input") @@ -64,7 +63,7 @@ protected: UInputAction* MouseLookAction; /** Cadencia de envio dos pacotes `C_INPUT_AXIS` (Hz). */ - UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "ZMMO|Networking", meta = (ClampMin = "1", ClampMax = "120")) + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Zeus|Networking", meta = (ClampMin = "1", ClampMax = "120")) int32 InputSendRateHz = 30; /** @@ -73,22 +72,22 @@ protected: * evitar starvation do servidor caso pacotes sejam perdidos. Em movimento * o envio segue `InputSendRateHz` (30 Hz). */ - UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "ZMMO|Networking", meta = (ClampMin = "0.05", ClampMax = "5.0")) + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Zeus|Networking", meta = (ClampMin = "0.05", ClampMax = "5.0")) float HeartbeatIntervalSec = 0.2f; public: - AZMMOPlayerCharacter(); + AZeusCharacter(); virtual void Tick(float DeltaSeconds) override; - // --- IZMMOEntityInterface --- - virtual int64 GetZMMOEntityId() const override { return ZMMOEntityId; } - virtual EZMMOEntityType GetZMMOEntityType() const override { return EZMMOEntityType::Player; } - virtual void ApplyEntitySnapshot(const FZMMOEntitySnapshot& Snapshot) override; + // --- IZeusEntityInterface --- + virtual int64 GetZeusEntityId() const override { return ZeusEntityId; } + virtual EZeusEntityType GetZeusEntityType() const override { return EZeusEntityType::Player; } + virtual void ApplyEntitySnapshot(const FZeusEntitySnapshot& Snapshot) override; virtual void SetEntityRelevant(bool bRelevant) override; - UFUNCTION(BlueprintCallable, Category = "ZMMO|Entity") - void SetZMMOEntityId(int64 InEntityId) { ZMMOEntityId = InEntityId; } + UFUNCTION(BlueprintCallable, Category = "Zeus|Entity") + void SetZeusEntityId(int64 InEntityId) { ZeusEntityId = InEntityId; } FORCEINLINE USpringArmComponent* GetCameraBoom() const { return CameraBoom; } FORCEINLINE UCameraComponent* GetFollowCamera() const { return FollowCamera; } @@ -131,7 +130,7 @@ private: void TryRegisterLocalEntityFromCachedSpawn(); /** - * Memoriza `EntityId` autoritativo e regista o pawn no `UZMMOWorldSubsystem` + * Memoriza `EntityId` autoritativo e regista o pawn no `UZeusWorldSubsystem` * para o registry partilhado por proxies remotos (filtra snapshots locais). * Metadados publicos do char (Name/Guild) chegam via S_CHAR_INFO em * HandleZeusCharInfo (servidor envia ANTES de S_SPAWN_PLAYER). @@ -152,8 +151,8 @@ private: bool bSpawnDelegateBound = false; /** Identidade autoritativa atribuida quando o servidor envia S_SPAWN_PLAYER local. */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity", meta = (AllowPrivateAccess = "true")) - int64 ZMMOEntityId = 0; + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity", meta = (AllowPrivateAccess = "true")) + int64 ZeusEntityId = 0; float PendingMoveForward = 0.0f; float PendingMoveRight = 0.0f; diff --git a/Source/ZMMO/Game/Entity/ZMMOEntity.cpp b/Source/ZMMO/Game/Entity/ZeusEntity.cpp similarity index 53% rename from Source/ZMMO/Game/Entity/ZMMOEntity.cpp rename to Source/ZMMO/Game/Entity/ZeusEntity.cpp index 82bbde7..3a3ff6e 100644 --- a/Source/ZMMO/Game/Entity/ZMMOEntity.cpp +++ b/Source/ZMMO/Game/Entity/ZeusEntity.cpp @@ -1,31 +1,31 @@ -#include "ZMMOEntity.h" +#include "ZeusEntity.h" -AZMMOEntity::AZMMOEntity() +AZeusEntity::AZeusEntity() { PrimaryActorTick.bCanEverTick = false; bReplicates = false; } -void AZMMOEntity::SetZMMOIdentity(const int64 InEntityId, const EZMMOEntityType InEntityType) +void AZeusEntity::SetZeusIdentity(const int64 InEntityId, const EZeusEntityType InEntityType) { EntityId = InEntityId; EntityType = InEntityType; } -void AZMMOEntity::ApplyEntitySnapshot(const FZMMOEntitySnapshot& Snapshot) +void AZeusEntity::ApplyEntitySnapshot(const FZeusEntitySnapshot& Snapshot) { const FRotator NewRotation(0.0f, Snapshot.YawDeg, 0.0f); SetActorLocationAndRotation(Snapshot.PositionCm, NewRotation); } -void AZMMOEntity::SetEntityRelevant(const bool bRelevant) +void AZeusEntity::SetEntityRelevant(const bool bRelevant) { - if (bIsZMMORelevant == bRelevant) + if (bIsZeusRelevant == bRelevant) { return; } - bIsZMMORelevant = bRelevant; + bIsZeusRelevant = bRelevant; SetActorHiddenInGame(!bRelevant); SetActorEnableCollision(bRelevant); SetActorTickEnabled(bRelevant); diff --git a/Source/ZMMO/Game/Entity/ZMMOEntity.h b/Source/ZMMO/Game/Entity/ZeusEntity.h similarity index 59% rename from Source/ZMMO/Game/Entity/ZMMOEntity.h rename to Source/ZMMO/Game/Entity/ZeusEntity.h index 5e1f8a4..ac18566 100644 --- a/Source/ZMMO/Game/Entity/ZMMOEntity.h +++ b/Source/ZMMO/Game/Entity/ZeusEntity.h @@ -2,22 +2,22 @@ #include "CoreMinimal.h" #include "GameFramework/Actor.h" -#include "ZMMOEntityInterface.h" -#include "ZMMOEntityTypes.h" -#include "ZMMOEntity.generated.h" +#include "ZeusEntityInterface.h" +#include "ZeusEntityTypes.h" +#include "ZeusEntity.generated.h" /** - * AZMMOEntity + * AZeusEntity * * Classe base para entidades replicadas pelo servidor que NAO precisam de * capsula + `UCharacterMovementComponent` — tipicamente NPCs estaticos, * objetos dinamicos do mundo, mobs simples sem locomotion fisica. * * Para personagens com capsula + CMC (proxy de jogador, mobs com locomotion - * por capsula), use `AZMMOPlayerProxy` ou uma futura `AZMMOMob` que herde + * por capsula), use `AZeusPlayerProxy` ou uma futura `AZeusMob` que herde * de `ACharacter`. * - * Implementa `IZMMOEntityInterface` com: + * Implementa `IZeusEntityInterface` com: * - getters para `EntityId` / `EntityType`; * - `ApplyEntitySnapshot` default: `SetActorLocationAndRotation` (sem * interpolacao temporal — V1 podera adicionar ring-buffer + lerp); @@ -25,33 +25,33 @@ * desativa tick (preserva o ator no mundo para futuro pooling). */ UCLASS(Blueprintable, BlueprintType) -class ZMMO_API AZMMOEntity : public AActor, public IZMMOEntityInterface +class ZMMO_API AZeusEntity : public AActor, public IZeusEntityInterface { GENERATED_BODY() public: - AZMMOEntity(); + AZeusEntity(); - // --- IZMMOEntityInterface --- - virtual int64 GetZMMOEntityId() const override { return EntityId; } - virtual EZMMOEntityType GetZMMOEntityType() const override { return EntityType; } - virtual void ApplyEntitySnapshot(const FZMMOEntitySnapshot& Snapshot) override; + // --- IZeusEntityInterface --- + virtual int64 GetZeusEntityId() const override { return EntityId; } + virtual EZeusEntityType GetZeusEntityType() const override { return EntityType; } + virtual void ApplyEntitySnapshot(const FZeusEntitySnapshot& Snapshot) override; virtual void SetEntityRelevant(bool bRelevant) override; - /** Setter usado pelo `UZMMOWorldSubsystem` apos o spawn para registrar a identidade. */ - UFUNCTION(BlueprintCallable, Category = "ZMMO|Entity") - void SetZMMOIdentity(int64 InEntityId, EZMMOEntityType InEntityType); + /** Setter usado pelo `UZeusWorldSubsystem` apos o spawn para registrar a identidade. */ + UFUNCTION(BlueprintCallable, Category = "Zeus|Entity") + void SetZeusIdentity(int64 InEntityId, EZeusEntityType InEntityType); protected: - /** Identificador autoritativo do servidor. Atribuido em `SetZMMOIdentity`. */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") + /** Identificador autoritativo do servidor. Atribuido em `SetZeusIdentity`. */ + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") int64 EntityId = 0; /** Categoria autoritativa (Player/Mob/NPC/Object). */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") - EZMMOEntityType EntityType = EZMMOEntityType::Object; + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") + EZeusEntityType EntityType = EZeusEntityType::Object; /** Estado de relevancia atual (espelha as transicoes Hidden<->Relevant do servidor). */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") - bool bIsZMMORelevant = true; + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") + bool bIsZeusRelevant = true; }; diff --git a/Source/ZMMO/Game/Entity/ZMMOEntityInterface.h b/Source/ZMMO/Game/Entity/ZeusEntityInterface.h similarity index 71% rename from Source/ZMMO/Game/Entity/ZMMOEntityInterface.h rename to Source/ZMMO/Game/Entity/ZeusEntityInterface.h index 77631d0..94be4ff 100644 --- a/Source/ZMMO/Game/Entity/ZMMOEntityInterface.h +++ b/Source/ZMMO/Game/Entity/ZeusEntityInterface.h @@ -2,27 +2,27 @@ #include "CoreMinimal.h" #include "UObject/Interface.h" -#include "ZMMOEntityTypes.h" -#include "ZMMOEntityInterface.generated.h" +#include "ZeusEntityTypes.h" +#include "ZeusEntityInterface.generated.h" /** - * UZMMOEntityInterface + * UZeusEntityInterface * * Marcador `UInterface` necessario para o sistema de reflexao da Unreal. Todo o - * contrato vive em `IZMMOEntityInterface` (puro C++). + * contrato vive em `IZeusEntityInterface` (puro C++). */ UINTERFACE(BlueprintType, MinimalAPI, meta = (CannotImplementInterfaceInBlueprint)) -class UZMMOEntityInterface : public UInterface +class UZeusEntityInterface : public UInterface { GENERATED_BODY() }; /** - * IZMMOEntityInterface + * IZeusEntityInterface * * Contrato comum de todas as entidades replicadas pelo Zeus Server (player - * local, players remotos, mobs, NPCs, objetos). Inspirado em `IZeusEntityInterface` - * (ZeusV1) e adaptado para o nosso modelo "cliente solto + servidor valida input". + * local, players remotos, mobs, NPCs, objetos). Adaptado para o nosso modelo + * "cliente solto + servidor valida input". * * Decisoes: * 1. **Identidade autoritativa**: `EntityId` e `EntityType` vem do servidor; o @@ -30,28 +30,28 @@ class UZMMOEntityInterface : public UInterface * 2. **Visibilidade gated por AOI**: o servidor envia spawn/despawn quando o * target entra/sai da area de interesse. O cliente reage via * `SetEntityRelevant(bool)`. - * 3. **Player local nao reconcilia em V0**: para o `AZMMOPlayerCharacter` o + * 3. **Player local nao reconcilia em V0**: para o `AZeusCharacter` o * `ApplyEntitySnapshot` e no-op (cliente solto controla landscape). Quando * a colisao de objetos chegar no servidor podemos ligar reconciliacao * horizontal opcional. * * Por que UInterface (e nao heranca classica)? - * - `AZMMOPlayerCharacter` ja herda de `ACharacter`. Forcar uma classe base - * `AZMMOEntity : AActor` para todos perderia o `ACharacter` gratuito. + * - `AZeusCharacter` ja herda de `ACharacter`. Forcar uma classe base + * `AZeusEntity : AActor` para todos perderia o `ACharacter` gratuito. * A interface permite que o player local (`ACharacter`), o proxy remoto * (`ACharacter`) e entidades genericas (`AActor`) implementem o mesmo * contrato sem heranca multipla concreta. */ -class ZMMO_API IZMMOEntityInterface +class ZMMO_API IZeusEntityInterface { GENERATED_BODY() public: /** Identificador autoritativo da entidade no servidor. */ - virtual int64 GetZMMOEntityId() const = 0; + virtual int64 GetZeusEntityId() const = 0; /** Categoria da entidade (Player, Mob, NPC, Object). */ - virtual EZMMOEntityType GetZMMOEntityType() const = 0; + virtual EZeusEntityType GetZeusEntityType() const = 0; /** * Aplica um snapshot autoritativo. Implementacoes podem extender com @@ -61,7 +61,7 @@ public: * fisica do landscape de forma autoritativa local, e o servidor apenas * valida input/velocidade (ADR 0038). */ - virtual void ApplyEntitySnapshot(const FZMMOEntitySnapshot& Snapshot) = 0; + virtual void ApplyEntitySnapshot(const FZeusEntitySnapshot& Snapshot) = 0; /** * Alterna entre estado visivel/ativo (`true`) e oculto/desativado (`false`). diff --git a/Source/ZMMO/Game/Entity/ZMMOEntityTypes.h b/Source/ZMMO/Game/Entity/ZeusEntityTypes.h similarity index 63% rename from Source/ZMMO/Game/Entity/ZMMOEntityTypes.h rename to Source/ZMMO/Game/Entity/ZeusEntityTypes.h index 142e263..63ab915 100644 --- a/Source/ZMMO/Game/Entity/ZMMOEntityTypes.h +++ b/Source/ZMMO/Game/Entity/ZeusEntityTypes.h @@ -1,14 +1,14 @@ #pragma once #include "CoreMinimal.h" -#include "ZMMOEntityTypes.generated.h" +#include "ZeusEntityTypes.generated.h" /** * Categoria autoritativa replicada pelo servidor. Determina que classe de ator - * o `UZMMOWorldSubsystem` deve spawnar para um snapshot recebido. + * o `UZeusWorldSubsystem` deve spawnar para um snapshot recebido. */ UENUM(BlueprintType) -enum class EZMMOEntityType : uint8 +enum class EZeusEntityType : uint8 { Player UMETA(DisplayName = "Player"), Mob UMETA(DisplayName = "Mob"), @@ -17,48 +17,48 @@ enum class EZMMOEntityType : uint8 }; /** - * Snapshot autoritativo aplicado por `IZMMOEntityInterface::ApplyEntitySnapshot`. + * Snapshot autoritativo aplicado por `IZeusEntityInterface::ApplyEntitySnapshot`. * - * Construido pelo `UZMMOWorldSubsystem` a partir dos delegates do + * Construido pelo `UZeusWorldSubsystem` a partir dos delegates do * `UZeusNetworkSubsystem` (`OnPlayerStateUpdate` em V0; opcodes para mobs/NPCs * em V1+). Mantemos os campos minimos que o servidor ja replica hoje * (`S_PLAYER_STATE`); novos campos sao adicionados aqui sempre que o protocolo * evoluir, sem mexer nas classes de proxy. */ USTRUCT(BlueprintType) -struct FZMMOEntitySnapshot +struct FZeusEntitySnapshot { GENERATED_BODY() /** EntityId autoritativo do servidor. */ - UPROPERTY(BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(BlueprintReadOnly, Category = "Zeus|Entity") int64 EntityId = 0; /** Categoria do ator (define qual proxy class spawnar). */ - UPROPERTY(BlueprintReadOnly, Category = "ZMMO|Entity") - EZMMOEntityType EntityType = EZMMOEntityType::Player; + UPROPERTY(BlueprintReadOnly, Category = "Zeus|Entity") + EZeusEntityType EntityType = EZeusEntityType::Player; /** Sequencia de input processada no servidor (so faz sentido para players). */ - UPROPERTY(BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(BlueprintReadOnly, Category = "Zeus|Entity") int32 LastProcessedInputSeq = 0; /** Posicao mundo (cm). */ - UPROPERTY(BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(BlueprintReadOnly, Category = "Zeus|Entity") FVector PositionCm = FVector::ZeroVector; /** Velocidade mundo (cm/s) — usada para network smoothing e drivers de animacao. */ - UPROPERTY(BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(BlueprintReadOnly, Category = "Zeus|Entity") FVector VelocityCmS = FVector::ZeroVector; /** Yaw em graus (orientacao visual). */ - UPROPERTY(BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(BlueprintReadOnly, Category = "Zeus|Entity") float YawDeg = 0.0f; /** Indica se o servidor considera o ator em solo. */ - UPROPERTY(BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(BlueprintReadOnly, Category = "Zeus|Entity") bool bGrounded = false; /** Tempo do servidor (ms desde epoch) quando este snapshot foi gerado. */ - UPROPERTY(BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(BlueprintReadOnly, Category = "Zeus|Entity") int64 ServerTimeMs = 0; }; diff --git a/Source/ZMMO/Game/Entity/ZMMOPlayerProxy.cpp b/Source/ZMMO/Game/Entity/ZeusPlayerProxy.cpp similarity index 88% rename from Source/ZMMO/Game/Entity/ZMMOPlayerProxy.cpp rename to Source/ZMMO/Game/Entity/ZeusPlayerProxy.cpp index 98737c3..574cb68 100644 --- a/Source/ZMMO/Game/Entity/ZMMOPlayerProxy.cpp +++ b/Source/ZMMO/Game/Entity/ZeusPlayerProxy.cpp @@ -1,4 +1,4 @@ -#include "ZMMOPlayerProxy.h" +#include "ZeusPlayerProxy.h" #include "Animation/AnimInstance.h" #include "Components/CapsuleComponent.h" @@ -8,10 +8,10 @@ #include "GameFramework/CharacterMovementComponent.h" #include "UObject/ConstructorHelpers.h" #include "ZMMO.h" -#include "ZMMOProxyMovementComponent.h" +#include "ZeusProxyMovementComponent.h" -AZMMOPlayerProxy::AZMMOPlayerProxy(const FObjectInitializer& ObjectInitializer) - : Super(ObjectInitializer.SetDefaultSubobjectClass(ACharacter::CharacterMovementComponentName)) +AZeusPlayerProxy::AZeusPlayerProxy(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer.SetDefaultSubobjectClass(ACharacter::CharacterMovementComponentName)) { PrimaryActorTick.bCanEverTick = true; PrimaryActorTick.bStartWithTickEnabled = true; @@ -43,7 +43,7 @@ AZMMOPlayerProxy::AZMMOPlayerProxy(const FObjectInitializer& ObjectInitializer) CMC->BrakingFrictionFactor = 0.0f; } - // Defaults visuais (mesh + AnimBP) em paridade com `AZMMOPlayerCharacter`. + // Defaults visuais (mesh + AnimBP) em paridade com `AZeusCharacter`. if (USkeletalMeshComponent* MeshComponent = GetMesh()) { static ConstructorHelpers::FObjectFinder QuinnMesh( @@ -60,7 +60,7 @@ AZMMOPlayerProxy::AZMMOPlayerProxy(const FObjectInitializer& ObjectInitializer) else { UE_LOG(LogZMMO, Warning, - TEXT("AZMMOPlayerProxy: SKM_Quinn_Simple nao encontrado em /Game/Characters/Mannequins/Meshes.")); + TEXT("AZeusPlayerProxy: SKM_Quinn_Simple nao encontrado em /Game/Characters/Mannequins/Meshes.")); } if (QuinnAnimBp.Succeeded()) @@ -71,7 +71,7 @@ AZMMOPlayerProxy::AZMMOPlayerProxy(const FObjectInitializer& ObjectInitializer) else { UE_LOG(LogZMMO, Warning, - TEXT("AZMMOPlayerProxy: ABP_Unarmed nao encontrado em /Game/Characters/Mannequins/Anims/Unarmed.")); + TEXT("AZeusPlayerProxy: ABP_Unarmed nao encontrado em /Game/Characters/Mannequins/Anims/Unarmed.")); } } @@ -80,7 +80,7 @@ AZMMOPlayerProxy::AZMMOPlayerProxy(const FObjectInitializer& ObjectInitializer) bUseControllerRotationRoll = false; } -void AZMMOPlayerProxy::BeginPlay() +void AZeusPlayerProxy::BeginPlay() { Super::BeginPlay(); @@ -94,7 +94,7 @@ void AZMMOPlayerProxy::BeginPlay() } } -void AZMMOPlayerProxy::Tick(const float DeltaSeconds) +void AZeusPlayerProxy::Tick(const float DeltaSeconds) { Super::Tick(DeltaSeconds); @@ -131,7 +131,7 @@ void AZMMOPlayerProxy::Tick(const float DeltaSeconds) // Sem snapshot futuro: extrapolacao curta com a ultima velocidade // conhecida, clampada por `MaxExtrapolationSeconds` para nao deixar // o proxy fugir se a rede ficar muda. - const FZMMOProxySnapshot& Last = SnapshotBuffer.Last(); + const FZeusProxySnapshot& Last = SnapshotBuffer.Last(); const float ExtrapSec = FMath::Clamp( static_cast(RenderMs - Last.ServerTimeMs) / 1000.0f, 0.0f, MaxExtrapolationSeconds); @@ -141,8 +141,8 @@ void AZMMOPlayerProxy::Tick(const float DeltaSeconds) } else { - const FZMMOProxySnapshot& A = SnapshotBuffer[IdxB - 1]; - const FZMMOProxySnapshot& B = SnapshotBuffer[IdxB]; + const FZeusProxySnapshot& A = SnapshotBuffer[IdxB - 1]; + const FZeusProxySnapshot& B = SnapshotBuffer[IdxB]; const double Span = FMath::Max(1.0, static_cast(B.ServerTimeMs - A.ServerTimeMs)); InterpAlpha = static_cast(FMath::Clamp( static_cast(RenderMs - A.ServerTimeMs) / Span, 0.0, 1.0)); @@ -208,19 +208,19 @@ void AZMMOPlayerProxy::Tick(const float DeltaSeconds) const int64 NewestMs = SnapshotBuffer.Last().ServerTimeMs; const int64 RenderLagMs = ServerNowMs - NewestMs; UE_LOG(LogZMMO, Verbose, - TEXT("ZMMOPlayerProxy[%lld] buffer=%d renderLagMs=%lld interpAlpha=%.2f extrap=%d delayMs=%.0f"), + TEXT("ZeusPlayerProxy[%lld] buffer=%d renderLagMs=%lld interpAlpha=%.2f extrap=%d delayMs=%.0f"), EntityId, SnapshotBuffer.Num(), RenderLagMs, InterpAlpha, bExtrapolating ? 1 : 0, InterpolationDelayMs); } } -void AZMMOPlayerProxy::SetZMMOIdentity(const int64 InEntityId, const EZMMOEntityType InEntityType) +void AZeusPlayerProxy::SetZeusIdentity(const int64 InEntityId, const EZeusEntityType InEntityType) { EntityId = InEntityId; EntityType = InEntityType; } -void AZMMOPlayerProxy::ApplyEntitySnapshot(const FZMMOEntitySnapshot& Snapshot) +void AZeusPlayerProxy::ApplyEntitySnapshot(const FZeusEntitySnapshot& Snapshot) { // Estabiliza o offset de relogio na primeira amostra. Subsequente nao // re-sincroniza para evitar saltos visuais; um esquema mais sofisticado @@ -231,7 +231,7 @@ void AZMMOPlayerProxy::ApplyEntitySnapshot(const FZMMOEntitySnapshot& Snapshot) ServerClockOffsetMs = LocalNowMs - Snapshot.ServerTimeMs; } - FZMMOProxySnapshot S; + FZeusProxySnapshot S; S.PosCm = Snapshot.PositionCm; S.VelCmS = Snapshot.VelocityCmS; S.bGrounded = Snapshot.bGrounded; @@ -282,20 +282,20 @@ void AZMMOPlayerProxy::ApplyEntitySnapshot(const FZMMOEntitySnapshot& Snapshot) ApplyCollisionPolicy(); } -void AZMMOPlayerProxy::SetEntityRelevant(const bool bRelevant) +void AZeusPlayerProxy::SetEntityRelevant(const bool bRelevant) { - if (bIsZMMORelevant == bRelevant) + if (bIsZeusRelevant == bRelevant) { return; } - bIsZMMORelevant = bRelevant; + bIsZeusRelevant = bRelevant; SetActorHiddenInGame(!bRelevant); SetActorTickEnabled(bRelevant); ApplyCollisionPolicy(); } -void AZMMOPlayerProxy::RefreshAnimationDrivers() +void AZeusPlayerProxy::RefreshAnimationDrivers() { UCharacterMovementComponent* CMC = GetCharacterMovement(); if (!CMC) @@ -314,13 +314,13 @@ void AZMMOPlayerProxy::RefreshAnimationDrivers() // Acceleration externa via CMC custom — alimenta `Get Current Acceleration` // que o AnimBP do Quinn usa em `ShouldMove` e nas transições de Jump_Start. - if (UZMMOProxyMovementComponent* ProxyCMC = Cast(CMC)) + if (UZeusProxyMovementComponent* ProxyCMC = Cast(CMC)) { - ProxyCMC->SetZMMOExternalAcceleration(LastDerivedAccelerationCmS2); + ProxyCMC->SetZeusExternalAcceleration(LastDerivedAccelerationCmS2); } } -void AZMMOPlayerProxy::ApplyCollisionPolicy() +void AZeusPlayerProxy::ApplyCollisionPolicy() { UCapsuleComponent* Capsule = GetCapsuleComponent(); if (!Capsule) @@ -328,6 +328,6 @@ void AZMMOPlayerProxy::ApplyCollisionPolicy() return; } - const bool bShouldCollide = bIsZMMORelevant && bHasFirstSnapshot; + const bool bShouldCollide = bIsZeusRelevant && bHasFirstSnapshot; Capsule->SetCollisionEnabled(bShouldCollide ? ECollisionEnabled::QueryOnly : ECollisionEnabled::NoCollision); } diff --git a/Source/ZMMO/Game/Entity/ZMMOPlayerProxy.h b/Source/ZMMO/Game/Entity/ZeusPlayerProxy.h similarity index 76% rename from Source/ZMMO/Game/Entity/ZMMOPlayerProxy.h rename to Source/ZMMO/Game/Entity/ZeusPlayerProxy.h index 14c5c3a..5a21096 100644 --- a/Source/ZMMO/Game/Entity/ZMMOPlayerProxy.h +++ b/Source/ZMMO/Game/Entity/ZeusPlayerProxy.h @@ -2,19 +2,18 @@ #include "CoreMinimal.h" #include "GameFramework/Character.h" -#include "ZMMOEntityInterface.h" -#include "ZMMOEntityTypes.h" -#include "ZMMOPlayerProxy.generated.h" +#include "ZeusEntityInterface.h" +#include "ZeusEntityTypes.h" +#include "ZeusPlayerProxy.generated.h" /** - * AZMMOPlayerProxy + * AZeusPlayerProxy * * Proxy visual para jogadores remotos (e, no futuro, mobs com locomotion * por capsula) cuja posicao vem 100% do servidor via snapshots * (`UZeusNetworkSubsystem::OnPlayerStateUpdate`). * - * Inspirado em `AZeusRemoteCharacter` (ZeusV1). Diferencas chave vs. - * `AZMMOPlayerCharacter` (jogador local): + * Diferencas chave vs. `AZeusCharacter` (jogador local): * - SEM `EnhancedInput`, sem envio de `C_INPUT_AXIS`. * - SEM buffer de pending inputs nem reconciliacao. * - Posicao aplicada por snapshot (`ApplyEntitySnapshot`); a `ACharacter` @@ -22,19 +21,18 @@ * mas o CMC fica em modo "kinematic-ish" (nao integra fisica). * * Animacao no AnimBP do Quinn (`ABP_Unarmed`): a formula `ShouldMove` exige - * `Acceleration != 0`. Como proxies nao tem input, adoptamos a mesma - * estrategia do ZClientMMO: CMC custom (`UZMMOProxyMovementComponent`) com - * escrita externa de `Acceleration`, alimentada pela derivada da velocidade - * entre snapshots. Tick do proxy roda **antes** do mesh tick para que - * Velocity+Acceleration estejam populados quando o `NativeUpdateAnimation` - * do AnimBP os ler. + * `Acceleration != 0`. Como proxies nao tem input, adoptamos a estrategia + * de CMC custom (`UZeusProxyMovementComponent`) com escrita externa de + * `Acceleration`, alimentada pela derivada da velocidade entre snapshots. + * Tick do proxy roda **antes** do mesh tick para que Velocity+Acceleration + * estejam populados quando o `NativeUpdateAnimation` do AnimBP os ler. */ /** * Snapshot bruto guardado no buffer de interpolacao. Mantido como struct privada * ao .h porque so o proxy (e debugging local) precisa olhar para ele. */ USTRUCT() -struct FZMMOProxySnapshot +struct FZeusProxySnapshot { GENERATED_BODY() @@ -53,37 +51,37 @@ struct FZMMOProxySnapshot }; UCLASS(Blueprintable, BlueprintType) -class ZMMO_API AZMMOPlayerProxy : public ACharacter, public IZMMOEntityInterface +class ZMMO_API AZeusPlayerProxy : public ACharacter, public IZeusEntityInterface { GENERATED_BODY() public: - AZMMOPlayerProxy(const FObjectInitializer& ObjectInitializer); + AZeusPlayerProxy(const FObjectInitializer& ObjectInitializer); virtual void BeginPlay() override; virtual void Tick(float DeltaSeconds) override; - // --- IZMMOEntityInterface --- - virtual int64 GetZMMOEntityId() const override { return EntityId; } - virtual EZMMOEntityType GetZMMOEntityType() const override { return EntityType; } - virtual void ApplyEntitySnapshot(const FZMMOEntitySnapshot& Snapshot) override; + // --- IZeusEntityInterface --- + virtual int64 GetZeusEntityId() const override { return EntityId; } + virtual EZeusEntityType GetZeusEntityType() const override { return EntityType; } + virtual void ApplyEntitySnapshot(const FZeusEntitySnapshot& Snapshot) override; virtual void SetEntityRelevant(bool bRelevant) override; - UFUNCTION(BlueprintCallable, Category = "ZMMO|Entity") - void SetZMMOIdentity(int64 InEntityId, EZMMOEntityType InEntityType); + UFUNCTION(BlueprintCallable, Category = "Zeus|Entity") + void SetZeusIdentity(int64 InEntityId, EZeusEntityType InEntityType); protected: - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") int64 EntityId = 0; - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") - EZMMOEntityType EntityType = EZMMOEntityType::Player; + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") + EZeusEntityType EntityType = EZeusEntityType::Player; - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") - bool bIsZMMORelevant = true; + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") + bool bIsZeusRelevant = true; /** True apos o primeiro snapshot ser aplicado — antes disso o ator pode ficar oculto. */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") bool bHasFirstSnapshot = false; /** @@ -91,15 +89,15 @@ protected: * de `InterpolatedPosCm` (visual) — separar os dois e essencial para * comparar drift autoritativo vs visual via debug overlay/logs. */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") FVector AuthoritativePosCm = FVector::ZeroVector; /** Posicao **visual** atual (resultado da interpolacao do tick). */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") FVector InterpolatedPosCm = FVector::ZeroVector; /** Compat: alias para `AuthoritativePosCm` (preserva binding de Blueprint, se houver). */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") FVector LastSnapshotPosition = FVector::ZeroVector; /** @@ -108,7 +106,7 @@ protected: * em cada `Tick` para manter os drivers de animacao alimentados entre * updates de rede. */ - UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Entity") + UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity") FVector VisualVelocity = FVector::ZeroVector; /** @@ -116,23 +114,23 @@ protected: * expresso no dominio do tempo do servidor. Padrao 100 ms (~3 snapshots a 30 Hz) * cobre 1 perda + 1 jitter sem extrapolar. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ZMMO|Network", + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Zeus|Network", meta = (ClampMin = "0.0", ClampMax = "500.0")) double InterpolationDelayMs = 100.0; /** Tamanho maximo do buffer (em snapshots). Cobre ~270 ms a 30 Hz. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ZMMO|Network", + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Zeus|Network", meta = (ClampMin = "2", ClampMax = "32")) int32 SnapshotBufferCapacity = 8; /** Limite duro de extrapolacao (s) quando nao ha snapshot futuro. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ZMMO|Network", + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Zeus|Network", meta = (ClampMin = "0.0", ClampMax = "0.5")) float MaxExtrapolationSeconds = 0.1f; /** Buffer ordenado por `ServerTimeMs` ascendente. */ UPROPERTY() - TArray SnapshotBuffer; + TArray SnapshotBuffer; /** * Offset entre o relogio local (`FPlatformTime::Seconds * 1000`) e o diff --git a/Source/ZMMO/Game/Entity/ZeusProxyMovementComponent.h b/Source/ZMMO/Game/Entity/ZeusProxyMovementComponent.h new file mode 100644 index 0000000..c9cd224 --- /dev/null +++ b/Source/ZMMO/Game/Entity/ZeusProxyMovementComponent.h @@ -0,0 +1,24 @@ +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/CharacterMovementComponent.h" + +#include "ZeusProxyMovementComponent.generated.h" + +/** + * CMC customizado para AZeusPlayerProxy. Expõe escrita direta de Acceleration + * (protected na base) para que o AnimBP veja Acceleration!=0 quando o proxy + * recebe snapshots, alimentando a fórmula ShouldMove e a transição Jump_Start + * do ABP_Unarmed (ambas dependem de aceleração não-nula). + */ +UCLASS(ClassGroup = (Zeus), meta = (BlueprintSpawnableComponent)) +class ZMMO_API UZeusProxyMovementComponent : public UCharacterMovementComponent +{ + GENERATED_BODY() + +public: + void SetZeusExternalAcceleration(const FVector& InAccelerationCmS2) + { + Acceleration = InAccelerationCmS2; + } +}; diff --git a/Source/ZMMO/Game/Modes/ZMMOFrontEndGameMode.cpp b/Source/ZMMO/Game/Modes/ZMMOFrontEndGameMode.cpp deleted file mode 100644 index 26a9666..0000000 --- a/Source/ZMMO/Game/Modes/ZMMOFrontEndGameMode.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "ZMMOFrontEndGameMode.h" - -#include "ZMMOFrontEndPlayerController.h" - -AZMMOFrontEndGameMode::AZMMOFrontEndGameMode() -{ - // UI pura: sem pawn. O controller cria o root layout e arranca o fluxo. - DefaultPawnClass = nullptr; - PlayerControllerClass = AZMMOFrontEndPlayerController::StaticClass(); -} diff --git a/Source/ZMMO/Game/Modes/ZMMOGameMode.cpp b/Source/ZMMO/Game/Modes/ZMMOGameMode.cpp deleted file mode 100644 index 75821f3..0000000 --- a/Source/ZMMO/Game/Modes/ZMMOGameMode.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "ZMMOGameMode.h" - -#include "ZMMOHUD.h" -#include "ZMMOPlayerCharacter.h" -#include "ZMMOPlayerController.h" -#include "ZMMOPlayerState.h" - -AZMMOGameMode::AZMMOGameMode() -{ - DefaultPawnClass = AZMMOPlayerCharacter::StaticClass(); - PlayerControllerClass = AZMMOPlayerController::StaticClass(); - PlayerStateClass = AZMMOPlayerState::StaticClass(); - HUDClass = AZMMOHUD::StaticClass(); -} diff --git a/Source/ZMMO/Game/Modes/ZeusFrontEndGameMode.cpp b/Source/ZMMO/Game/Modes/ZeusFrontEndGameMode.cpp new file mode 100644 index 0000000..d949bed --- /dev/null +++ b/Source/ZMMO/Game/Modes/ZeusFrontEndGameMode.cpp @@ -0,0 +1,10 @@ +#include "ZeusFrontEndGameMode.h" + +#include "ZeusFrontEndPlayerController.h" + +AZeusFrontEndGameMode::AZeusFrontEndGameMode() +{ + // UI pura: sem pawn. O controller cria o root layout e arranca o fluxo. + DefaultPawnClass = nullptr; + PlayerControllerClass = AZeusFrontEndPlayerController::StaticClass(); +} diff --git a/Source/ZMMO/Game/Modes/ZMMOFrontEndGameMode.h b/Source/ZMMO/Game/Modes/ZeusFrontEndGameMode.h similarity index 63% rename from Source/ZMMO/Game/Modes/ZMMOFrontEndGameMode.h rename to Source/ZMMO/Game/Modes/ZeusFrontEndGameMode.h index 0cef995..9399a2d 100644 --- a/Source/ZMMO/Game/Modes/ZMMOFrontEndGameMode.h +++ b/Source/ZMMO/Game/Modes/ZeusFrontEndGameMode.h @@ -2,21 +2,21 @@ #include "CoreMinimal.h" #include "GameFramework/GameModeBase.h" -#include "ZMMOFrontEndGameMode.generated.h" +#include "ZeusFrontEndGameMode.generated.h" /** - * AZMMOFrontEndGameMode + * AZeusFrontEndGameMode * * GameMode do mapa de front-end (L_FrontEnd): só UI, sem pawn nem network - * play. NÃO é o GameMode global (esse continua AZMMOGameMode para mapas de + * play. NÃO é o GameMode global (esse continua AZeusGameMode para mapas de * mundo) — aplicado via override no World Settings de L_FrontEnd * (ARQUITETURA.md §3.3 / decisão de mapa dedicado). */ UCLASS(Blueprintable, BlueprintType) -class ZMMO_API AZMMOFrontEndGameMode : public AGameModeBase +class ZMMO_API AZeusFrontEndGameMode : public AGameModeBase { GENERATED_BODY() public: - AZMMOFrontEndGameMode(); + AZeusFrontEndGameMode(); }; diff --git a/Source/ZMMO/Game/Modes/ZMMOGameInstance.cpp b/Source/ZMMO/Game/Modes/ZeusGameInstance.cpp similarity index 60% rename from Source/ZMMO/Game/Modes/ZMMOGameInstance.cpp rename to Source/ZMMO/Game/Modes/ZeusGameInstance.cpp index 36b2221..68dc68e 100644 --- a/Source/ZMMO/Game/Modes/ZMMOGameInstance.cpp +++ b/Source/ZMMO/Game/Modes/ZeusGameInstance.cpp @@ -1,13 +1,13 @@ -#include "ZMMOGameInstance.h" +#include "ZeusGameInstance.h" #include "ZMMO.h" #include "ZeusNetworkSubsystem.h" -void UZMMOGameInstance::Init() +void UZeusGameInstance::Init() { Super::Init(); - UE_LOG(LogZMMO, Log, TEXT("ZMMOGameInstance::Init AutoConnect=%s Host=%s Port=%d"), + UE_LOG(LogZMMO, Log, TEXT("ZeusGameInstance::Init AutoConnect=%s Host=%s Port=%d"), bAutoConnectOnStart ? TEXT("true") : TEXT("false"), *ZeusServerHost, ZeusServerPort); @@ -15,7 +15,7 @@ void UZMMOGameInstance::Init() UZeusNetworkSubsystem* ZeusNet = GetZeusNetwork(); if (!ZeusNet) { - UE_LOG(LogZMMO, Warning, TEXT("ZMMOGameInstance: ZeusNetworkSubsystem unavailable; ZeusNetwork plugin enabled?")); + UE_LOG(LogZMMO, Warning, TEXT("ZeusGameInstance: ZeusNetworkSubsystem unavailable; ZeusNetwork plugin enabled?")); return; } @@ -29,7 +29,7 @@ void UZMMOGameInstance::Init() ZeusNet->ConnectToZeusServer(ZeusServerHost, ZeusServerPort); } -void UZMMOGameInstance::Shutdown() +void UZeusGameInstance::Shutdown() { if (UZeusNetworkSubsystem* ZeusNet = GetZeusNetwork()) { @@ -43,55 +43,55 @@ void UZMMOGameInstance::Shutdown() Super::Shutdown(); } -UZeusNetworkSubsystem* UZMMOGameInstance::GetZeusNetwork() const +UZeusNetworkSubsystem* UZeusGameInstance::GetZeusNetwork() const { return GetSubsystem(); } -void UZMMOGameInstance::BindZeusDelegates(UZeusNetworkSubsystem* Zeus) +void UZeusGameInstance::BindZeusDelegates(UZeusNetworkSubsystem* Zeus) { if (!Zeus) { return; } - Zeus->OnConnected.AddDynamic(this, &UZMMOGameInstance::HandleZeusConnected); - Zeus->OnConnectionFailed.AddDynamic(this, &UZMMOGameInstance::HandleZeusConnectionFailed); - Zeus->OnDisconnected.AddDynamic(this, &UZMMOGameInstance::HandleZeusDisconnected); + Zeus->OnConnected.AddDynamic(this, &UZeusGameInstance::HandleZeusConnected); + Zeus->OnConnectionFailed.AddDynamic(this, &UZeusGameInstance::HandleZeusConnectionFailed); + Zeus->OnDisconnected.AddDynamic(this, &UZeusGameInstance::HandleZeusDisconnected); // OnNetworkLog: NAO assinamos. Plugin ja loga em LogZeusNetwork (console) // + arquivo proprio em Saved/Logs/ZeusNetwork/. Forwarding em LogZMMO era // diagnostico inicial (sessao 2026-05-07); agora gera duplicacao de cada // linha. Remova esta nota e descomente abaixo se quiser ver no LogZMMO: - // Zeus->OnNetworkLog.AddDynamic(this, &UZMMOGameInstance::HandleZeusNetworkLog); + // Zeus->OnNetworkLog.AddDynamic(this, &UZeusGameInstance::HandleZeusNetworkLog); } -void UZMMOGameInstance::UnbindZeusDelegates(UZeusNetworkSubsystem* Zeus) +void UZeusGameInstance::UnbindZeusDelegates(UZeusNetworkSubsystem* Zeus) { if (!Zeus) { return; } - Zeus->OnConnected.RemoveDynamic(this, &UZMMOGameInstance::HandleZeusConnected); - Zeus->OnConnectionFailed.RemoveDynamic(this, &UZMMOGameInstance::HandleZeusConnectionFailed); - Zeus->OnDisconnected.RemoveDynamic(this, &UZMMOGameInstance::HandleZeusDisconnected); + Zeus->OnConnected.RemoveDynamic(this, &UZeusGameInstance::HandleZeusConnected); + Zeus->OnConnectionFailed.RemoveDynamic(this, &UZeusGameInstance::HandleZeusConnectionFailed); + Zeus->OnDisconnected.RemoveDynamic(this, &UZeusGameInstance::HandleZeusDisconnected); // OnNetworkLog: nao foi assinado (ver BindZeusDelegates) — nada a remover. } -void UZMMOGameInstance::HandleZeusConnected() +void UZeusGameInstance::HandleZeusConnected() { UE_LOG(LogZMMO, Log, TEXT("[Zeus] Connected to server %s:%d"), *ZeusServerHost, ZeusServerPort); } -void UZMMOGameInstance::HandleZeusConnectionFailed(FString Reason) +void UZeusGameInstance::HandleZeusConnectionFailed(FString Reason) { UE_LOG(LogZMMO, Warning, TEXT("[Zeus] Connection failed: %s"), *Reason); } -void UZMMOGameInstance::HandleZeusDisconnected() +void UZeusGameInstance::HandleZeusDisconnected() { UE_LOG(LogZMMO, Log, TEXT("[Zeus] Disconnected.")); } -void UZMMOGameInstance::HandleZeusNetworkLog(FString Message) +void UZeusGameInstance::HandleZeusNetworkLog(FString Message) { UE_LOG(LogZMMO, Log, TEXT("[Zeus] %s"), *Message); } diff --git a/Source/ZMMO/Game/Modes/ZMMOGameInstance.h b/Source/ZMMO/Game/Modes/ZeusGameInstance.h similarity index 88% rename from Source/ZMMO/Game/Modes/ZMMOGameInstance.h rename to Source/ZMMO/Game/Modes/ZeusGameInstance.h index 89d195c..839f593 100644 --- a/Source/ZMMO/Game/Modes/ZMMOGameInstance.h +++ b/Source/ZMMO/Game/Modes/ZeusGameInstance.h @@ -2,12 +2,12 @@ #include "CoreMinimal.h" #include "Engine/GameInstance.h" -#include "ZMMOGameInstance.generated.h" +#include "ZeusGameInstance.generated.h" class UZeusNetworkSubsystem; /** - * UZMMOGameInstance + * UZeusGameInstance * * Game instance do cliente Zeus MMO. O `UZeusNetworkSubsystem` (do plugin * `ZeusNetwork`) e um `UGameInstanceSubsystem` e portanto e criado @@ -22,7 +22,7 @@ class UZeusNetworkSubsystem; * overrides de configuracao por build (dev / staging / prod). */ UCLASS(Blueprintable, BlueprintType) -class ZMMO_API UZMMOGameInstance : public UGameInstance +class ZMMO_API UZeusGameInstance : public UGameInstance { GENERATED_BODY() @@ -36,20 +36,20 @@ public: * dirigida pelo `UUIFrontEndFlowSubsystem` (fluxo Boot→Connecting→Login). * Pôr `true` apenas para smoke test legado sem front-end. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Config, Category = "ZMMO|Network") + UPROPERTY(EditAnywhere, BlueprintReadWrite, Config, Category = "Zeus|Network") bool bAutoConnectOnStart = false; /** Host (IPv4 ou hostname) do servidor Zeus. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Config, Category = "ZMMO|Network") + UPROPERTY(EditAnywhere, BlueprintReadWrite, Config, Category = "Zeus|Network") FString ZeusServerHost = TEXT("127.0.0.1"); /** Porta UDP do servidor Zeus (1..65535). */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Config, Category = "ZMMO|Network", meta = (ClampMin = "1", ClampMax = "65535")) + UPROPERTY(EditAnywhere, BlueprintReadWrite, Config, Category = "Zeus|Network", meta = (ClampMin = "1", ClampMax = "65535")) int32 ZeusServerPort = 27777; protected: /** Devolve o subsystem Zeus desta game instance (criado automaticamente pelo plugin). */ - UFUNCTION(BlueprintPure, Category = "ZMMO|Network") + UFUNCTION(BlueprintPure, Category = "Zeus|Network") UZeusNetworkSubsystem* GetZeusNetwork() const; void BindZeusDelegates(UZeusNetworkSubsystem* Zeus); diff --git a/Source/ZMMO/Game/Modes/ZeusGameMode.cpp b/Source/ZMMO/Game/Modes/ZeusGameMode.cpp new file mode 100644 index 0000000..a017ef8 --- /dev/null +++ b/Source/ZMMO/Game/Modes/ZeusGameMode.cpp @@ -0,0 +1,14 @@ +#include "ZeusGameMode.h" + +#include "ZeusHUD.h" +#include "ZeusCharacter.h" +#include "ZeusPlayerController.h" +#include "ZeusPlayerState.h" + +AZeusGameMode::AZeusGameMode() +{ + DefaultPawnClass = AZeusCharacter::StaticClass(); + PlayerControllerClass = AZeusPlayerController::StaticClass(); + PlayerStateClass = AZeusPlayerState::StaticClass(); + HUDClass = AZeusHUD::StaticClass(); +} diff --git a/Source/ZMMO/Game/Modes/ZMMOGameMode.h b/Source/ZMMO/Game/Modes/ZeusGameMode.h similarity index 53% rename from Source/ZMMO/Game/Modes/ZMMOGameMode.h rename to Source/ZMMO/Game/Modes/ZeusGameMode.h index 32acfe9..dccde63 100644 --- a/Source/ZMMO/Game/Modes/ZMMOGameMode.h +++ b/Source/ZMMO/Game/Modes/ZeusGameMode.h @@ -2,24 +2,24 @@ #include "CoreMinimal.h" #include "GameFramework/GameModeBase.h" -#include "ZMMOGameMode.generated.h" +#include "ZeusGameMode.generated.h" /** - * AZMMOGameMode + * AZeusGameMode * - * Game mode do cliente Zeus MMO. Configura `AZMMOPlayerCharacter` como - * `DefaultPawnClass` e `AZMMOPlayerController` como `PlayerControllerClass`. + * Game mode do cliente Zeus MMO. Configura `AZeusCharacter` como + * `DefaultPawnClass` e `AZeusPlayerController` como `PlayerControllerClass`. * * A classe e instanciavel directamente (apontada por - * `GlobalDefaultGameMode=/Script/ZMMO.ZMMOGameMode` em + * `GlobalDefaultGameMode=/Script/ZMMO.ZeusGameMode` em * `Config/DefaultEngine.ini`); um BP filho e opcional para overrides * por mapa / build (skeletal mesh, AnimBP custom, etc.). */ UCLASS(Blueprintable, BlueprintType) -class ZMMO_API AZMMOGameMode : public AGameModeBase +class ZMMO_API AZeusGameMode : public AGameModeBase { GENERATED_BODY() public: - AZMMOGameMode(); + AZeusGameMode(); }; diff --git a/Source/ZMMO/Game/Modes/ZMMOHUD.cpp b/Source/ZMMO/Game/Modes/ZeusHUD.cpp similarity index 82% rename from Source/ZMMO/Game/Modes/ZMMOHUD.cpp rename to Source/ZMMO/Game/Modes/ZeusHUD.cpp index c7c6087..920e07e 100644 --- a/Source/ZMMO/Game/Modes/ZMMOHUD.cpp +++ b/Source/ZMMO/Game/Modes/ZeusHUD.cpp @@ -1,16 +1,16 @@ -#include "ZMMOHUD.h" +#include "ZeusHUD.h" #include "Engine/GameInstance.h" #include "ZMMO.h" #include "UI/InGame/UIInGameFlowSubsystem.h" -AZMMOHUD::AZMMOHUD() +AZeusHUD::AZeusHUD() { // AHUD nao precisa tick — toda atualizacao vem via UMG (delegates + // CommonUI). PrimaryActorTick default e' off; mantemos. } -void AZMMOHUD::BeginPlay() +void AZeusHUD::BeginPlay() { Super::BeginPlay(); @@ -25,12 +25,12 @@ void AZMMOHUD::BeginPlay() else { UE_LOG(LogZMMO, Warning, - TEXT("AZMMOHUD: UUIInGameFlowSubsystem nao encontrado — HUD nao sera spawnado")); + TEXT("AZeusHUD: UUIInGameFlowSubsystem nao encontrado — HUD nao sera spawnado")); } } } -void AZMMOHUD::EndPlay(const EEndPlayReason::Type EndPlayReason) +void AZeusHUD::EndPlay(const EEndPlayReason::Type EndPlayReason) { // UUIInGameFlowSubsystem persiste no GameInstance entre OpenLevel — nao // limpamos UI in-game aqui (o front-end flow vai tomar conta na proxima diff --git a/Source/ZMMO/Game/Modes/ZMMOHUD.h b/Source/ZMMO/Game/Modes/ZeusHUD.h similarity index 70% rename from Source/ZMMO/Game/Modes/ZMMOHUD.h rename to Source/ZMMO/Game/Modes/ZeusHUD.h index 44c95f7..3eb8be1 100644 --- a/Source/ZMMO/Game/Modes/ZMMOHUD.h +++ b/Source/ZMMO/Game/Modes/ZeusHUD.h @@ -2,7 +2,7 @@ #include "CoreMinimal.h" #include "GameFramework/HUD.h" -#include "ZMMOHUD.generated.h" +#include "ZeusHUD.generated.h" /** * HUD do MMO. Pattern UE5 idiomatico: o GameMode atribui `HUDClass`, o @@ -14,21 +14,21 @@ * subsystem cuida do cleanup. * * Separacao de responsabilidades: - * - AZMMOPlayerCharacter (Pawn) — movimento, input, AttributeComponent - * - AZMMOPlayerController — input mapping, mouse - * - AZMMOHUD — UI lifecycle - * - AZMMOGameMode — wires tudo via class slots + * - AZeusCharacter (Pawn) — movimento, input, AttributeComponent + * - AZeusPlayerController — input mapping, mouse + * - AZeusHUD — UI lifecycle + * - AZeusGameMode — wires tudo via class slots * * NAO desenha nada via canvas (AHUD::DrawHUD). UI inteira vive em UMG + * CommonUI (UI.Layer.Game / GameMenu / Modal). */ UCLASS() -class ZMMO_API AZMMOHUD : public AHUD +class ZMMO_API AZeusHUD : public AHUD { GENERATED_BODY() public: - AZMMOHUD(); + AZeusHUD(); protected: virtual void BeginPlay() override; diff --git a/Source/ZMMO/Game/Modes/ZMMOPlayerState.cpp b/Source/ZMMO/Game/Modes/ZeusPlayerState.cpp similarity index 66% rename from Source/ZMMO/Game/Modes/ZMMOPlayerState.cpp rename to Source/ZMMO/Game/Modes/ZeusPlayerState.cpp index 4fb5a2d..7e87c8c 100644 --- a/Source/ZMMO/Game/Modes/ZMMOPlayerState.cpp +++ b/Source/ZMMO/Game/Modes/ZeusPlayerState.cpp @@ -1,14 +1,14 @@ -#include "ZMMOPlayerState.h" +#include "ZeusPlayerState.h" #include "Components/ActorComponent.h" #include "Misc/ConfigCacheIni.h" #include "Net/UnrealNetwork.h" #include "ZMMO.h" -AZMMOPlayerState::AZMMOPlayerState() +AZeusPlayerState::AZeusPlayerState() { // Component Registry: instancia cada classe declarada em - // DefaultGame.ini::[/Script/ZMMO.ZMMOPlayerState]+ComponentClasses=... + // DefaultGame.ini::[/Script/ZMMO.ZeusPlayerState]+ComponentClasses=... // // Le manualmente via GConfig para evitar timing do UPROPERTY(Config), // que requer LoadConfig() ja ter rodado no CDO antes da instance ser @@ -17,7 +17,7 @@ AZMMOPlayerState::AZMMOPlayerState() if (ComponentClasses.Num() == 0 && GConfig) { TArray ClassPaths; - GConfig->GetArray(TEXT("/Script/ZMMO.ZMMOPlayerState"), + GConfig->GetArray(TEXT("/Script/ZMMO.ZeusPlayerState"), TEXT("ComponentClasses"), ClassPaths, GGameIni); @@ -30,13 +30,13 @@ AZMMOPlayerState::AZMMOPlayerState() else { UE_LOG(LogZMMO, Warning, - TEXT("ZMMOPlayerState: ComponentClasses path nao resolveu: %s"), *Path); + TEXT("ZeusPlayerState: ComponentClasses path nao resolveu: %s"), *Path); } } } UE_LOG(LogZMMO, Log, - TEXT("AZMMOPlayerState ctor: %d componente(s) no registry (instance=%s)"), + TEXT("AZeusPlayerState ctor: %d componente(s) no registry (instance=%s)"), ComponentClasses.Num(), *GetName()); int32 SubobjectIndex = 0; @@ -46,13 +46,13 @@ AZMMOPlayerState::AZMMOPlayerState() if (!CompClass) { UE_LOG(LogZMMO, Warning, - TEXT("ZMMOPlayerState: ComponentClass null em ComponentClasses[%d]"), + TEXT("ZeusPlayerState: ComponentClass null em ComponentClasses[%d]"), SubobjectIndex); ++SubobjectIndex; continue; } const FName CompName = MakeUniqueObjectName(this, CompClass, - FName(*FString::Printf(TEXT("ZMMOComp_%d_%s"), SubobjectIndex, *CompClass->GetName()))); + FName(*FString::Printf(TEXT("ZeusComp_%d_%s"), SubobjectIndex, *CompClass->GetName()))); // Overload runtime de CreateDefaultSubobject retorna UObject* (sem template) — // precisa cast para UActorComponent. UActorComponent* Comp = Cast(CreateDefaultSubobject(CompName, CompClass, CompClass, @@ -60,40 +60,40 @@ AZMMOPlayerState::AZMMOPlayerState() if (Comp) { UE_LOG(LogZMMO, Log, - TEXT("ZMMOPlayerState: componente registrado [%d] %s"), + TEXT("ZeusPlayerState: componente registrado [%d] %s"), SubobjectIndex, *CompClass->GetName()); } else { UE_LOG(LogZMMO, Warning, - TEXT("ZMMOPlayerState: CreateDefaultSubobject falhou para %s"), + TEXT("ZeusPlayerState: CreateDefaultSubobject falhou para %s"), *CompClass->GetName()); } ++SubobjectIndex; } } -void AZMMOPlayerState::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const +void AZeusPlayerState::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const { Super::GetLifetimeReplicatedProps(OutLifetimeProps); - DOREPLIFETIME(AZMMOPlayerState, ZMMOEntityId); - DOREPLIFETIME(AZMMOPlayerState, CharId); - DOREPLIFETIME(AZMMOPlayerState, CharName); - DOREPLIFETIME(AZMMOPlayerState, BaseLevel); - DOREPLIFETIME(AZMMOPlayerState, ClassId); - DOREPLIFETIME(AZMMOPlayerState, GuildName); + DOREPLIFETIME(AZeusPlayerState, ZeusEntityId); + DOREPLIFETIME(AZeusPlayerState, CharId); + DOREPLIFETIME(AZeusPlayerState, CharName); + DOREPLIFETIME(AZeusPlayerState, BaseLevel); + DOREPLIFETIME(AZeusPlayerState, ClassId); + DOREPLIFETIME(AZeusPlayerState, GuildName); } -void AZMMOPlayerState::SetPublicIdentity(int64 InEntityId, const FString& InCharId, +void AZeusPlayerState::SetPublicIdentity(int64 InEntityId, const FString& InCharId, int32 InBaseLevel, int32 InClassId) { - ZMMOEntityId = InEntityId; + ZeusEntityId = InEntityId; CharId = InCharId; BaseLevel = InBaseLevel; ClassId = InClassId; } -void AZMMOPlayerState::SetCharInfo(const FString& InCharName, const FString& InGuildName) +void AZeusPlayerState::SetCharInfo(const FString& InCharName, const FString& InGuildName) { CharName = InCharName; GuildName = InGuildName; diff --git a/Source/ZMMO/Game/Modes/ZMMOPlayerState.h b/Source/ZMMO/Game/Modes/ZeusPlayerState.h similarity index 74% rename from Source/ZMMO/Game/Modes/ZMMOPlayerState.h rename to Source/ZMMO/Game/Modes/ZeusPlayerState.h index 1d027f0..26b2107 100644 --- a/Source/ZMMO/Game/Modes/ZMMOPlayerState.h +++ b/Source/ZMMO/Game/Modes/ZeusPlayerState.h @@ -3,7 +3,7 @@ #include "CoreMinimal.h" #include "GameFramework/PlayerState.h" #include "Templates/SubclassOf.h" -#include "ZMMOPlayerState.generated.h" +#include "ZeusPlayerState.generated.h" class FLifetimeProperty; class UActorComponent; @@ -28,29 +28,29 @@ class UActorComponent; * * ## Component Registry (Open-Closed) * - * Cada modulo (ZMMOAttributes, ZMMOInventory, ZMMOSkills futuros) declara + * Cada modulo (ZeusAttributes, ZeusInventory, ZeusSkills futuros) declara * sua component class em DefaultGame.ini: * - * [/Script/ZMMO.ZMMOPlayerState] - * +ComponentClasses=/Script/ZMMOAttributes.ZMMOAttributeComponent - * +ComponentClasses=/Script/ZMMOInventory.ZMMOInventoryComponent - * +ComponentClasses=/Script/ZMMOSkills.ZMMOSkillComponent + * [/Script/ZMMO.ZeusPlayerState] + * +ComponentClasses=/Script/ZeusAttributes.ZeusAttributeComponent + * +ComponentClasses=/Script/ZeusInventory.ZeusInventoryComponent + * +ComponentClasses=/Script/ZeusSkills.ZeusSkillComponent * - * O construtor de AZMMOPlayerState le essa lista (Config) e instancia + * O construtor de AZeusPlayerState le essa lista (Config) e instancia * cada classe como subobject. PlayerState fica fechado pra modificacao, * modulos abertos pra extensao — adicionar Inventory NAO requer - * recompilar/editar AZMMOPlayerState. + * recompilar/editar AZeusPlayerState. * - * Acesso: `PlayerState->FindComponentByClass()` - * ou o helper `GetZMMOComponent()`. + * Acesso: `PlayerState->FindComponentByClass()` + * ou o helper `GetZeusComponent()`. */ UCLASS(Config = Game, BlueprintType) -class ZMMO_API AZMMOPlayerState : public APlayerState +class ZMMO_API AZeusPlayerState : public APlayerState { GENERATED_BODY() public: - AZMMOPlayerState(); + AZeusPlayerState(); // === Identidade publica === // @@ -60,51 +60,51 @@ public: // passe a usar dedicated UE5 no futuro. /** EntityId autoritativo do server. 0 ate o spawn local confirmar. */ - UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Identity") - int64 ZMMOEntityId = 0; + UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Identity") + int64 ZeusEntityId = 0; /** CharId (BIGINT no DB; FString pra preservar 64 bits em Blueprint). */ - UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Identity") + UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Identity") FString CharId; /** Nome do char vindo do DB (`characters.name`). Setado por - * AZMMOPlayerCharacter::HandleLocalSpawnReady com o payload do + * AZeusCharacter::HandleLocalSpawnReady com o payload do * S_SPAWN_PLAYER. UI prefere isto a APlayerState::GetPlayerName(). */ - UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Identity") + UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Identity") FString CharName; // === Progressao publica === - UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Progress") + UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Progress") int32 BaseLevel = 1; - UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Progress") + UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Progress") int32 ClassId = 0; // === Guild (futuro) === - UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "ZMMO|Guild") + UPROPERTY(Replicated, VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Guild") FString GuildName; virtual void GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const override; // === Helpers === - /// Setado por AZMMOPlayerCharacter::HandleLocalSpawnReady (pose/EntityId) + /// Setado por AZeusCharacter::HandleLocalSpawnReady (pose/EntityId) /// e atualizado por handlers de snapshot/level up para refletir dados /// publicos do char no PlayerState. - UFUNCTION(BlueprintCallable, Category = "ZMMO|Identity") + UFUNCTION(BlueprintCallable, Category = "Zeus|Identity") void SetPublicIdentity(int64 InEntityId, const FString& InCharId, int32 InBaseLevel, int32 InClassId); /// Setado pelo handler do S_CHAR_INFO (chega antes de S_SPAWN_PLAYER) — /// metadados publicos do char vindos do servidor. - UFUNCTION(BlueprintCallable, Category = "ZMMO|Identity") + UFUNCTION(BlueprintCallable, Category = "Zeus|Identity") void SetCharInfo(const FString& InCharName, const FString& InGuildName); - /// Template helper: PS->GetZMMOComponent() + /// Template helper: PS->GetZeusComponent() template - T* GetZMMOComponent() const + T* GetZeusComponent() const { return Cast(FindComponentByClass(T::StaticClass())); } @@ -119,6 +119,6 @@ protected: * diretamente. Modulos C++ precisam estar carregados antes do CDO ser * instanciado — garantido por LoadingPhase=PreDefault no .uproject. */ - UPROPERTY(Config, EditDefaultsOnly, Category = "ZMMO|Components") + UPROPERTY(Config, EditDefaultsOnly, Category = "Zeus|Components") TArray> ComponentClasses; }; diff --git a/Source/ZMMO/Game/Network/ZMMOWorldSubsystem.cpp b/Source/ZMMO/Game/Network/ZeusWorldSubsystem.cpp similarity index 72% rename from Source/ZMMO/Game/Network/ZMMOWorldSubsystem.cpp rename to Source/ZMMO/Game/Network/ZeusWorldSubsystem.cpp index 25d3021..caa78cb 100644 --- a/Source/ZMMO/Game/Network/ZMMOWorldSubsystem.cpp +++ b/Source/ZMMO/Game/Network/ZeusWorldSubsystem.cpp @@ -1,23 +1,23 @@ -#include "ZMMOWorldSubsystem.h" +#include "ZeusWorldSubsystem.h" #include "Engine/GameInstance.h" #include "Engine/World.h" #include "ZMMO.h" -#include "ZMMOEntity.h" -#include "ZMMOEntityInterface.h" -#include "ZMMOPlayerProxy.h" +#include "ZeusEntity.h" +#include "ZeusEntityInterface.h" +#include "ZeusPlayerProxy.h" #include "ZeusNetworkSubsystem.h" -void UZMMOWorldSubsystem::Initialize(FSubsystemCollectionBase& Collection) +void UZeusWorldSubsystem::Initialize(FSubsystemCollectionBase& Collection) { Super::Initialize(Collection); if (RemoteEntityClasses.IsEmpty()) { - RemoteEntityClasses.Add(EZMMOEntityType::Player, AZMMOPlayerProxy::StaticClass()); - RemoteEntityClasses.Add(EZMMOEntityType::Mob, AZMMOEntity::StaticClass()); - RemoteEntityClasses.Add(EZMMOEntityType::NPC, AZMMOEntity::StaticClass()); - RemoteEntityClasses.Add(EZMMOEntityType::Object, AZMMOEntity::StaticClass()); + RemoteEntityClasses.Add(EZeusEntityType::Player, AZeusPlayerProxy::StaticClass()); + RemoteEntityClasses.Add(EZeusEntityType::Mob, AZeusEntity::StaticClass()); + RemoteEntityClasses.Add(EZeusEntityType::NPC, AZeusEntity::StaticClass()); + RemoteEntityClasses.Add(EZeusEntityType::Object, AZeusEntity::StaticClass()); } // Bind + replay vivem em OnWorldBeginPlay (mundo pronto). Initialize roda // MUITO cedo no pipeline de LoadMap — antes do GameMode ser instanciado @@ -25,16 +25,16 @@ void UZMMOWorldSubsystem::Initialize(FSubsystemCollectionBase& Collection) // feitos aqui podem ser perdidos durante a fase de setup posterior. } -void UZMMOWorldSubsystem::OnWorldBeginPlay(UWorld& InWorld) +void UZeusWorldSubsystem::OnWorldBeginPlay(UWorld& InWorld) { Super::OnWorldBeginPlay(InWorld); if (UZeusNetworkSubsystem* ZeusNet = ResolveZeusNetworkSubsystem()) { - ZeusNet->OnPlayerSpawned.AddDynamic(this, &UZMMOWorldSubsystem::HandlePlayerSpawned); - ZeusNet->OnPlayerDespawned.AddDynamic(this, &UZMMOWorldSubsystem::HandlePlayerDespawned); - ZeusNet->OnPlayerStateUpdate.AddDynamic(this, &UZMMOWorldSubsystem::HandlePlayerStateUpdate); - UE_LOG(LogZMMO, Log, TEXT("ZMMOWorldSubsystem bound to ZeusNetworkSubsystem delegates.")); + ZeusNet->OnPlayerSpawned.AddDynamic(this, &UZeusWorldSubsystem::HandlePlayerSpawned); + ZeusNet->OnPlayerDespawned.AddDynamic(this, &UZeusWorldSubsystem::HandlePlayerDespawned); + ZeusNet->OnPlayerStateUpdate.AddDynamic(this, &UZeusWorldSubsystem::HandlePlayerStateUpdate); + UE_LOG(LogZMMO, Log, TEXT("ZeusWorldSubsystem bound to ZeusNetworkSubsystem delegates.")); // Catch-up race fix (Fase 3): broadcasts de proxies remotos chegam // enquanto o cliente novo ainda esta em OpenLevel. UZeusNetworkSubsystem @@ -49,22 +49,22 @@ void UZMMOWorldSubsystem::OnWorldBeginPlay(UWorld& InWorld) }); if (ReplayCount > 0) { - UE_LOG(LogZMMO, Log, TEXT("ZMMOWorldSubsystem: replay de %d proxy(ies) cacheados."), ReplayCount); + UE_LOG(LogZMMO, Log, TEXT("ZeusWorldSubsystem: replay de %d proxy(ies) cacheados."), ReplayCount); } } else { - UE_LOG(LogZMMO, Warning, TEXT("ZMMOWorldSubsystem: ZeusNetworkSubsystem not found at OnWorldBeginPlay.")); + UE_LOG(LogZMMO, Warning, TEXT("ZeusWorldSubsystem: ZeusNetworkSubsystem not found at OnWorldBeginPlay.")); } } -void UZMMOWorldSubsystem::Deinitialize() +void UZeusWorldSubsystem::Deinitialize() { if (UZeusNetworkSubsystem* ZeusNet = ResolveZeusNetworkSubsystem()) { - ZeusNet->OnPlayerSpawned.RemoveDynamic(this, &UZMMOWorldSubsystem::HandlePlayerSpawned); - ZeusNet->OnPlayerDespawned.RemoveDynamic(this, &UZMMOWorldSubsystem::HandlePlayerDespawned); - ZeusNet->OnPlayerStateUpdate.RemoveDynamic(this, &UZMMOWorldSubsystem::HandlePlayerStateUpdate); + ZeusNet->OnPlayerSpawned.RemoveDynamic(this, &UZeusWorldSubsystem::HandlePlayerSpawned); + ZeusNet->OnPlayerDespawned.RemoveDynamic(this, &UZeusWorldSubsystem::HandlePlayerDespawned); + ZeusNet->OnPlayerStateUpdate.RemoveDynamic(this, &UZeusWorldSubsystem::HandlePlayerStateUpdate); } RemoteEntities.Reset(); @@ -72,7 +72,7 @@ void UZMMOWorldSubsystem::Deinitialize() Super::Deinitialize(); } -void UZMMOWorldSubsystem::RegisterLocalEntity(const int64 EntityId, AActor* LocalActor) +void UZeusWorldSubsystem::RegisterLocalEntity(const int64 EntityId, AActor* LocalActor) { if (EntityId == 0 || LocalActor == nullptr) { @@ -81,11 +81,11 @@ void UZMMOWorldSubsystem::RegisterLocalEntity(const int64 EntityId, AActor* Loca LocalEntityId = EntityId; RemoteEntities.Add(EntityId, TWeakObjectPtr(LocalActor)); - UE_LOG(LogZMMO, Log, TEXT("ZMMOWorldSubsystem: local entity registered EntityId=%lld actor=%s"), + UE_LOG(LogZMMO, Log, TEXT("ZeusWorldSubsystem: local entity registered EntityId=%lld actor=%s"), EntityId, *GetNameSafe(LocalActor)); } -void UZMMOWorldSubsystem::HandlePlayerSpawned(const int64 EntityId, const bool bIsLocal, +void UZeusWorldSubsystem::HandlePlayerSpawned(const int64 EntityId, const bool bIsLocal, const FVector PosCm, const float YawDeg, const int64 ServerTimeMs) { if (EntityId == 0) @@ -95,7 +95,7 @@ void UZMMOWorldSubsystem::HandlePlayerSpawned(const int64 EntityId, const bool b if (bIsLocal) { - // O proprio AZMMOPlayerCharacter cuida da sua identidade quando recebe o + // O proprio AZeusCharacter cuida da sua identidade quando recebe o // delegate por outro caminho. Aqui apenas memorizamos para filtrar // snapshots locais (cliente solto, sem reconciliacao em V0). LocalEntityId = EntityId; @@ -110,17 +110,17 @@ void UZMMOWorldSubsystem::HandlePlayerSpawned(const int64 EntityId, const bool b // silenciosamente ignorado depois de oscilacoes na AOI. if (AActor* Existing = RemoteEntities[EntityId].Get()) { - if (IZMMOEntityInterface* AsEntity = Cast(Existing)) + if (IZeusEntityInterface* AsEntity = Cast(Existing)) { AsEntity->SetEntityRelevant(true); } Existing->SetActorLocationAndRotation(PosCm, FRotator(0.0f, YawDeg, 0.0f)); - UE_LOG(LogZMMO, Verbose, TEXT("ZMMOWorldSubsystem: re-snap EntityId=%d"), EntityId); + UE_LOG(LogZMMO, Verbose, TEXT("ZeusWorldSubsystem: re-snap EntityId=%d"), EntityId); return; } // weak ptr stale — limpa entry e cai pro spawn novo abaixo. RemoteEntities.Remove(EntityId); - UE_LOG(LogZMMO, Log, TEXT("ZMMOWorldSubsystem: stale entry para EntityId=%d, respawnando"), EntityId); + UE_LOG(LogZMMO, Log, TEXT("ZeusWorldSubsystem: stale entry para EntityId=%d, respawnando"), EntityId); } UWorld* World = GetWorld(); @@ -129,10 +129,10 @@ void UZMMOWorldSubsystem::HandlePlayerSpawned(const int64 EntityId, const bool b return; } - UClass* ProxyClass = ResolveActorClass(EZMMOEntityType::Player); + UClass* ProxyClass = ResolveActorClass(EZeusEntityType::Player); if (!ProxyClass) { - UE_LOG(LogZMMO, Warning, TEXT("ZMMOWorldSubsystem: no class registered for Player; spawn aborted.")); + UE_LOG(LogZMMO, Warning, TEXT("ZeusWorldSubsystem: no class registered for Player; spawn aborted.")); return; } @@ -142,30 +142,30 @@ void UZMMOWorldSubsystem::HandlePlayerSpawned(const int64 EntityId, const bool b AActor* SpawnedActor = World->SpawnActor(ProxyClass, PosCm, SpawnRot, Params); if (!SpawnedActor) { - UE_LOG(LogZMMO, Warning, TEXT("ZMMOWorldSubsystem: SpawnActor failed for EntityId=%d"), EntityId); + UE_LOG(LogZMMO, Warning, TEXT("ZeusWorldSubsystem: SpawnActor failed for EntityId=%d"), EntityId); return; } - if (IZMMOEntityInterface* AsEntity = Cast(SpawnedActor)) + if (IZeusEntityInterface* AsEntity = Cast(SpawnedActor)) { // Inject identity via dedicated setter when the spawned actor exposes one. - if (AZMMOPlayerProxy* Proxy = Cast(SpawnedActor)) + if (AZeusPlayerProxy* Proxy = Cast(SpawnedActor)) { - Proxy->SetZMMOIdentity(EntityId, EZMMOEntityType::Player); + Proxy->SetZeusIdentity(EntityId, EZeusEntityType::Player); } - else if (AZMMOEntity* Entity = Cast(SpawnedActor)) + else if (AZeusEntity* Entity = Cast(SpawnedActor)) { - Entity->SetZMMOIdentity(EntityId, EZMMOEntityType::Player); + Entity->SetZeusIdentity(EntityId, EZeusEntityType::Player); } AsEntity->SetEntityRelevant(true); } RemoteEntities.Add(EntityId, TWeakObjectPtr(SpawnedActor)); - UE_LOG(LogZMMO, Log, TEXT("ZMMOWorldSubsystem: spawned remote EntityId=%d at (%s) yaw=%.1f t=%lld"), + UE_LOG(LogZMMO, Log, TEXT("ZeusWorldSubsystem: spawned remote EntityId=%d at (%s) yaw=%.1f t=%lld"), EntityId, *PosCm.ToString(), YawDeg, ServerTimeMs); } -void UZMMOWorldSubsystem::HandlePlayerDespawned(const int64 EntityId) +void UZeusWorldSubsystem::HandlePlayerDespawned(const int64 EntityId) { const TWeakObjectPtr* Entry = RemoteEntities.Find(EntityId); if (!Entry) @@ -181,7 +181,7 @@ void UZMMOWorldSubsystem::HandlePlayerDespawned(const int64 EntityId) // confirmado nos logs do AOI ao oscilar entrada/saida da ZI/ZD. if (AActor* Actor = Entry->Get()) { - if (IZMMOEntityInterface* AsEntity = Cast(Actor)) + if (IZeusEntityInterface* AsEntity = Cast(Actor)) { AsEntity->SetEntityRelevant(false); } @@ -189,10 +189,10 @@ void UZMMOWorldSubsystem::HandlePlayerDespawned(const int64 EntityId) } RemoteEntities.Remove(EntityId); - UE_LOG(LogZMMO, Log, TEXT("ZMMOWorldSubsystem: despawn EntityId=%d (destroyed)"), EntityId); + UE_LOG(LogZMMO, Log, TEXT("ZeusWorldSubsystem: despawn EntityId=%d (destroyed)"), EntityId); } -void UZMMOWorldSubsystem::HandlePlayerStateUpdate(const int64 EntityId, const int32 InputSeq, +void UZeusWorldSubsystem::HandlePlayerStateUpdate(const int64 EntityId, const int32 InputSeq, const FVector PosCm, const FVector VelCmS, const bool bGrounded, const int64 ServerTimeMs) { if (EntityId == 0) @@ -204,7 +204,7 @@ void UZMMOWorldSubsystem::HandlePlayerStateUpdate(const int64 EntityId, const in { // Cliente local solto: ignoramos snapshots autoritativos para o nosso // proprio personagem em V0 (ADR 0038). Reconciliacao opcional pode ser - // activada por flag em `AZMMOPlayerCharacter` quando colisao de objetos + // activada por flag em `AZeusCharacter` quando colisao de objetos // chegar. return; } @@ -223,15 +223,15 @@ void UZMMOWorldSubsystem::HandlePlayerStateUpdate(const int64 EntityId, const in return; } - IZMMOEntityInterface* AsEntity = Cast(Actor); + IZeusEntityInterface* AsEntity = Cast(Actor); if (!AsEntity) { return; } - FZMMOEntitySnapshot Snapshot; + FZeusEntitySnapshot Snapshot; Snapshot.EntityId = EntityId; - Snapshot.EntityType = AsEntity->GetZMMOEntityType(); + Snapshot.EntityType = AsEntity->GetZeusEntityType(); Snapshot.LastProcessedInputSeq = InputSeq; Snapshot.PositionCm = PosCm; Snapshot.VelocityCmS = VelCmS; @@ -281,7 +281,7 @@ void UZMMOWorldSubsystem::HandlePlayerStateUpdate(const int64 EntityId, const in AsEntity->ApplyEntitySnapshot(Snapshot); } -UClass* UZMMOWorldSubsystem::ResolveActorClass(const EZMMOEntityType EntityType) const +UClass* UZeusWorldSubsystem::ResolveActorClass(const EZeusEntityType EntityType) const { if (const TSubclassOf* Found = RemoteEntityClasses.Find(EntityType)) { @@ -290,10 +290,10 @@ UClass* UZMMOWorldSubsystem::ResolveActorClass(const EZMMOEntityType EntityType) return Found->Get(); } } - return AZMMOEntity::StaticClass(); + return AZeusEntity::StaticClass(); } -UZeusNetworkSubsystem* UZMMOWorldSubsystem::ResolveZeusNetworkSubsystem() const +UZeusNetworkSubsystem* UZeusWorldSubsystem::ResolveZeusNetworkSubsystem() const { const UWorld* World = GetWorld(); if (!World) diff --git a/Source/ZMMO/Game/Network/ZMMOWorldSubsystem.h b/Source/ZMMO/Game/Network/ZeusWorldSubsystem.h similarity index 75% rename from Source/ZMMO/Game/Network/ZMMOWorldSubsystem.h rename to Source/ZMMO/Game/Network/ZeusWorldSubsystem.h index 00ae7ce..3ab425e 100644 --- a/Source/ZMMO/Game/Network/ZMMOWorldSubsystem.h +++ b/Source/ZMMO/Game/Network/ZeusWorldSubsystem.h @@ -2,16 +2,16 @@ #include "CoreMinimal.h" #include "Subsystems/WorldSubsystem.h" -#include "ZMMOEntityTypes.h" -#include "ZMMOWorldSubsystem.generated.h" +#include "ZeusEntityTypes.h" +#include "ZeusWorldSubsystem.generated.h" class AActor; -class AZMMOPlayerCharacter; -class AZMMOPlayerProxy; +class AZeusCharacter; +class AZeusPlayerProxy; class UZeusNetworkSubsystem; /** - * UZMMOWorldSubsystem + * UZeusWorldSubsystem * * Subsistema por-mundo que orquestra a aplicacao de pacotes de replicacao * recebidos do servidor (`S_SPAWN_PLAYER`, `S_DESPAWN_PLAYER`, @@ -26,19 +26,19 @@ class UZeusNetworkSubsystem; * conexao UDP e dos delegates; este subsistema apenas escuta os * delegates e materializa atores na cena atual. * - * Resolucao de classe por `EZMMOEntityType`: + * Resolucao de classe por `EZeusEntityType`: * - `RemoteEntityClasses` e um TMap configuravel (BlueprintReadWrite) * com defaults seguros em `Initialize`. Permite trocar - * `AZMMOPlayerProxy` por um BP filho com mesh customizada sem + * `AZeusPlayerProxy` por um BP filho com mesh customizada sem * recompilar C++. * * Despawn: - * - V0: chama `IZMMOEntityInterface::SetEntityRelevant(false)` (preserva + * - V0: chama `IZeusEntityInterface::SetEntityRelevant(false)` (preserva * o ator para futuro pooling). * - V1: pool real por `EntityType`, limites de memoria, expiracao. */ UCLASS() -class ZMMO_API UZMMOWorldSubsystem : public UWorldSubsystem +class ZMMO_API UZeusWorldSubsystem : public UWorldSubsystem { GENERATED_BODY() @@ -48,27 +48,27 @@ public: virtual void Deinitialize() override; /** - * Regista o jogador local no registry. Chamado por `AZMMOPlayerCharacter` + * Regista o jogador local no registry. Chamado por `AZeusCharacter` * apos receber o `EntityId` autoritativo do servidor (delegate * `OnPlayerSpawned` com `bIsLocal=true`). */ - UFUNCTION(BlueprintCallable, Category = "ZMMO|World") + UFUNCTION(BlueprintCallable, Category = "Zeus|World") void RegisterLocalEntity(int64 EntityId, AActor* LocalActor); /** Numero de entidades remotas actualmente trackeadas. Util em debug overlays. */ - UFUNCTION(BlueprintPure, Category = "ZMMO|World") + UFUNCTION(BlueprintPure, Category = "Zeus|World") int32 GetTrackedEntityCount() const { return RemoteEntities.Num(); } protected: /** - * Mapa configuravel de classe a usar por `EZMMOEntityType`. Caso vazio, - * usamos defaults seguros (`AZMMOPlayerProxy` para Player, `AZMMOEntity` + * Mapa configuravel de classe a usar por `EZeusEntityType`. Caso vazio, + * usamos defaults seguros (`AZeusPlayerProxy` para Player, `AZeusEntity` * para Mob/NPC/Object — actualizado quando classes especificas existirem). * * Pode ser preenchido via Blueprint subclassing ou em runtime. */ - UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "ZMMO|World") - TMap> RemoteEntityClasses; + UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Zeus|World") + TMap> RemoteEntityClasses; private: UFUNCTION() @@ -80,7 +80,7 @@ private: UFUNCTION() void HandlePlayerStateUpdate(int64 EntityId, int32 InputSeq, FVector PosCm, FVector VelCmS, bool bGrounded, int64 ServerTimeMs); - UClass* ResolveActorClass(EZMMOEntityType EntityType) const; + UClass* ResolveActorClass(EZeusEntityType EntityType) const; UZeusNetworkSubsystem* ResolveZeusNetworkSubsystem() const; /** diff --git a/Source/ZMMO/Game/UI/Common/UIDraggableWindow_Base.cpp b/Source/ZMMO/Game/UI/Common/UIDraggableWindow_Base.cpp index a74fe50..320612c 100644 --- a/Source/ZMMO/Game/UI/Common/UIDraggableWindow_Base.cpp +++ b/Source/ZMMO/Game/UI/Common/UIDraggableWindow_Base.cpp @@ -20,7 +20,7 @@ void UUIDraggableWindow_Base::ApplySavedPosition() const FName Id = GetWindowId(); if (Id.IsNone()) return; - UZMMOUISaveGame* Save = UZMMOUISaveGame::LoadOrCreate(); + UZeusUISaveGame* Save = UZeusUISaveGame::LoadOrCreate(); FVector2D Pos; if (Save && Save->TryGetWindowPosition(Id, Pos)) { @@ -33,10 +33,10 @@ void UUIDraggableWindow_Base::PersistCurrentPosition() const FName Id = GetWindowId(); if (Id.IsNone()) return; - UZMMOUISaveGame* Save = UZMMOUISaveGame::LoadOrCreate(); + UZeusUISaveGame* Save = UZeusUISaveGame::LoadOrCreate(); if (!Save) return; Save->SetWindowPosition(Id, GetRenderTransform().Translation); - UZMMOUISaveGame::SaveNow(Save); + UZeusUISaveGame::SaveNow(Save); } bool UUIDraggableWindow_Base::IsDragHandleHit(const FPointerEvent& MouseEvent) const diff --git a/Source/ZMMO/Game/UI/Common/UIDraggableWindow_Base.h b/Source/ZMMO/Game/UI/Common/UIDraggableWindow_Base.h index a24db37..717b1d5 100644 --- a/Source/ZMMO/Game/UI/Common/UIDraggableWindow_Base.h +++ b/Source/ZMMO/Game/UI/Common/UIDraggableWindow_Base.h @@ -5,12 +5,12 @@ #include "UIDraggableWindow_Base.generated.h" class UBorder; -class UZMMOUISaveGame; +class UZeusUISaveGame; /** * Base de janelas in-game movel + persistente. Subclasse define WindowId * (FName estavel) via override de GetWindowId(); a Base cuida do drag - * (RenderTransform.Translation) e da persistencia (UZMMOUISaveGame). + * (RenderTransform.Translation) e da persistencia (UZeusUISaveGame). * * Convencao do WBP: * - Bind opcional `Border_DragHandle` cobrindo a area arrastavel (header). diff --git a/Source/ZMMO/Game/UI/Common/UILoadingProfilesDataAsset.cpp b/Source/ZMMO/Game/UI/Common/UILoadingProfilesDataAsset.cpp index 87bf61a..be43a57 100644 --- a/Source/ZMMO/Game/UI/Common/UILoadingProfilesDataAsset.cpp +++ b/Source/ZMMO/Game/UI/Common/UILoadingProfilesDataAsset.cpp @@ -1,10 +1,10 @@ #include "UILoadingProfilesDataAsset.h" -FZMMOLoadingProfile UZMMOLoadingProfilesDataAsset::GetProfile(EZMMOLoadingContext Context) const +FZeusLoadingProfile UZeusLoadingProfilesDataAsset::GetProfile(EZeusLoadingContext Context) const { - if (const FZMMOLoadingProfile* Found = Profiles.Find(Context)) + if (const FZeusLoadingProfile* Found = Profiles.Find(Context)) { return *Found; } - return FZMMOLoadingProfile(); + return FZeusLoadingProfile(); } diff --git a/Source/ZMMO/Game/UI/Common/UILoadingProfilesDataAsset.h b/Source/ZMMO/Game/UI/Common/UILoadingProfilesDataAsset.h index f3d83a2..22750b2 100644 --- a/Source/ZMMO/Game/UI/Common/UILoadingProfilesDataAsset.h +++ b/Source/ZMMO/Game/UI/Common/UILoadingProfilesDataAsset.h @@ -7,7 +7,7 @@ /** * Mapa data-driven contexto → perfil (etapas + título). Designer edita o - * asset; código consulta por EZMMOLoadingContext na hora de configurar a + * asset; código consulta por EZeusLoadingContext na hora de configurar a * tela. Asset canônico: DA_LoadingProfiles em /Game/ZMMO/Data/UI/Loading/. * * Configurado em DefaultGame.ini: @@ -15,15 +15,15 @@ * LoadingProfilesAsset=/Game/ZMMO/Data/UI/Loading/DA_LoadingProfiles.DA_LoadingProfiles */ UCLASS(BlueprintType) -class ZMMO_API UZMMOLoadingProfilesDataAsset : public UDataAsset +class ZMMO_API UZeusLoadingProfilesDataAsset : public UDataAsset { GENERATED_BODY() public: UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Loading") - TMap Profiles; + TMap Profiles; /** Retorna o perfil do contexto ou um perfil vazio (sem etapas). */ UFUNCTION(BlueprintCallable, Category = "Loading") - FZMMOLoadingProfile GetProfile(EZMMOLoadingContext Context) const; + FZeusLoadingProfile GetProfile(EZeusLoadingContext Context) const; }; diff --git a/Source/ZMMO/Game/UI/Common/UILoadingScreen_Base.cpp b/Source/ZMMO/Game/UI/Common/UILoadingScreen_Base.cpp index cf3eb46..7e08555 100644 --- a/Source/ZMMO/Game/UI/Common/UILoadingScreen_Base.cpp +++ b/Source/ZMMO/Game/UI/Common/UILoadingScreen_Base.cpp @@ -8,8 +8,8 @@ #include "UILoadingProfilesDataAsset.h" #include "UILoadingTipRow.h" -void UUILoadingScreen_Base::Configure(EZMMOLoadingContext InContext, - UZMMOLoadingProfilesDataAsset* Profiles, +void UUILoadingScreen_Base::Configure(EZeusLoadingContext InContext, + UZeusLoadingProfilesDataAsset* Profiles, UDataTable* TipsTable) { Context_ = InContext; @@ -18,22 +18,22 @@ void UUILoadingScreen_Base::Configure(EZMMOLoadingContext InContext, // Perfil (etapas + título). Profile_ = (Profiles != nullptr) ? Profiles->GetProfile(InContext) - : FZMMOLoadingProfile(); + : FZeusLoadingProfile(); StepStatus_.Reset(); - for (const FZMMOLoadingStepDef& Step : Profile_.Steps) + for (const FZeusLoadingStepDef& Step : Profile_.Steps) { - StepStatus_.Add(Step.StepId, EZMMOLoadingStepStatus::Pending); + StepStatus_.Add(Step.StepId, EZeusLoadingStepStatus::Pending); } // Pool de dicas filtrada por contexto (None = qualquer). TipPool_.Reset(); if (TipsTable != nullptr) { - TipsTable->ForeachRow(TEXT("UUILoadingScreen_Base::Configure"), - [this](const FName& /*Key*/, const FZMMOLoadingTipRow& Row) + TipsTable->ForeachRow(TEXT("UUILoadingScreen_Base::Configure"), + [this](const FName& /*Key*/, const FZeusLoadingTipRow& Row) { - if (Row.Context == EZMMOLoadingContext::None || Row.Context == Context_) + if (Row.Context == EZeusLoadingContext::None || Row.Context == Context_) { if (!Row.Tip.IsEmpty()) { @@ -67,12 +67,12 @@ void UUILoadingScreen_Base::NativeOnDeactivated() void UUILoadingScreen_Base::MarkStepRunning(FName StepId) { - if (EZMMOLoadingStepStatus* Status = StepStatus_.Find(StepId)) + if (EZeusLoadingStepStatus* Status = StepStatus_.Find(StepId)) { // Já Done não regride. - if (*Status != EZMMOLoadingStepStatus::Done && *Status != EZMMOLoadingStepStatus::Failed) + if (*Status != EZeusLoadingStepStatus::Done && *Status != EZeusLoadingStepStatus::Failed) { - *Status = EZMMOLoadingStepStatus::Running; + *Status = EZeusLoadingStepStatus::Running; RefreshUI(); } } @@ -80,9 +80,9 @@ void UUILoadingScreen_Base::MarkStepRunning(FName StepId) void UUILoadingScreen_Base::MarkStepDone(FName StepId) { - if (EZMMOLoadingStepStatus* Status = StepStatus_.Find(StepId)) + if (EZeusLoadingStepStatus* Status = StepStatus_.Find(StepId)) { - *Status = EZMMOLoadingStepStatus::Done; + *Status = EZeusLoadingStepStatus::Done; RefreshUI(); if (!bCompleteFired_ && AreAllStepsDone()) @@ -95,9 +95,9 @@ void UUILoadingScreen_Base::MarkStepDone(FName StepId) void UUILoadingScreen_Base::MarkStepFailed(FName StepId, const FText& Reason) { - if (EZMMOLoadingStepStatus* Status = StepStatus_.Find(StepId)) + if (EZeusLoadingStepStatus* Status = StepStatus_.Find(StepId)) { - *Status = EZMMOLoadingStepStatus::Failed; + *Status = EZeusLoadingStepStatus::Failed; if (Text_Status && !Reason.IsEmpty()) { Text_Status->SetText(Reason); @@ -112,10 +112,10 @@ bool UUILoadingScreen_Base::AreAllStepsDone() const { return false; } - for (const FZMMOLoadingStepDef& Step : Profile_.Steps) + for (const FZeusLoadingStepDef& Step : Profile_.Steps) { - const EZMMOLoadingStepStatus* Status = StepStatus_.Find(Step.StepId); - if (Status == nullptr || *Status != EZMMOLoadingStepStatus::Done) + const EZeusLoadingStepStatus* Status = StepStatus_.Find(Step.StepId); + if (Status == nullptr || *Status != EZeusLoadingStepStatus::Done) { return false; } @@ -135,11 +135,11 @@ int32 UUILoadingScreen_Base::FindStepIndex(FName StepId) const return INDEX_NONE; } -EZMMOLoadingStepStatus UUILoadingScreen_Base::GetStepStatus(int32 Index) const +EZeusLoadingStepStatus UUILoadingScreen_Base::GetStepStatus(int32 Index) const { - if (!Profile_.Steps.IsValidIndex(Index)) return EZMMOLoadingStepStatus::Pending; - const EZMMOLoadingStepStatus* Status = StepStatus_.Find(Profile_.Steps[Index].StepId); - return Status ? *Status : EZMMOLoadingStepStatus::Pending; + if (!Profile_.Steps.IsValidIndex(Index)) return EZeusLoadingStepStatus::Pending; + const EZeusLoadingStepStatus* Status = StepStatus_.Find(Profile_.Steps[Index].StepId); + return Status ? *Status : EZeusLoadingStepStatus::Pending; } FText UUILoadingScreen_Base::ComputeCurrentStatusText() const @@ -148,12 +148,12 @@ FText UUILoadingScreen_Base::ComputeCurrentStatusText() const int32 LastDone = INDEX_NONE; for (int32 i = 0; i < Profile_.Steps.Num(); ++i) { - const EZMMOLoadingStepStatus St = GetStepStatus(i); - if (St == EZMMOLoadingStepStatus::Running) + const EZeusLoadingStepStatus St = GetStepStatus(i); + if (St == EZeusLoadingStepStatus::Running) { return Profile_.Steps[i].Label; } - if (St == EZMMOLoadingStepStatus::Done) + if (St == EZeusLoadingStepStatus::Done) { LastDone = i; } @@ -176,9 +176,9 @@ float UUILoadingScreen_Base::ComputeProgress01() const float Acc = 0.f; for (int32 i = 0; i < N; ++i) { - const EZMMOLoadingStepStatus St = GetStepStatus(i); - if (St == EZMMOLoadingStepStatus::Done) Acc += 1.f; - else if (St == EZMMOLoadingStepStatus::Running) Acc += 0.5f; + const EZeusLoadingStepStatus St = GetStepStatus(i); + if (St == EZeusLoadingStepStatus::Done) Acc += 1.f; + else if (St == EZeusLoadingStepStatus::Running) Acc += 0.5f; } return FMath::Clamp(Acc / static_cast(N), 0.f, 1.f); } diff --git a/Source/ZMMO/Game/UI/Common/UILoadingScreen_Base.h b/Source/ZMMO/Game/UI/Common/UILoadingScreen_Base.h index 401afd4..173ffc7 100644 --- a/Source/ZMMO/Game/UI/Common/UILoadingScreen_Base.h +++ b/Source/ZMMO/Game/UI/Common/UILoadingScreen_Base.h @@ -8,15 +8,15 @@ class UCommonTextBlock; class UProgressBar; class UDataTable; -class UZMMOLoadingProfilesDataAsset; +class UZeusLoadingProfilesDataAsset; -DECLARE_DYNAMIC_MULTICAST_DELEGATE(FZMMOOnLoadingComplete); +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FZeusOnLoadingComplete); /** * Tela de loading genérica. Reusada pelo FrontEnd (handoff CharServer → * WorldServer) e pelo InGame (entrada em instance/dungeon, respawn). Cada - * uso passa um EZMMOLoadingContext em Configure(), que resolve o perfil - * no UZMMOLoadingProfilesDataAsset (lista de etapas + título). + * uso passa um EZeusLoadingContext em Configure(), que resolve o perfil + * no UZeusLoadingProfilesDataAsset (lista de etapas + título). * * Quem orquestra (UIFrontEndFlowSubsystem, futuro UIInGameFlowSubsystem) * assina os próprios eventos (HandlePostLoadMap, OnPlayerSpawned, etc) e @@ -41,8 +41,8 @@ public: * de NativeOnActivated (estado é reaplicado em RefreshUI). */ UFUNCTION(BlueprintCallable, Category = "Loading") - void Configure(EZMMOLoadingContext InContext, - UZMMOLoadingProfilesDataAsset* Profiles, + void Configure(EZeusLoadingContext InContext, + UZeusLoadingProfilesDataAsset* Profiles, UDataTable* TipsTable); UFUNCTION(BlueprintCallable, Category = "Loading") @@ -59,7 +59,7 @@ public: /** Disparado UMA vez quando todas as etapas viram Done. */ UPROPERTY(BlueprintAssignable, Category = "Loading") - FZMMOOnLoadingComplete OnLoadingComplete; + FZeusOnLoadingComplete OnLoadingComplete; protected: virtual void NativeOnActivated() override; @@ -75,7 +75,7 @@ protected: int32 FindStepIndex(FName StepId) const; /** Status atual da etapa em [Steps_]; Pending se não rastreada. */ - EZMMOLoadingStepStatus GetStepStatus(int32 Index) const; + EZeusLoadingStepStatus GetStepStatus(int32 Index) const; /** Texto exibido em Text_Status — etapa Running atual ou última Done. */ FText ComputeCurrentStatusText() const; @@ -107,13 +107,13 @@ protected: float TipRotationIntervalSeconds = 6.f; private: - EZMMOLoadingContext Context_ = EZMMOLoadingContext::None; + EZeusLoadingContext Context_ = EZeusLoadingContext::None; UPROPERTY(Transient) - FZMMOLoadingProfile Profile_; + FZeusLoadingProfile Profile_; UPROPERTY(Transient) - TMap StepStatus_; + TMap StepStatus_; UPROPERTY(Transient) TArray TipPool_; diff --git a/Source/ZMMO/Game/UI/Common/UILoadingTipRow.h b/Source/ZMMO/Game/UI/Common/UILoadingTipRow.h index 2889894..435fe39 100644 --- a/Source/ZMMO/Game/UI/Common/UILoadingTipRow.h +++ b/Source/ZMMO/Game/UI/Common/UILoadingTipRow.h @@ -12,7 +12,7 @@ * UE). Filtra por contexto: Context=None significa "qualquer loading". */ USTRUCT(BlueprintType) -struct FZMMOLoadingTipRow : public FTableRowBase +struct FZeusLoadingTipRow : public FTableRowBase { GENERATED_BODY() @@ -22,7 +22,7 @@ struct FZMMOLoadingTipRow : public FTableRowBase /** Restringe a dica a um contexto. None = todos. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Loading") - EZMMOLoadingContext Context = EZMMOLoadingContext::None; + EZeusLoadingContext Context = EZeusLoadingContext::None; /** Tag opcional pra categorizar (PvE/PvP/Crafting...) — futuro filtro. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Loading") diff --git a/Source/ZMMO/Game/UI/Common/UIWindowSaveGame.cpp b/Source/ZMMO/Game/UI/Common/UIWindowSaveGame.cpp index 717778d..2113d37 100644 --- a/Source/ZMMO/Game/UI/Common/UIWindowSaveGame.cpp +++ b/Source/ZMMO/Game/UI/Common/UIWindowSaveGame.cpp @@ -2,23 +2,23 @@ #include "Kismet/GameplayStatics.h" -const FString UZMMOUISaveGame::SlotName = TEXT("UIPrefs"); +const FString UZeusUISaveGame::SlotName = TEXT("UIPrefs"); -UZMMOUISaveGame* UZMMOUISaveGame::LoadOrCreate() +UZeusUISaveGame* UZeusUISaveGame::LoadOrCreate() { if (UGameplayStatics::DoesSaveGameExist(SlotName, UserIndex)) { - if (UZMMOUISaveGame* Loaded = Cast( + if (UZeusUISaveGame* Loaded = Cast( UGameplayStatics::LoadGameFromSlot(SlotName, UserIndex))) { return Loaded; } } - return Cast( - UGameplayStatics::CreateSaveGameObject(UZMMOUISaveGame::StaticClass())); + return Cast( + UGameplayStatics::CreateSaveGameObject(UZeusUISaveGame::StaticClass())); } -void UZMMOUISaveGame::SaveNow(UZMMOUISaveGame* Save) +void UZeusUISaveGame::SaveNow(UZeusUISaveGame* Save) { if (Save) { @@ -26,7 +26,7 @@ void UZMMOUISaveGame::SaveNow(UZMMOUISaveGame* Save) } } -bool UZMMOUISaveGame::TryGetWindowPosition(FName WindowId, FVector2D& OutPos) const +bool UZeusUISaveGame::TryGetWindowPosition(FName WindowId, FVector2D& OutPos) const { if (const FVector2D* Found = WindowPositions.Find(WindowId)) { @@ -37,7 +37,7 @@ bool UZMMOUISaveGame::TryGetWindowPosition(FName WindowId, FVector2D& OutPos) co return false; } -void UZMMOUISaveGame::SetWindowPosition(FName WindowId, FVector2D Pos) +void UZeusUISaveGame::SetWindowPosition(FName WindowId, FVector2D Pos) { WindowPositions.Add(WindowId, Pos); } diff --git a/Source/ZMMO/Game/UI/Common/UIWindowSaveGame.h b/Source/ZMMO/Game/UI/Common/UIWindowSaveGame.h index 76e6f35..eb297d7 100644 --- a/Source/ZMMO/Game/UI/Common/UIWindowSaveGame.h +++ b/Source/ZMMO/Game/UI/Common/UIWindowSaveGame.h @@ -10,13 +10,13 @@ * movel registra uma chave (FName WindowId) e grava aqui ao soltar o drag. * * Arquivo: [Project]/Saved/SaveGames/UIPrefs_0.sav (binary blob via - * UE serializer). Mesmo padrao do [[ZMMOLoginSaveGame]]. + * UE serializer). Mesmo padrao do [[ZeusLoginSaveGame]]. * * Helpers static abaixo encapsulam load-or-create do slot e Get/Set/Save * pra que a Base nao precise repetir a cerimonia. */ UCLASS() -class ZMMO_API UZMMOUISaveGame : public USaveGame +class ZMMO_API UZeusUISaveGame : public USaveGame { GENERATED_BODY() @@ -32,10 +32,10 @@ public: * Carrega o save existente ou cria um novo (nao salva ainda). * Sempre retorna instancia valida. */ - static UZMMOUISaveGame* LoadOrCreate(); + static UZeusUISaveGame* LoadOrCreate(); /** Salva o slot atual (sincrono — chamado on-mouse-up, custo baixo). */ - static void SaveNow(UZMMOUISaveGame* Save); + static void SaveNow(UZeusUISaveGame* Save); /** Get com default — se WindowId nao foi gravado retorna FVector2D::ZeroVector. */ UFUNCTION(BlueprintCallable, Category = "UI|Prefs") diff --git a/Source/ZMMO/Game/UI/FrontEnd/CharServerOpcodes.h b/Source/ZMMO/Game/UI/FrontEnd/CharServerOpcodes.h index f609dad..fbf89a3 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/CharServerOpcodes.h +++ b/Source/ZMMO/Game/UI/FrontEnd/CharServerOpcodes.h @@ -10,9 +10,9 @@ * é responsabilidade do UZeusCharServerSubsystem (Send/OnRawMessage operam * sobre o payload já sem header). */ -namespace ZMMOCharOp +namespace ZeusCharOp { - // Autenticação — payload começa com uint8 method (ver ZMMOCharAuthMethod) + // Autenticação — payload começa com uint8 method (ver ZeusCharAuthMethod) constexpr int32 C_CHAR_AUTH_REQUEST = 2000; constexpr int32 S_CHAR_AUTH_OK = 2001; // string(accountId)+string(user)+uint64(expiresMs) constexpr int32 S_CHAR_AUTH_REJECT = 2002; // uint16(reason) @@ -52,14 +52,14 @@ namespace ZMMOCharOp * Método de autenticação enviado como uint8 prefix no payload do * C_CHAR_AUTH_REQUEST. */ -namespace ZMMOCharAuthMethod +namespace ZeusCharAuthMethod { constexpr uint8 TOKEN = 0; constexpr uint8 PASSWORD = 1; } /** Espelha `CharRejectReason` em CharOpcodes.ts. */ -namespace ZMMOCharRejectReason +namespace ZeusCharRejectReason { constexpr uint16 Unknown = 0; constexpr uint16 InvalidToken = 1; @@ -85,7 +85,7 @@ namespace ZMMOCharRejectReason } /** Estado do Realm no wire (uint8). Espelha `WireRealmState` em CharOpcodes.ts. */ -namespace ZMMOWireRealmState +namespace ZeusWireRealmState { constexpr uint8 Offline = 0; constexpr uint8 Online = 1; diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIActivatableScreen_Base.cpp b/Source/ZMMO/Game/UI/FrontEnd/UIActivatableScreen_Base.cpp index 562c62e..b466e41 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIActivatableScreen_Base.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UIActivatableScreen_Base.cpp @@ -1,6 +1,6 @@ #include "UIActivatableScreen_Base.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" #include "UIFrontEndFlowSubsystem.h" #include "Engine/GameInstance.h" #include "Input/UIActionBindingHandle.h" @@ -10,13 +10,13 @@ TOptional UUIActivatableScreen_Base::GetDesiredInputConfig() con { switch (InputConfig) { - case EZMMOScreenInputMode::GameAndMenu: + case EZeusScreenInputMode::GameAndMenu: return FUIInputConfig(ECommonInputMode::All, GameMouseCaptureMode); - case EZMMOScreenInputMode::Game: + case EZeusScreenInputMode::Game: return FUIInputConfig(ECommonInputMode::Game, GameMouseCaptureMode); - case EZMMOScreenInputMode::Menu: + case EZeusScreenInputMode::Menu: return FUIInputConfig(ECommonInputMode::Menu, EMouseCaptureMode::NoCapture); - case EZMMOScreenInputMode::Default: + case EZeusScreenInputMode::Default: default: return TOptional(); } @@ -25,7 +25,7 @@ TOptional UUIActivatableScreen_Base::GetDesiredInputConfig() con void UUIActivatableScreen_Base::RefreshUIStyle_Implementation() { // Base no-op: cada WBP/filho sobrescreve para reaplicar tokens do tema - // ativo (via UZMMOThemeSubsystem). Mantém o contrato igual a + // ativo (via UZeusThemeSubsystem). Mantém o contrato igual a // UUIButton_Base::RefreshUIStyle / UUIPanel_Base::RefreshUIStyle. } @@ -37,7 +37,7 @@ void UUIActivatableScreen_Base::NativeConstruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.AddDynamic(this, &UUIActivatableScreen_Base::HandleThemeChanged); bThemeBound = true; @@ -54,7 +54,7 @@ void UUIActivatableScreen_Base::NativeDestruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.RemoveDynamic(this, &UUIActivatableScreen_Base::HandleThemeChanged); } diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIActivatableScreen_Base.h b/Source/ZMMO/Game/UI/FrontEnd/UIActivatableScreen_Base.h index f07eb8b..d43fefd 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIActivatableScreen_Base.h +++ b/Source/ZMMO/Game/UI/FrontEnd/UIActivatableScreen_Base.h @@ -11,7 +11,7 @@ * GetDesiredInputConfig. */ UENUM(BlueprintType) -enum class EZMMOScreenInputMode : uint8 +enum class EZeusScreenInputMode : uint8 { Default, // não força nada (herda do CommonUI) GameAndMenu, // jogo + UI (ex.: HUD com cursor) @@ -27,7 +27,7 @@ enum class EZMMOScreenInputMode : uint8 * desta classe C++ (UMG não encadeia árvores — ARQUITETURA.md §3.3). Os WBPs * gerados pelo Zeus UMG Forge são reparented para cá (§4.8). * - * Reage à troca de tema via UZMMOThemeSubsystem (mesmo padrão de + * Reage à troca de tema via UZeusThemeSubsystem (mesmo padrão de * UUIButton_Base) e encaminha o "voltar" ao UUIFrontEndFlowSubsystem. */ UCLASS(Abstract, Blueprintable) @@ -44,7 +44,7 @@ public: protected: // ---- Input config (desktop/gamepad) ---- UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Input") - EZMMOScreenInputMode InputConfig = EZMMOScreenInputMode::Menu; + EZeusScreenInputMode InputConfig = EZeusScreenInputMode::Menu; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Input") EMouseCaptureMode GameMouseCaptureMode = EMouseCaptureMode::CapturePermanently; diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIBootScreen_Base.cpp b/Source/ZMMO/Game/UI/FrontEnd/UIBootScreen_Base.cpp index a92af2e..69e33f7 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIBootScreen_Base.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UIBootScreen_Base.cpp @@ -4,7 +4,7 @@ #include "UIButton_Base.h" #include "UISpinner_Base.h" #include "UIFrontEndFlowSubsystem.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" #include "ZeusCharServerSubsystem.h" #include "CommonTextBlock.h" #include "Components/Border.h" @@ -22,7 +22,7 @@ namespace { if (const UGameInstance* GI = Widget->GetGameInstance()) { - if (const UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (const UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { return Theme->GetActiveUIStyle(); } diff --git a/Source/ZMMO/Game/UI/FrontEnd/UICharCard_Base.cpp b/Source/ZMMO/Game/UI/FrontEnd/UICharCard_Base.cpp index 853bd01..b1aa238 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UICharCard_Base.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UICharCard_Base.cpp @@ -5,7 +5,7 @@ #include "Engine/World.h" #include "TimerManager.h" #include "UI/Widgets/UIButton_Base.h" -#include "ZMMOJobsLibrary.h" +#include "ZeusJobsLibrary.h" void UUICharCard_Base::NativeConstruct() { @@ -34,7 +34,7 @@ void UUICharCard_Base::NativeDestruct() Super::NativeDestruct(); } -void UUICharCard_Base::SetFromSummary(const FZMMOCharSummary& InSummary) +void UUICharCard_Base::SetFromSummary(const FZeusCharSummary& InSummary) { Summary = InSummary; const bool bDeleteScheduled = Summary.DeleteScheduledAtMs > 0; @@ -49,7 +49,7 @@ void UUICharCard_Base::SetFromSummary(const FZMMOCharSummary& InSummary) } if (Text_Class) { - Text_Class->SetText(UZMMOJobsLibrary::GetJobDisplayName(this, Summary.ClassId)); + Text_Class->SetText(UZeusJobsLibrary::GetJobDisplayName(this, Summary.ClassId)); } const ESlateVisibility ActionVis = bDeleteScheduled ? ESlateVisibility::Collapsed : ESlateVisibility::Visible; diff --git a/Source/ZMMO/Game/UI/FrontEnd/UICharCard_Base.h b/Source/ZMMO/Game/UI/FrontEnd/UICharCard_Base.h index 5656114..1abfd52 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UICharCard_Base.h +++ b/Source/ZMMO/Game/UI/FrontEnd/UICharCard_Base.h @@ -2,7 +2,7 @@ #include "CoreMinimal.h" #include "Blueprint/UserWidget.h" -#include "ZMMOCharSummary.h" +#include "ZeusCharSummary.h" #include "UICharCard_Base.generated.h" class UCommonTextBlock; @@ -10,10 +10,10 @@ class UBorder; class UUIButton_Base; class UWidget; -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZMMOOnCharCardSelected, FString, CharId); -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZMMOOnCharCardDeleteRequest, FString, CharId); -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZMMOOnCharCardDeleteAccept, FString, CharId); -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZMMOOnCharCardDeleteCancel, FString, CharId); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZeusOnCharCardSelected, FString, CharId); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZeusOnCharCardDeleteRequest, FString, CharId); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZeusOnCharCardDeleteAccept, FString, CharId); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZeusOnCharCardDeleteCancel, FString, CharId); /** * Card de personagem (instanciado dinamicamente pelo Lobby/CharSelect). @@ -34,22 +34,22 @@ class ZMMO_API UUICharCard_Base : public UUserWidget public: UFUNCTION(BlueprintCallable, Category = "Zeus|CharCard") - void SetFromSummary(const FZMMOCharSummary& InSummary); + void SetFromSummary(const FZeusCharSummary& InSummary); UPROPERTY(BlueprintReadOnly, Category = "Zeus|CharCard") - FZMMOCharSummary Summary; + FZeusCharSummary Summary; UPROPERTY(BlueprintAssignable, Category = "Zeus|CharCard") - FZMMOOnCharCardSelected OnCardSelected; + FZeusOnCharCardSelected OnCardSelected; UPROPERTY(BlueprintAssignable, Category = "Zeus|CharCard") - FZMMOOnCharCardDeleteRequest OnCardDeleteRequest; + FZeusOnCharCardDeleteRequest OnCardDeleteRequest; UPROPERTY(BlueprintAssignable, Category = "Zeus|CharCard") - FZMMOOnCharCardDeleteAccept OnCardDeleteAccept; + FZeusOnCharCardDeleteAccept OnCardDeleteAccept; UPROPERTY(BlueprintAssignable, Category = "Zeus|CharCard") - FZMMOOnCharCardDeleteCancel OnCardDeleteCancel; + FZeusOnCharCardDeleteCancel OnCardDeleteCancel; /** * Hook BP — chamado apos SetFromSummary aplicar valores. Util pra diff --git a/Source/ZMMO/Game/UI/FrontEnd/UICharacterCreatePage_Base.cpp b/Source/ZMMO/Game/UI/FrontEnd/UICharacterCreatePage_Base.cpp index ac0b166..b3131fa 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UICharacterCreatePage_Base.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UICharacterCreatePage_Base.cpp @@ -11,11 +11,11 @@ #include "Engine/GameInstance.h" #include "UI/Widgets/UIButton_Base.h" -using ZMMOWire::WriteUuid16; -using ZMMOWire::WriteUInt8; -using ZMMOWire::WriteUInt16; -using ZMMOWire::WriteUInt32; -using ZMMOWire::WriteStringUtf8; +using ZeusWire::WriteUuid16; +using ZeusWire::WriteUInt8; +using ZeusWire::WriteUInt16; +using ZeusWire::WriteUInt32; +using ZeusWire::WriteStringUtf8; void UUICharacterCreatePage_Base::NativeConstruct() { @@ -86,7 +86,7 @@ void UUICharacterCreatePage_Base::SubmitCreate() WriteUInt32(Payload, 0); // skinColor WriteUInt8(Payload, 0); // bodyType - Char->SendCharRequest(ZMMOCharOp::C_CHAR_CREATE, Payload); + Char->SendCharRequest(ZeusCharOp::C_CHAR_CREATE, Payload); if (Text_Error) Text_Error->SetText(FText::GetEmpty()); OnRequestSent.Broadcast(); } diff --git a/Source/ZMMO/Game/UI/FrontEnd/UICharacterCreatePage_Base.h b/Source/ZMMO/Game/UI/FrontEnd/UICharacterCreatePage_Base.h index 084fd8a..585d1e4 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UICharacterCreatePage_Base.h +++ b/Source/ZMMO/Game/UI/FrontEnd/UICharacterCreatePage_Base.h @@ -9,8 +9,8 @@ class UComboBoxString; class UCommonTextBlock; class UUIButton_Base; -DECLARE_DYNAMIC_MULTICAST_DELEGATE(FZMMOOnCharCreateRequestSent); -DECLARE_DYNAMIC_MULTICAST_DELEGATE(FZMMOOnCharCreateCancelled); +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FZeusOnCharCreateRequestSent); +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FZeusOnCharCreateCancelled); /** * Page de criacao de personagem dentro do Lobby. Form minimo: nome + classId @@ -35,10 +35,10 @@ public: void CancelCreate(); UPROPERTY(BlueprintAssignable, Category = "Zeus|CharCreate") - FZMMOOnCharCreateRequestSent OnRequestSent; + FZeusOnCharCreateRequestSent OnRequestSent; UPROPERTY(BlueprintAssignable, Category = "Zeus|CharCreate") - FZMMOOnCharCreateCancelled OnCancelled; + FZeusOnCharCreateCancelled OnCancelled; protected: virtual void NativeConstruct() override; diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndFlowSubsystem.cpp b/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndFlowSubsystem.cpp index 0c7aa00..5d7074c 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndFlowSubsystem.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndFlowSubsystem.cpp @@ -8,8 +8,8 @@ #include "UI/Common/UILoadingProfilesDataAsset.h" #include "UI/Common/UILoadingScreen_Base.h" #include "UI/UILayerTags.h" -#include "ZMMOGameInstance.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusGameInstance.h" +#include "ZeusThemeSubsystem.h" #include "ZeusNetworkSubsystem.h" #include "ZeusCharServerSubsystem.h" #include "CommonActivatableWidget.h" @@ -48,7 +48,7 @@ void UUIFrontEndFlowSubsystem::StartFrontEnd() EnsureRootLayout(); BindNetwork(); - SetState(EZMMOFrontEndState::Boot); + SetState(EZeusFrontEndState::Boot); // Pré-login fala com o ZeusCharServer (WebSocket), NÃO com o world server // UDP. A tela Boot observa o CharServer e libera o botão ao conectar. @@ -82,7 +82,7 @@ void UUIFrontEndFlowSubsystem::EnsureRootLayout() UE_LOG(LogZMMO, Log, TEXT("FrontEndFlow::EnsureRootLayout: RootLayout recriado")); } -void UUIFrontEndFlowSubsystem::SetState(EZMMOFrontEndState NewState) +void UUIFrontEndFlowSubsystem::SetState(EZeusFrontEndState NewState) { if (NewState == CurrentState) { @@ -94,16 +94,16 @@ void UUIFrontEndFlowSubsystem::SetState(EZMMOFrontEndState NewState) *UEnum::GetValueAsString(NewState)); OnStateChanged.Broadcast(NewState); - const FGameplayTag MenuLayer = ZMMOUITags::UI_Layer_Menu.GetTag(); - const FGameplayTag ModalLayer = ZMMOUITags::UI_Layer_Modal.GetTag(); + const FGameplayTag MenuLayer = ZeusUITags::UI_Layer_Menu.GetTag(); + const FGameplayTag ModalLayer = ZeusUITags::UI_Layer_Modal.GetTag(); switch (NewState) { - case EZMMOFrontEndState::Boot: - case EZMMOFrontEndState::Connecting: - case EZMMOFrontEndState::Login: - case EZMMOFrontEndState::ServerSelect: - case EZMMOFrontEndState::Lobby: + case EZeusFrontEndState::Boot: + case EZeusFrontEndState::Connecting: + case EZeusFrontEndState::Login: + case EZeusFrontEndState::ServerSelect: + case EZeusFrontEndState::Lobby: // Telas do front-end vivem na camada Menu (uma por vez). if (UUIManagerSubsystem* Mgr = GetUIManager()) { @@ -112,12 +112,12 @@ void UUIFrontEndFlowSubsystem::SetState(EZMMOFrontEndState NewState) ResolveAndPushScreen(NewState); break; - case EZMMOFrontEndState::EnteringWorld: + case EZeusFrontEndState::EnteringWorld: // Loading/handoff por cima de tudo (camada Modal). ResolveAndPushScreen(NewState); break; - case EZMMOFrontEndState::InWorld: + case EZeusFrontEndState::InWorld: // HUD de gameplay assume — limpa front-end e loading. if (UUIManagerSubsystem* Mgr = GetUIManager()) { @@ -126,13 +126,13 @@ void UUIFrontEndFlowSubsystem::SetState(EZMMOFrontEndState NewState) } break; - case EZMMOFrontEndState::None: + case EZeusFrontEndState::None: default: break; } } -void UUIFrontEndFlowSubsystem::ShowLobbyPage(EZMMOLobbyPage Page) +void UUIFrontEndFlowSubsystem::ShowLobbyPage(EZeusLobbyPage Page) { UUIFrontEndScreenSet* SS = GetScreenSet(); UUIManagerSubsystem* Mgr = GetUIManager(); @@ -149,7 +149,7 @@ void UUIFrontEndFlowSubsystem::ShowLobbyPage(EZMMOLobbyPage Page) return; } - const FGameplayTag MenuLayer = ZMMOUITags::UI_Layer_Menu.GetTag(); + const FGameplayTag MenuLayer = ZeusUITags::UI_Layer_Menu.GetTag(); const FSoftObjectPath Path = Soft.ToSoftObjectPath(); UAssetManager::GetStreamableManager().RequestAsyncLoad( Path, @@ -169,22 +169,22 @@ bool UUIFrontEndFlowSubsystem::RequestBack() { switch (CurrentState) { - case EZMMOFrontEndState::Login: + case EZeusFrontEndState::Login: // Volta à Boot (CharServer segue conectado; só re-mostra a tela). - SetState(EZMMOFrontEndState::Boot); + SetState(EZeusFrontEndState::Boot); return true; - case EZMMOFrontEndState::ServerSelect: - SetState(EZMMOFrontEndState::Login); + case EZeusFrontEndState::ServerSelect: + SetState(EZeusFrontEndState::Login); return true; - case EZMMOFrontEndState::Lobby: - SetState(EZMMOFrontEndState::ServerSelect); + case EZeusFrontEndState::Lobby: + SetState(EZeusFrontEndState::ServerSelect); return true; default: return false; } } -void UUIFrontEndFlowSubsystem::ResolveAndPushScreen(EZMMOFrontEndState State) +void UUIFrontEndFlowSubsystem::ResolveAndPushScreen(EZeusFrontEndState State) { UUIFrontEndScreenSet* SS = GetScreenSet(); if (!SS) @@ -209,9 +209,9 @@ void UUIFrontEndFlowSubsystem::ResolveAndPushScreen(EZMMOFrontEndState State) return; } - const FGameplayTag Layer = (State == EZMMOFrontEndState::EnteringWorld) - ? ZMMOUITags::UI_Layer_Modal.GetTag() - : ZMMOUITags::UI_Layer_Menu.GetTag(); + const FGameplayTag Layer = (State == EZeusFrontEndState::EnteringWorld) + ? ZeusUITags::UI_Layer_Modal.GetTag() + : ZeusUITags::UI_Layer_Menu.GetTag(); const FSoftObjectPath Path = Soft.ToSoftObjectPath(); UAssetManager::GetStreamableManager().RequestAsyncLoad( @@ -226,12 +226,12 @@ void UUIFrontEndFlowSubsystem::ResolveAndPushScreen(EZMMOFrontEndState State) // Loading: configura logo após o push e marca etapa "Travel" // (chegamos aqui via HandleServerTravelRequested → SetState). - if (State == EZMMOFrontEndState::EnteringWorld) + if (State == EZeusFrontEndState::EnteringWorld) { if (UUILoadingScreen_Base* Loading = Cast(Pushed)) { ActiveLoadingScreen = Loading; - Loading->Configure(EZMMOLoadingContext::FrontEndEnteringWorld, + Loading->Configure(EZeusLoadingContext::FrontEndEnteringWorld, GetLoadingProfiles(), GetLoadingTips()); Loading->OnLoadingComplete.AddDynamic(this, &UUIFrontEndFlowSubsystem::HandleLoadingComplete); Loading->MarkStepDone(TEXT("Travel")); @@ -362,11 +362,11 @@ void UUIFrontEndFlowSubsystem::HandleCharDisconnected(int32 StatusCode, FString UE_LOG(LogZMMO, Log, TEXT("FrontEndFlow: CharServer desconectou (code=%d, %s)."), StatusCode, *Reason); // Se caiu antes de entrar no mundo, volta a Boot para reconectar. - if (CurrentState != EZMMOFrontEndState::InWorld && - CurrentState != EZMMOFrontEndState::EnteringWorld && - CurrentState != EZMMOFrontEndState::Boot) + if (CurrentState != EZeusFrontEndState::InWorld && + CurrentState != EZeusFrontEndState::EnteringWorld && + CurrentState != EZeusFrontEndState::Boot) { - SetState(EZMMOFrontEndState::Boot); + SetState(EZeusFrontEndState::Boot); if (UZeusCharServerSubsystem* Char = GetCharServer()) { Char->ConnectToDefaultCharServer(); @@ -376,17 +376,17 @@ void UUIFrontEndFlowSubsystem::HandleCharDisconnected(int32 StatusCode, FString void UUIFrontEndFlowSubsystem::RequestEnterLogin() { - if (CurrentState == EZMMOFrontEndState::Boot) + if (CurrentState == EZeusFrontEndState::Boot) { - SetState(EZMMOFrontEndState::Login); + SetState(EZeusFrontEndState::Login); } } void UUIFrontEndFlowSubsystem::RequestEnterServerSelect() { - if (CurrentState == EZMMOFrontEndState::Login) + if (CurrentState == EZeusFrontEndState::Login) { - SetState(EZMMOFrontEndState::ServerSelect); + SetState(EZeusFrontEndState::ServerSelect); } } @@ -439,9 +439,9 @@ void UUIFrontEndFlowSubsystem::HandleServerTravelRequested(const FString& MapNam TEXT("FrontEndFlow: ja estamos em %s — ignorando OpenLevel do S_TRAVEL_TO_MAP (mantem HUD/PlayerState)"), *TargetShort); bTravelingToWorld = false; - if (CurrentState != EZMMOFrontEndState::InWorld) + if (CurrentState != EZeusFrontEndState::InWorld) { - SetState(EZMMOFrontEndState::InWorld); + SetState(EZeusFrontEndState::InWorld); } return; } @@ -449,15 +449,15 @@ void UUIFrontEndFlowSubsystem::HandleServerTravelRequested(const FString& MapNam } bTravelingToWorld = true; - SetState(EZMMOFrontEndState::EnteringWorld); + SetState(EZeusFrontEndState::EnteringWorld); if (!MapPath.IsEmpty()) { - // Forca ZMMOGameMode em qualquer mapa que venha do WorldServer. + // Forca ZeusGameMode em qualquer mapa que venha do WorldServer. // World Settings do .umap podem ter override herdado de L_FrontEnd - // (GameModeOverride=ZMMOFrontEndGameMode) — sobrescrevemos via URL + // (GameModeOverride=ZeusFrontEndGameMode) — sobrescrevemos via URL // option pra nao depender de cada artista configurar. - const FString Options = TEXT("game=/Script/ZMMO.ZMMOGameMode"); + const FString Options = TEXT("game=/Script/ZMMO.ZeusGameMode"); UGameplayStatics::OpenLevel(GetGameInstance(), FName(*MapPath), /*bAbsolute=*/true, Options); } } @@ -514,10 +514,10 @@ void UUIFrontEndFlowSubsystem::HandleLoadingComplete() ActiveLoadingScreen.Reset(); PendingLoadingSteps_.Reset(); bTravelingToWorld = false; - SetState(EZMMOFrontEndState::InWorld); + SetState(EZeusFrontEndState::InWorld); } -UZMMOLoadingProfilesDataAsset* UUIFrontEndFlowSubsystem::GetLoadingProfiles() +UZeusLoadingProfilesDataAsset* UUIFrontEndFlowSubsystem::GetLoadingProfiles() { if (LoadingProfiles) return LoadingProfiles; if (!LoadingProfilesAsset.IsNull()) @@ -543,14 +543,14 @@ void UUIFrontEndFlowSubsystem::HandleServerHelloTheme(FName ThemeId) // ThemeId do ServerHello. Mantido pronto para quando o plugin expuser. if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->ApplyServerTheme(ThemeId); } } } -const FZMMOMapDef* UUIFrontEndFlowSubsystem::FindMapDef(int32 MapId) const +const FZeusMapDef* UUIFrontEndFlowSubsystem::FindMapDef(int32 MapId) const { if (MapId <= 0) return nullptr; if (MapsTableAsset.IsNull()) @@ -563,7 +563,7 @@ const FZMMOMapDef* UUIFrontEndFlowSubsystem::FindMapDef(int32 MapId) const for (const TPair& Row : Table->GetRowMap()) { - const FZMMOMapDef* Def = reinterpret_cast(Row.Value); + const FZeusMapDef* Def = reinterpret_cast(Row.Value); if (Def && Def->MapId == MapId) { return Def; @@ -574,7 +574,7 @@ const FZMMOMapDef* UUIFrontEndFlowSubsystem::FindMapDef(int32 MapId) const FString UUIFrontEndFlowSubsystem::ResolveLevelPathByMapId(int32 MapId) const { - const FZMMOMapDef* Def = FindMapDef(MapId); + const FZeusMapDef* Def = FindMapDef(MapId); if (!Def) return FString(); const FSoftObjectPath ObjPath = Def->ClientLevel.ToSoftObjectPath(); if (!ObjPath.IsValid()) return FString(); @@ -611,8 +611,8 @@ bool UUIFrontEndFlowSubsystem::TravelToMapById(int32 MapId) } UE_LOG(LogZMMO, Log, TEXT("FrontEndFlow: TravelToMapById(%d) -> %s"), MapId, *MapPath); bTravelingToWorld = true; - SetState(EZMMOFrontEndState::EnteringWorld); - const FString Options = TEXT("game=/Script/ZMMO.ZMMOGameMode"); + SetState(EZeusFrontEndState::EnteringWorld); + const FString Options = TEXT("game=/Script/ZMMO.ZeusGameMode"); UGameplayStatics::OpenLevel(GetGameInstance(), FName(*MapPath), /*bAbsolute=*/true, Options); return true; } diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndFlowSubsystem.h b/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndFlowSubsystem.h index 6f4783c..c24a181 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndFlowSubsystem.h +++ b/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndFlowSubsystem.h @@ -9,12 +9,12 @@ class UUIFrontEndScreenSet; class UUIManagerSubsystem; class UUILoadingScreen_Base; -class UZMMOLoadingProfilesDataAsset; +class UZeusLoadingProfilesDataAsset; class UZeusNetworkSubsystem; class UZeusCharServerSubsystem; -struct FZMMOMapDef; +struct FZeusMapDef; -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZMMOFrontEndStateChanged, EZMMOFrontEndState, NewState); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZeusFrontEndStateChanged, EZeusFrontEndState, NewState); /** * Orquestrador do fluxo de front-end. UGameInstanceSubsystem porque o @@ -22,7 +22,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZMMOFrontEndStateChanged, EZMMOFr * morrer no OpenLevel). * * Responsável por: (a) dirigir a conexão via UZeusNetworkSubsystem; - * (b) manter EZMMOFrontEndState; (c) resolver estado→tela pelo + * (b) manter EZeusFrontEndState; (c) resolver estado→tela pelo * DA_FrontEndScreenSet e pedir ao UUIManagerSubsystem para empurrar na * camada certa; (d) detectar a chegada ao mundo. * @@ -40,7 +40,7 @@ public: virtual void Deinitialize() override; /** - * Ponto de entrada chamado pelo AZMMOFrontEndPlayerController::BeginPlay + * Ponto de entrada chamado pelo AZeusFrontEndPlayerController::BeginPlay * (garante que os subsistemas já existem — ver aviso no header do * ZeusNetworkSubsystem sobre GameInstance::Init). Cria o root layout, * liga os delegates de rede e dispara Boot→Connecting. @@ -61,14 +61,14 @@ public: void EnsureRootLayout(); UFUNCTION(BlueprintCallable, Category = "FrontEnd") - void SetState(EZMMOFrontEndState NewState); + void SetState(EZeusFrontEndState NewState); UFUNCTION(BlueprintPure, Category = "FrontEnd") - EZMMOFrontEndState GetCurrentState() const { return CurrentState; } + EZeusFrontEndState GetCurrentState() const { return CurrentState; } /** Mostra uma página interna do Lobby ("switch principal"). */ UFUNCTION(BlueprintCallable, Category = "FrontEnd") - void ShowLobbyPage(EZMMOLobbyPage Page); + void ShowLobbyPage(EZeusLobbyPage Page); /** "Voltar". Retorna true se o fluxo consumiu (tela base encaminha aqui). */ UFUNCTION(BlueprintCallable, Category = "FrontEnd") @@ -102,7 +102,7 @@ public: * Retorna nullptr se MapId=0, DT_Maps nao configurado, ou mapId nao * encontrado. */ - const FZMMOMapDef* FindMapDef(int32 MapId) const; + const FZeusMapDef* FindMapDef(int32 MapId) const; /** * Helper: resolve `MapId` no DT_Maps e retorna `ClientLevel.ToSoftObjectPath().GetLongPackageName()` @@ -113,7 +113,7 @@ public: /** * Inicia transicao pra mundo dado um `MapId`: faz `OpenLevel` com - * `?game=/Script/ZMMO.ZMMOGameMode`. No-op se `MapId` invalido ou + * `?game=/Script/ZMMO.ZeusGameMode`. No-op se `MapId` invalido ou * DT_Maps nao tem entrada. */ UFUNCTION(BlueprintCallable, Category = "FrontEnd|Maps") @@ -122,7 +122,7 @@ public: /** * Memoriza a pose autoritativa do char vinda no `S_CHAR_SELECT_OK` * (pos salva no DB + yaw). Sobrevive ao travel porque vivemos no - * GameInstance. Lida pelo `AZMMOPlayerCharacter::BeginPlay` pra + * GameInstance. Lida pelo `AZeusCharacter::BeginPlay` pra * reposicionar o pawn local em vez de spawnar no PlayerStart default * do level. Limpa apos consumo (a proxima sessao reenvia). */ @@ -133,7 +133,7 @@ public: bool ConsumePendingSpawnPose(FVector& OutPosCm, float& OutYawDeg); UPROPERTY(BlueprintAssignable, Category = "FrontEnd") - FOnZMMOFrontEndStateChanged OnStateChanged; + FOnZeusFrontEndStateChanged OnStateChanged; protected: /** DA com o mapa estado→tela. Config em DefaultGame.ini. */ @@ -141,7 +141,7 @@ protected: TSoftObjectPtr ScreenSetAsset; /** - * DataTable com FZMMOMapDef. Source of truth client-side para + * DataTable com FZeusMapDef. Source of truth client-side para * `MapId -> ClientLevel/spawns/displayName`. Configure em DefaultGame.ini: * [/Script/ZMMO.UIFrontEndFlowSubsystem] * MapsTableAsset=/Game/ZMMO/Data/World/DT_Maps.DT_Maps @@ -156,10 +156,10 @@ protected: * LoadingProfilesAsset=/Game/ZMMO/Data/UI/Loading/DA_LoadingProfiles.DA_LoadingProfiles */ UPROPERTY(Config, EditDefaultsOnly, Category = "FrontEnd|Loading") - TSoftObjectPtr LoadingProfilesAsset; + TSoftObjectPtr LoadingProfilesAsset; /** - * DataTable com dicas (rows = FZMMOLoadingTipRow). Opcional — vazio + * DataTable com dicas (rows = FZeusLoadingTipRow). Opcional — vazio * significa "sem dicas". Configure em DefaultGame.ini: * [/Script/ZMMO.UIFrontEndFlowSubsystem] * LoadingTipsAsset=/Game/ZMMO/Data/UI/Loading/DT_LoadingTips.DT_LoadingTips @@ -176,7 +176,7 @@ private: UUIFrontEndScreenSet* GetScreenSet(); /** Resolve a soft class do estado e empurra na camada Menu (no-op+log se vazio). */ - void ResolveAndPushScreen(EZMMOFrontEndState State); + void ResolveAndPushScreen(EZeusFrontEndState State); UFUNCTION() void HandleConnected(); @@ -205,7 +205,7 @@ private: void HandlePostLoadMap(UWorld* LoadedWorld); /** Resolve+carrega o DA de perfis (sync). */ - UZMMOLoadingProfilesDataAsset* GetLoadingProfiles(); + UZeusLoadingProfilesDataAsset* GetLoadingProfiles(); /** Resolve+carrega o DT de dicas (sync). */ UDataTable* GetLoadingTips(); @@ -213,13 +213,13 @@ private: /** * Dívida técnica (D5): ServerHello traz ThemeId, mas o UZeusNetworkSubsystem * ainda não expõe um delegate/getter dedicado. Quando expuser, ligar aqui - * → UZMMOThemeSubsystem::ApplyServerTheme. Sem isto, o tema resolve por + * → UZeusThemeSubsystem::ApplyServerTheme. Sem isto, o tema resolve por * calendário/Default (ARQUITETURA.md §1.10). */ void HandleServerHelloTheme(FName ThemeId); UPROPERTY(Transient) - EZMMOFrontEndState CurrentState = EZMMOFrontEndState::None; + EZeusFrontEndState CurrentState = EZeusFrontEndState::None; UPROPERTY(Transient) FString SelectedRealmId; @@ -238,7 +238,7 @@ private: TObjectPtr ScreenSet; UPROPERTY(Transient) - TObjectPtr LoadingProfiles; + TObjectPtr LoadingProfiles; UPROPERTY(Transient) TObjectPtr LoadingTips; diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndScreenSet.cpp b/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndScreenSet.cpp index b00badc..734b453 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndScreenSet.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndScreenSet.cpp @@ -1,6 +1,6 @@ #include "UIFrontEndScreenSet.h" -TSoftClassPtr UUIFrontEndScreenSet::GetScreenForState(EZMMOFrontEndState State) const +TSoftClassPtr UUIFrontEndScreenSet::GetScreenForState(EZeusFrontEndState State) const { if (const TSoftClassPtr* Found = StateScreens.Find(State)) { @@ -9,7 +9,7 @@ TSoftClassPtr UUIFrontEndScreenSet::GetScreenForState( return TSoftClassPtr(); } -TSoftClassPtr UUIFrontEndScreenSet::GetLobbyPage(EZMMOLobbyPage Page) const +TSoftClassPtr UUIFrontEndScreenSet::GetLobbyPage(EZeusLobbyPage Page) const { if (const TSoftClassPtr* Found = LobbyPages.Find(Page)) { diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndScreenSet.h b/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndScreenSet.h index 5f5e5fb..4a1cfc0 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndScreenSet.h +++ b/Source/ZMMO/Game/UI/FrontEnd/UIFrontEndScreenSet.h @@ -29,17 +29,17 @@ public: /** Tela por estado de topo do fluxo. */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "FrontEnd") - TMap> StateScreens; + TMap> StateScreens; /** Páginas internas do Lobby (host = a tela de Lobby; "switch principal"). */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "FrontEnd") - TMap> LobbyPages; + TMap> LobbyPages; /** Soft class da tela do estado (vazio se não configurado). */ UFUNCTION(BlueprintCallable, Category = "FrontEnd") - TSoftClassPtr GetScreenForState(EZMMOFrontEndState State) const; + TSoftClassPtr GetScreenForState(EZeusFrontEndState State) const; /** Soft class da página de Lobby (vazio se não configurado). */ UFUNCTION(BlueprintCallable, Category = "FrontEnd") - TSoftClassPtr GetLobbyPage(EZMMOLobbyPage Page) const; + TSoftClassPtr GetLobbyPage(EZeusLobbyPage Page) const; }; diff --git a/Source/ZMMO/Game/UI/FrontEnd/UILoginScreen_Base.cpp b/Source/ZMMO/Game/UI/FrontEnd/UILoginScreen_Base.cpp index 83150ed..c5934b2 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UILoginScreen_Base.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UILoginScreen_Base.cpp @@ -5,10 +5,10 @@ #include "UIButton_Base.h" #include "UICheckBox_Base.h" #include "UILabel_Base.h" -#include "ZMMOLoginSaveGame.h" +#include "ZeusLoginSaveGame.h" #include "Kismet/GameplayStatics.h" #include "UIFrontEndFlowSubsystem.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" #include "ZeusCharServerSubsystem.h" #include "ZeusPacketWriter.h" #include "ZeusPacketReader.h" @@ -28,7 +28,7 @@ namespace { if (const UGameInstance* GI = Widget->GetGameInstance()) { - if (const UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (const UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { return Theme->GetActiveUIStyle(); } @@ -198,12 +198,12 @@ void UUILoginScreen_Base::HandleLoginClicked() SaveOrClearRememberedAccess(User); FZeusPacketWriter W; - W.WriteUInt8(ZMMOCharAuthMethod::PASSWORD); + W.WriteUInt8(ZeusCharAuthMethod::PASSWORD); W.WriteStringUtf8(User.TrimStartAndEnd()); W.WriteStringUtf8(Pass); const bool bSent = Char->SendCharRequest( - ZMMOCharOp::C_CHAR_AUTH_REQUEST, W.GetBuffer()); + ZeusCharOp::C_CHAR_AUTH_REQUEST, W.GetBuffer()); if (!bSent) { UE_LOG(LogZMMO, Warning, TEXT("Login: falha ao enviar C_CHAR_AUTH_REQUEST.")); @@ -235,7 +235,7 @@ void UUILoginScreen_Base::HandleCharRawMessage(int32 Opcode, const TArray return; // só nos interessa a resposta do auth que disparamos } - if (Opcode == ZMMOCharOp::S_CHAR_AUTH_OK) + if (Opcode == ZeusCharOp::S_CHAR_AUTH_OK) { bAwaitingAuth = false; FZeusPacketReader R(Payload.GetData(), Payload.Num()); @@ -255,7 +255,7 @@ void UUILoginScreen_Base::HandleCharRawMessage(int32 Opcode, const TArray } } } - else if (Opcode == ZMMOCharOp::S_CHAR_AUTH_REJECT) + else if (Opcode == ZeusCharOp::S_CHAR_AUTH_REJECT) { bAwaitingAuth = false; FZeusPacketReader R(Payload.GetData(), Payload.Num()); @@ -267,11 +267,11 @@ void UUILoginScreen_Base::HandleCharRawMessage(int32 Opcode, const TArray FText Message; switch (Reason) { - case ZMMOCharRejectReason::InvalidCredentials: Message = InvalidCredentialsText; break; - case ZMMOCharRejectReason::AccountLocked: Message = AccountLockedText; break; - case ZMMOCharRejectReason::AccountSuspended: Message = AccountSuspendedText; break; - case ZMMOCharRejectReason::AccountBanned: Message = AccountSuspendedText; break; - case ZMMOCharRejectReason::CredentialsAuthDisabled: Message = CredentialsDisabledText; break; + case ZeusCharRejectReason::InvalidCredentials: Message = InvalidCredentialsText; break; + case ZeusCharRejectReason::AccountLocked: Message = AccountLockedText; break; + case ZeusCharRejectReason::AccountSuspended: Message = AccountSuspendedText; break; + case ZeusCharRejectReason::AccountBanned: Message = AccountSuspendedText; break; + case ZeusCharRejectReason::CredentialsAuthDisabled: Message = CredentialsDisabledText; break; default: Message = FText::Format( NSLOCTEXT("ZMMO", "LoginRejectFmt", "{0} (cód. {1})"), @@ -285,7 +285,7 @@ void UUILoginScreen_Base::HandleCharRawMessage(int32 Opcode, const TArray void UUILoginScreen_Base::LoadRememberedAccess() { if (!UGameplayStatics::DoesSaveGameExist( - UZMMOLoginSaveGame::SlotName, UZMMOLoginSaveGame::UserIndex)) + UZeusLoginSaveGame::SlotName, UZeusLoginSaveGame::UserIndex)) { return; } @@ -294,13 +294,13 @@ void UUILoginScreen_Base::LoadRememberedAccess() Delegate.BindUFunction(this, FName(TEXT("HandleLoadLoginCacheCompleted"))); UGameplayStatics::AsyncLoadGameFromSlot( - UZMMOLoginSaveGame::SlotName, UZMMOLoginSaveGame::UserIndex, Delegate); + UZeusLoginSaveGame::SlotName, UZeusLoginSaveGame::UserIndex, Delegate); } void UUILoginScreen_Base::HandleLoadLoginCacheCompleted(const FString& /*InSlotName*/, int32 /*InUserIndex*/, USaveGame* LoadedGame) { - const UZMMOLoginSaveGame* Save = Cast(LoadedGame); + const UZeusLoginSaveGame* Save = Cast(LoadedGame); if (!Save || !Save->bRememberAccess || Save->SavedUsername.IsEmpty()) { return; @@ -320,21 +320,21 @@ void UUILoginScreen_Base::SaveOrClearRememberedAccess(const FString& User) const bool bRemember = RememberAccess ? RememberAccess->IsChecked() : false; if (bRemember) { - UZMMOLoginSaveGame* Save = Cast( - UGameplayStatics::CreateSaveGameObject(UZMMOLoginSaveGame::StaticClass())); + UZeusLoginSaveGame* Save = Cast( + UGameplayStatics::CreateSaveGameObject(UZeusLoginSaveGame::StaticClass())); if (Save) { Save->SavedUsername = User.TrimStartAndEnd(); Save->bRememberAccess = true; UGameplayStatics::AsyncSaveGameToSlot( - Save, UZMMOLoginSaveGame::SlotName, UZMMOLoginSaveGame::UserIndex); + Save, UZeusLoginSaveGame::SlotName, UZeusLoginSaveGame::UserIndex); } } else if (UGameplayStatics::DoesSaveGameExist( - UZMMOLoginSaveGame::SlotName, UZMMOLoginSaveGame::UserIndex)) + UZeusLoginSaveGame::SlotName, UZeusLoginSaveGame::UserIndex)) { // Checkbox desmarcada: apaga save antigo (não vamos lembrar mais). UGameplayStatics::DeleteGameInSlot( - UZMMOLoginSaveGame::SlotName, UZMMOLoginSaveGame::UserIndex); + UZeusLoginSaveGame::SlotName, UZeusLoginSaveGame::UserIndex); } } diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIPrimaryGameLayout_Base.cpp b/Source/ZMMO/Game/UI/FrontEnd/UIPrimaryGameLayout_Base.cpp index 87165f0..dabfff9 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIPrimaryGameLayout_Base.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UIPrimaryGameLayout_Base.cpp @@ -8,10 +8,10 @@ void UUIPrimaryGameLayout_Base::NativeOnInitialized() { Super::NativeOnInitialized(); - RegisterLayer(ZMMOUITags::UI_Layer_Game, Stack_Game); - RegisterLayer(ZMMOUITags::UI_Layer_GameMenu, Stack_GameMenu); - RegisterLayer(ZMMOUITags::UI_Layer_Menu, Stack_Menu); - RegisterLayer(ZMMOUITags::UI_Layer_Modal, Stack_Modal); + RegisterLayer(ZeusUITags::UI_Layer_Game, Stack_Game); + RegisterLayer(ZeusUITags::UI_Layer_GameMenu, Stack_GameMenu); + RegisterLayer(ZeusUITags::UI_Layer_Menu, Stack_Menu); + RegisterLayer(ZeusUITags::UI_Layer_Modal, Stack_Modal); } void UUIPrimaryGameLayout_Base::RegisterLayer(FGameplayTag LayerTag, UCommonActivatableWidgetStack* Stack) diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIServerCard_Base.cpp b/Source/ZMMO/Game/UI/FrontEnd/UIServerCard_Base.cpp index cf88bf9..498a1b6 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIServerCard_Base.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UIServerCard_Base.cpp @@ -41,7 +41,7 @@ void UUIServerCard_Base::NativeDestruct() Super::NativeDestruct(); } -void UUIServerCard_Base::SetFromEntry(const FZMMORealmEntry& InEntry) +void UUIServerCard_Base::SetFromEntry(const FZeusRealmEntry& InEntry) { Entry = InEntry; diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIServerCard_Base.h b/Source/ZMMO/Game/UI/FrontEnd/UIServerCard_Base.h index 5c8c367..54a18c3 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIServerCard_Base.h +++ b/Source/ZMMO/Game/UI/FrontEnd/UIServerCard_Base.h @@ -2,7 +2,7 @@ #include "CoreMinimal.h" #include "Blueprint/UserWidget.h" -#include "ZMMORealmEntry.h" +#include "ZeusRealmEntry.h" #include "UIServerCard_Base.generated.h" class UCommonTextBlock; @@ -13,7 +13,7 @@ class UProgressBar; /** * Card de servidor (realm) instanciado dinamicamente pela ServerSelect. * - * Recebe um `FZMMORealmEntry` e renderiza nome/pop/status/bar; ao clicar + * Recebe um `FZeusRealmEntry` e renderiza nome/pop/status/bar; ao clicar * em "Entrar" dispara `OnCardPressed.Broadcast(RealmId, State)`. A tela * dona (UUIServerSelectScreen_Base) escuta esse delegate. * @@ -25,7 +25,7 @@ class UProgressBar; * - Btn_Enter : Button * - Bar_Pop : ProgressBar (opcional) */ -DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FZMMOOnServerCardPressed, FString, RealmId, uint8, State); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FZeusOnServerCardPressed, FString, RealmId, uint8, State); UCLASS(Abstract, Blueprintable) class ZMMO_API UUIServerCard_Base : public UUserWidget @@ -37,18 +37,18 @@ public: * Aplica os dados de um realm no card. */ UFUNCTION(BlueprintCallable, Category = "Zeus|ServerCard") - void SetFromEntry(const FZMMORealmEntry& Entry); + void SetFromEntry(const FZeusRealmEntry& Entry); /** Dados atuais (copia). */ UPROPERTY(BlueprintReadOnly, Category = "Zeus|ServerCard") - FZMMORealmEntry Entry; + FZeusRealmEntry Entry; /** * Disparado quando o botao "Entrar" do card e clicado. * State e o wire state (0=Offline, 1=Online, 2=Maintenance). */ UPROPERTY(BlueprintAssignable, Category = "Zeus|ServerCard") - FZMMOOnServerCardPressed OnCardPressed; + FZeusOnServerCardPressed OnCardPressed; protected: virtual void NativePreConstruct() override; diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIServerSelectScreen_Base.cpp b/Source/ZMMO/Game/UI/FrontEnd/UIServerSelectScreen_Base.cpp index 0737cf2..4e1bc84 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIServerSelectScreen_Base.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UIServerSelectScreen_Base.cpp @@ -1,7 +1,7 @@ #include "UIServerSelectScreen_Base.h" #include "ZMMO.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" #include "CharServerOpcodes.h" #include "UIFrontEndFlowSubsystem.h" #include "UIServerCard_Base.h" @@ -16,9 +16,9 @@ #include "Engine/DataTable.h" #include "UI/UIStyleRow.h" -using ZMMOWire::ReadU8; -using ZMMOWire::ReadU16; -using ZMMOWire::ReadStringUtf8; +using ZeusWire::ReadU8; +using ZeusWire::ReadU16; +using ZeusWire::ReadStringUtf8; namespace { @@ -28,7 +28,7 @@ namespace { if (const UGameInstance* GI = Widget->GetGameInstance()) { - if (const UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (const UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { return Theme->GetActiveUIStyle(); } @@ -119,7 +119,7 @@ void UUIServerSelectScreen_Base::RequestRealmList() return; } TArray EmptyPayload; - Char->SendCharRequest(ZMMOCharOp::C_REALM_LIST_REQUEST, EmptyPayload); + Char->SendCharRequest(ZeusCharOp::C_REALM_LIST_REQUEST, EmptyPayload); } void UUIServerSelectScreen_Base::SelectRealmAndProceed(const FString& RealmId) @@ -137,17 +137,17 @@ void UUIServerSelectScreen_Base::SelectRealmAndProceed(const FString& RealmId) if (UUIFrontEndFlowSubsystem* Flow = GI->GetSubsystem()) { Flow->SetSelectedRealmId(RealmId); - Flow->SetState(EZMMOFrontEndState::Lobby); + Flow->SetState(EZeusFrontEndState::Lobby); } } void UUIServerSelectScreen_Base::HandleCharRawMessage(int32 Opcode, const TArray& Payload) { - if (Opcode == ZMMOCharOp::S_REALM_LIST) + if (Opcode == ZeusCharOp::S_REALM_LIST) { ParseRealmList(Payload); } - else if (Opcode == ZMMOCharOp::S_REALM_STATUS_UPDATE) + else if (Opcode == ZeusCharOp::S_REALM_STATUS_UPDATE) { ApplyStatusUpdate(Payload); } @@ -186,7 +186,7 @@ void UUIServerSelectScreen_Base::ApplyStatusUpdate(const TArray& Payload) RequestRealmList(); return; } - FZMMORealmEntry& Entry = Realms[Idx]; + FZeusRealmEntry& Entry = Realms[Idx]; Entry.Pop = static_cast(Pop); Entry.QueueLen = static_cast(QueueLen); Entry.State = State; @@ -210,12 +210,12 @@ void UUIServerSelectScreen_Base::ParseRealmList(const TArray& Payload) return; } - TArray NewRealms; + TArray NewRealms; NewRealms.Reserve(Count); for (uint16 i = 0; i < Count; ++i) { - FZMMORealmEntry Entry; + FZeusRealmEntry Entry; FString RegionStr; uint16 Cap = 0; uint16 Pop = 0; @@ -280,7 +280,7 @@ void UUIServerSelectScreen_Base::RebuildCards() const int32 GridColumns = 2; // bate com o mock (ColumnFill[0]/[1]) int32 Index = 0; - for (const FZMMORealmEntry& R : Realms) + for (const FZeusRealmEntry& R : Realms) { UUIServerCard_Base* Card = CreateWidget(this, CardClass); if (!Card) diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIServerSelectScreen_Base.h b/Source/ZMMO/Game/UI/FrontEnd/UIServerSelectScreen_Base.h index 039ae02..1396562 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIServerSelectScreen_Base.h +++ b/Source/ZMMO/Game/UI/FrontEnd/UIServerSelectScreen_Base.h @@ -2,7 +2,7 @@ #include "CoreMinimal.h" #include "UIActivatableScreen_Base.h" -#include "ZMMORealmEntry.h" +#include "ZeusRealmEntry.h" #include "UIServerSelectScreen_Base.generated.h" class UCommonTextBlock; @@ -35,7 +35,7 @@ public: void SelectRealmAndProceed(const FString& RealmId); UPROPERTY(BlueprintReadOnly, Category = "Zeus|ServerSelect") - TArray Realms; + TArray Realms; UFUNCTION(BlueprintImplementableEvent, Category = "Zeus|ServerSelect") void OnRealmListReceived(); diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIUserLobbyScreen_Base.cpp b/Source/ZMMO/Game/UI/FrontEnd/UIUserLobbyScreen_Base.cpp index e041ffd..d0a4770 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIUserLobbyScreen_Base.cpp +++ b/Source/ZMMO/Game/UI/FrontEnd/UIUserLobbyScreen_Base.cpp @@ -14,14 +14,14 @@ #include "Engine/GameInstance.h" #include "UI/Widgets/UIButton_Base.h" -using ZMMOWire::ReadU8; -using ZMMOWire::ReadU16; -using ZMMOWire::ReadU32; -using ZMMOWire::ReadU64; -using ZMMOWire::ReadFloat; -using ZMMOWire::ReadStringUtf8; -using ZMMOWire::ReadUuid16; -using ZMMOWire::WriteUuid16; +using ZeusWire::ReadU8; +using ZeusWire::ReadU16; +using ZeusWire::ReadU32; +using ZeusWire::ReadU64; +using ZeusWire::ReadFloat; +using ZeusWire::ReadStringUtf8; +using ZeusWire::ReadUuid16; +using ZeusWire::WriteUuid16; void UUIUserLobbyScreen_Base::NativeOnActivated() { @@ -91,7 +91,7 @@ void UUIUserLobbyScreen_Base::RequestCharList() Payload.Add(0); } } - Char->SendCharRequest(ZMMOCharOp::C_CHAR_LIST_REQUEST, Payload); + Char->SendCharRequest(ZeusCharOp::C_CHAR_LIST_REQUEST, Payload); } void UUIUserLobbyScreen_Base::ShowCharSelectPage() @@ -111,7 +111,7 @@ void UUIUserLobbyScreen_Base::BackToServerSelect() if (UUIFrontEndFlowSubsystem* Flow = GI->GetSubsystem()) { Flow->ClearSelectedRealm(); - Flow->SetState(EZMMOFrontEndState::ServerSelect); + Flow->SetState(EZeusFrontEndState::ServerSelect); } } @@ -119,14 +119,14 @@ void UUIUserLobbyScreen_Base::HandleCharRawMessage(int32 Opcode, const TArray& Payload) return; } - TArray New; + TArray New; New.Reserve(Count); for (uint16 i = 0; i < Count; ++i) { - FZMMOCharSummary E; + FZeusCharSummary E; uint64 charId64 = 0; uint8 slot = 0; uint16 classId = 0; @@ -222,7 +222,7 @@ void UUIUserLobbyScreen_Base::RebuildCards() SpawnedCards.Reset(); CardContainer->ClearChildren(); - for (const FZMMOCharSummary& C : Chars) + for (const FZeusCharSummary& C : Chars) { UUICharCard_Base* Card = CreateWidget(this, CharCardClass); if (!Card) continue; @@ -246,25 +246,25 @@ void UUIUserLobbyScreen_Base::HandleCardSelected(FString CharId) // Wire: uint64 charId TArray Payload; for (int32 i = 0; i < 8; ++i) Payload.Add(static_cast((CharId64 >> (8 * i)) & 0xFF)); - Char->SendCharRequest(ZMMOCharOp::C_CHAR_SELECT, Payload); + Char->SendCharRequest(ZeusCharOp::C_CHAR_SELECT, Payload); } void UUIUserLobbyScreen_Base::HandleCardDeleteRequest(FString CharId) { UE_LOG(LogZMMO, Log, TEXT("Lobby: DELETE_REQUEST char %s"), *CharId); - SendCharIdOpcode(ZMMOCharOp::C_CHAR_DELETE_REQUEST, CharId); + SendCharIdOpcode(ZeusCharOp::C_CHAR_DELETE_REQUEST, CharId); } void UUIUserLobbyScreen_Base::HandleCardAcceptDeleteRequest(FString CharId) { UE_LOG(LogZMMO, Log, TEXT("Lobby: DELETE_ACCEPT char %s"), *CharId); - SendCharIdOpcode(ZMMOCharOp::C_CHAR_DELETE_ACCEPT, CharId); + SendCharIdOpcode(ZeusCharOp::C_CHAR_DELETE_ACCEPT, CharId); } void UUIUserLobbyScreen_Base::HandleCardCancelDeleteRequest(FString CharId) { UE_LOG(LogZMMO, Log, TEXT("Lobby: DELETE_CANCEL char %s"), *CharId); - SendCharIdOpcode(ZMMOCharOp::C_CHAR_DELETE_CANCEL, CharId); + SendCharIdOpcode(ZeusCharOp::C_CHAR_DELETE_CANCEL, CharId); } void UUIUserLobbyScreen_Base::SendCharIdOpcode(int32 Opcode, const FString& CharId) @@ -373,8 +373,8 @@ void UUIUserLobbyScreen_Base::HandleCharSelectOk(const TArray& Payload) UUIFrontEndFlowSubsystem* Flow = GI->GetSubsystem(); if (Flow) { - Flow->SetState(EZMMOFrontEndState::EnteringWorld); - // Memoriza pose pra `AZMMOPlayerCharacter::BeginPlay` reposicionar + Flow->SetState(EZeusFrontEndState::EnteringWorld); + // Memoriza pose pra `AZeusCharacter::BeginPlay` reposicionar // o pawn local na pos salva no DB (em vez do PlayerStart default). Flow->SetPendingSpawnPose(FVector(Px, Py, Pz), Yaw); } diff --git a/Source/ZMMO/Game/UI/FrontEnd/UIUserLobbyScreen_Base.h b/Source/ZMMO/Game/UI/FrontEnd/UIUserLobbyScreen_Base.h index f8c1a34..fe18500 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/UIUserLobbyScreen_Base.h +++ b/Source/ZMMO/Game/UI/FrontEnd/UIUserLobbyScreen_Base.h @@ -2,7 +2,7 @@ #include "CoreMinimal.h" #include "UIActivatableScreen_Base.h" -#include "ZMMOCharSummary.h" +#include "ZeusCharSummary.h" #include "UIUserLobbyScreen_Base.generated.h" class UCommonTextBlock; @@ -49,7 +49,7 @@ public: void BackToServerSelect(); UPROPERTY(BlueprintReadOnly, Category = "Zeus|Lobby") - TArray Chars; + TArray Chars; UFUNCTION(BlueprintImplementableEvent, Category = "Zeus|Lobby") void OnCharListReceived(); diff --git a/Source/ZMMO/Game/UI/FrontEnd/WireHelpers.h b/Source/ZMMO/Game/UI/FrontEnd/WireHelpers.h index c383bcc..04b02fc 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/WireHelpers.h +++ b/Source/ZMMO/Game/UI/FrontEnd/WireHelpers.h @@ -8,7 +8,7 @@ #include "CoreMinimal.h" -namespace ZMMOWire +namespace ZeusWire { inline bool ReadU8(const TArray& Buf, int32& Pos, uint8& Out) { diff --git a/Source/ZMMO/Game/UI/FrontEnd/ZMMOLoginSaveGame.cpp b/Source/ZMMO/Game/UI/FrontEnd/ZMMOLoginSaveGame.cpp deleted file mode 100644 index cad1be3..0000000 --- a/Source/ZMMO/Game/UI/FrontEnd/ZMMOLoginSaveGame.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "ZMMOLoginSaveGame.h" - -const FString UZMMOLoginSaveGame::SlotName = TEXT("LoginCache"); diff --git a/Source/ZMMO/Game/UI/FrontEnd/ZMMOCharSummary.h b/Source/ZMMO/Game/UI/FrontEnd/ZeusCharSummary.h similarity index 94% rename from Source/ZMMO/Game/UI/FrontEnd/ZMMOCharSummary.h rename to Source/ZMMO/Game/UI/FrontEnd/ZeusCharSummary.h index c765906..0b65383 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/ZMMOCharSummary.h +++ b/Source/ZMMO/Game/UI/FrontEnd/ZeusCharSummary.h @@ -1,11 +1,11 @@ #pragma once #include "CoreMinimal.h" -#include "ZMMOCharSummary.generated.h" +#include "ZeusCharSummary.generated.h" /** Stats primarios do personagem (espelha `CharStats` em char.types.ts). */ USTRUCT(BlueprintType) -struct FZMMOCharStats +struct FZeusCharStats { GENERATED_BODY() @@ -19,7 +19,7 @@ struct FZMMOCharStats /** Aparencia (espelha `CharAppearance` em char.types.ts). */ USTRUCT(BlueprintType) -struct FZMMOCharAppearance +struct FZeusCharAppearance { GENERATED_BODY() @@ -34,7 +34,7 @@ struct FZMMOCharAppearance * Espelha `CharSummary` em `Server/ZeusCharServer/src/types/char.types.ts`. */ USTRUCT(BlueprintType) -struct FZMMOCharSummary +struct FZeusCharSummary { GENERATED_BODY() @@ -67,7 +67,7 @@ struct FZMMOCharSummary int32 JobExp = 0; UPROPERTY(BlueprintReadOnly, Category = "Zeus|Char") - FZMMOCharStats Stats; + FZeusCharStats Stats; UPROPERTY(BlueprintReadOnly, Category = "Zeus|Char") int32 Hp = 0; @@ -95,7 +95,7 @@ struct FZMMOCharSummary float YawDeg = 0.f; UPROPERTY(BlueprintReadOnly, Category = "Zeus|Char") - FZMMOCharAppearance Appearance; + FZeusCharAppearance Appearance; /** Epoch ms em que o delete vai efetivar. 0 = nao agendado. */ UPROPERTY(BlueprintReadOnly, Category = "Zeus|Char") diff --git a/Source/ZMMO/Game/UI/FrontEnd/ZeusLoginSaveGame.cpp b/Source/ZMMO/Game/UI/FrontEnd/ZeusLoginSaveGame.cpp new file mode 100644 index 0000000..05af2ce --- /dev/null +++ b/Source/ZMMO/Game/UI/FrontEnd/ZeusLoginSaveGame.cpp @@ -0,0 +1,3 @@ +#include "ZeusLoginSaveGame.h" + +const FString UZeusLoginSaveGame::SlotName = TEXT("LoginCache"); diff --git a/Source/ZMMO/Game/UI/FrontEnd/ZMMOLoginSaveGame.h b/Source/ZMMO/Game/UI/FrontEnd/ZeusLoginSaveGame.h similarity index 91% rename from Source/ZMMO/Game/UI/FrontEnd/ZMMOLoginSaveGame.h rename to Source/ZMMO/Game/UI/FrontEnd/ZeusLoginSaveGame.h index 9cdab81..f5e6d96 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/ZMMOLoginSaveGame.h +++ b/Source/ZMMO/Game/UI/FrontEnd/ZeusLoginSaveGame.h @@ -2,7 +2,7 @@ #include "CoreMinimal.h" #include "GameFramework/SaveGame.h" -#include "ZMMOLoginSaveGame.generated.h" +#include "ZeusLoginSaveGame.generated.h" /** * Cache local da tela de Login. Persiste APENAS o nome do usuário (texto @@ -18,7 +18,7 @@ * UPROPERTY não-Transient via UE serializer). */ UCLASS() -class ZMMO_API UZMMOLoginSaveGame : public USaveGame +class ZMMO_API UZeusLoginSaveGame : public USaveGame { GENERATED_BODY() diff --git a/Source/ZMMO/Game/UI/FrontEnd/ZMMORealmEntry.h b/Source/ZMMO/Game/UI/FrontEnd/ZeusRealmEntry.h similarity index 87% rename from Source/ZMMO/Game/UI/FrontEnd/ZMMORealmEntry.h rename to Source/ZMMO/Game/UI/FrontEnd/ZeusRealmEntry.h index 0709953..66e15ab 100644 --- a/Source/ZMMO/Game/UI/FrontEnd/ZMMORealmEntry.h +++ b/Source/ZMMO/Game/UI/FrontEnd/ZeusRealmEntry.h @@ -1,7 +1,7 @@ #pragma once #include "CoreMinimal.h" -#include "ZMMORealmEntry.generated.h" +#include "ZeusRealmEntry.generated.h" /** * Entrada de Realm (cluster Gateway+Provinces) recebida do CharServer via @@ -13,10 +13,10 @@ * anterior). Cliente faz split por `:` quando precisa abrir UDP. * * State usa o wire raw (0=Offline, 1=Online, 2=Maintenance — ver - * ZMMOWireRealmState em CharServerOpcodes.h). + * ZeusWireRealmState em CharServerOpcodes.h). */ USTRUCT(BlueprintType) -struct FZMMORealmEntry +struct FZeusRealmEntry { GENERATED_BODY() @@ -42,7 +42,7 @@ struct FZMMORealmEntry UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm") int32 QueueLen = 0; - /** 0=Offline, 1=Online, 2=Maintenance (vide ZMMOWireRealmState). */ + /** 0=Offline, 1=Online, 2=Maintenance (vide ZeusWireRealmState). */ UPROPERTY(BlueprintReadOnly, Category = "Zeus|Realm") uint8 State = 0; }; diff --git a/Source/ZMMO/Game/UI/InGame/UIInGameFlowSubsystem.cpp b/Source/ZMMO/Game/UI/InGame/UIInGameFlowSubsystem.cpp index bd4a318..15d1bb7 100644 --- a/Source/ZMMO/Game/UI/InGame/UIInGameFlowSubsystem.cpp +++ b/Source/ZMMO/Game/UI/InGame/UIInGameFlowSubsystem.cpp @@ -21,13 +21,13 @@ void UUIInGameFlowSubsystem::Initialize(FSubsystemCollectionBase& Collection) void UUIInGameFlowSubsystem::Deinitialize() { ScreenSet = nullptr; - CurrentState = EZMMOInGameUIState::None; + CurrentState = EZeusInGameUIState::None; Super::Deinitialize(); } void UUIInGameFlowSubsystem::StartInGame() { - if (CurrentState != EZMMOInGameUIState::None) + if (CurrentState != EZeusInGameUIState::None) { // Idempotente: chamadas extras (ex.: respawn) sao no-op se ja in-world. UE_LOG(LogZMMO, Verbose, @@ -55,22 +55,22 @@ void UUIInGameFlowSubsystem::StartInGame() // dialogs orfaos do handoff). Layer.Game vai receber o HUD novo. if (UUIManagerSubsystem* Mgr = GetUIManager()) { - Mgr->ClearLayer(ZMMOUITags::UI_Layer_Menu.GetTag()); - Mgr->ClearLayer(ZMMOUITags::UI_Layer_Modal.GetTag()); - Mgr->ClearLayer(ZMMOUITags::UI_Layer_GameMenu.GetTag()); + Mgr->ClearLayer(ZeusUITags::UI_Layer_Menu.GetTag()); + Mgr->ClearLayer(ZeusUITags::UI_Layer_Modal.GetTag()); + Mgr->ClearLayer(ZeusUITags::UI_Layer_GameMenu.GetTag()); } - SetState(EZMMOInGameUIState::Playing); + SetState(EZeusInGameUIState::Playing); } -void UUIInGameFlowSubsystem::SetState(EZMMOInGameUIState NewState) +void UUIInGameFlowSubsystem::SetState(EZeusInGameUIState NewState) { if (NewState == CurrentState) { return; } - const EZMMOInGameUIState OldState = CurrentState; + const EZeusInGameUIState OldState = CurrentState; CurrentState = NewState; UE_LOG(LogZMMO, Log, TEXT("InGameFlow: state %s -> %s"), @@ -81,12 +81,12 @@ void UUIInGameFlowSubsystem::SetState(EZMMOInGameUIState NewState) // (Status/Inventory/Menu) limpando o Layer.GameMenu — HUD em Layer.Game // permanece. Para qualquer outro estado, mantemos HUD e empilhamos no // layer correspondente. - const bool bGoingToPlaying = (NewState == EZMMOInGameUIState::Playing); + const bool bGoingToPlaying = (NewState == EZeusInGameUIState::Playing); if (UUIManagerSubsystem* Mgr = GetUIManager()) { if (bGoingToPlaying) { - Mgr->ClearLayer(ZMMOUITags::UI_Layer_GameMenu.GetTag()); + Mgr->ClearLayer(ZeusUITags::UI_Layer_GameMenu.GetTag()); } } @@ -95,8 +95,8 @@ void UUIInGameFlowSubsystem::SetState(EZMMOInGameUIState NewState) // que o usuario fechar StatusWindow/Inventory/etc, o HUD seria recriado // — flicker em todos os textos (HP/SP/etc) por causa do Construct novo. const bool bSkipRepush = bGoingToPlaying - && OldState != EZMMOInGameUIState::None - && OldState != EZMMOInGameUIState::Playing; + && OldState != EZeusInGameUIState::None + && OldState != EZeusInGameUIState::Playing; if (!bSkipRepush) { ResolveAndPushScreen(NewState); @@ -104,16 +104,16 @@ void UUIInGameFlowSubsystem::SetState(EZMMOInGameUIState NewState) OnStateChanged.Broadcast(NewState); } -void UUIInGameFlowSubsystem::ToggleScreen(EZMMOInGameUIState Screen) +void UUIInGameFlowSubsystem::ToggleScreen(EZeusInGameUIState Screen) { - if (Screen == EZMMOInGameUIState::Playing || Screen == EZMMOInGameUIState::None) + if (Screen == EZeusInGameUIState::Playing || Screen == EZeusInGameUIState::None) { // Toggle para Playing nao faz sentido (estado base). Use SetState direto. return; } if (CurrentState == Screen) { - SetState(EZMMOInGameUIState::Playing); + SetState(EZeusInGameUIState::Playing); } else { @@ -148,26 +148,26 @@ UUIManagerSubsystem* UUIInGameFlowSubsystem::GetUIManager() const return nullptr; } -FGameplayTag UUIInGameFlowSubsystem::LayerForState(EZMMOInGameUIState State) const +FGameplayTag UUIInGameFlowSubsystem::LayerForState(EZeusInGameUIState State) const { switch (State) { - case EZMMOInGameUIState::Playing: - return ZMMOUITags::UI_Layer_Game.GetTag(); - case EZMMOInGameUIState::Loading: - return ZMMOUITags::UI_Layer_Modal.GetTag(); - case EZMMOInGameUIState::StatusWindow: - case EZMMOInGameUIState::Inventory: - case EZMMOInGameUIState::SkillTree: - case EZMMOInGameUIState::EscapeMenu: + case EZeusInGameUIState::Playing: + return ZeusUITags::UI_Layer_Game.GetTag(); + case EZeusInGameUIState::Loading: + return ZeusUITags::UI_Layer_Modal.GetTag(); + case EZeusInGameUIState::StatusWindow: + case EZeusInGameUIState::Inventory: + case EZeusInGameUIState::SkillTree: + case EZeusInGameUIState::EscapeMenu: default: - return ZMMOUITags::UI_Layer_GameMenu.GetTag(); + return ZeusUITags::UI_Layer_GameMenu.GetTag(); } } -void UUIInGameFlowSubsystem::ResolveAndPushScreen(EZMMOInGameUIState State) +void UUIInGameFlowSubsystem::ResolveAndPushScreen(EZeusInGameUIState State) { - if (State == EZMMOInGameUIState::None) { return; } + if (State == EZeusInGameUIState::None) { return; } UUIInGameScreenSet* SS = GetScreenSet(); if (!SS) diff --git a/Source/ZMMO/Game/UI/InGame/UIInGameFlowSubsystem.h b/Source/ZMMO/Game/UI/InGame/UIInGameFlowSubsystem.h index 5037bde..fbc0067 100644 --- a/Source/ZMMO/Game/UI/InGame/UIInGameFlowSubsystem.h +++ b/Source/ZMMO/Game/UI/InGame/UIInGameFlowSubsystem.h @@ -10,7 +10,7 @@ class UUIManagerSubsystem; class UCommonActivatableWidget; struct FGameplayTag; -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZMMOInGameStateChanged, EZMMOInGameUIState, NewState); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZeusInGameStateChanged, EZeusInGameUIState, NewState); /** * Orquestrador da UI in-game. Espelho simetrico do UUIFrontEndFlowSubsystem @@ -20,7 +20,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZMMOInGameStateChanged, EZMMOInGa * * UGameInstanceSubsystem pra persistir entre OpenLevel (futuro: trocar * de mapa in-game preserva estado da UI). Inicializa em modo `None`; - * caller (`AZMMOPlayerCharacter::HandleLocalSpawnReady`) chama + * caller (`AZeusCharacter::HandleLocalSpawnReady`) chama * `StartInGame()` ao confirmar spawn local, que vai pra `Playing`. * * Convencao de layer (resolvida internamente): @@ -30,7 +30,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZMMOInGameStateChanged, EZMMOInGa * - Loading -> UI.Layer.Modal * * Adicionar nova tela in-game = 3 passos: - * 1. Adicionar entry em `EZMMOInGameUIState` + * 1. Adicionar entry em `EZeusInGameUIState` * 2. Adicionar entry no DA_InGameScreenSet (estado -> WBP) * 3. (se for em layer custom) adicionar caso em `LayerForState` * Subsystem nao precisa de mudancas. @@ -45,7 +45,7 @@ public: virtual void Deinitialize() override; /** - * Ativa a UI in-game. Chamado pelo `AZMMOPlayerCharacter::HandleLocalSpawnReady` + * Ativa a UI in-game. Chamado pelo `AZeusCharacter::HandleLocalSpawnReady` * quando o servidor confirma o spawn local. Garante root layout, limpa * layers do front-end (Menu/Modal residuais), e vai pra `Playing` (HUD). */ @@ -54,10 +54,10 @@ public: /** Define o estado top-level. Resolve a tela do DA + push no layer correto. */ UFUNCTION(BlueprintCallable, Category = "InGame|UI") - void SetState(EZMMOInGameUIState NewState); + void SetState(EZeusInGameUIState NewState); UFUNCTION(BlueprintPure, Category = "InGame|UI") - EZMMOInGameUIState GetCurrentState() const { return CurrentState; } + EZeusInGameUIState GetCurrentState() const { return CurrentState; } /** * Atalho UX: alterna entre `Playing` e a tela passada. Util pra teclas @@ -65,11 +65,11 @@ public: * Se ja' estiver em `Screen`, volta pra Playing; senao vai pra `Screen`. */ UFUNCTION(BlueprintCallable, Category = "InGame|UI") - void ToggleScreen(EZMMOInGameUIState Screen); + void ToggleScreen(EZeusInGameUIState Screen); /** Disparado a cada SetState bem-sucedido. */ UPROPERTY(BlueprintAssignable, Category = "InGame|UI") - FOnZMMOInGameStateChanged OnStateChanged; + FOnZeusInGameStateChanged OnStateChanged; protected: /** DA com o mapa estado->tela. Config em DefaultGame.ini: @@ -84,13 +84,13 @@ private: UUIManagerSubsystem* GetUIManager() const; /** Retorna a layer tag onde a tela do estado deve ir. */ - FGameplayTag LayerForState(EZMMOInGameUIState State) const; + FGameplayTag LayerForState(EZeusInGameUIState State) const; /** Resolve a soft class + push no layer apropriado (async load). */ - void ResolveAndPushScreen(EZMMOInGameUIState State); + void ResolveAndPushScreen(EZeusInGameUIState State); UPROPERTY(Transient) - EZMMOInGameUIState CurrentState = EZMMOInGameUIState::None; + EZeusInGameUIState CurrentState = EZeusInGameUIState::None; UPROPERTY(Transient) TObjectPtr ScreenSet; diff --git a/Source/ZMMO/Game/UI/InGame/UIInGameScreenSet.cpp b/Source/ZMMO/Game/UI/InGame/UIInGameScreenSet.cpp index 9e14b95..387becf 100644 --- a/Source/ZMMO/Game/UI/InGame/UIInGameScreenSet.cpp +++ b/Source/ZMMO/Game/UI/InGame/UIInGameScreenSet.cpp @@ -1,6 +1,6 @@ #include "UIInGameScreenSet.h" -TSoftClassPtr UUIInGameScreenSet::GetScreenForState(EZMMOInGameUIState State) const +TSoftClassPtr UUIInGameScreenSet::GetScreenForState(EZeusInGameUIState State) const { const TSoftClassPtr* Found = StateScreens.Find(State); return Found ? *Found : TSoftClassPtr(); diff --git a/Source/ZMMO/Game/UI/InGame/UIInGameScreenSet.h b/Source/ZMMO/Game/UI/InGame/UIInGameScreenSet.h index 2a0bd06..938ee4c 100644 --- a/Source/ZMMO/Game/UI/InGame/UIInGameScreenSet.h +++ b/Source/ZMMO/Game/UI/InGame/UIInGameScreenSet.h @@ -16,7 +16,7 @@ class UCommonActivatableWidget; * Asset concreto: DA_InGameScreenSet em Content/ZMMO/UI/InGame/ * (criado via MCP no editor). * - * Adicionar nova tela = adicionar entry em EZMMOInGameUIState + entry no DA + * Adicionar nova tela = adicionar entry em EZeusInGameUIState + entry no DA * + WBP herdando UCommonActivatableWidget. Subsystem nao muda. */ UCLASS(BlueprintType) @@ -27,9 +27,9 @@ class ZMMO_API UUIInGameScreenSet : public UDataAsset public: /** Tela por estado in-game. */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "InGame") - TMap> StateScreens; + TMap> StateScreens; /** Soft class da tela do estado (vazio se nao configurado). */ UFUNCTION(BlueprintCallable, Category = "InGame") - TSoftClassPtr GetScreenForState(EZMMOInGameUIState State) const; + TSoftClassPtr GetScreenForState(EZeusInGameUIState State) const; }; diff --git a/Source/ZMMO/Game/UI/InGame/ZMMOHudPlayerVitalsWidget.cpp b/Source/ZMMO/Game/UI/InGame/ZeusHudPlayerVitalsWidget.cpp similarity index 88% rename from Source/ZMMO/Game/UI/InGame/ZMMOHudPlayerVitalsWidget.cpp rename to Source/ZMMO/Game/UI/InGame/ZeusHudPlayerVitalsWidget.cpp index f945626..cfc6704 100644 --- a/Source/ZMMO/Game/UI/InGame/ZMMOHudPlayerVitalsWidget.cpp +++ b/Source/ZMMO/Game/UI/InGame/ZeusHudPlayerVitalsWidget.cpp @@ -1,4 +1,4 @@ -#include "ZMMOHudPlayerVitalsWidget.h" +#include "ZeusHudPlayerVitalsWidget.h" #include "Components/RichTextBlock.h" #include "Components/TextBlock.h" @@ -30,7 +30,7 @@ namespace } } -void UZMMOHudPlayerVitalsWidget::ApplySnapshot(const FZMMOAttributesSnapshot& Snapshot) +void UZeusHudPlayerVitalsWidget::ApplySnapshot(const FZeusAttributesSnapshot& Snapshot) { LastSnapshot = Snapshot; @@ -67,7 +67,7 @@ void UZMMOHudPlayerVitalsWidget::ApplySnapshot(const FZMMOAttributesSnapshot& Sn OnSnapshotApplied(Snapshot); } -void UZMMOHudPlayerVitalsWidget::ApplyHpSp(int32 Hp, int32 MaxHp, int32 Sp, int32 MaxSp) +void UZeusHudPlayerVitalsWidget::ApplyHpSp(int32 Hp, int32 MaxHp, int32 Sp, int32 MaxSp) { LastSnapshot.Hp = Hp; LastSnapshot.MaxHp = MaxHp; @@ -99,7 +99,7 @@ void UZMMOHudPlayerVitalsWidget::ApplyHpSp(int32 Hp, int32 MaxHp, int32 Sp, int3 } } -void UZMMOHudPlayerVitalsWidget::SetCharName(const FString& InName) +void UZeusHudPlayerVitalsWidget::SetCharName(const FString& InName) { if (NameText) { @@ -107,7 +107,7 @@ void UZMMOHudPlayerVitalsWidget::SetCharName(const FString& InName) } } -void UZMMOHudPlayerVitalsWidget::SetClassName(const FString& InClassName) +void UZeusHudPlayerVitalsWidget::SetClassName(const FString& InClassName) { if (ClassText) { @@ -115,7 +115,7 @@ void UZMMOHudPlayerVitalsWidget::SetClassName(const FString& InClassName) } } -void UZMMOHudPlayerVitalsWidget::OnSnapshotApplied_Implementation(const FZMMOAttributesSnapshot& /*Snapshot*/) +void UZeusHudPlayerVitalsWidget::OnSnapshotApplied_Implementation(const FZeusAttributesSnapshot& /*Snapshot*/) { // Default vazio — skin do WBP estende se quiser (low-HP flash, etc.). } diff --git a/Source/ZMMO/Game/UI/InGame/ZMMOHudPlayerVitalsWidget.h b/Source/ZMMO/Game/UI/InGame/ZeusHudPlayerVitalsWidget.h similarity index 87% rename from Source/ZMMO/Game/UI/InGame/ZMMOHudPlayerVitalsWidget.h rename to Source/ZMMO/Game/UI/InGame/ZeusHudPlayerVitalsWidget.h index 471197b..0cfeaea 100644 --- a/Source/ZMMO/Game/UI/InGame/ZMMOHudPlayerVitalsWidget.h +++ b/Source/ZMMO/Game/UI/InGame/ZeusHudPlayerVitalsWidget.h @@ -2,8 +2,8 @@ #include "CommonUserWidget.h" #include "CoreMinimal.h" -#include "ZMMOAttributeTypes.h" -#include "ZMMOHudPlayerVitalsWidget.generated.h" +#include "ZeusAttributeTypes.h" +#include "ZeusHudPlayerVitalsWidget.generated.h" class UUIProgressBar_Base; class UTextBlock; @@ -12,7 +12,7 @@ class URichTextBlock; /** * Sub-widget do HUD: painel de vitais do player (portrait + nome/job/level + * barras HP/SP/BASE EXP/JOB EXP). Sem auto-bind no AttributeComponent — o - * parent (UZMMOHudWidget) propaga snapshots via ApplySnapshot/ApplyHpSp. + * parent (UZeusHudWidget) propaga snapshots via ApplySnapshot/ApplyHpSp. * * Barras são UUIProgressBar_Base (material custom Primary/Secondary). HP/SP * têm pool efetivo no snapshot → % real. BASE/JOB EXP só têm exp acumulado @@ -24,14 +24,14 @@ class URichTextBlock; * LvlText, HpReadout, SpReadout, ExpReadout, JobReadout (opcionais). */ UCLASS(Abstract, Blueprintable, BlueprintType) -class ZMMO_API UZMMOHudPlayerVitalsWidget : public UCommonUserWidget +class ZMMO_API UZeusHudPlayerVitalsWidget : public UCommonUserWidget { GENERATED_BODY() public: - /** Atualiza todos os campos a partir do snapshot. Chamado pelo UZMMOHudWidget. */ + /** Atualiza todos os campos a partir do snapshot. Chamado pelo UZeusHudWidget. */ UFUNCTION(BlueprintCallable, Category = "Zeus|HUD") - void ApplySnapshot(const FZMMOAttributesSnapshot& Snapshot); + void ApplySnapshot(const FZeusAttributesSnapshot& Snapshot); /** Atualiza apenas HP/SP (otimização do tick — sem mexer em level/exp). */ UFUNCTION(BlueprintCallable, Category = "Zeus|HUD") @@ -48,8 +48,8 @@ public: protected: /** Hook BP pra skin reagir (cores low-HP, animações, etc.). */ UFUNCTION(BlueprintNativeEvent, Category = "Zeus|HUD") - void OnSnapshotApplied(const FZMMOAttributesSnapshot& Snapshot); - virtual void OnSnapshotApplied_Implementation(const FZMMOAttributesSnapshot& Snapshot); + void OnSnapshotApplied(const FZeusAttributesSnapshot& Snapshot); + virtual void OnSnapshotApplied_Implementation(const FZeusAttributesSnapshot& Snapshot); // === BindWidget — barras (HP/SP obrigatórias) === UPROPERTY(BlueprintReadOnly, meta = (BindWidget), Category = "Zeus|HUD") @@ -89,5 +89,5 @@ protected: private: /** Último snapshot recebido (cache pra ApplyHpSp manter MaxHp/MaxSp). */ UPROPERTY(Transient) - FZMMOAttributesSnapshot LastSnapshot; + FZeusAttributesSnapshot LastSnapshot; }; diff --git a/Source/ZMMO/Game/UI/InGame/ZMMOHudWidget.cpp b/Source/ZMMO/Game/UI/InGame/ZeusHudWidget.cpp similarity index 67% rename from Source/ZMMO/Game/UI/InGame/ZMMOHudWidget.cpp rename to Source/ZMMO/Game/UI/InGame/ZeusHudWidget.cpp index 21a8d2b..8543cd7 100644 --- a/Source/ZMMO/Game/UI/InGame/ZMMOHudWidget.cpp +++ b/Source/ZMMO/Game/UI/InGame/ZeusHudWidget.cpp @@ -1,4 +1,4 @@ -#include "ZMMOHudWidget.h" +#include "ZeusHudWidget.h" #include "Components/TextBlock.h" #include "Components/Widget.h" @@ -8,13 +8,13 @@ #include "GameFramework/PlayerState.h" #include "TimerManager.h" #include "ZMMO.h" -#include "ZMMOAttributeComponent.h" -#include "ZMMOHudHpSpWidget.h" -#include "ZMMOHudPlayerVitalsWidget.h" -#include "ZMMOJobsLibrary.h" -#include "ZMMOPlayerState.h" +#include "ZeusAttributeComponent.h" +#include "ZeusHudHpSpWidget.h" +#include "ZeusHudPlayerVitalsWidget.h" +#include "ZeusJobsLibrary.h" +#include "ZeusPlayerState.h" -UZMMOHudWidget::UZMMOHudWidget(const FObjectInitializer& ObjectInitializer) +UZeusHudWidget::UZeusHudWidget(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { // HUD nao bloqueia "back" (Esc / B no controller). Menus reais (StatusWindow, @@ -25,14 +25,14 @@ UZMMOHudWidget::UZMMOHudWidget(const FObjectInitializer& ObjectInitializer) bAutoActivate = true; } -TOptional UZMMOHudWidget::GetDesiredInputConfig() const +TOptional UZeusHudWidget::GetDesiredInputConfig() const { // Modo Game: input flui pro PlayerController/Pawn, mouse capturado (3a pessoa). // Sem isso, CommonUI assume Menu config (mostra cursor + bloqueia movimento). return FUIInputConfig(ECommonInputMode::Game, EMouseCaptureMode::CapturePermanently); } -void UZMMOHudWidget::NativeOnActivated() +void UZeusHudWidget::NativeOnActivated() { Super::NativeOnActivated(); // HUD nao intercepta cliques — mouse passa direto pro Pawn (camera, etc.). @@ -41,23 +41,23 @@ void UZMMOHudWidget::NativeOnActivated() // Toast comeca escondido — so' aparece em HandleLevelUp. HideLevelUpToast(); BindToLocalPlayer(); - UE_LOG(LogZMMO, Log, TEXT("ZMMOHudWidget activated (HpSpBar=%s)"), + UE_LOG(LogZMMO, Log, TEXT("ZeusHudWidget activated (HpSpBar=%s)"), HpSpBar ? *HpSpBar->GetName() : TEXT("none")); } -void UZMMOHudWidget::NativeOnDeactivated() +void UZeusHudWidget::NativeOnDeactivated() { UnbindFromComponent(); Super::NativeOnDeactivated(); } -void UZMMOHudWidget::NativeDestruct() +void UZeusHudWidget::NativeDestruct() { UnbindFromComponent(); Super::NativeDestruct(); } -void UZMMOHudWidget::BindToLocalPlayer() +void UZeusHudWidget::BindToLocalPlayer() { UWorld* World = GetWorld(); if (!World) { return; } @@ -68,38 +68,38 @@ void UZMMOHudWidget::BindToLocalPlayer() if (!PS) { // PlayerState pode nao existir ainda — race com GameMode setup. - // AZMMOPlayerCharacter::HandleLocalSpawnReady chama BindToAttributeComponent + // AZeusCharacter::HandleLocalSpawnReady chama BindToAttributeComponent // manualmente como fallback (seed do EntityId). - UE_LOG(LogZMMO, Log, TEXT("ZMMOHudWidget: PlayerState ausente no activate (race fix via HandleLocalSpawnReady esperado)")); + UE_LOG(LogZMMO, Log, TEXT("ZeusHudWidget: PlayerState ausente no activate (race fix via HandleLocalSpawnReady esperado)")); return; } - UZMMOAttributeComponent* Comp = PS->FindComponentByClass(); + UZeusAttributeComponent* Comp = PS->FindComponentByClass(); if (!Comp) { return; } if (Comp == BoundComponent.Get()) { return; } // idempotente UnbindFromComponent(); BoundComponent = Comp; - Comp->OnAttributesChanged.AddDynamic(this, &UZMMOHudWidget::HandleAttributesChanged); - Comp->OnHpSpChanged.AddDynamic(this, &UZMMOHudWidget::HandleHpSpChanged); - Comp->OnLevelUp.AddDynamic(this, &UZMMOHudWidget::HandleLevelUp); + Comp->OnAttributesChanged.AddDynamic(this, &UZeusHudWidget::HandleAttributesChanged); + Comp->OnHpSpChanged.AddDynamic(this, &UZeusHudWidget::HandleHpSpChanged); + Comp->OnLevelUp.AddDynamic(this, &UZeusHudWidget::HandleLevelUp); // Refresh imediato — caso o snapshot ja' tenha chegado. HandleAttributesChanged(Comp->GetSnapshot()); } -void UZMMOHudWidget::UnbindFromComponent() +void UZeusHudWidget::UnbindFromComponent() { - if (UZMMOAttributeComponent* Old = BoundComponent.Get()) + if (UZeusAttributeComponent* Old = BoundComponent.Get()) { - Old->OnAttributesChanged.RemoveDynamic(this, &UZMMOHudWidget::HandleAttributesChanged); - Old->OnHpSpChanged.RemoveDynamic(this, &UZMMOHudWidget::HandleHpSpChanged); - Old->OnLevelUp.RemoveDynamic(this, &UZMMOHudWidget::HandleLevelUp); + Old->OnAttributesChanged.RemoveDynamic(this, &UZeusHudWidget::HandleAttributesChanged); + Old->OnHpSpChanged.RemoveDynamic(this, &UZeusHudWidget::HandleHpSpChanged); + Old->OnLevelUp.RemoveDynamic(this, &UZeusHudWidget::HandleLevelUp); } BoundComponent.Reset(); } -void UZMMOHudWidget::HandleAttributesChanged(const FZMMOAttributesSnapshot& Snapshot) +void UZeusHudWidget::HandleAttributesChanged(const FZeusAttributesSnapshot& Snapshot) { // Propaga snapshot aos sub-widgets que ja existem. if (HpSpBar) @@ -112,24 +112,24 @@ void UZMMOHudWidget::HandleAttributesChanged(const FZMMOAttributesSnapshot& Snap // Identidade: nome vem do PlayerState (não está no snapshot); job vem // do JobsSubsystem resolvendo ClassId -> display name. - if (UZMMOAttributeComponent* Comp = BoundComponent.Get()) + if (UZeusAttributeComponent* Comp = BoundComponent.Get()) { - if (const AZMMOPlayerState* PS = Cast(Comp->GetOwner())) + if (const AZeusPlayerState* PS = Cast(Comp->GetOwner())) { PlayerVitals->SetCharName(PS->CharName); } } PlayerVitals->SetClassName( - UZMMOJobsLibrary::GetJobDisplayName(this, Snapshot.ClassId).ToString()); + UZeusJobsLibrary::GetJobDisplayName(this, Snapshot.ClassId).ToString()); } // Futuros: Buffs->RefreshIcons, etc. } -void UZMMOHudWidget::HandleHpSpChanged(int32 Hp, int32 Sp) +void UZeusHudWidget::HandleHpSpChanged(int32 Hp, int32 Sp) { - if (UZMMOAttributeComponent* Comp = BoundComponent.Get()) + if (UZeusAttributeComponent* Comp = BoundComponent.Get()) { - const FZMMOAttributesSnapshot& Snap = Comp->GetSnapshot(); + const FZeusAttributesSnapshot& Snap = Comp->GetSnapshot(); if (HpSpBar) { HpSpBar->ApplyHpSp(Hp, Snap.MaxHp, Sp, Snap.MaxSp); @@ -141,7 +141,7 @@ void UZMMOHudWidget::HandleHpSpChanged(int32 Hp, int32 Sp) } } -void UZMMOHudWidget::HandleLevelUp(int32 NewBaseLevel, int32 StatusPointDelta) +void UZeusHudWidget::HandleLevelUp(int32 NewBaseLevel, int32 StatusPointDelta) { // Snapshot subsequente atualiza HpSpBar (level/maxhp/maxsp). Aqui mostra // toast visual instantaneo. StatusPointDelta nao usado no texto (UI mostra @@ -150,7 +150,7 @@ void UZMMOHudWidget::HandleLevelUp(int32 NewBaseLevel, int32 StatusPointDelta) ShowLevelUpToast(NewBaseLevel); } -void UZMMOHudWidget::ShowLevelUpToast(int32 NewBaseLevel) +void UZeusHudWidget::ShowLevelUpToast(int32 NewBaseLevel) { if (LevelUpToastText) { @@ -167,12 +167,12 @@ void UZMMOHudWidget::ShowLevelUpToast(int32 NewBaseLevel) { World->GetTimerManager().ClearTimer(LevelUpToastHideTimer); World->GetTimerManager().SetTimer(LevelUpToastHideTimer, - FTimerDelegate::CreateUObject(this, &UZMMOHudWidget::HideLevelUpToast), + FTimerDelegate::CreateUObject(this, &UZeusHudWidget::HideLevelUpToast), LevelUpToastDurationSec, /*loop*/ false); } } -void UZMMOHudWidget::HideLevelUpToast() +void UZeusHudWidget::HideLevelUpToast() { if (LevelUpToastContainer) { diff --git a/Source/ZMMO/Game/UI/InGame/ZMMOHudWidget.h b/Source/ZMMO/Game/UI/InGame/ZeusHudWidget.h similarity index 79% rename from Source/ZMMO/Game/UI/InGame/ZMMOHudWidget.h rename to Source/ZMMO/Game/UI/InGame/ZeusHudWidget.h index d53b532..2639ee3 100644 --- a/Source/ZMMO/Game/UI/InGame/ZMMOHudWidget.h +++ b/Source/ZMMO/Game/UI/InGame/ZeusHudWidget.h @@ -3,14 +3,14 @@ #include "CommonActivatableWidget.h" #include "CoreMinimal.h" #include "Engine/TimerHandle.h" -#include "ZMMOAttributeTypes.h" -#include "ZMMOHudWidget.generated.h" +#include "ZeusAttributeTypes.h" +#include "ZeusHudWidget.generated.h" class UTextBlock; class UWidget; -class UZMMOAttributeComponent; -class UZMMOHudHpSpWidget; -class UZMMOHudPlayerVitalsWidget; +class UZeusAttributeComponent; +class UZeusHudHpSpWidget; +class UZeusHudPlayerVitalsWidget; /** * Root da HUD de gameplay. UCommonActivatableWidget pushed pelo @@ -18,12 +18,12 @@ class UZMMOHudPlayerVitalsWidget; * * **Vive em ZMMO core** (UI/InGame/) porque o HUD root e' generico pra * qualquer GameType — sub-widgets vem dos modulos especializados - * (HpSpBar do sub-modulo ZMMOAttributes, Minimap de ZMMOMap futuro, - * Chat de ZMMOChat futuro, etc.). + * (HpSpBar do sub-modulo ZeusAttributes, Minimap de ZeusMap futuro, + * Chat de ZeusChat futuro, etc.). * * Padrao **composite**: o WBP_HUD (filho) declara as PECAS visuais como * sub-widgets BindWidgetOptional, e este C++ orquestra: - * 1. Em NativeOnActivated: auto-binda no UZMMOAttributeComponent do + * 1. Em NativeOnActivated: auto-binda no UZeusAttributeComponent do * player local (vive no PlayerState via Component Registry) * 2. Subscreve aos delegates do componente (OnAttributesChanged, * OnHpSpChanged, OnLevelUp) @@ -32,7 +32,7 @@ class UZMMOHudPlayerVitalsWidget; * * Composicao prevista (sub-widgets — todos `BindWidgetOptional` pra * permitir GameTypes sem modulos opcionais — ex.: Survival sem stats RO): - * - HpSpBar (UZMMOHudHpSpWidget — sub-modulo ZMMOAttributes) — impl + * - HpSpBar (UZeusHudHpSpWidget — sub-modulo ZeusAttributes) — impl * - PlayerInfo (futuro — nome/job/level/exp bar) * - Minimap (futuro) * - QuickBar (futuro — hotkeys de skills) @@ -47,12 +47,12 @@ class UZMMOHudPlayerVitalsWidget; * no Designer — sem tocar este C++. */ UCLASS(Abstract, Blueprintable, BlueprintType) -class ZMMO_API UZMMOHudWidget : public UCommonActivatableWidget +class ZMMO_API UZeusHudWidget : public UCommonActivatableWidget { GENERATED_BODY() public: - UZMMOHudWidget(const FObjectInitializer& ObjectInitializer); + UZeusHudWidget(const FObjectInitializer& ObjectInitializer); protected: virtual void NativeOnActivated() override; @@ -70,16 +70,16 @@ protected: */ virtual TOptional GetDesiredInputConfig() const override; - /// Sub-widget HP/SP/level (sub-modulo ZMMOAttributes). BindWidgetOptional + /// Sub-widget HP/SP/level (sub-modulo ZeusAttributes). BindWidgetOptional /// — WBP_HUD pode omitir se o GameType nao usa Attributes (Survival, etc.). UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional), Category = "Zeus|HUD") - UZMMOHudHpSpWidget* HpSpBar = nullptr; + UZeusHudHpSpWidget* HpSpBar = nullptr; /// Painel de vitais novo (portrait + nome/job/level + HP/SP/EXP/JOB bars). /// Substitui o HpSpBar legado. BindWidgetOptional — coexiste durante a /// migração; o WBP_HUD pode ter um ou outro. UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional), Category = "Zeus|HUD") - UZMMOHudPlayerVitalsWidget* PlayerVitals = nullptr; + UZeusHudPlayerVitalsWidget* PlayerVitals = nullptr; /// Container do toast "LEVEL UP!" (Fase 3). Hidden por default; em /// `HandleLevelUp` vira visivel por `LevelUpToastDurationSec` segundos @@ -98,24 +98,24 @@ protected: float LevelUpToastDurationSec = 2.5f; // === Futuros sub-widgets === - // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZMMOHudPlayerInfoWidget* PlayerInfo = nullptr; - // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZMMOHudMinimapWidget* Minimap = nullptr; - // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZMMOHudQuickBarWidget* QuickBar = nullptr; - // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZMMOHudBuffsWidget* Buffs = nullptr; - // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZMMOHudChatWidget* Chat = nullptr; - // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZMMOHudTargetInfoWidget* TargetInfo = nullptr; + // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZeusHudPlayerInfoWidget* PlayerInfo = nullptr; + // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZeusHudMinimapWidget* Minimap = nullptr; + // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZeusHudQuickBarWidget* QuickBar = nullptr; + // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZeusHudBuffsWidget* Buffs = nullptr; + // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZeusHudChatWidget* Chat = nullptr; + // UPROPERTY(BlueprintReadOnly, meta = (BindWidgetOptional)) UZeusHudTargetInfoWidget* TargetInfo = nullptr; UFUNCTION(BlueprintPure, Category = "Zeus|HUD") - UZMMOAttributeComponent* GetBoundComponent() const { return BoundComponent.Get(); } + UZeusAttributeComponent* GetBoundComponent() const { return BoundComponent.Get(); } private: - /// Tenta achar o UZMMOAttributeComponent do player local + subscrever + /// Tenta achar o UZeusAttributeComponent do player local + subscrever /// nos delegates. Idempotente. void BindToLocalPlayer(); void UnbindFromComponent(); UFUNCTION() - void HandleAttributesChanged(const FZMMOAttributesSnapshot& Snapshot); + void HandleAttributesChanged(const FZeusAttributesSnapshot& Snapshot); UFUNCTION() void HandleHpSpChanged(int32 Hp, int32 Sp); @@ -124,7 +124,7 @@ private: void HandleLevelUp(int32 NewBaseLevel, int32 StatusPointDelta); UPROPERTY(Transient) - TWeakObjectPtr BoundComponent; + TWeakObjectPtr BoundComponent; void ShowLevelUpToast(int32 NewBaseLevel); void HideLevelUpToast(); diff --git a/Source/ZMMO/Game/UI/Widgets/UICheckBox_Base.cpp b/Source/ZMMO/Game/UI/Widgets/UICheckBox_Base.cpp index ebbae17..d13095d 100644 --- a/Source/ZMMO/Game/UI/Widgets/UICheckBox_Base.cpp +++ b/Source/ZMMO/Game/UI/Widgets/UICheckBox_Base.cpp @@ -1,6 +1,6 @@ #include "UICheckBox_Base.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" #include "Engine/GameInstance.h" #include "Engine/DataTable.h" #include "Components/CheckBox.h" @@ -18,7 +18,7 @@ namespace { if (const UGameInstance* GI = Widget->GetGameInstance()) { - if (const UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (const UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { return Theme->GetActiveUIStyle(); } @@ -174,7 +174,7 @@ void UUICheckBox_Base::NativeConstruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.AddDynamic(this, &UUICheckBox_Base::HandleThemeChanged); bThemeBound = true; @@ -195,7 +195,7 @@ void UUICheckBox_Base::NativeDestruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.RemoveDynamic(this, &UUICheckBox_Base::HandleThemeChanged); } diff --git a/Source/ZMMO/Game/UI/Widgets/UICheckBox_Base.h b/Source/ZMMO/Game/UI/Widgets/UICheckBox_Base.h index 2f03931..00435e2 100644 --- a/Source/ZMMO/Game/UI/Widgets/UICheckBox_Base.h +++ b/Source/ZMMO/Game/UI/Widgets/UICheckBox_Base.h @@ -16,7 +16,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FUICheckBoxStateChanged, bool, bIsCh * WBP concreto (UI_CheckBox_Master) herda DIRETO desta classe C++ (UMG não * encadeia árvores — ARQUITETURA.md §3.3). * - * Visual data-driven por FUIStyle.CheckBox (UZMMOThemeSubsystem). C++ aplica + * Visual data-driven por FUIStyle.CheckBox (UZeusThemeSubsystem). C++ aplica * o que dá no UCheckBox; cor/brush finos vão pelo hook BP_ApplyCheckBoxStyle * (o WBP tinge os brushes do estilo do UCheckBox). */ diff --git a/Source/ZMMO/Game/UI/Widgets/UICommonText_Base.cpp b/Source/ZMMO/Game/UI/Widgets/UICommonText_Base.cpp index 0e28645..5f69f6e 100644 --- a/Source/ZMMO/Game/UI/Widgets/UICommonText_Base.cpp +++ b/Source/ZMMO/Game/UI/Widgets/UICommonText_Base.cpp @@ -1,6 +1,6 @@ #include "UICommonText_Base.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" #include "Engine/GameInstance.h" #include "Engine/DataTable.h" #include "Styling/CoreStyle.h" @@ -18,7 +18,7 @@ namespace { if (const UGameInstance* GI = Widget->GetGameInstance()) { - if (const UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (const UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { return Theme->GetActiveUIStyle(); } diff --git a/Source/ZMMO/Game/UI/Widgets/UICommonText_Base.h b/Source/ZMMO/Game/UI/Widgets/UICommonText_Base.h index 8890987..f62fc00 100644 --- a/Source/ZMMO/Game/UI/Widgets/UICommonText_Base.h +++ b/Source/ZMMO/Game/UI/Widgets/UICommonText_Base.h @@ -8,7 +8,7 @@ * Texto compartilhado do ZMMO. Subclasse de UCommonTextBlock (leaf, usado * direto na árvore). A categoria tipográfica NÃO é um enum fixo: é um nome * (FName) resolvido contra o mapa FUIStyle.TextRoles do DT_UI_Styles via - * UZMMOThemeSubsystem — o dropdown do Details é populado a partir do DT + * UZeusThemeSubsystem — o dropdown do Details é populado a partir do DT * (GetOptions). Data-driven, sem struct/enum pré-definido (pedido do autor). * * Fallback: se a chave não existir no mapa, cai nas categorias clássicas de diff --git a/Source/ZMMO/Game/UI/Widgets/UIInput_Base.cpp b/Source/ZMMO/Game/UI/Widgets/UIInput_Base.cpp index 4a3a4a6..c14bfab 100644 --- a/Source/ZMMO/Game/UI/Widgets/UIInput_Base.cpp +++ b/Source/ZMMO/Game/UI/Widgets/UIInput_Base.cpp @@ -1,6 +1,6 @@ #include "UIInput_Base.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" #include "Engine/GameInstance.h" #include "Engine/DataTable.h" #include "Components/EditableTextBox.h" @@ -20,7 +20,7 @@ namespace { if (const UGameInstance* GI = Widget->GetGameInstance()) { - if (const UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (const UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { return Theme->GetActiveUIStyle(); } @@ -277,7 +277,7 @@ void UUIInput_Base::NativeConstruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.AddDynamic(this, &UUIInput_Base::HandleThemeChanged); bThemeBound = true; @@ -299,7 +299,7 @@ void UUIInput_Base::NativeDestruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.RemoveDynamic(this, &UUIInput_Base::HandleThemeChanged); } diff --git a/Source/ZMMO/Game/UI/Widgets/UIPanel_Base.cpp b/Source/ZMMO/Game/UI/Widgets/UIPanel_Base.cpp index 80e9bd9..b82f807 100644 --- a/Source/ZMMO/Game/UI/Widgets/UIPanel_Base.cpp +++ b/Source/ZMMO/Game/UI/Widgets/UIPanel_Base.cpp @@ -1,6 +1,6 @@ #include "UIPanel_Base.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" #include "Engine/GameInstance.h" #include "Components/Border.h" #include "Styling/SlateBrush.h" @@ -15,7 +15,7 @@ namespace { if (const UGameInstance* GI = Widget->GetGameInstance()) { - if (const UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (const UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { return Theme->GetActiveUIStyle(); } @@ -106,7 +106,7 @@ void UUIPanel_Base::NativeConstruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.AddDynamic(this, &UUIPanel_Base::HandleThemeChanged); bThemeBound = true; @@ -122,7 +122,7 @@ void UUIPanel_Base::NativeDestruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.RemoveDynamic(this, &UUIPanel_Base::HandleThemeChanged); } diff --git a/Source/ZMMO/Game/UI/Widgets/UIPanel_Base.h b/Source/ZMMO/Game/UI/Widgets/UIPanel_Base.h index 9387f19..91137ad 100644 --- a/Source/ZMMO/Game/UI/Widgets/UIPanel_Base.h +++ b/Source/ZMMO/Game/UI/Widgets/UIPanel_Base.h @@ -14,7 +14,7 @@ class UBorder; * (UI_Panel_Master) herda DIRETO desta classe C++ (UMG não encadeia árvores * de WBP — ver ARQUITETURA.md §3.3). * - * Visual data-driven por FUIStyle.Panel (UZMMOThemeSubsystem). Designers + * Visual data-driven por FUIStyle.Panel (UZeusThemeSubsystem). Designers * injetam o conteúdo no NamedSlot "Content". */ UCLASS(Abstract, Blueprintable) diff --git a/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_StatRow.h b/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_StatRow.h index ae9ce20..239aa94 100644 --- a/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_StatRow.h +++ b/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_StatRow.h @@ -8,7 +8,7 @@ class UButton; class UHorizontalBox; class UTextBlock; -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZMMOOnStatRowPlusClicked, int32, StatId); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZeusOnStatRowPlusClicked, int32, StatId); /** * Linha de um stat primário (STR/AGI/VIT/INT/DEX/LUK) na janela de Status. @@ -44,7 +44,7 @@ public: /** Disparado quando o usuário clica em "+". */ UPROPERTY(BlueprintAssignable, Category = "Zeus|Status") - FZMMOOnStatRowPlusClicked OnPlusClicked; + FZeusOnStatRowPlusClicked OnPlusClicked; protected: virtual void NativeOnInitialized() override; diff --git a/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_Window.cpp b/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_Window.cpp index 5a6bad1..1152be7 100644 --- a/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_Window.cpp +++ b/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_Window.cpp @@ -10,10 +10,10 @@ #include "GameFramework/PlayerState.h" #include "Internationalization/Text.h" #include "ZMMO.h" -#include "ZMMOAttributeComponent.h" -#include "ZMMOJobDataAsset.h" -#include "ZMMOJobsSubsystem.h" -#include "ZMMOPlayerState.h" +#include "ZeusAttributeComponent.h" +#include "ZeusJobDataAsset.h" +#include "ZeusJobsSubsystem.h" +#include "ZeusPlayerState.h" #include "UI/InGame/UIInGameFlowSubsystem.h" #include "UI/InGameTypes.h" #include "UI/Widgets/UIPlayerStatus_BonusRow.h" @@ -107,23 +107,23 @@ void UUIPlayerStatus_Window::BindToLocalPlayer() APlayerController* PC = World->GetFirstPlayerController(); if (!PC || !PC->PlayerState) return; - // CharName vem do AZMMOPlayerState (setado pelo S_SPAWN_PLAYER no spawn + // CharName vem do AZeusPlayerState (setado pelo S_SPAWN_PLAYER no spawn // local). Fallback pra APlayerState::GetPlayerName() se o cast falhar ou // se CharName ainda nao chegou (race com handler que dispara o widget). if (Text_CharName) { FString DisplayName = PC->PlayerState->GetPlayerName(); - if (const AZMMOPlayerState* ZMMOPs = Cast(PC->PlayerState)) + if (const AZeusPlayerState* ZeusPs = Cast(PC->PlayerState)) { - if (!ZMMOPs->CharName.IsEmpty()) + if (!ZeusPs->CharName.IsEmpty()) { - DisplayName = ZMMOPs->CharName; + DisplayName = ZeusPs->CharName; } } Text_CharName->SetText(FText::FromString(DisplayName)); } - UZMMOAttributeComponent* Comp = PC->PlayerState->FindComponentByClass(); + UZeusAttributeComponent* Comp = PC->PlayerState->FindComponentByClass(); if (!Comp || Comp == BoundComponent.Get()) return; UnbindFromComponent(); @@ -135,7 +135,7 @@ void UUIPlayerStatus_Window::BindToLocalPlayer() void UUIPlayerStatus_Window::UnbindFromComponent() { - if (UZMMOAttributeComponent* Old = BoundComponent.Get()) + if (UZeusAttributeComponent* Old = BoundComponent.Get()) { Old->OnAttributesChanged.RemoveDynamic(this, &UUIPlayerStatus_Window::HandleAttributesChanged); Old->OnStatAllocReply.RemoveDynamic(this, &UUIPlayerStatus_Window::HandleStatAllocReply); @@ -143,7 +143,7 @@ void UUIPlayerStatus_Window::UnbindFromComponent() BoundComponent.Reset(); } -void UUIPlayerStatus_Window::HandleAttributesChanged(const FZMMOAttributesSnapshot& Snapshot) +void UUIPlayerStatus_Window::HandleAttributesChanged(const FZeusAttributesSnapshot& Snapshot) { bPlusButtonsLocked = false; RefreshFromSnapshot(Snapshot); @@ -155,9 +155,9 @@ void UUIPlayerStatus_Window::HandleStatAllocReply(bool bAccepted, int32 Reason) bAccepted ? 1 : 0, Reason); bPlusButtonsLocked = false; - if (UZMMOAttributeComponent* Comp = BoundComponent.Get()) + if (UZeusAttributeComponent* Comp = BoundComponent.Get()) { - const FZMMOAttributesSnapshot& S = Comp->GetSnapshot(); + const FZeusAttributesSnapshot& S = Comp->GetSnapshot(); SetAllPrimaryRowsPlusEnabled(S.StatusPoint > 0); } } @@ -165,7 +165,7 @@ void UUIPlayerStatus_Window::HandleStatAllocReply(bool bAccepted, int32 Reason) void UUIPlayerStatus_Window::HandleRowPlusClicked(int32 StatId) { if (bPlusButtonsLocked) return; - UZMMOAttributeComponent* Comp = BoundComponent.Get(); + UZeusAttributeComponent* Comp = BoundComponent.Get(); if (!Comp) return; bPlusButtonsLocked = true; @@ -184,7 +184,7 @@ void UUIPlayerStatus_Window::SetAllPrimaryRowsPlusEnabled(bool bEnabled) Set(Row_Int); Set(Row_Dex); Set(Row_Luk); } -void UUIPlayerStatus_Window::RefreshFromSnapshot(const FZMMOAttributesSnapshot& S) +void UUIPlayerStatus_Window::RefreshFromSnapshot(const FZeusAttributesSnapshot& S) { // Primários: snapshot atual não splita base/bonus de primários (só derivados). if (Row_Str) Row_Str->SetValues(S.Str, 0); @@ -202,9 +202,9 @@ void UUIPlayerStatus_Window::RefreshFromSnapshot(const FZMMOAttributesSnapshot& FText JobName; if (UGameInstance* GI = GetGameInstance()) { - if (const UZMMOJobsSubsystem* Jobs = GI->GetSubsystem()) + if (const UZeusJobsSubsystem* Jobs = GI->GetSubsystem()) { - if (const UZMMOJobDataAsset* Data = Jobs->GetJobData(S.ClassId)) + if (const UZeusJobDataAsset* Data = Jobs->GetJobData(S.ClassId)) { JobName = Data->DisplayName; } @@ -244,7 +244,7 @@ void UUIPlayerStatus_Window::HandleCloseClicked() { if (UUIInGameFlowSubsystem* Flow = GI->GetSubsystem()) { - Flow->SetState(EZMMOInGameUIState::Playing); + Flow->SetState(EZeusInGameUIState::Playing); } } } @@ -259,7 +259,7 @@ FReply UUIPlayerStatus_Window::NativeOnKeyDown(const FGeometry& Geom, const FKey { if (UUIInGameFlowSubsystem* Flow = GI->GetSubsystem()) { - Flow->SetState(EZMMOInGameUIState::Playing); + Flow->SetState(EZeusInGameUIState::Playing); return FReply::Handled(); } } diff --git a/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_Window.h b/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_Window.h index b1541ff..c5a5a17 100644 --- a/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_Window.h +++ b/Source/ZMMO/Game/UI/Widgets/UIPlayerStatus_Window.h @@ -2,7 +2,7 @@ #include "CoreMinimal.h" #include "UI/Common/UIDraggableWindow_Base.h" -#include "ZMMOAttributeTypes.h" +#include "ZeusAttributeTypes.h" #include "UIPlayerStatus_Window.generated.h" class UButton; @@ -10,13 +10,13 @@ class UTextBlock; class UHorizontalBox; class UUIPlayerStatus_BonusRow; class UUIPlayerStatus_StatRow; -class UZMMOAttributeComponent; +class UZeusAttributeComponent; /** * Janela de Status do player — composta por instâncias dos sub-widgets * UUIPlayerStatus_StatRow (6 primários) e UUIPlayerStatus_BonusRow (8 derivados). * - * Consome o UZMMOAttributeComponent do PlayerState e a pipeline de + * Consome o UZeusAttributeComponent do PlayerState e a pipeline de * C_STAT_ALLOC (RequestStatAlloc → server valida → OnStatAllocReply). * * Pareada com o WBP UI_PlayerStatus_Window. Os 14 rows são BindWidgetOptional @@ -30,7 +30,7 @@ class ZMMO_API UUIPlayerStatus_Window : public UUIDraggableWindow_Base public: UUIPlayerStatus_Window(const FObjectInitializer& ObjectInitializer); - /** Chave de persistencia no UZMMOUISaveGame. Estavel — nao renomear. */ + /** Chave de persistencia no UZeusUISaveGame. Estavel — nao renomear. */ virtual FName GetWindowId() const override { return TEXT("PlayerStatus"); } protected: @@ -94,17 +94,17 @@ protected: private: void BindToLocalPlayer(); void UnbindFromComponent(); - void RefreshFromSnapshot(const FZMMOAttributesSnapshot& Snap); + void RefreshFromSnapshot(const FZeusAttributesSnapshot& Snap); void SetAllPrimaryRowsPlusEnabled(bool bEnabled); void BindRow(UUIPlayerStatus_StatRow* Row, int32 StatId, const TCHAR* IconLetter, const TCHAR* DisplayName); - UFUNCTION() void HandleAttributesChanged(const FZMMOAttributesSnapshot& Snapshot); + UFUNCTION() void HandleAttributesChanged(const FZeusAttributesSnapshot& Snapshot); UFUNCTION() void HandleStatAllocReply(bool bAccepted, int32 Reason); UFUNCTION() void HandleRowPlusClicked(int32 StatId); UFUNCTION() void HandleCloseClicked(); UPROPERTY(Transient) - TWeakObjectPtr BoundComponent; + TWeakObjectPtr BoundComponent; /** Trava local pra evitar spam-click: vira true ao clicar, false ao * receber StatAllocReply (ou snapshot novo, o que vier primeiro). */ diff --git a/Source/ZMMO/Game/UI/Widgets/UIProgressBar_Base.cpp b/Source/ZMMO/Game/UI/Widgets/UIProgressBar_Base.cpp index b4e5045..08f7c50 100644 --- a/Source/ZMMO/Game/UI/Widgets/UIProgressBar_Base.cpp +++ b/Source/ZMMO/Game/UI/Widgets/UIProgressBar_Base.cpp @@ -10,7 +10,7 @@ #include "Styling/SlateTypes.h" #include "UI/UIStyleRow.h" #include "UI/UIStyleTokens.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" namespace { @@ -59,7 +59,7 @@ namespace { if (const UGameInstance* GI = Widget->GetGameInstance()) { - if (const UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (const UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { return Theme->GetActiveUIStyle(); } @@ -135,7 +135,7 @@ void UUIProgressBar_Base::NativeConstruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.AddDynamic(this, &UUIProgressBar_Base::HandleThemeChanged); bThemeBound = true; @@ -163,7 +163,7 @@ void UUIProgressBar_Base::NativeDestruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.RemoveDynamic(this, &UUIProgressBar_Base::HandleThemeChanged); } diff --git a/Source/ZMMO/Game/UI/Widgets/UISpinner_Base.cpp b/Source/ZMMO/Game/UI/Widgets/UISpinner_Base.cpp index 4357bea..aa31081 100644 --- a/Source/ZMMO/Game/UI/Widgets/UISpinner_Base.cpp +++ b/Source/ZMMO/Game/UI/Widgets/UISpinner_Base.cpp @@ -1,6 +1,6 @@ #include "UISpinner_Base.h" -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" #include "Engine/GameInstance.h" #include "Engine/DataTable.h" #include "Components/CircularThrobber.h" @@ -16,7 +16,7 @@ namespace { if (const UGameInstance* GI = Widget->GetGameInstance()) { - if (const UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (const UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { return Theme->GetActiveUIStyle(); } @@ -103,7 +103,7 @@ void UUISpinner_Base::NativeConstruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.AddDynamic(this, &UUISpinner_Base::HandleThemeChanged); bThemeBound = true; @@ -119,7 +119,7 @@ void UUISpinner_Base::NativeDestruct() { if (const UGameInstance* GI = GetGameInstance()) { - if (UZMMOThemeSubsystem* Theme = GI->GetSubsystem()) + if (UZeusThemeSubsystem* Theme = GI->GetSubsystem()) { Theme->OnThemeChanged.RemoveDynamic(this, &UUISpinner_Base::HandleThemeChanged); } diff --git a/Source/ZMMO/Game/UI/Widgets/UISpinner_Base.h b/Source/ZMMO/Game/UI/Widgets/UISpinner_Base.h index ed13dbb..e248eba 100644 --- a/Source/ZMMO/Game/UI/Widgets/UISpinner_Base.h +++ b/Source/ZMMO/Game/UI/Widgets/UISpinner_Base.h @@ -13,7 +13,7 @@ class UCircularThrobber; * (UI_Spinner_Master) herda DIRETO desta classe C++ (UMG não encadeia * árvores — ARQUITETURA.md §3.3). * - * Visual data-driven por FUIStyle.Spinner (UZMMOThemeSubsystem). C++ aplica + * Visual data-driven por FUIStyle.Spinner (UZeusThemeSubsystem). C++ aplica * NumberOfPieces/Period/Radius no UCircularThrobber; cor/brush vão pelo hook * BP_ApplySpinnerStyle (o WBP tinge a imagem do throbber). */ diff --git a/Source/ZMMO/Game/UI/ZMMOThemeDataAsset.cpp b/Source/ZMMO/Game/UI/ZMMOThemeDataAsset.cpp deleted file mode 100644 index 581a1e8..0000000 --- a/Source/ZMMO/Game/UI/ZMMOThemeDataAsset.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "ZMMOThemeDataAsset.h" - -bool UZMMOThemeDataAsset::HasKey(EZMMOThemeKey Key) const -{ - return Entries.Contains(Key); -} - -const FThemeEntry* UZMMOThemeDataAsset::FindEntry(EZMMOThemeKey Key) const -{ - return Entries.Find(Key); -} diff --git a/Source/ZMMO/Game/UI/ZeusThemeDataAsset.cpp b/Source/ZMMO/Game/UI/ZeusThemeDataAsset.cpp new file mode 100644 index 0000000..545ad18 --- /dev/null +++ b/Source/ZMMO/Game/UI/ZeusThemeDataAsset.cpp @@ -0,0 +1,11 @@ +#include "ZeusThemeDataAsset.h" + +bool UZeusThemeDataAsset::HasKey(EZeusThemeKey Key) const +{ + return Entries.Contains(Key); +} + +const FThemeEntry* UZeusThemeDataAsset::FindEntry(EZeusThemeKey Key) const +{ + return Entries.Find(Key); +} diff --git a/Source/ZMMO/Game/UI/ZMMOThemeDataAsset.h b/Source/ZMMO/Game/UI/ZeusThemeDataAsset.h similarity index 67% rename from Source/ZMMO/Game/UI/ZMMOThemeDataAsset.h rename to Source/ZMMO/Game/UI/ZeusThemeDataAsset.h index 7e678aa..540e3cb 100644 --- a/Source/ZMMO/Game/UI/ZMMOThemeDataAsset.h +++ b/Source/ZMMO/Game/UI/ZeusThemeDataAsset.h @@ -4,10 +4,10 @@ #include "Engine/DataAsset.h" #include "UI/ThemeKeys.h" #include "UI/ThemeRow.h" -#include "ZMMOThemeDataAsset.generated.h" +#include "ZeusThemeDataAsset.generated.h" UCLASS(BlueprintType) -class ZMMO_API UZMMOThemeDataAsset : public UPrimaryDataAsset +class ZMMO_API UZeusThemeDataAsset : public UPrimaryDataAsset { GENERATED_BODY() @@ -19,8 +19,8 @@ public: FText DisplayName; UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Theme", meta = (ToolTip = "Only fill the keys this theme overrides. Missing keys fall back to the Default theme.")) - TMap Entries; + TMap Entries; - bool HasKey(EZMMOThemeKey Key) const; - const FThemeEntry* FindEntry(EZMMOThemeKey Key) const; + bool HasKey(EZeusThemeKey Key) const; + const FThemeEntry* FindEntry(EZeusThemeKey Key) const; }; diff --git a/Source/ZMMO/Game/UI/ZMMOThemeSubsystem.cpp b/Source/ZMMO/Game/UI/ZeusThemeSubsystem.cpp similarity index 79% rename from Source/ZMMO/Game/UI/ZMMOThemeSubsystem.cpp rename to Source/ZMMO/Game/UI/ZeusThemeSubsystem.cpp index de29915..315b38b 100644 --- a/Source/ZMMO/Game/UI/ZMMOThemeSubsystem.cpp +++ b/Source/ZMMO/Game/UI/ZeusThemeSubsystem.cpp @@ -1,6 +1,6 @@ -#include "ZMMOThemeSubsystem.h" +#include "ZeusThemeSubsystem.h" -#include "ZMMOThemeDataAsset.h" +#include "ZeusThemeDataAsset.h" #include "Engine/DataTable.h" #include "Engine/Texture2D.h" #include "Sound/SoundBase.h" @@ -15,7 +15,7 @@ namespace const FName GUIStyleDefaultRow(TEXT("Default")); } -void UZMMOThemeSubsystem::Initialize(FSubsystemCollectionBase& Collection) +void UZeusThemeSubsystem::Initialize(FSubsystemCollectionBase& Collection) { Super::Initialize(Collection); @@ -23,7 +23,7 @@ void UZMMOThemeSubsystem::Initialize(FSubsystemCollectionBase& Collection) if (!DefaultTheme) { UE_LOG(LogTemp, Warning, - TEXT("[ZMMOThemeSubsystem] DefaultThemeAsset is not set. UI will have no theme.")); + TEXT("[ZeusThemeSubsystem] DefaultThemeAsset is not set. UI will have no theme.")); } ResolveActiveTheme(); @@ -36,32 +36,32 @@ void UZMMOThemeSubsystem::Initialize(FSubsystemCollectionBase& Collection) ResolveActiveUIStyle(ActiveThemeId); } -void UZMMOThemeSubsystem::Deinitialize() +void UZeusThemeSubsystem::Deinitialize() { ActiveTheme = nullptr; DefaultTheme = nullptr; Super::Deinitialize(); } -void UZMMOThemeSubsystem::ApplyServerTheme(FName ThemeId) +void UZeusThemeSubsystem::ApplyServerTheme(FName ThemeId) { ServerThemeId = ThemeId; ResolveActiveTheme(); } -void UZMMOThemeSubsystem::ForceTheme(FName ThemeId) +void UZeusThemeSubsystem::ForceTheme(FName ThemeId) { ForcedThemeId = ThemeId; ResolveActiveTheme(); } -void UZMMOThemeSubsystem::ClearForcedTheme() +void UZeusThemeSubsystem::ClearForcedTheme() { ForcedThemeId = NAME_None; ResolveActiveTheme(); } -void UZMMOThemeSubsystem::ResolveActiveTheme() +void UZeusThemeSubsystem::ResolveActiveTheme() { FName Resolved = NAME_None; @@ -84,7 +84,7 @@ void UZMMOThemeSubsystem::ResolveActiveTheme() Resolved = ResolveByCalendar(); } - UZMMOThemeDataAsset* NewActive = !Resolved.IsNone() ? LoadThemeById(Resolved) : nullptr; + UZeusThemeDataAsset* NewActive = !Resolved.IsNone() ? LoadThemeById(Resolved) : nullptr; if (!NewActive) { NewActive = DefaultTheme; @@ -100,7 +100,7 @@ void UZMMOThemeSubsystem::ResolveActiveTheme() } } -void UZMMOThemeSubsystem::ResolveActiveUIStyle(FName ThemeId) +void UZeusThemeSubsystem::ResolveActiveUIStyle(FName ThemeId) { // Reset para os defaults do struct antes de aplicar a linha resolvida — // assim um tema sem linha cai num estado coerente (paleta Aurora Arcana). @@ -128,7 +128,7 @@ void UZMMOThemeSubsystem::ResolveActiveUIStyle(FName ThemeId) } } -FName UZMMOThemeSubsystem::ResolveByCalendar() const +FName UZeusThemeSubsystem::ResolveByCalendar() const { UDataTable* Table = CalendarTable.LoadSynchronous(); if (!Table) @@ -170,16 +170,16 @@ FName UZMMOThemeSubsystem::ResolveByCalendar() const return Best; } -UZMMOThemeDataAsset* UZMMOThemeSubsystem::LoadThemeById(FName ThemeId) const +UZeusThemeDataAsset* UZeusThemeSubsystem::LoadThemeById(FName ThemeId) const { - if (const TSoftObjectPtr* Soft = ThemeRegistry.Find(ThemeId)) + if (const TSoftObjectPtr* Soft = ThemeRegistry.Find(ThemeId)) { return Soft->LoadSynchronous(); } return nullptr; } -const FThemeEntry* UZMMOThemeSubsystem::FindEntryWithFallback(EZMMOThemeKey Key) const +const FThemeEntry* UZeusThemeSubsystem::FindEntryWithFallback(EZeusThemeKey Key) const { if (ActiveTheme) { @@ -198,25 +198,25 @@ const FThemeEntry* UZMMOThemeSubsystem::FindEntryWithFallback(EZMMOThemeKey Key) return nullptr; } -UTexture2D* UZMMOThemeSubsystem::GetTexture(EZMMOThemeKey Key) const +UTexture2D* UZeusThemeSubsystem::GetTexture(EZeusThemeKey Key) const { const FThemeEntry* Entry = FindEntryWithFallback(Key); return Entry ? Entry->Texture.LoadSynchronous() : nullptr; } -USoundBase* UZMMOThemeSubsystem::GetSound(EZMMOThemeKey Key) const +USoundBase* UZeusThemeSubsystem::GetSound(EZeusThemeKey Key) const { const FThemeEntry* Entry = FindEntryWithFallback(Key); return Entry ? Entry->Sound.LoadSynchronous() : nullptr; } -UNiagaraSystem* UZMMOThemeSubsystem::GetVFX(EZMMOThemeKey Key) const +UNiagaraSystem* UZeusThemeSubsystem::GetVFX(EZeusThemeKey Key) const { const FThemeEntry* Entry = FindEntryWithFallback(Key); return Entry ? Entry->VFX.LoadSynchronous() : nullptr; } -UObject* UZMMOThemeSubsystem::GetGeneric(EZMMOThemeKey Key) const +UObject* UZeusThemeSubsystem::GetGeneric(EZeusThemeKey Key) const { const FThemeEntry* Entry = FindEntryWithFallback(Key); return Entry ? Entry->Generic.LoadSynchronous() : nullptr; diff --git a/Source/ZMMO/Game/UI/ZMMOThemeSubsystem.h b/Source/ZMMO/Game/UI/ZeusThemeSubsystem.h similarity index 80% rename from Source/ZMMO/Game/UI/ZMMOThemeSubsystem.h rename to Source/ZMMO/Game/UI/ZeusThemeSubsystem.h index 27344ee..bc6d5f4 100644 --- a/Source/ZMMO/Game/UI/ZMMOThemeSubsystem.h +++ b/Source/ZMMO/Game/UI/ZeusThemeSubsystem.h @@ -5,18 +5,18 @@ #include "UI/ThemeKeys.h" #include "UI/ThemeRow.h" #include "UI/UIStyleRow.h" -#include "ZMMOThemeSubsystem.generated.h" +#include "ZeusThemeSubsystem.generated.h" -class UZMMOThemeDataAsset; +class UZeusThemeDataAsset; class UDataTable; class UTexture2D; class USoundBase; class UNiagaraSystem; -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZMMOThemeChanged, FName, NewThemeId); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZeusThemeChanged, FName, NewThemeId); /** - * Resolves which UI theme is active and answers asset lookups by EZMMOThemeKey. + * Resolves which UI theme is active and answers asset lookups by EZeusThemeKey. * * Resolution precedence (see ARQUITETURA.md §1.10): * 1. Dev override (.ini DevThemeOverride) — ignored in Shipping builds. @@ -28,7 +28,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnZMMOThemeChanged, FName, NewTheme * active theme through Get* methods on this subsystem. */ UCLASS(Config = Game) -class ZMMO_API UZMMOThemeSubsystem : public UGameInstanceSubsystem +class ZMMO_API UZeusThemeSubsystem : public UGameInstanceSubsystem { GENERATED_BODY() @@ -53,16 +53,16 @@ public: FName GetActiveThemeId() const { return ActiveThemeId; } UFUNCTION(BlueprintCallable, Category = "Theme") - UTexture2D* GetTexture(EZMMOThemeKey Key) const; + UTexture2D* GetTexture(EZeusThemeKey Key) const; UFUNCTION(BlueprintCallable, Category = "Theme") - USoundBase* GetSound(EZMMOThemeKey Key) const; + USoundBase* GetSound(EZeusThemeKey Key) const; UFUNCTION(BlueprintCallable, Category = "Theme") - UNiagaraSystem* GetVFX(EZMMOThemeKey Key) const; + UNiagaraSystem* GetVFX(EZeusThemeKey Key) const; UFUNCTION(BlueprintCallable, Category = "Theme") - UObject* GetGeneric(EZMMOThemeKey Key) const; + UObject* GetGeneric(EZeusThemeKey Key) const; /** * Tokens de estilo (cores/fontes/dimensões) do tema ativo, resolvidos de @@ -74,16 +74,16 @@ public: /** Fired whenever the active theme actually changes. */ UPROPERTY(BlueprintAssignable, Category = "Theme") - FOnZMMOThemeChanged OnThemeChanged; + FOnZeusThemeChanged OnThemeChanged; protected: /** Default theme. Must be filled with every key — it is the final fallback. */ UPROPERTY(Config, EditDefaultsOnly, Category = "Theme") - TSoftObjectPtr DefaultThemeAsset; + TSoftObjectPtr DefaultThemeAsset; /** Registry of seasonal/event themes keyed by ThemeId. */ UPROPERTY(Config, EditDefaultsOnly, Category = "Theme") - TMap> ThemeRegistry; + TMap> ThemeRegistry; /** Local calendar table (FThemeCalendarRow). Optional. */ UPROPERTY(Config, EditDefaultsOnly, Category = "Theme") @@ -100,15 +100,15 @@ protected: private: void ResolveActiveTheme(); FName ResolveByCalendar() const; - UZMMOThemeDataAsset* LoadThemeById(FName ThemeId) const; - const FThemeEntry* FindEntryWithFallback(EZMMOThemeKey Key) const; + UZeusThemeDataAsset* LoadThemeById(FName ThemeId) const; + const FThemeEntry* FindEntryWithFallback(EZeusThemeKey Key) const; void ResolveActiveUIStyle(FName ThemeId); UPROPERTY(Transient) - TObjectPtr ActiveTheme; + TObjectPtr ActiveTheme; UPROPERTY(Transient) - TObjectPtr DefaultTheme; + TObjectPtr DefaultTheme; UPROPERTY(Transient) FName ActiveThemeId; diff --git a/Source/ZMMO/ZMMO.Build.cs b/Source/ZMMO/ZMMO.Build.cs index f911655..7e9999e 100644 --- a/Source/ZMMO/ZMMO.Build.cs +++ b/Source/ZMMO/ZMMO.Build.cs @@ -19,8 +19,8 @@ public class ZMMO : ModuleRules "CommonInput", "GameplayTags", "ZeusNetwork", - "ZMMOAttributes", - "ZMMOJobs" + "ZeusAttributes", + "ZeusJobs" }); PrivateDependencyModuleNames.AddRange(new string[] { diff --git a/Source/ZMMOAttributes/Private/ZMMOAttributesModule.cpp b/Source/ZMMOAttributes/Private/ZMMOAttributesModule.cpp deleted file mode 100644 index 28f71f5..0000000 --- a/Source/ZMMOAttributes/Private/ZMMOAttributesModule.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "ZMMOAttributesModule.h" - -#include "Modules/ModuleManager.h" - -void FZMMOAttributesModule::StartupModule() -{ -} - -void FZMMOAttributesModule::ShutdownModule() -{ -} - -IMPLEMENT_MODULE(FZMMOAttributesModule, ZMMOAttributes) diff --git a/Source/ZMMOJobs/Private/ZMMOJobsModule.cpp b/Source/ZMMOJobs/Private/ZMMOJobsModule.cpp deleted file mode 100644 index 4bfc787..0000000 --- a/Source/ZMMOJobs/Private/ZMMOJobsModule.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "ZMMOJobsModule.h" - -#include "Modules/ModuleManager.h" - -void FZMMOJobsModule::StartupModule() -{ -} - -void FZMMOJobsModule::ShutdownModule() -{ -} - -IMPLEMENT_MODULE(FZMMOJobsModule, ZMMOJobs) diff --git a/Source/ZMMOAttributes/Private/ZMMOAttributeComponent.cpp b/Source/ZeusAttributes/Private/ZeusAttributeComponent.cpp similarity index 73% rename from Source/ZMMOAttributes/Private/ZMMOAttributeComponent.cpp rename to Source/ZeusAttributes/Private/ZeusAttributeComponent.cpp index d2aa07d..1ac6ed0 100644 --- a/Source/ZMMOAttributes/Private/ZMMOAttributeComponent.cpp +++ b/Source/ZeusAttributes/Private/ZeusAttributeComponent.cpp @@ -1,14 +1,14 @@ -#include "ZMMOAttributeComponent.h" +#include "ZeusAttributeComponent.h" #include "Engine/GameInstance.h" #include "ZeusNetworkSubsystem.h" -UZMMOAttributeComponent::UZMMOAttributeComponent() +UZeusAttributeComponent::UZeusAttributeComponent() { PrimaryComponentTick.bCanEverTick = false; } -void UZMMOAttributeComponent::ApplySnapshot(const FZMMOAttributesSnapshot& InSnapshot) +void UZeusAttributeComponent::ApplySnapshot(const FZeusAttributesSnapshot& InSnapshot) { const int32 OldHp = Current.Hp; const int32 OldSp = Current.Sp; @@ -20,7 +20,7 @@ void UZMMOAttributeComponent::ApplySnapshot(const FZMMOAttributesSnapshot& InSna } } -void UZMMOAttributeComponent::ApplyHpSpUpdate(int32 NewHp, int32 NewSp) +void UZeusAttributeComponent::ApplyHpSpUpdate(int32 NewHp, int32 NewSp) { if (Current.Hp == NewHp && Current.Sp == NewSp) { @@ -31,19 +31,19 @@ void UZMMOAttributeComponent::ApplyHpSpUpdate(int32 NewHp, int32 NewSp) OnHpSpChanged.Broadcast(Current.Hp, Current.Sp); } -void UZMMOAttributeComponent::NotifyLevelUp(int32 NewBaseLevel, int32 StatusPointDelta) +void UZeusAttributeComponent::NotifyLevelUp(int32 NewBaseLevel, int32 StatusPointDelta) { // O snapshot subsequente vai trazer todos os outros campos atualizados — // aqui apenas dispara o delegate para efeitos visuais imediatos. OnLevelUp.Broadcast(NewBaseLevel, StatusPointDelta); } -void UZMMOAttributeComponent::NotifyStatAllocReply(bool bAccepted, int32 Reason) +void UZeusAttributeComponent::NotifyStatAllocReply(bool bAccepted, int32 Reason) { OnStatAllocReply.Broadcast(bAccepted, Reason); } -void UZMMOAttributeComponent::RequestStatAlloc(int32 StatId, int32 Amount) +void UZeusAttributeComponent::RequestStatAlloc(int32 StatId, int32 Amount) { UWorld* World = GetWorld(); if (!World) { return; } diff --git a/Source/ZMMOAttributes/Private/ZMMOAttributeNetworkHandler.cpp b/Source/ZeusAttributes/Private/ZeusAttributeNetworkHandler.cpp similarity index 73% rename from Source/ZMMOAttributes/Private/ZMMOAttributeNetworkHandler.cpp rename to Source/ZeusAttributes/Private/ZeusAttributeNetworkHandler.cpp index e2c1e5e..af3a201 100644 --- a/Source/ZMMOAttributes/Private/ZMMOAttributeNetworkHandler.cpp +++ b/Source/ZeusAttributes/Private/ZeusAttributeNetworkHandler.cpp @@ -1,21 +1,21 @@ -#include "ZMMOAttributeNetworkHandler.h" +#include "ZeusAttributeNetworkHandler.h" #include "Engine/GameInstance.h" #include "Engine/World.h" #include "GameFramework/GameStateBase.h" #include "GameFramework/PlayerController.h" #include "GameFramework/PlayerState.h" -#include "ZMMOAttributeComponent.h" -#include "ZMMOAttributeTypes.h" +#include "ZeusAttributeComponent.h" +#include "ZeusAttributeTypes.h" #include "ZeusNetworkSubsystem.h" namespace { // Helper privado — converte o payload binario do plugin pra USTRUCT // Blueprint que o componente exibe. - FZMMOAttributesSnapshot ToSnapshot(const FZeusAttributesPayload& P) + FZeusAttributesSnapshot ToSnapshot(const FZeusAttributesPayload& P) { - FZMMOAttributesSnapshot S; + FZeusAttributesSnapshot S; S.EntityId = P.EntityId; S.ClassId = P.ClassId; S.BaseLevel = P.BaseLevel; @@ -56,14 +56,14 @@ namespace return S; } - // Resolve `EntityId -> UZMMOAttributeComponent` via PlayerArray do GameState. - // AttributeComponent agora vive no PlayerState (vide AZMMOPlayerState + + // Resolve `EntityId -> UZeusAttributeComponent` via PlayerArray do GameState. + // AttributeComponent agora vive no PlayerState (vide AZeusPlayerState + // Component Registry em DefaultGame.ini). Itera apenas players (1 por // conexao), nao 1000+ atores — O(N_players). // - // Cada UZMMOAttributeComponent carrega seu proprio EntityId (seed em - // AZMMOPlayerCharacter::HandleLocalSpawnReady ou no primeiro snapshot). - UZMMOAttributeComponent* FindComponentForEntity(UWorld* World, int64 EntityId) // PR-HANDOFF-007 int64 + // Cada UZeusAttributeComponent carrega seu proprio EntityId (seed em + // AZeusCharacter::HandleLocalSpawnReady ou no primeiro snapshot). + UZeusAttributeComponent* FindComponentForEntity(UWorld* World, int64 EntityId) // PR-HANDOFF-007 int64 { if (!World || EntityId == 0) { return nullptr; } const AGameStateBase* GS = World->GetGameState(); @@ -71,7 +71,7 @@ namespace for (APlayerState* PS : GS->PlayerArray) { if (!PS) { continue; } - UZMMOAttributeComponent* Comp = PS->FindComponentByClass(); + UZeusAttributeComponent* Comp = PS->FindComponentByClass(); if (!Comp) { continue; } if (Comp->GetSnapshot().EntityId == EntityId) { @@ -82,7 +82,7 @@ namespace } } -bool UZMMOAttributeNetworkHandler::ShouldCreateSubsystem(UObject* Outer) const +bool UZeusAttributeNetworkHandler::ShouldCreateSubsystem(UObject* Outer) const { // Cria apenas para mundos de gameplay (PIE/Game), nao para editor preview. UWorld* World = Cast(Outer); @@ -90,24 +90,24 @@ bool UZMMOAttributeNetworkHandler::ShouldCreateSubsystem(UObject* Outer) const return World->WorldType == EWorldType::Game || World->WorldType == EWorldType::PIE; } -void UZMMOAttributeNetworkHandler::Initialize(FSubsystemCollectionBase& Collection) +void UZeusAttributeNetworkHandler::Initialize(FSubsystemCollectionBase& Collection) { Super::Initialize(Collection); if (UZeusNetworkSubsystem* Net = GetZeusNetSubsystem()) { SnapshotFullHandle = Net->OnAttributeSnapshotFull.AddUObject( - this, &UZMMOAttributeNetworkHandler::HandleAttributeSnapshotFull); + this, &UZeusAttributeNetworkHandler::HandleAttributeSnapshotFull); HpSpUpdateHandle = Net->OnHpSpUpdate.AddUObject( - this, &UZMMOAttributeNetworkHandler::HandleHpSpUpdate); + this, &UZeusAttributeNetworkHandler::HandleHpSpUpdate); LevelUpHandle = Net->OnLevelUp.AddUObject( - this, &UZMMOAttributeNetworkHandler::HandleLevelUp); + this, &UZeusAttributeNetworkHandler::HandleLevelUp); StatAllocReplyHandle = Net->OnStatAllocReply.AddUObject( - this, &UZMMOAttributeNetworkHandler::HandleStatAllocReply); + this, &UZeusAttributeNetworkHandler::HandleStatAllocReply); } } -void UZMMOAttributeNetworkHandler::Deinitialize() +void UZeusAttributeNetworkHandler::Deinitialize() { if (UZeusNetworkSubsystem* Net = GetZeusNetSubsystem()) { @@ -135,7 +135,7 @@ void UZMMOAttributeNetworkHandler::Deinitialize() Super::Deinitialize(); } -UZeusNetworkSubsystem* UZMMOAttributeNetworkHandler::GetZeusNetSubsystem() const +UZeusNetworkSubsystem* UZeusAttributeNetworkHandler::GetZeusNetSubsystem() const { const UWorld* World = GetWorld(); if (!World) { return nullptr; } @@ -144,11 +144,11 @@ UZeusNetworkSubsystem* UZMMOAttributeNetworkHandler::GetZeusNetSubsystem() const return GI->GetSubsystem(); } -void UZMMOAttributeNetworkHandler::HandleAttributeSnapshotFull(const FZeusAttributesPayload& Payload) +void UZeusAttributeNetworkHandler::HandleAttributeSnapshotFull(const FZeusAttributesPayload& Payload) { UWorld* World = GetWorld(); if (!World) { return; } - UZMMOAttributeComponent* Comp = FindComponentForEntity(World, Payload.EntityId); + UZeusAttributeComponent* Comp = FindComponentForEntity(World, Payload.EntityId); if (!Comp) { // Fallback chicken-and-egg: primeiro snapshot chega antes do EntityId @@ -161,7 +161,7 @@ void UZMMOAttributeNetworkHandler::HandleAttributeSnapshotFull(const FZeusAttrib for (APlayerState* PS : GS->PlayerArray) { if (!PS) { continue; } - UZMMOAttributeComponent* Candidate = PS->FindComponentByClass(); + UZeusAttributeComponent* Candidate = PS->FindComponentByClass(); if (Candidate && Candidate->GetSnapshot().EntityId == 0) { Comp = Candidate; @@ -176,43 +176,43 @@ void UZMMOAttributeNetworkHandler::HandleAttributeSnapshotFull(const FZeusAttrib } } -void UZMMOAttributeNetworkHandler::HandleHpSpUpdate(int64 EntityId, int32 Hp, int32 Sp) +void UZeusAttributeNetworkHandler::HandleHpSpUpdate(int64 EntityId, int32 Hp, int32 Sp) { UWorld* World = GetWorld(); if (!World) { return; } - UZMMOAttributeComponent* Comp = FindComponentForEntity(World, EntityId); + UZeusAttributeComponent* Comp = FindComponentForEntity(World, EntityId); if (Comp) { Comp->ApplyHpSpUpdate(Hp, Sp); } } -void UZMMOAttributeNetworkHandler::HandleLevelUp(int64 EntityId, int32 NewBaseLevel, int32 StatusPointDelta) +void UZeusAttributeNetworkHandler::HandleLevelUp(int64 EntityId, int32 NewBaseLevel, int32 StatusPointDelta) { UWorld* World = GetWorld(); if (!World) { return; } - UZMMOAttributeComponent* Comp = FindComponentForEntity(World, EntityId); + UZeusAttributeComponent* Comp = FindComponentForEntity(World, EntityId); if (Comp) { Comp->NotifyLevelUp(NewBaseLevel, StatusPointDelta); } } -void UZMMOAttributeNetworkHandler::HandleStatAllocReply(bool bAccepted, int32 Reason) +void UZeusAttributeNetworkHandler::HandleStatAllocReply(bool bAccepted, int32 Reason) { // S_ATTRIBUTE_STAT_ALLOC_OK nao traz EntityId no payload — sempre do // player local que fez o request. Busca o AttributeComponent via PC. - if (UZMMOAttributeComponent* Comp = FindLocalPlayerAttributeComponent()) + if (UZeusAttributeComponent* Comp = FindLocalPlayerAttributeComponent()) { Comp->NotifyStatAllocReply(bAccepted, Reason); } } -UZMMOAttributeComponent* UZMMOAttributeNetworkHandler::FindLocalPlayerAttributeComponent() const +UZeusAttributeComponent* UZeusAttributeNetworkHandler::FindLocalPlayerAttributeComponent() const { UWorld* World = GetWorld(); if (!World) { return nullptr; } APlayerController* PC = World->GetFirstPlayerController(); if (!PC || !PC->PlayerState) { return nullptr; } - return PC->PlayerState->FindComponentByClass(); + return PC->PlayerState->FindComponentByClass(); } diff --git a/Source/ZeusAttributes/Private/ZeusAttributesModule.cpp b/Source/ZeusAttributes/Private/ZeusAttributesModule.cpp new file mode 100644 index 0000000..cdfcbd3 --- /dev/null +++ b/Source/ZeusAttributes/Private/ZeusAttributesModule.cpp @@ -0,0 +1,13 @@ +#include "ZeusAttributesModule.h" + +#include "Modules/ModuleManager.h" + +void FZeusAttributesModule::StartupModule() +{ +} + +void FZeusAttributesModule::ShutdownModule() +{ +} + +IMPLEMENT_MODULE(FZeusAttributesModule, ZeusAttributes) diff --git a/Source/ZMMOAttributes/Private/ZMMOHudHpSpWidget.cpp b/Source/ZeusAttributes/Private/ZeusHudHpSpWidget.cpp similarity index 78% rename from Source/ZMMOAttributes/Private/ZMMOHudHpSpWidget.cpp rename to Source/ZeusAttributes/Private/ZeusHudHpSpWidget.cpp index 543ea80..a7ad47e 100644 --- a/Source/ZMMOAttributes/Private/ZMMOHudHpSpWidget.cpp +++ b/Source/ZeusAttributes/Private/ZeusHudHpSpWidget.cpp @@ -1,16 +1,16 @@ -#include "ZMMOHudHpSpWidget.h" +#include "ZeusHudHpSpWidget.h" #include "Components/ProgressBar.h" #include "Components/TextBlock.h" #include "Internationalization/Text.h" -void UZMMOHudHpSpWidget::ApplySnapshot(const FZMMOAttributesSnapshot& Snapshot) +void UZeusHudHpSpWidget::ApplySnapshot(const FZeusAttributesSnapshot& Snapshot) { LastSnapshot = Snapshot; OnSnapshotApplied(Snapshot); } -void UZMMOHudHpSpWidget::ApplyHpSp(int32 Hp, int32 MaxHp, int32 Sp, int32 MaxSp) +void UZeusHudHpSpWidget::ApplyHpSp(int32 Hp, int32 MaxHp, int32 Sp, int32 MaxSp) { LastSnapshot.Hp = Hp; LastSnapshot.MaxHp = MaxHp; @@ -35,7 +35,7 @@ void UZMMOHudHpSpWidget::ApplyHpSp(int32 Hp, int32 MaxHp, int32 Sp, int32 MaxSp) } } -void UZMMOHudHpSpWidget::OnSnapshotApplied_Implementation(const FZMMOAttributesSnapshot& Snapshot) +void UZeusHudHpSpWidget::OnSnapshotApplied_Implementation(const FZeusAttributesSnapshot& Snapshot) { ApplyHpSp(Snapshot.Hp, Snapshot.MaxHp, Snapshot.Sp, Snapshot.MaxSp); if (LevelText) diff --git a/Source/ZMMOAttributes/Public/ZMMOAttributeComponent.h b/Source/ZeusAttributes/Public/ZeusAttributeComponent.h similarity index 76% rename from Source/ZMMOAttributes/Public/ZMMOAttributeComponent.h rename to Source/ZeusAttributes/Public/ZeusAttributeComponent.h index 6d11055..39ff4e2 100644 --- a/Source/ZMMOAttributes/Public/ZMMOAttributeComponent.h +++ b/Source/ZeusAttributes/Public/ZeusAttributeComponent.h @@ -2,16 +2,16 @@ #include "CoreMinimal.h" #include "Components/ActorComponent.h" -#include "ZMMOAttributeTypes.h" -#include "ZMMOAttributeComponent.generated.h" +#include "ZeusAttributeTypes.h" +#include "ZeusAttributeComponent.generated.h" -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZMMOOnAttributesChanged, const FZMMOAttributesSnapshot&, Snapshot); -DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FZMMOOnHpSpChanged, int32, Hp, int32, Sp); -DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FZMMOOnLevelUp, int32, NewBaseLevel, int32, StatusPointDelta); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FZeusOnAttributesChanged, const FZeusAttributesSnapshot&, Snapshot); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FZeusOnHpSpChanged, int32, Hp, int32, Sp); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FZeusOnLevelUp, int32, NewBaseLevel, int32, StatusPointDelta); /// Resposta server ao C_STAT_ALLOC. Reason e' EAllocRejectReason (None=0, /// InvalidStat=1, InvalidAmount=2, NotEnoughPoints=3, StatCapped=4, NoSession=5). -DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FZMMOOnStatAllocReply, bool, bAccepted, int32, Reason); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FZeusOnStatAllocReply, bool, bAccepted, int32, Reason); /** * Componente de atributos do MMO ligado ao ator que o representa em-jogo @@ -21,24 +21,24 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FZMMOOnStatAllocReply, bool, bAccep * Game/MMO/Modules/AttributeSystem). Cliente apenas armazena o ultimo * snapshot recebido e expoe delegates para UI/HUD reagir. * - * Roteamento server → componente: `UZMMOAttributeNetworkHandler` + * Roteamento server → componente: `UZeusAttributeNetworkHandler` * (UWorldSubsystem) liga em `UZeusNetworkSubsystem::OnAttributeSnapshotFull`, - * resolve `EntityId -> AActor*` via `UZMMOWorldSubsystem` e chama + * resolve `EntityId -> AActor*` via `UZeusWorldSubsystem` e chama * `ApplySnapshot` no componente do ator. */ -UCLASS(ClassGroup=(ZMMO), meta=(BlueprintSpawnableComponent), +UCLASS(ClassGroup=(Zeus), meta=(BlueprintSpawnableComponent), hidecategories=(Activation, Collision, Cooking, Object, Replication)) -class ZMMOATTRIBUTES_API UZMMOAttributeComponent : public UActorComponent +class ZEUSATTRIBUTES_API UZeusAttributeComponent : public UActorComponent { GENERATED_BODY() public: - UZMMOAttributeComponent(); + UZeusAttributeComponent(); /// Aplica snapshot full recebido do servidor. Substitui `Current` e /// dispara `OnAttributesChanged` + `OnHpSpChanged` (se hp/sp mudaram). UFUNCTION(BlueprintCallable, Category = "Zeus|Attributes") - void ApplySnapshot(const FZMMOAttributesSnapshot& InSnapshot); + void ApplySnapshot(const FZeusAttributesSnapshot& InSnapshot); /// Aplica apenas delta de HP/SP (sem mexer em outros campos). UFUNCTION(BlueprintCallable, Category = "Zeus|Attributes") @@ -60,14 +60,14 @@ public: void RequestStatAlloc(int32 StatId, int32 Amount = 1); /// Seed do EntityId vindo de S_SPAWN_PLAYER local. Chamado pelo - /// `AZMMOPlayerCharacter` antes do primeiro S_ATTRIBUTE_SNAPSHOT_FULL + /// `AZeusCharacter` antes do primeiro S_ATTRIBUTE_SNAPSHOT_FULL /// chegar, garantindo que o NetworkHandler consiga rotear via lookup /// por EntityId desde o inicio. UFUNCTION(BlueprintCallable, Category = "Zeus|Attributes") void SeedEntityId(int64 InEntityId) { Current.EntityId = InEntityId; } UFUNCTION(BlueprintPure, Category = "Zeus|Attributes") - const FZMMOAttributesSnapshot& GetSnapshot() const { return Current; } + const FZeusAttributesSnapshot& GetSnapshot() const { return Current; } UFUNCTION(BlueprintPure, Category = "Zeus|Attributes") float GetHpRatio() const @@ -85,21 +85,21 @@ public: /** Snapshot novo aplicado. Use isto na UI para refresh geral. */ UPROPERTY(BlueprintAssignable, Category = "Zeus|Attributes") - FZMMOOnAttributesChanged OnAttributesChanged; + FZeusOnAttributesChanged OnAttributesChanged; /** HP ou SP mudou (efêmero ou via snapshot). Para barras animadas. */ UPROPERTY(BlueprintAssignable, Category = "Zeus|Attributes") - FZMMOOnHpSpChanged OnHpSpChanged; + FZeusOnHpSpChanged OnHpSpChanged; /** Subiu de nível. Para efeitos visuais ("LEVEL UP!" toast). */ UPROPERTY(BlueprintAssignable, Category = "Zeus|Attributes") - FZMMOOnLevelUp OnLevelUp; + FZeusOnLevelUp OnLevelUp; /** Resposta ao C_STAT_ALLOC (aceito ou rejeitado). UI reage. */ UPROPERTY(BlueprintAssignable, Category = "Zeus|Attributes") - FZMMOOnStatAllocReply OnStatAllocReply; + FZeusOnStatAllocReply OnStatAllocReply; protected: UPROPERTY(BlueprintReadOnly, Category = "Zeus|Attributes") - FZMMOAttributesSnapshot Current; + FZeusAttributesSnapshot Current; }; diff --git a/Source/ZMMOAttributes/Public/ZMMOAttributeNetworkHandler.h b/Source/ZeusAttributes/Public/ZeusAttributeNetworkHandler.h similarity index 80% rename from Source/ZMMOAttributes/Public/ZMMOAttributeNetworkHandler.h rename to Source/ZeusAttributes/Public/ZeusAttributeNetworkHandler.h index dbc81e3..12ca4cd 100644 --- a/Source/ZMMOAttributes/Public/ZMMOAttributeNetworkHandler.h +++ b/Source/ZeusAttributes/Public/ZeusAttributeNetworkHandler.h @@ -3,26 +3,26 @@ #include "CoreMinimal.h" #include "Subsystems/WorldSubsystem.h" #include "ZeusAttributesPayload.h" -#include "ZMMOAttributeNetworkHandler.generated.h" +#include "ZeusAttributeNetworkHandler.generated.h" class UZeusNetworkSubsystem; /** * Ponte entre o `UZeusNetworkSubsystem` (GameInstanceSubsystem do plugin - * ZeusNetwork) e os `UZMMOAttributeComponent` ligados aos atores do mundo. + * ZeusNetwork) e os `UZeusAttributeComponent` ligados aos atores do mundo. * * Por que UWorldSubsystem (e nao GameInstanceSubsystem)? - * - O registry de atores (`UZMMOWorldSubsystem::GetActorByEntityId`) e' + * - O registry de atores (`UZeusWorldSubsystem::GetActorByEntityId`) e' * World-scoped, reset a cada OpenLevel. * - World subsystem so existe enquanto ha mundo carregado, o que e' exato * quando precisamos rotear snapshots (no front-end nao ha pawn). * * Lifecycle: `Initialize` binda nos 3 delegates do ZeusNetworkSubsystem; * `Deinitialize` unbinda. Conversao `FZeusAttributesPayload -> - * FZMMOAttributesSnapshot` (USTRUCT Blueprint) acontece aqui. + * FZeusAttributesSnapshot` (USTRUCT Blueprint) acontece aqui. */ UCLASS() -class ZMMOATTRIBUTES_API UZMMOAttributeNetworkHandler : public UWorldSubsystem +class ZEUSATTRIBUTES_API UZeusAttributeNetworkHandler : public UWorldSubsystem { GENERATED_BODY() @@ -42,7 +42,7 @@ private: /// Acha o AttributeComponent do player local (Pawn->PlayerState). /// Usado pro StatAllocReply (sem EntityId no payload). - class UZMMOAttributeComponent* FindLocalPlayerAttributeComponent() const; + class UZeusAttributeComponent* FindLocalPlayerAttributeComponent() const; FDelegateHandle SnapshotFullHandle; FDelegateHandle HpSpUpdateHandle; diff --git a/Source/ZMMOAttributes/Public/ZMMOAttributeTypes.h b/Source/ZeusAttributes/Public/ZeusAttributeTypes.h similarity index 98% rename from Source/ZMMOAttributes/Public/ZMMOAttributeTypes.h rename to Source/ZeusAttributes/Public/ZeusAttributeTypes.h index e19e322..7e34477 100644 --- a/Source/ZMMOAttributes/Public/ZMMOAttributeTypes.h +++ b/Source/ZeusAttributes/Public/ZeusAttributeTypes.h @@ -1,7 +1,7 @@ #pragma once #include "CoreMinimal.h" -#include "ZMMOAttributeTypes.generated.h" +#include "ZeusAttributeTypes.generated.h" /** * Snapshot completo dos atributos do char vindo do server via @@ -15,7 +15,7 @@ * em `Server/.../AttributeService.cpp::WriteSnapshotPayload`. */ USTRUCT(BlueprintType) -struct ZMMOATTRIBUTES_API FZMMOAttributesSnapshot +struct ZEUSATTRIBUTES_API FZeusAttributesSnapshot { GENERATED_BODY() diff --git a/Source/ZMMOAttributes/Public/ZMMOAttributesModule.h b/Source/ZeusAttributes/Public/ZeusAttributesModule.h similarity index 89% rename from Source/ZMMOAttributes/Public/ZMMOAttributesModule.h rename to Source/ZeusAttributes/Public/ZeusAttributesModule.h index cdc8874..0878053 100644 --- a/Source/ZMMOAttributes/Public/ZMMOAttributesModule.h +++ b/Source/ZeusAttributes/Public/ZeusAttributesModule.h @@ -11,7 +11,7 @@ * `UAttributeComponent` esteja registrado antes do `ZMMO` instanciar o * player character. */ -class FZMMOAttributesModule : public IModuleInterface +class FZeusAttributesModule : public IModuleInterface { public: virtual void StartupModule() override; diff --git a/Source/ZMMOAttributes/Public/ZMMOHudHpSpWidget.h b/Source/ZeusAttributes/Public/ZeusHudHpSpWidget.h similarity index 79% rename from Source/ZMMOAttributes/Public/ZMMOHudHpSpWidget.h rename to Source/ZeusAttributes/Public/ZeusHudHpSpWidget.h index 2713625..107fcbf 100644 --- a/Source/ZMMOAttributes/Public/ZMMOHudHpSpWidget.h +++ b/Source/ZeusAttributes/Public/ZeusHudHpSpWidget.h @@ -2,20 +2,20 @@ #include "Blueprint/UserWidget.h" #include "CoreMinimal.h" -#include "ZMMOAttributeTypes.h" -#include "ZMMOHudHpSpWidget.generated.h" +#include "ZeusAttributeTypes.h" +#include "ZeusHudHpSpWidget.generated.h" class UProgressBar; class UTextBlock; /** * Sub-widget do HUD: barras de HP/SP + label de level. Sem auto-bind no - * AttributeComponent — o parent (`UZMMOHudWidget`) propaga snapshots via + * AttributeComponent — o parent (`UZeusHudWidget`) propaga snapshots via * `ApplySnapshot` / `ApplyHpSpDelta` quando o player local recebe updates. * - * Composicao do HUD (ver `UZMMOHudWidget`): - * WBP_HUD (UZMMOHudWidget root) - * |-- HpSpBar (UZMMOHudHpSpWidget — este) + * Composicao do HUD (ver `UZeusHudWidget`): + * WBP_HUD (UZeusHudWidget root) + * |-- HpSpBar (UZeusHudHpSpWidget — este) * |-- PlayerInfo (futuro — nome/job/level) * |-- Minimap (futuro) * |-- QuickBar (futuro — hotkeys) @@ -23,21 +23,21 @@ class UTextBlock; * |-- Chat (futuro) * |-- TargetInfo (futuro — mob/player targetado) * - * Cada sub-widget tem responsabilidade unica (SRP). O parent (UZMMOHudWidget) + * Cada sub-widget tem responsabilidade unica (SRP). O parent (UZeusHudWidget) * faz binding com AttributeComponent e propaga deltas. * * Convencao `meta=(BindWidget)`: o WBP filho deve ter widgets com nomes * exatos (HpBar, SpBar). `BindWidgetOptional` permite omitir. */ UCLASS(Abstract, Blueprintable, BlueprintType) -class ZMMOATTRIBUTES_API UZMMOHudHpSpWidget : public UUserWidget +class ZEUSATTRIBUTES_API UZeusHudHpSpWidget : public UUserWidget { GENERATED_BODY() public: - /** Atualiza todos os campos a partir do snapshot. Chamado pelo UZMMOHudWidget. */ + /** Atualiza todos os campos a partir do snapshot. Chamado pelo UZeusHudWidget. */ UFUNCTION(BlueprintCallable, Category = "Zeus|HUD") - void ApplySnapshot(const FZMMOAttributesSnapshot& Snapshot); + void ApplySnapshot(const FZeusAttributesSnapshot& Snapshot); /** Atualiza apenas HP/SP (sem mexer no level/text). Otimizacao do tick. */ UFUNCTION(BlueprintCallable, Category = "Zeus|HUD") @@ -50,8 +50,8 @@ protected: * atualiza progress bars + textos via BindWidget/BindWidgetOptional. */ UFUNCTION(BlueprintNativeEvent, Category = "Zeus|HUD") - void OnSnapshotApplied(const FZMMOAttributesSnapshot& Snapshot); - virtual void OnSnapshotApplied_Implementation(const FZMMOAttributesSnapshot& Snapshot); + void OnSnapshotApplied(const FZeusAttributesSnapshot& Snapshot); + virtual void OnSnapshotApplied_Implementation(const FZeusAttributesSnapshot& Snapshot); // === BindWidget — devem existir no WBP com EXATAMENTE estes nomes === UPROPERTY(BlueprintReadOnly, meta = (BindWidget), Category = "Zeus|HUD") @@ -72,5 +72,5 @@ protected: private: /// Ultimo snapshot recebido (cache pra ApplyHpSp manter MaxHp/MaxSp). */ UPROPERTY(Transient) - FZMMOAttributesSnapshot LastSnapshot; + FZeusAttributesSnapshot LastSnapshot; }; diff --git a/Source/ZMMOAttributes/ZMMOAttributes.Build.cs b/Source/ZeusAttributes/ZeusAttributes.Build.cs similarity index 85% rename from Source/ZMMOAttributes/ZMMOAttributes.Build.cs rename to Source/ZeusAttributes/ZeusAttributes.Build.cs index 85eba18..f5b942b 100644 --- a/Source/ZMMOAttributes/ZMMOAttributes.Build.cs +++ b/Source/ZeusAttributes/ZeusAttributes.Build.cs @@ -1,8 +1,8 @@ using UnrealBuildTool; -public class ZMMOAttributes : ModuleRules +public class ZeusAttributes : ModuleRules { - public ZMMOAttributes(ReadOnlyTargetRules Target) : base(Target) + public ZeusAttributes(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; diff --git a/Source/ZMMOAttributes/module.json b/Source/ZeusAttributes/module.json similarity index 75% rename from Source/ZMMOAttributes/module.json rename to Source/ZeusAttributes/module.json index 73f678f..5971739 100644 --- a/Source/ZMMOAttributes/module.json +++ b/Source/ZeusAttributes/module.json @@ -1,5 +1,5 @@ { - "name": "ZMMOAttributes", + "name": "ZeusAttributes", "gameType": "MMO", "version": "0.1.0", "side": "client", @@ -9,10 +9,10 @@ "modules": [] }, "publicHeaders": [ - "ZMMOAttributesModule.h", - "ZMMOAttributeTypes.h", - "ZMMOAttributeComponent.h", - "ZMMOAttributeNetworkHandler.h" + "ZeusAttributesModule.h", + "ZeusAttributeTypes.h", + "ZeusAttributeComponent.h", + "ZeusAttributeNetworkHandler.h" ], "loadOrder": 100, "description": "Cliente do AttributeSystem do MMO. UActorComponent + UWorldSubsystem que recebe S_ATTRIBUTE_SNAPSHOT_FULL/HP_SP_UPDATE/LEVEL_UP do ZeusNetworkSubsystem e expõe pra UI/HUD." diff --git a/Source/ZMMOJobs/Private/ZMMOJobChangeNetworkHandler.cpp b/Source/ZeusJobs/Private/ZeusJobChangeNetworkHandler.cpp similarity index 64% rename from Source/ZMMOJobs/Private/ZMMOJobChangeNetworkHandler.cpp rename to Source/ZeusJobs/Private/ZeusJobChangeNetworkHandler.cpp index ab3a458..ae757a1 100644 --- a/Source/ZMMOJobs/Private/ZMMOJobChangeNetworkHandler.cpp +++ b/Source/ZeusJobs/Private/ZeusJobChangeNetworkHandler.cpp @@ -1,12 +1,12 @@ -#include "ZMMOJobChangeNetworkHandler.h" +#include "ZeusJobChangeNetworkHandler.h" #include "Engine/GameInstance.h" #include "Engine/World.h" #include "ZeusNetworkSubsystem.h" -DEFINE_LOG_CATEGORY_STATIC(LogZMMOJobChange, Log, All); +DEFINE_LOG_CATEGORY_STATIC(LogZeusJobChange, Log, All); -bool UZMMOJobChangeNetworkHandler::ShouldCreateSubsystem(UObject* Outer) const +bool UZeusJobChangeNetworkHandler::ShouldCreateSubsystem(UObject* Outer) const { // Mesmo criterio do AttributeNetworkHandler — so' em mundos de gameplay // (PIE / standalone in-game). Editor preview / front-end menu nao precisa. @@ -16,25 +16,25 @@ bool UZMMOJobChangeNetworkHandler::ShouldCreateSubsystem(UObject* Outer) const || World->WorldType == EWorldType::PIE; } -void UZMMOJobChangeNetworkHandler::Initialize(FSubsystemCollectionBase& Collection) +void UZeusJobChangeNetworkHandler::Initialize(FSubsystemCollectionBase& Collection) { Super::Initialize(Collection); if (UZeusNetworkSubsystem* Net = GetZeusNetSubsystem()) { JobChangeResultHandle = Net->OnJobChangeResult.AddUObject( - this, &UZMMOJobChangeNetworkHandler::HandleJobChangeResult); - UE_LOG(LogZMMOJobChange, Log, - TEXT("[ZMMOJobChangeNetworkHandler] Bind OnJobChangeResult OK")); + this, &UZeusJobChangeNetworkHandler::HandleJobChangeResult); + UE_LOG(LogZeusJobChange, Log, + TEXT("[ZeusJobChangeNetworkHandler] Bind OnJobChangeResult OK")); } else { - UE_LOG(LogZMMOJobChange, Warning, - TEXT("[ZMMOJobChangeNetworkHandler] ZeusNetworkSubsystem indisponivel — bind pulado")); + UE_LOG(LogZeusJobChange, Warning, + TEXT("[ZeusJobChangeNetworkHandler] ZeusNetworkSubsystem indisponivel — bind pulado")); } } -void UZMMOJobChangeNetworkHandler::Deinitialize() +void UZeusJobChangeNetworkHandler::Deinitialize() { if (UZeusNetworkSubsystem* Net = GetZeusNetSubsystem()) { @@ -48,16 +48,16 @@ void UZMMOJobChangeNetworkHandler::Deinitialize() Super::Deinitialize(); } -void UZMMOJobChangeNetworkHandler::HandleJobChangeResult( +void UZeusJobChangeNetworkHandler::HandleJobChangeResult( bool bAccepted, int32 Reason, int32 NewClassId) { - UE_LOG(LogZMMOJobChange, Log, - TEXT("[ZMMOJobChangeNetworkHandler] S_JOB_CHANGE_RESULT accepted=%d reason=%d newClassId=%d"), + UE_LOG(LogZeusJobChange, Log, + TEXT("[ZeusJobChangeNetworkHandler] S_JOB_CHANGE_RESULT accepted=%d reason=%d newClassId=%d"), bAccepted ? 1 : 0, Reason, NewClassId); OnJobChangeResult.Broadcast(bAccepted, Reason, NewClassId); } -UZeusNetworkSubsystem* UZMMOJobChangeNetworkHandler::GetZeusNetSubsystem() const +UZeusNetworkSubsystem* UZeusJobChangeNetworkHandler::GetZeusNetSubsystem() const { const UWorld* World = GetWorld(); if (World == nullptr) { return nullptr; } diff --git a/Source/ZMMOJobs/Private/ZMMOJobDataAsset.cpp b/Source/ZeusJobs/Private/ZeusJobDataAsset.cpp similarity index 85% rename from Source/ZMMOJobs/Private/ZMMOJobDataAsset.cpp rename to Source/ZeusJobs/Private/ZeusJobDataAsset.cpp index 2631308..f7f3bec 100644 --- a/Source/ZMMOJobs/Private/ZMMOJobDataAsset.cpp +++ b/Source/ZeusJobs/Private/ZeusJobDataAsset.cpp @@ -1,4 +1,4 @@ -#include "ZMMOJobDataAsset.h" +#include "ZeusJobDataAsset.h" // Implementacao vazia — todas as props sao UPROPERTY EditDefaultsOnly e // vivem inline no .uasset. Override de GetPrimaryAssetId() esta no header diff --git a/Source/ZMMOJobs/Private/ZMMOJobsLibrary.cpp b/Source/ZeusJobs/Private/ZeusJobsLibrary.cpp similarity index 61% rename from Source/ZMMOJobs/Private/ZMMOJobsLibrary.cpp rename to Source/ZeusJobs/Private/ZeusJobsLibrary.cpp index 82c67d5..330148f 100644 --- a/Source/ZMMOJobs/Private/ZMMOJobsLibrary.cpp +++ b/Source/ZeusJobs/Private/ZeusJobsLibrary.cpp @@ -1,31 +1,31 @@ -#include "ZMMOJobsLibrary.h" +#include "ZeusJobsLibrary.h" #include "Engine/GameInstance.h" #include "Engine/World.h" -#include "ZMMOJobDataAsset.h" -#include "ZMMOJobsSubsystem.h" +#include "ZeusJobDataAsset.h" +#include "ZeusJobsSubsystem.h" #include "ZeusNetworkSubsystem.h" namespace { /// Resolve Subsystem via WorldContextObject. Retorna nullptr em contextos /// invalidos (CDO em editor, world em destruicao). -UZMMOJobsSubsystem* ResolveSubsystem(const UObject* WorldContextObject) +UZeusJobsSubsystem* ResolveSubsystem(const UObject* WorldContextObject) { if (WorldContextObject == nullptr) { return nullptr; } const UWorld* World = WorldContextObject->GetWorld(); if (World == nullptr) { return nullptr; } UGameInstance* GI = World->GetGameInstance(); if (GI == nullptr) { return nullptr; } - return GI->GetSubsystem(); + return GI->GetSubsystem(); } } // namespace -FText UZMMOJobsLibrary::GetJobDisplayName(const UObject* WorldContextObject, int32 ClassId) +FText UZeusJobsLibrary::GetJobDisplayName(const UObject* WorldContextObject, int32 ClassId) { - if (UZMMOJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) + if (UZeusJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) { - if (UZMMOJobDataAsset* Job = Sub->GetJobData(ClassId)) + if (UZeusJobDataAsset* Job = Sub->GetJobData(ClassId)) { return Job->DisplayName.IsEmpty() ? FText::FromString(Job->TechnicalName) @@ -36,45 +36,45 @@ FText UZMMOJobsLibrary::GetJobDisplayName(const UObject* WorldContextObject, int return FText::FromString(FString::Printf(TEXT("Classe %d"), ClassId)); } -UZMMOJobDataAsset* UZMMOJobsLibrary::GetJobData(const UObject* WorldContextObject, int32 ClassId) +UZeusJobDataAsset* UZeusJobsLibrary::GetJobData(const UObject* WorldContextObject, int32 ClassId) { - if (UZMMOJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) + if (UZeusJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) { return Sub->GetJobData(ClassId); } return nullptr; } -bool UZMMOJobsLibrary::IsJobRegistered(const UObject* WorldContextObject, int32 ClassId) +bool UZeusJobsLibrary::IsJobRegistered(const UObject* WorldContextObject, int32 ClassId) { - if (UZMMOJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) + if (UZeusJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) { return Sub->GetJobData(ClassId) != nullptr; } return false; } -TArray UZMMOJobsLibrary::GetJobsByTier( - const UObject* WorldContextObject, EZMMOJobTier Tier) +TArray UZeusJobsLibrary::GetJobsByTier( + const UObject* WorldContextObject, EZeusJobTier Tier) { - if (UZMMOJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) + if (UZeusJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) { return Sub->GetJobsByTier(Tier); } return {}; } -TArray UZMMOJobsLibrary::GetEligibleNextJobs( +TArray UZeusJobsLibrary::GetEligibleNextJobs( const UObject* WorldContextObject, int32 CurrentClassId) { - if (UZMMOJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) + if (UZeusJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject)) { return Sub->GetEligibleNextJobs(CurrentClassId); } return {}; } -void UZMMOJobsLibrary::SendJobChangeRequest( +void UZeusJobsLibrary::SendJobChangeRequest( const UObject* WorldContextObject, int32 TargetClassId) { if (WorldContextObject == nullptr) { return; } diff --git a/Source/ZeusJobs/Private/ZeusJobsModule.cpp b/Source/ZeusJobs/Private/ZeusJobsModule.cpp new file mode 100644 index 0000000..1933b4f --- /dev/null +++ b/Source/ZeusJobs/Private/ZeusJobsModule.cpp @@ -0,0 +1,13 @@ +#include "ZeusJobsModule.h" + +#include "Modules/ModuleManager.h" + +void FZeusJobsModule::StartupModule() +{ +} + +void FZeusJobsModule::ShutdownModule() +{ +} + +IMPLEMENT_MODULE(FZeusJobsModule, ZeusJobs) diff --git a/Source/ZMMOJobs/Private/ZMMOJobsSubsystem.cpp b/Source/ZeusJobs/Private/ZeusJobsSubsystem.cpp similarity index 59% rename from Source/ZMMOJobs/Private/ZMMOJobsSubsystem.cpp rename to Source/ZeusJobs/Private/ZeusJobsSubsystem.cpp index e2e782b..43f8222 100644 --- a/Source/ZMMOJobs/Private/ZMMOJobsSubsystem.cpp +++ b/Source/ZeusJobs/Private/ZeusJobsSubsystem.cpp @@ -1,25 +1,25 @@ -#include "ZMMOJobsSubsystem.h" +#include "ZeusJobsSubsystem.h" #include "AssetRegistry/AssetRegistryModule.h" #include "Modules/ModuleManager.h" -#include "ZMMOJobDataAsset.h" +#include "ZeusJobDataAsset.h" -DEFINE_LOG_CATEGORY_STATIC(LogZMMOJobs, Log, All); +DEFINE_LOG_CATEGORY_STATIC(LogZeusJobs, Log, All); -void UZMMOJobsSubsystem::Initialize(FSubsystemCollectionBase& Collection) +void UZeusJobsSubsystem::Initialize(FSubsystemCollectionBase& Collection) { Super::Initialize(Collection); LoadJobsFromAssetRegistry(); - UE_LOG(LogZMMOJobs, Log, TEXT("[ZMMOJobsSubsystem] Initialize: %d job(s) carregados"), CachedJobs.Num()); + UE_LOG(LogZeusJobs, Log, TEXT("[ZeusJobsSubsystem] Initialize: %d job(s) carregados"), CachedJobs.Num()); } -void UZMMOJobsSubsystem::Deinitialize() +void UZeusJobsSubsystem::Deinitialize() { CachedJobs.Empty(); Super::Deinitialize(); } -void UZMMOJobsSubsystem::LoadJobsFromAssetRegistry() +void UZeusJobsSubsystem::LoadJobsFromAssetRegistry() { FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked("AssetRegistry"); @@ -32,18 +32,18 @@ void UZMMOJobsSubsystem::LoadJobsFromAssetRegistry() #endif TArray Assets; - const FTopLevelAssetPath ClassPath(UZMMOJobDataAsset::StaticClass()->GetClassPathName()); + const FTopLevelAssetPath ClassPath(UZeusJobDataAsset::StaticClass()->GetClassPathName()); AR.GetAssetsByClass(ClassPath, Assets, /*bSearchSubClasses*/ true); for (const FAssetData& AssetData : Assets) { - UZMMOJobDataAsset* Job = Cast(AssetData.GetAsset()); + UZeusJobDataAsset* Job = Cast(AssetData.GetAsset()); if (Job == nullptr) { continue; } if (CachedJobs.Contains(Job->ClassId)) { - UE_LOG(LogZMMOJobs, Warning, - TEXT("[ZMMOJobsSubsystem] Duplicate ClassId=%d (existing=%s, new=%s) — ignorando segundo"), + UE_LOG(LogZeusJobs, Warning, + TEXT("[ZeusJobsSubsystem] Duplicate ClassId=%d (existing=%s, new=%s) — ignorando segundo"), Job->ClassId, *CachedJobs[Job->ClassId]->GetName(), *Job->GetName()); @@ -51,26 +51,26 @@ void UZMMOJobsSubsystem::LoadJobsFromAssetRegistry() } CachedJobs.Add(Job->ClassId, Job); - UE_LOG(LogZMMOJobs, Verbose, - TEXT("[ZMMOJobsSubsystem] Cached classId=%d name=%s display=%s"), + UE_LOG(LogZeusJobs, Verbose, + TEXT("[ZeusJobsSubsystem] Cached classId=%d name=%s display=%s"), Job->ClassId, *Job->TechnicalName, *Job->DisplayName.ToString()); } } -UZMMOJobDataAsset* UZMMOJobsSubsystem::GetJobData(int32 ClassId) const +UZeusJobDataAsset* UZeusJobsSubsystem::GetJobData(int32 ClassId) const { - if (const TObjectPtr* Found = CachedJobs.Find(ClassId)) + if (const TObjectPtr* Found = CachedJobs.Find(ClassId)) { return Found->Get(); } return nullptr; } -TArray UZMMOJobsSubsystem::GetJobsByTier(EZMMOJobTier Tier) const +TArray UZeusJobsSubsystem::GetJobsByTier(EZeusJobTier Tier) const { - TArray Out; + TArray Out; Out.Reserve(CachedJobs.Num()); - for (const TPair>& Pair : CachedJobs) + for (const TPair>& Pair : CachedJobs) { if (Pair.Value && Pair.Value->Tier == Tier) { @@ -80,11 +80,11 @@ TArray UZMMOJobsSubsystem::GetJobsByTier(EZMMOJobTier Tier) return Out; } -TArray UZMMOJobsSubsystem::GetEligibleNextJobs(int32 CurrentClassId) const +TArray UZeusJobsSubsystem::GetEligibleNextJobs(int32 CurrentClassId) const { - TArray Out; + TArray Out; Out.Reserve(4); // tipico: 2-6 destinos - for (const TPair>& Pair : CachedJobs) + for (const TPair>& Pair : CachedJobs) { if (Pair.Value && Pair.Value->ParentClassId == CurrentClassId && Pair.Value->ClassId != CurrentClassId) diff --git a/Source/ZMMOJobs/Public/ZMMOJobChangeNetworkHandler.h b/Source/ZeusJobs/Public/ZeusJobChangeNetworkHandler.h similarity index 83% rename from Source/ZMMOJobs/Public/ZMMOJobChangeNetworkHandler.h rename to Source/ZeusJobs/Public/ZeusJobChangeNetworkHandler.h index b2b9ea0..b2f1322 100644 --- a/Source/ZMMOJobs/Public/ZMMOJobChangeNetworkHandler.h +++ b/Source/ZeusJobs/Public/ZeusJobChangeNetworkHandler.h @@ -2,7 +2,7 @@ #include "CoreMinimal.h" #include "Subsystems/WorldSubsystem.h" -#include "ZMMOJobChangeNetworkHandler.generated.h" +#include "ZeusJobChangeNetworkHandler.generated.h" class UZeusNetworkSubsystem; @@ -19,21 +19,21 @@ class UZeusNetworkSubsystem; * - NewClassId : significativo apenas se bAccepted=true (redundante com * snapshot que vem junto, mas util pra triggers/toasts). */ -DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FZMMOOnJobChangeResultBP, +DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FZeusOnJobChangeResultBP, bool, bAccepted, int32, Reason, int32, NewClassId); /** * Bridge entre o `UZeusNetworkSubsystem` (do plugin ZeusNetwork) e a UI - * Blueprint (WBP de promocao). Mesmo pattern do `UZMMOAttributeNetworkHandler` + * Blueprint (WBP de promocao). Mesmo pattern do `UZeusAttributeNetworkHandler` * — converte o delegate C++-only `FZeusOnJobChangeResult` num dynamic - * multicast (`FZMMOOnJobChangeResultBP`) assignavel em BP. + * multicast (`FZeusOnJobChangeResultBP`) assignavel em BP. * * Por que UWorldSubsystem? Player so' faz promocao quando ja' esta no * WorldServer (com mundo carregado). No front-end / lobby, esse subsystem * nao existe — economiza memoria. */ UCLASS() -class ZMMOJOBS_API UZMMOJobChangeNetworkHandler : public UWorldSubsystem +class ZEUSJOBS_API UZeusJobChangeNetworkHandler : public UWorldSubsystem { GENERATED_BODY() @@ -44,7 +44,7 @@ public: /// Assignavel em BP: WBP_JobChangePanel.OnEvent_OnJobChangeResult. UPROPERTY(BlueprintAssignable, Category = "Zeus|Jobs") - FZMMOOnJobChangeResultBP OnJobChangeResult; + FZeusOnJobChangeResultBP OnJobChangeResult; private: void HandleJobChangeResult(bool bAccepted, int32 Reason, int32 NewClassId); diff --git a/Source/ZMMOJobs/Public/ZMMOJobDataAsset.h b/Source/ZeusJobs/Public/ZeusJobDataAsset.h similarity index 89% rename from Source/ZMMOJobs/Public/ZMMOJobDataAsset.h rename to Source/ZeusJobs/Public/ZeusJobDataAsset.h index 1c83c3f..c92967f 100644 --- a/Source/ZMMOJobs/Public/ZMMOJobDataAsset.h +++ b/Source/ZeusJobs/Public/ZeusJobDataAsset.h @@ -2,8 +2,8 @@ #include "CoreMinimal.h" #include "Engine/DataAsset.h" -#include "ZMMOJobTypes.h" -#include "ZMMOJobDataAsset.generated.h" +#include "ZeusJobTypes.h" +#include "ZeusJobDataAsset.generated.h" class UTexture2D; class USoundBase; @@ -25,13 +25,13 @@ class UAnimMontage; * quando o player spawna. */ UCLASS(BlueprintType) -class ZMMOJOBS_API UZMMOJobDataAsset : public UPrimaryDataAsset +class ZEUSJOBS_API UZeusJobDataAsset : public UPrimaryDataAsset { GENERATED_BODY() public: /// Chave estavel (bate com `Config/Jobs/.json:Id` no server e com - /// `FZMMOAttributesSnapshot::ClassId` recebido do server). + /// `FZeusAttributesSnapshot::ClassId` recebido do server). UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Zeus|Job") int32 ClassId = 0; @@ -48,7 +48,7 @@ public: /// Tier hierarquico — espelha `JobDef::tier` do server. UI usa pra agrupar /// jobs (ex: lista de Vocacoes possiveis quando promovendo Novato). UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Zeus|Job") - EZMMOJobTier Tier = EZMMOJobTier::Beginner; + EZeusJobTier Tier = EZeusJobTier::Beginner; /// ClassId do parent na arvore de promocao. 0 = sem parent (Novato eh root). /// Espelha `JobDef::parentJobId` do server. UI usa pra filtrar destinos @@ -60,7 +60,7 @@ public: /// do server (mas como TArray pra editor visual em vez de bitmask cru). /// Inventory UI usa pra hint "nao pode equipar" + filtro de catalogo. UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Zeus|Job") - TArray AllowedWeapons; + TArray AllowedWeapons; /// Icone do job — usado em StatusWindow, CharacterCard, JobChangeUI. /// Soft ptr: nao carrega ate alguem chamar LoadSynchronous() ou async load. @@ -84,10 +84,10 @@ public: TSoftObjectPtr LevelUpSoundCue; /// PrimaryAssetType pro AssetManager (precisa pra GetPrimaryAssetIdList). - /// Hardcoded "ZMMOJob" — registry classifica todos os DAs deste tipo. + /// Hardcoded "ZeusJob" — registry classifica todos os DAs deste tipo. virtual FPrimaryAssetId GetPrimaryAssetId() const override { - return FPrimaryAssetId(FPrimaryAssetType(TEXT("ZMMOJob")), + return FPrimaryAssetId(FPrimaryAssetType(TEXT("ZeusJob")), *FString::Printf(TEXT("Job_%d_%s"), ClassId, *TechnicalName)); } }; diff --git a/Source/ZMMOJobs/Public/ZMMOJobTypes.h b/Source/ZeusJobs/Public/ZeusJobTypes.h similarity index 95% rename from Source/ZMMOJobs/Public/ZMMOJobTypes.h rename to Source/ZeusJobs/Public/ZeusJobTypes.h index 771852c..1352586 100644 --- a/Source/ZMMOJobs/Public/ZMMOJobTypes.h +++ b/Source/ZeusJobs/Public/ZeusJobTypes.h @@ -1,7 +1,7 @@ #pragma once #include "CoreMinimal.h" -#include "ZMMOJobTypes.generated.h" +#include "ZeusJobTypes.generated.h" /** * Tier hierarquico de um job. Espelha `EJobTier` do server em @@ -14,7 +14,7 @@ * abrindo path paralelo RebornVocation → Mastery (coroa final). */ UENUM(BlueprintType) -enum class EZMMOJobTier : uint8 +enum class EZeusJobTier : uint8 { Beginner = 0 UMETA(DisplayName = "Iniciante"), Vocation = 1 UMETA(DisplayName = "Vocacao"), @@ -33,7 +33,7 @@ enum class EZMMOJobTier : uint8 * JobDef usa bit N = EWeaponType(N). */ UENUM(BlueprintType) -enum class EZMMOWeaponType : uint8 +enum class EZeusWeaponType : uint8 { Fist = 0 UMETA(DisplayName = "Punho"), Dagger = 1 UMETA(DisplayName = "Adaga"), diff --git a/Source/ZMMOJobs/Public/ZMMOJobsLibrary.h b/Source/ZeusJobs/Public/ZeusJobsLibrary.h similarity index 85% rename from Source/ZMMOJobs/Public/ZMMOJobsLibrary.h rename to Source/ZeusJobs/Public/ZeusJobsLibrary.h index 03cf59d..436c914 100644 --- a/Source/ZMMOJobs/Public/ZMMOJobsLibrary.h +++ b/Source/ZeusJobs/Public/ZeusJobsLibrary.h @@ -2,10 +2,10 @@ #include "CoreMinimal.h" #include "Kismet/BlueprintFunctionLibrary.h" -#include "ZMMOJobTypes.h" -#include "ZMMOJobsLibrary.generated.h" +#include "ZeusJobTypes.h" +#include "ZeusJobsLibrary.generated.h" -class UZMMOJobDataAsset; +class UZeusJobDataAsset; /** * Helpers Blueprint pra UI/HUD acessar dados de job sem precisar pegar o @@ -17,7 +17,7 @@ class UZMMOJobDataAsset; * - Image binding: `JobsLibrary::GetJobIcon(Self, ClassId).LoadSynchronous()` */ UCLASS() -class ZMMOJOBS_API UZMMOJobsLibrary : public UBlueprintFunctionLibrary +class ZEUSJOBS_API UZeusJobsLibrary : public UBlueprintFunctionLibrary { GENERATED_BODY() @@ -31,7 +31,7 @@ public: /// DataAsset completo (pode ser nullptr — caller checa). UFUNCTION(BlueprintPure, Category = "Zeus|Jobs", meta = (WorldContext = "WorldContextObject")) - static UZMMOJobDataAsset* GetJobData(const UObject* WorldContextObject, int32 ClassId); + static UZeusJobDataAsset* GetJobData(const UObject* WorldContextObject, int32 ClassId); /// Helper de UI: retorna true se ClassId tem DA registrado. UFUNCTION(BlueprintPure, Category = "Zeus|Jobs", @@ -41,15 +41,15 @@ public: /// Lista jobs num tier (UI dropdown). Vazio se subsystem indisponivel. UFUNCTION(BlueprintPure, Category = "Zeus|Jobs", meta = (WorldContext = "WorldContextObject")) - static TArray GetJobsByTier( - const UObject* WorldContextObject, EZMMOJobTier Tier); + static TArray GetJobsByTier( + const UObject* WorldContextObject, EZeusJobTier Tier); /// Destinos de promocao a partir do char atual. WBP de promocao consome /// direto. Vazio se nao houver filhos (ex: char ja' esta em Tier 3 /// Mastery — Jobs.4 introduzira terminal de progressao). UFUNCTION(BlueprintPure, Category = "Zeus|Jobs", meta = (WorldContext = "WorldContextObject")) - static TArray GetEligibleNextJobs( + static TArray GetEligibleNextJobs( const UObject* WorldContextObject, int32 CurrentClassId); /// Helper de send via ZeusNetworkSubsystem. Conveniencia pra WBP nao diff --git a/Source/ZMMOJobs/Public/ZMMOJobsModule.h b/Source/ZeusJobs/Public/ZeusJobsModule.h similarity index 75% rename from Source/ZMMOJobs/Public/ZMMOJobsModule.h rename to Source/ZeusJobs/Public/ZeusJobsModule.h index 89817bb..77839e2 100644 --- a/Source/ZMMOJobs/Public/ZMMOJobsModule.h +++ b/Source/ZeusJobs/Public/ZeusJobsModule.h @@ -8,14 +8,14 @@ * * Espelho de `Server/ZeusServerEngine/Game/MMO/Modules/JobsSystem/`. Roda * como modulo Runtime em LoadingPhase PreDefault para que o - * `UZMMOJobsSubsystem` esteja registrado antes do ZMMO core spawnar a HUD. + * `UZeusJobsSubsystem` esteja registrado antes do ZMMO core spawnar a HUD. * * Responsabilidades: * - Dados visuais por job: DisplayName localizado, JobIcon, anim override - * - Lookup classId → UZMMOJobDataAsset via Subsystem + * - Lookup classId → UZeusJobDataAsset via Subsystem * - Library Blueprint pra HUD/UI consumir */ -class FZMMOJobsModule : public IModuleInterface +class FZeusJobsModule : public IModuleInterface { public: virtual void StartupModule() override; diff --git a/Source/ZMMOJobs/Public/ZMMOJobsSubsystem.h b/Source/ZeusJobs/Public/ZeusJobsSubsystem.h similarity index 71% rename from Source/ZMMOJobs/Public/ZMMOJobsSubsystem.h rename to Source/ZeusJobs/Public/ZeusJobsSubsystem.h index c1c0ee6..b861077 100644 --- a/Source/ZMMOJobs/Public/ZMMOJobsSubsystem.h +++ b/Source/ZeusJobs/Public/ZeusJobsSubsystem.h @@ -2,30 +2,30 @@ #include "CoreMinimal.h" #include "Subsystems/GameInstanceSubsystem.h" -#include "ZMMOJobTypes.h" -#include "ZMMOJobsSubsystem.generated.h" +#include "ZeusJobTypes.h" +#include "ZeusJobsSubsystem.generated.h" -class UZMMOJobDataAsset; +class UZeusJobDataAsset; /** - * Cache central de UZMMOJobDataAsset por ClassId. Vive como GameInstance + * Cache central de UZeusJobDataAsset por ClassId. Vive como GameInstance * Subsystem — startup automatico quando GameInstance inicializa (PIE, * standalone, packaged). Sobrevive a map transitions. * * Initialize: - * 1. Carrega via AssetRegistry: scan de UZMMOJobDataAsset em todo Content - * 2. Cacheia em TMap por ClassId + * 1. Carrega via AssetRegistry: scan de UZeusJobDataAsset em todo Content + * 2. Cacheia em TMap por ClassId * 3. Log: quantos jobs encontrou * * Uso: - * - C++: GameInstance->GetSubsystem()->GetJobData(0) - * - BP: UZMMOJobsLibrary::GetJobData(WorldContext, 0) + * - C++: GameInstance->GetSubsystem()->GetJobData(0) + * - BP: UZeusJobsLibrary::GetJobData(WorldContext, 0) * - * Fase 7+ (Mod support): SCANEAR PrimaryAssetType="ZMMOJob" do AssetManager + * Fase 7+ (Mod support): SCANEAR PrimaryAssetType="ZeusJob" do AssetManager * permite mods adicionarem DAs proprios sem mexer no source. */ UCLASS() -class ZMMOJOBS_API UZMMOJobsSubsystem : public UGameInstanceSubsystem +class ZEUSJOBS_API UZeusJobsSubsystem : public UGameInstanceSubsystem { GENERATED_BODY() @@ -36,7 +36,7 @@ public: /// Lookup por classId. Retorna nullptr se ClassId nao tem DA correspondente /// (caller usa Library com fallback FText). UFUNCTION(BlueprintPure, Category = "Zeus|Jobs") - UZMMOJobDataAsset* GetJobData(int32 ClassId) const; + UZeusJobDataAsset* GetJobData(int32 ClassId) const; /// Total de jobs cacheados (diagnostico). UFUNCTION(BlueprintPure, Category = "Zeus|Jobs") @@ -46,7 +46,7 @@ public: /// "Vocacoes possiveis"). Ordem do retorno e' a do AssetRegistry scan /// — UI pode reordenar por ClassId/DisplayName se precisar. UFUNCTION(BlueprintPure, Category = "Zeus|Jobs") - TArray GetJobsByTier(EZMMOJobTier Tier) const; + TArray GetJobsByTier(EZeusJobTier Tier) const; /// Destinos de promocao validos a partir do `CurrentClassId`. Filtra /// pelos jobs que tem `ParentClassId == CurrentClassId`. WBP de @@ -56,7 +56,7 @@ public: /// e' do server — UI apenas LISTA opcoes possiveis pelo schema. Server /// reponde rejeicao via S_JOB_CHANGE_RESULT (Jobs::EJobChangeRejectReason). UFUNCTION(BlueprintPure, Category = "Zeus|Jobs") - TArray GetEligibleNextJobs(int32 CurrentClassId) const; + TArray GetEligibleNextJobs(int32 CurrentClassId) const; private: /// Scan AssetRegistry + popula CachedJobs. Sincronizo (V1) — chamado UMA @@ -65,5 +65,5 @@ private: void LoadJobsFromAssetRegistry(); UPROPERTY() - TMap> CachedJobs; + TMap> CachedJobs; }; diff --git a/Source/ZMMOJobs/ZMMOJobs.Build.cs b/Source/ZeusJobs/ZeusJobs.Build.cs similarity index 80% rename from Source/ZMMOJobs/ZMMOJobs.Build.cs rename to Source/ZeusJobs/ZeusJobs.Build.cs index 00a0924..a71e826 100644 --- a/Source/ZMMOJobs/ZMMOJobs.Build.cs +++ b/Source/ZeusJobs/ZeusJobs.Build.cs @@ -1,8 +1,8 @@ using UnrealBuildTool; -public class ZMMOJobs : ModuleRules +public class ZeusJobs : ModuleRules { - public ZMMOJobs(ReadOnlyTargetRules Target) : base(Target) + public ZeusJobs(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; @@ -21,7 +21,7 @@ public class ZMMOJobs : ModuleRules // Cliente roda em LoadingPhase PreDefault — Subsystem inicializa // ANTES de o ZMMO core criar a player character / HUD. // - // Sem dependencia em ZMMOAttributes: server envia classId no snapshot, + // Sem dependencia em ZeusAttributes: server envia classId no snapshot, // cliente faz lookup local. Mantem o peer-module pattern. } } diff --git a/Source/ZMMOJobs/module.json b/Source/ZeusJobs/module.json similarity index 73% rename from Source/ZMMOJobs/module.json rename to Source/ZeusJobs/module.json index 9afae77..9c7d068 100644 --- a/Source/ZMMOJobs/module.json +++ b/Source/ZeusJobs/module.json @@ -1,5 +1,5 @@ { - "name": "ZMMOJobs", + "name": "ZeusJobs", "gameType": "MMO", "version": "0.1.0", "side": "client", @@ -8,11 +8,11 @@ "modules": [] }, "publicHeaders": [ - "ZMMOJobsModule.h", - "ZMMOJobDataAsset.h", - "ZMMOJobsSubsystem.h", - "ZMMOJobsLibrary.h" + "ZeusJobsModule.h", + "ZeusJobDataAsset.h", + "ZeusJobsSubsystem.h", + "ZeusJobsLibrary.h" ], "loadingPhase": "PreDefault", - "description": "Sub-modulo cliente do GameType MMO — dados visuais/UI por job (DisplayName localizado, ícone, anim override, som de level up). Espelha JobsSystem do server mas focado em apresentacao. NAO depende de ZMMOAttributes — server envia classId no snapshot, cliente faz lookup local. Pattern peer-module estabelecido no PR #9." + "description": "Sub-modulo cliente do GameType MMO — dados visuais/UI por job (DisplayName localizado, ícone, anim override, som de level up). Espelha JobsSystem do server mas focado em apresentacao. NAO depende de ZeusAttributes — server envia classId no snapshot, cliente faz lookup local. Pattern peer-module estabelecido no PR #9." } diff --git a/ZMMO.uproject b/ZMMO.uproject index 4f68b16..b4dade9 100644 --- a/ZMMO.uproject +++ b/ZMMO.uproject @@ -10,12 +10,12 @@ "LoadingPhase": "Default" }, { - "Name": "ZMMOAttributes", + "Name": "ZeusAttributes", "Type": "Runtime", "LoadingPhase": "PreDefault" }, { - "Name": "ZMMOJobs", + "Name": "ZeusJobs", "Type": "Runtime", "LoadingPhase": "PreDefault" }