feat(jobs): Jobs.1 client UI infra (handler + library + tecla J) + UI tweaks
Infraestrutura cliente da promocao de classe (Jobs.1). WBP_JobChangePanel NAO esta neste commit — foi exploracao descartada (criar UI dinamica de botoes via MCP BP graph esbarrou em limites do CreateWidget node). A fundacao C++ fica pronta pra ser usada quando voltarmos pra UI. INFRA C++ NOVA (Source/ZMMOJobs/) * UZMMOJobChangeNetworkHandler (WorldSubsystem novo) — bind no OnJobChangeResult do plugin e re-broadcast via FZMMOOnJobChangeResultBP (dynamic multicast assignavel em BP). WBP futura escuta direto. * UZMMOJobsSubsystem helpers: GetJobsByTier(EZMMOJobTier) + GetEligibleNextJobs(currentClassId) — filtra por ParentClassId. Pure. * UZMMOJobsLibrary BPFL wrappers + SendJobChangeRequest convenience (delega pro UZeusNetworkSubsystem). Dep ZeusNetwork adicionada no Build.cs. ENUM + INPUT * EZMMOInGameUIState ganha JobChangePanel (entre StatusWindow e Inventory). DA_InGameScreenSet pendente de receber entry quando WBP for criada (tecla J vai falhar silenciosamente ate la). * ZMMOPlayerController: tecla J -> ToggleJobChangePanel -> Flow->ToggleScreen(JobChangePanel). Espelha pattern do Alt+A do StatusWindow (InputComponent legacy BindKey + FInputChord). UI TWEAKS * WBP_StatusWindow + DT_UI_Styles: ajustes visuais no Editor durante a sessao (sem mudanca funcional documentavel — provavelmente fontes/ spacing/cores). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "Engine/World.h"
|
||||
#include "ZMMOJobDataAsset.h"
|
||||
#include "ZMMOJobsSubsystem.h"
|
||||
#include "ZeusNetworkSubsystem.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -52,3 +53,37 @@ bool UZMMOJobsLibrary::IsJobRegistered(const UObject* WorldContextObject, int32
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
TArray<UZMMOJobDataAsset*> UZMMOJobsLibrary::GetJobsByTier(
|
||||
const UObject* WorldContextObject, EZMMOJobTier Tier)
|
||||
{
|
||||
if (UZMMOJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject))
|
||||
{
|
||||
return Sub->GetJobsByTier(Tier);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
TArray<UZMMOJobDataAsset*> UZMMOJobsLibrary::GetEligibleNextJobs(
|
||||
const UObject* WorldContextObject, int32 CurrentClassId)
|
||||
{
|
||||
if (UZMMOJobsSubsystem* Sub = ResolveSubsystem(WorldContextObject))
|
||||
{
|
||||
return Sub->GetEligibleNextJobs(CurrentClassId);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
void UZMMOJobsLibrary::SendJobChangeRequest(
|
||||
const UObject* WorldContextObject, int32 TargetClassId)
|
||||
{
|
||||
if (WorldContextObject == nullptr) { return; }
|
||||
const UWorld* World = WorldContextObject->GetWorld();
|
||||
if (World == nullptr) { return; }
|
||||
UGameInstance* GI = World->GetGameInstance();
|
||||
if (GI == nullptr) { return; }
|
||||
if (UZeusNetworkSubsystem* Net = GI->GetSubsystem<UZeusNetworkSubsystem>())
|
||||
{
|
||||
Net->SendJobChangeRequest(TargetClassId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user