#pragma once #include #include #include #include #include "PalIndividual.hpp" // EPalElementType_ namespace PalUIExtension::Api::Pal { class PalUIStatusModel : public UnrealWrapper { public: static auto ClassPath() -> const TCHAR* { return STR("/Script/Pal.PalUIStatusModel"); } static auto DebugTag() -> const TCHAR* { return STR("PalUIStatusModel"); } PalUIStatusModel() = default; explicit PalUIStatusModel(UObject* Obj) : UnrealWrapper(Obj, ClassOf(), DebugTag()) {} // Count of pals currently loaded into the model -- "pal number". auto GetDisplayPalNum() -> std::optional { return CallForReturn(STR("GetDisplayPalNum")); } auto GetDisplayPalHandle(uint8 Index) -> UObject* { struct P { uint8 Index; UObject* ReturnValue; } p{ Index, nullptr }; auto Result = CallForReturn(STR("GetDisplayPalHandle"), p, &P::ReturnValue); return (Result && *Result) ? *Result : nullptr; } auto GetNowSelectedIndex() -> std::optional { return CallForReturn(STR("GetNowSelectedIndex")); } auto ChangeIndex(uint8 Index) -> bool { struct P { uint8 Index; } p{ Index }; return Call(STR("ChangeIndex"), p); } auto OnClickedPalIcon(int32 Index) -> bool { struct P { int32 Index; } p{ Index }; return Call(STR("OnClickedPalIcon"), p); } // ---- extended: mechanical Index -> stat getters ---------------- auto GetDisplayLevel(int32 Index) -> std::optional { struct P { int32 Index; int32 ReturnValue; } p{ Index, 0 }; return CallForReturn(STR("GetDisplayLevel"), p, &P::ReturnValue); } auto GetDisplaySpeed(int32 Index) -> std::optional { struct P { int32 Index; int32 ReturnValue; } p{ Index, 0 }; return CallForReturn(STR("GetDisplaySpeed"), p, &P::ReturnValue); } auto GetDisplayMeleeAttack(int32 Index) -> std::optional { struct P { int32 Index; int32 ReturnValue; } p{ Index, 0 }; return CallForReturn(STR("GetDisplayMeleeAttack"), p, &P::ReturnValue); } auto GetDisplayShotAttack(int32 Index) -> std::optional { struct P { int32 Index; int32 ReturnValue; } p{ Index, 0 }; return CallForReturn(STR("GetDisplayShotAttack"), p, &P::ReturnValue); } auto GetDisplayDefence(int32 Index) -> std::optional { struct P { int32 Index; int32 ReturnValue; } p{ Index, 0 }; return CallForReturn(STR("GetDisplayDefence"), p, &P::ReturnValue); } auto GetDisplayEatingHabits(int32 Index) -> std::optional { struct P { int32 Index; int32 ReturnValue; } p{ Index, 0 }; return CallForReturn(STR("GetDisplayEatingHabits"), p, &P::ReturnValue); } auto GetDisplayNowExp(int32 Index) -> std::optional { struct P { int32 Index; int32 ReturnValue; } p{ Index, 0 }; return CallForReturn(STR("GetDisplayNowExp"), p, &P::ReturnValue); } auto GetDisplayNextExp(int32 Index) -> std::optional { struct P { int32 Index; int32 ReturnValue; } p{ Index, 0 }; return CallForReturn(STR("GetDisplayNextExp"), p, &P::ReturnValue); } auto GetDisplayHunger(int32 Index) -> std::optional { struct P { int32 Index; float ReturnValue; } p{ Index, 0.f }; return CallForReturn(STR("GetDisplayHunger"), p, &P::ReturnValue); } auto GetDisplayMaxHunger(int32 Index) -> std::optional { struct P { int32 Index; float ReturnValue; } p{ Index, 0.f }; return CallForReturn(STR("GetDisplayMaxHunger"), p, &P::ReturnValue); } auto GetDisplayElementType1(int32 Index) -> std::optional { struct P { int32 Index; EPalElementType_ ReturnValue; } p{ Index, EPalElementType_::None }; return CallForReturn(STR("GetDisplayElementType1"), p, &P::ReturnValue); } auto GetDisplayElementType2(int32 Index) -> std::optional { struct P { int32 Index; EPalElementType_ ReturnValue; } p{ Index, EPalElementType_::None }; return CallForReturn(STR("GetDisplayElementType2"), p, &P::ReturnValue); } // Raw byte -- see class comment. Do not assume ordering/meaning. auto GetDisplayPhysicalHealthTypeRaw(int32 Index) -> std::optional { struct P { int32 Index; uint8 ReturnValue; } p{ Index, 0 }; return CallForReturn(STR("GetDisplayPhysicalHealthType"), p, &P::ReturnValue); } // ---- extended: FText / FString getters ------------------------- auto GetDisplayDefaultName(int32 Index) -> std::optional { struct P { int32 Index; FText ReturnValue; } p{ Index, {} }; return CallForReturn(STR("GetDisplayDefaultName"), p, &P::ReturnValue); } auto GetDisplayCoopActionName(int32 Index) -> std::optional { struct P { int32 Index; FText ReturnValue; } p{ Index, {} }; return CallForReturn(STR("GetDisplayCoopActionName"), p, &P::ReturnValue); } auto GetDisplayActiveSkillName(int32 Index, int32 SkillIndex) -> std::optional { struct P { int32 Index; int32 SkillIndex; FText ReturnValue; } p{ Index, SkillIndex, {} }; return CallForReturn(STR("GetDisplayActiveSkillName"), p, &P::ReturnValue); } auto GetDisplayNickName(int32 Index) -> std::optional { struct P { int32 Index; FString OutName; } p{ Index, {} }; if (!Call(STR("GetDisplayNickName"), p)) return std::nullopt; return p.OutName; } auto ChangeNickname(int32 Index, const TCHAR* NewNickName) -> bool { struct P { int32 Index; FString NewNickName; } p{ Index, FString(NewNickName) }; return Call(STR("ChangeNickname"), p); } }; }