Sub-módulo cliente do JobsSystem do server. Pavimenta dados visuais/UI por job (DisplayName localizado, ícone, anim override, som de level up) sem acoplar ao ZMMOAttributes. ARQUITETURA — espelha o peer-module pattern do server (PR #9): Server: Game/MMO/Modules/JobsSystem (módulo núcleo, LoadOrder=50) Client: Source/ZMMOJobs/ (LoadingPhase=PreDefault, peer de ZMMOAttributes) ZMMOAttributes NÃO depende de ZMMOJobs — server envia classId no snapshot, cliente faz lookup local via Library/Subsystem. NOVOS ARQUIVOS C++ module (Source/ZMMOJobs/): - module.json + ZMMOJobs.Build.cs (deps: Core/Engine/AssetRegistry) - ZMMOJobsModule.h/.cpp — IMPLEMENT_MODULE - ZMMOJobDataAsset.h/.cpp — UPrimaryDataAsset (BlueprintType) campos: ClassId, TechnicalName, DisplayName, JobIcon (soft), DefaultAnimInstanceClass, JobChangeMontage (soft), LevelUpSoundCue (soft) - ZMMOJobsSubsystem.h/.cpp — UGameInstanceSubsystem scan AssetRegistry no Initialize + cache TMap<int32, DA*> por ClassId O(1) GetJobData(ClassId) - ZMMOJobsLibrary.h/.cpp — UBlueprintFunctionLibrary GetJobDisplayName/GetJobData/IsJobRegistered fallback "Classe N" se ClassId desconhecido Content: - Content/ZMMO/Data/Jobs/DA_Job_Novice.uasset (ClassId=0, TechnicalName="Novice", DisplayName="Aprendiz") MODIFICADOS - ZMMO.uproject: + Module "ZMMOJobs" (LoadingPhase PreDefault) - Source/ZMMO/ZMMO.Build.cs: + "ZMMOJobs" em PublicDependencyModuleNames - Source/ZMMO/Game/UI/FrontEnd/UICharCard_Base.cpp:51 — primeiro consumer do Library: "Classe %d" hardcoded → UZMMOJobsLibrary::GetJobDisplayName(this, ClassId) Card da seleção de personagem agora mostra "Aprendiz" via DA lookup. BLUEPRINT ACCESS Toda a API exposta pra BP via UFUNCTION(BlueprintPure): - UZMMOJobsLibrary::GetJobDisplayName(Self, ClassId) → FText - UZMMOJobsLibrary::GetJobData(Self, ClassId) → UZMMOJobDataAsset* - UZMMOJobsSubsystem::GetJobData(ClassId) - UZMMOJobDataAsset propriedades BlueprintReadOnly (UMG binding direto) LOOKUP AssetRegistry varre /Game/ por UZMMOJobDataAsset no boot do GameInstance. Chave = campo ClassId do asset (não nome do arquivo — renomear .uasset OK). Lookup O(1) via TMap. Custo de scan amortizado em 1 vez por sessão (~50ms pra 50 jobs futuro). VALIDAÇÃO Editor: [Log] DA class found: <class 'ZMMOJobDataAsset'> [Log] Subsystem class found: <class 'ZMMOJobsSubsystem'> [Log] Library class found: <class 'ZMMOJobsLibrary'> [Log] AssetRegistry encontrou 1 ZMMOJobDataAsset(s): - DA_Job_Novice @ /Game/ZMMO/Data/Jobs/DA_Job_Novice Próximo módulo cliente: 1 linha no .uproject + .Build.cs + ZMMOJobs.Build.cs não muda. Pattern estabelecido. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
78 lines
1.2 KiB
Plaintext
78 lines
1.2 KiB
Plaintext
{
|
|
"FileVersion": 3,
|
|
"EngineAssociation": "5.7",
|
|
"Category": "",
|
|
"Description": "",
|
|
"Modules": [
|
|
{
|
|
"Name": "ZMMO",
|
|
"Type": "Runtime",
|
|
"LoadingPhase": "Default"
|
|
},
|
|
{
|
|
"Name": "ZMMOAttributes",
|
|
"Type": "Runtime",
|
|
"LoadingPhase": "PreDefault"
|
|
},
|
|
{
|
|
"Name": "ZMMOJobs",
|
|
"Type": "Runtime",
|
|
"LoadingPhase": "PreDefault"
|
|
}
|
|
],
|
|
"Plugins": [
|
|
{
|
|
"Name": "ModelingToolsEditorMode",
|
|
"Enabled": true
|
|
},
|
|
{
|
|
"Name": "StateTree",
|
|
"Enabled": true
|
|
},
|
|
{
|
|
"Name": "GameplayStateTree",
|
|
"Enabled": true
|
|
},
|
|
{
|
|
"Name": "VisualStudioTools",
|
|
"Enabled": true,
|
|
"SupportedTargetPlatforms": [
|
|
"Win64"
|
|
],
|
|
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/362651520df94e4fa65492dbcba44ae2"
|
|
},
|
|
{
|
|
"Name": "ZeusNetwork",
|
|
"Enabled": true
|
|
},
|
|
{
|
|
"Name": "ZeusMapTools",
|
|
"Enabled": true,
|
|
"TargetAllowList": [
|
|
"Editor"
|
|
]
|
|
},
|
|
{
|
|
"Name": "ZeusUMGForge",
|
|
"Enabled": true,
|
|
"TargetAllowList": [
|
|
"Editor"
|
|
]
|
|
},
|
|
{
|
|
"Name": "meshy",
|
|
"Enabled": false,
|
|
"SupportedTargetPlatforms": [
|
|
"Win64",
|
|
"Mac"
|
|
]
|
|
},
|
|
{
|
|
"Name": "CommonUI",
|
|
"Enabled": true
|
|
}
|
|
],
|
|
"AdditionalPluginDirectories": [
|
|
"../../Server/Plugins/Unreal"
|
|
]
|
|
} |