mirror of
https://github.com/swordbluesword/PalWorld-NetCrack.git
synced 2025-04-29 02:47:17 +09:00
commit
f8ac6e5053
@ -97,7 +97,7 @@ public:
|
|||||||
return Data[Index];
|
return Data[Index];
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int32 Num()
|
inline int32 Count()
|
||||||
{
|
{
|
||||||
return NumElements;
|
return NumElements;
|
||||||
}
|
}
|
||||||
|
@ -13923,7 +13923,9 @@ public:
|
|||||||
class ULevel : public UObject
|
class ULevel : public UObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
uint8 Pad_336A[0x90]; // Fixing Size After Last Property [ Dumper-7 ]
|
uint8 Pad_336A[0x70]; // Fixing Size After Last Property [ Dumper-7 ]
|
||||||
|
TArray<class AActor*> Actors; // 0x98
|
||||||
|
unsigned char kek_00A8[0x10]; // padding
|
||||||
class UWorld* OwningWorld; // 0xB8(0x8)(ZeroConstructor, Transient, NoDestructor, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
class UWorld* OwningWorld; // 0xB8(0x8)(ZeroConstructor, Transient, NoDestructor, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||||
class UModel* Model; // 0xC0(0x8)(ZeroConstructor, NoDestructor, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
class UModel* Model; // 0xC0(0x8)(ZeroConstructor, NoDestructor, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||||
TArray<class UModelComponent*> ModelComponents; // 0xC8(0x10)(ExportObject, ZeroConstructor, ContainsInstancedReference, UObjectWrapper, NativeAccessSpecifierPublic)
|
TArray<class UModelComponent*> ModelComponents; // 0xC8(0x10)(ExportObject, ZeroConstructor, ContainsInstancedReference, UObjectWrapper, NativeAccessSpecifierPublic)
|
||||||
|
131
config.cpp
131
config.cpp
@ -40,10 +40,25 @@ SDK::UWorld* config::GetUWorld()
|
|||||||
{
|
{
|
||||||
auto gworld = signature("48 8B 05 ? ? ? ? EB 05").instruction(3).add(7);
|
auto gworld = signature("48 8B 05 ? ? ? ? EB 05").instruction(3).add(7);
|
||||||
gworld_ptr = gworld.GetPointer();
|
gworld_ptr = gworld.GetPointer();
|
||||||
|
if (gworld_ptr)
|
||||||
|
Config.gWorld = *(SDK::UWorld**)gworld_ptr;
|
||||||
}
|
}
|
||||||
return (*(SDK::UWorld**)(gworld_ptr));
|
return (*(SDK::UWorld**)(gworld_ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDK::UPalCharacterImportanceManager* config::GetCharacterImpManager()
|
||||||
|
{
|
||||||
|
SDK::UWorld* pWorld = Config.gWorld;
|
||||||
|
if (!pWorld)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
SDK::UGameInstance* pGameInstance = pWorld->OwningGameInstance;
|
||||||
|
if (!pGameInstance)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
return static_cast<SDK::UPalGameInstance*>(pGameInstance)->CharacterImportanceManager;
|
||||||
|
}
|
||||||
|
|
||||||
SDK::APalPlayerCharacter* config::GetPalPlayerCharacter()
|
SDK::APalPlayerCharacter* config::GetPalPlayerCharacter()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -54,7 +69,123 @@ SDK::APalPlayerCharacter* config::GetPalPlayerCharacter()
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDK::APalPlayerState* config::GetPalPlayerState()
|
||||||
|
{
|
||||||
|
SDK::APalPlayerCharacter* pPlayer = GetPalPlayerCharacter();
|
||||||
|
if (!pPlayer)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
return static_cast<SDK::APalPlayerState*>(pPlayer->PlayerState);
|
||||||
|
}
|
||||||
|
|
||||||
|
SDK::UPalPlayerInventoryData* config::GetInventoryComponent()
|
||||||
|
{
|
||||||
|
SDK::APalPlayerState* pPlayerState = GetPalPlayerState();
|
||||||
|
if (!pPlayerState)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
return pPlayerState->InventoryData;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDK::APalWeaponBase* config::GetPlayerEquippedWeapon()
|
||||||
|
{
|
||||||
|
SDK::APalPlayerCharacter* pPalCharacter = GetPalPlayerCharacter();
|
||||||
|
if (!pPalCharacter)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
SDK::UPalShooterComponent* pWeaponInventory = pPalCharacter->ShooterComponent;
|
||||||
|
if (!pWeaponInventory)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
return pWeaponInventory->HasWeapon;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool config::GetTAllPlayers(SDK::TArray<class SDK::APalCharacter*>* outResult)
|
||||||
|
{
|
||||||
|
SDK::UPalCharacterImportanceManager* mPal = GetCharacterImpManager();
|
||||||
|
if (!mPal)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
mPal->GetAllPlayer(outResult);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool config::GetTAllImpNPC(SDK::TArray<class SDK::APalCharacter*>* outResult)
|
||||||
|
{
|
||||||
|
SDK::UPalCharacterImportanceManager* mPal = GetCharacterImpManager();
|
||||||
|
if (!mPal)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
mPal->GetImportantNPC(outResult);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool config::GetTAllNPC(SDK::TArray<class SDK::APalCharacter*>* outResult)
|
||||||
|
{
|
||||||
|
SDK::UPalCharacterImportanceManager* mPal = GetCharacterImpManager();
|
||||||
|
if (!mPal)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
mPal->GetAllNPC(outResult);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool config::GetTAllPals(SDK::TArray<class SDK::APalCharacter*>* outResult)
|
||||||
|
{
|
||||||
|
SDK::UPalCharacterImportanceManager* mPal = GetCharacterImpManager();
|
||||||
|
if (!mPal)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
mPal->GetAllPalCharacter(outResult);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool config::GetAllActorsofType(SDK::UClass* mType, std::vector<SDK::AActor*>* outArray, bool bLoopAllLevels, bool bSkipLocalPlayer)
|
||||||
|
{
|
||||||
|
SDK::UWorld* pWorld = Config.gWorld;
|
||||||
|
if (!pWorld)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
SDK::AActor* pLocalPlayer = static_cast<SDK::AActor*>(GetPalPlayerCharacter());
|
||||||
|
std::vector<SDK::AActor*> result;
|
||||||
|
|
||||||
|
// Get Levels
|
||||||
|
SDK::TArray<SDK::ULevel*> pLevelsArray = pWorld->Levels;
|
||||||
|
__int32 levelsCount = pLevelsArray.Count();
|
||||||
|
|
||||||
|
// Loop Levels Array
|
||||||
|
for (int i = 0; i < levelsCount; i++)
|
||||||
|
{
|
||||||
|
if (!pLevelsArray.IsValidIndex(i))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
SDK::TArray<SDK::AActor*> pActorsArray = pLevelsArray[i]->Actors;
|
||||||
|
__int32 actorsCount = pActorsArray.Count();
|
||||||
|
|
||||||
|
// Loop Actor Array
|
||||||
|
for (int j = 0; j < actorsCount; j++)
|
||||||
|
{
|
||||||
|
if (!pActorsArray.IsValidIndex(j))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
SDK::AActor* pActor = pActorsArray[j];
|
||||||
|
if (!pActor || !pActor->RootComponent || (pActor == pLocalPlayer && bSkipLocalPlayer))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!pActor->IsA(mType))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
result.push_back(pActor);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bLoopAllLevels)
|
||||||
|
continue;
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*outArray = result;
|
||||||
|
return result.size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
void config::Init()
|
void config::Init()
|
||||||
{
|
{
|
||||||
|
13
config.h
13
config.h
@ -29,6 +29,9 @@ public:
|
|||||||
bool IsQuick = false;
|
bool IsQuick = false;
|
||||||
bool matchDbItems = true;
|
bool matchDbItems = true;
|
||||||
bool isEq = false;
|
bool isEq = false;
|
||||||
|
bool isDebugESP = false;
|
||||||
|
float mDebugESPDistance = 5.0f;
|
||||||
|
|
||||||
//def and value
|
//def and value
|
||||||
float SpeedModiflers = 1.0f;
|
float SpeedModiflers = 1.0f;
|
||||||
int DamageUp = 0;
|
int DamageUp = 0;
|
||||||
@ -39,6 +42,7 @@ public:
|
|||||||
char ItemName[255];
|
char ItemName[255];
|
||||||
char inputTextBuffer[255] = "";
|
char inputTextBuffer[255] = "";
|
||||||
int EqModifiler = 1;
|
int EqModifiler = 1;
|
||||||
|
SDK::UWorld* gWorld = nullptr;
|
||||||
SDK::APalPlayerCharacter* localPlayer = NULL;
|
SDK::APalPlayerCharacter* localPlayer = NULL;
|
||||||
SDK::TArray<SDK::APalPlayerCharacter*> AllPlayers = {};
|
SDK::TArray<SDK::APalPlayerCharacter*> AllPlayers = {};
|
||||||
SDK::UPalCharacterImportanceManager* UCIM = NULL;
|
SDK::UPalCharacterImportanceManager* UCIM = NULL;
|
||||||
@ -60,8 +64,17 @@ public:
|
|||||||
|
|
||||||
//static function
|
//static function
|
||||||
static SDK::UWorld* GetUWorld();
|
static SDK::UWorld* GetUWorld();
|
||||||
|
static SDK::UPalCharacterImportanceManager* GetCharacterImpManager();
|
||||||
static SDK::APalPlayerCharacter* GetPalPlayerCharacter();
|
static SDK::APalPlayerCharacter* GetPalPlayerCharacter();
|
||||||
|
static SDK::APalPlayerState* GetPalPlayerState();
|
||||||
|
static SDK::UPalPlayerInventoryData* GetInventoryComponent();
|
||||||
|
static SDK::APalWeaponBase* GetPlayerEquippedWeapon();
|
||||||
static SDK::TArray<SDK::APalPlayerCharacter*> GetTAllPlayers();
|
static SDK::TArray<SDK::APalPlayerCharacter*> GetTAllPlayers();
|
||||||
|
static bool GetTAllPlayers(SDK::TArray<class SDK::APalCharacter*>* outResult);
|
||||||
|
static bool GetTAllImpNPC(SDK::TArray<class SDK::APalCharacter*>* outResult);
|
||||||
|
static bool GetTAllNPC(SDK::TArray<class SDK::APalCharacter*>* outResult);
|
||||||
|
static bool GetTAllPals(SDK::TArray<class SDK::APalCharacter*>* outResult);
|
||||||
|
static bool GetAllActorsofType(SDK::UClass* mType, std::vector<SDK::AActor*>* outArray, bool bLoopAllLevels = false , bool bSkipLocalPlayer = false);
|
||||||
static void Init();
|
static void Init();
|
||||||
static void Update(const char* filterText);
|
static void Update(const char* filterText);
|
||||||
static const std::vector<std::string>& GetFilteredItems();
|
static const std::vector<std::string>& GetFilteredItems();
|
||||||
|
223
feature.cpp
223
feature.cpp
@ -1,37 +1,82 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "feature.h"
|
#include "feature.h"
|
||||||
|
using namespace SDK;
|
||||||
|
|
||||||
void ESP()
|
void ESP()
|
||||||
{
|
{
|
||||||
if (Config.GetPalPlayerCharacter() != NULL)
|
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
|
||||||
{
|
if (!pPalCharacter)
|
||||||
if (Config.GetPalPlayerCharacter()->ShooterComponent != NULL)
|
return;
|
||||||
{
|
|
||||||
if(Config.GetPalPlayerCharacter()->ShooterComponent->GetHasWeapon() != NULL)
|
UPalShooterComponent* pShootComponent = pPalCharacter->ShooterComponent;
|
||||||
{
|
if (!pShootComponent)
|
||||||
DrawUActorComponent(Config.GetPalPlayerCharacter()->ShooterComponent->GetHasWeapon()->InstanceComponents, ImColor(128, 0, 0));
|
return;
|
||||||
}
|
|
||||||
}
|
APalWeaponBase* pWeapon = pShootComponent->HasWeapon;
|
||||||
if (Config.UCIM != NULL)
|
if (pWeapon)
|
||||||
{
|
DrawUActorComponent(pWeapon->InstanceComponents, ImColor(128, 0, 0));
|
||||||
SDK::TArray<SDK::APalCharacter*> T = {};
|
|
||||||
|
if (!Config.UCIM)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TArray<SDK::APalCharacter*> T = {};
|
||||||
Config.UCIM->GetAllPalCharacter(&T);
|
Config.UCIM->GetAllPalCharacter(&T);
|
||||||
if (T.IsValid())
|
if (!T.IsValid())
|
||||||
{
|
return;
|
||||||
for (int i = 0; i < T.Num(); i++)
|
|
||||||
{
|
for (int i = 0; i < T.Count(); i++)
|
||||||
ImGui::GetBackgroundDrawList()->AddText(nullptr, 16, ImVec2(10, 10 + (i * 30)), ImColor(128,0,0), T[i]->GetFullName().c_str());
|
ImGui::GetBackgroundDrawList()->AddText(nullptr, 16, ImVec2(10, 10 + (i * 30)), ImColor(128,0,0), T[i]->GetFullName().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ESP_DEBUG(float mDist, ImVec4 color, UClass* mEntType)
|
||||||
|
{
|
||||||
|
APalPlayerCharacter* pLocalPlayer = Config.GetPalPlayerCharacter();
|
||||||
|
if (!pLocalPlayer)
|
||||||
|
return;
|
||||||
|
|
||||||
|
APalPlayerController* pPlayerController = static_cast<APalPlayerController*>(pLocalPlayer->Controller);
|
||||||
|
if (!pPlayerController)
|
||||||
|
return;
|
||||||
|
|
||||||
|
std::vector<AActor*> actors;
|
||||||
|
if (!config::GetAllActorsofType(mEntType, &actors, true))
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto draw = ImGui::GetWindowDrawList();
|
||||||
|
|
||||||
|
__int32 actorsCount = actors.size();
|
||||||
|
for (AActor* actor : actors)
|
||||||
|
{
|
||||||
|
FVector actorLocation = actor->K2_GetActorLocation();
|
||||||
|
FVector localPlayerLocation = pLocalPlayer->K2_GetActorLocation();
|
||||||
|
float distantTo = pLocalPlayer->GetDistanceTo(actor);
|
||||||
|
if (distantTo > mDist)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
FVector2D outScreen;
|
||||||
|
if (!pPlayerController->ProjectWorldLocationToScreen(actorLocation, &outScreen, true))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
char data[0x256];
|
||||||
|
const char* StringData = "OBJECT: [%s]\nCLASS: [%s]\nINDEX: [%d]\nPOSITION: { %0.0f, %0.0f, %0.0f }\nDISTANCE: [%.0fm]";
|
||||||
|
if (distantTo >= 1000.f)
|
||||||
|
{
|
||||||
|
distantTo /= 1000.f;
|
||||||
|
StringData = "OBJECT: [%s]\nCLASS: [%s]\nINDEX: [%d]\nPOSITION: { %0.0f, %0.0f, %0.0f }\nDISTANCE: [%.0fkm]";
|
||||||
|
}
|
||||||
|
sprintf_s(data, StringData, actor->GetName().c_str(), actor->Class->GetFullName().c_str(), actorLocation.X, actorLocation.Y, actorLocation.Z, distantTo);
|
||||||
|
|
||||||
|
ImVec2 screen = ImVec2(static_cast<float>(outScreen.X), static_cast<float>(outScreen.Y));
|
||||||
|
draw->AddText(screen, ImColor(color), data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
void DrawUActorComponent(SDK::TArray<SDK::UActorComponent*> Comps,ImColor color)
|
void DrawUActorComponent(SDK::TArray<SDK::UActorComponent*> Comps,ImColor color)
|
||||||
{
|
{
|
||||||
ImGui::GetBackgroundDrawList()->AddText(nullptr, 16, ImVec2(ImGui::GetIO().DisplaySize.x / 2, ImGui::GetIO().DisplaySize.y / 2), color, "Drawing...");
|
ImGui::GetBackgroundDrawList()->AddText(nullptr, 16, ImVec2(ImGui::GetIO().DisplaySize.x / 2, ImGui::GetIO().DisplaySize.y / 2), color, "Drawing...");
|
||||||
if (Comps.IsValid())
|
if (Comps.IsValid())
|
||||||
{
|
{
|
||||||
for (int i = 0; i < Comps.Num(); i++)
|
for (int i = 0; i < Comps.Count(); i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Comps[i] != NULL)
|
if (Comps[i] != NULL)
|
||||||
@ -112,3 +157,143 @@ void UnlockAllEffigies() {
|
|||||||
((SDK::APalPlayerState*)pPalCharacter->PlayerState)->RequestObtainLevelObject_ToServer(relic);
|
((SDK::APalPlayerState*)pPalCharacter->PlayerState)->RequestObtainLevelObject_ToServer(relic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ResetStamina()
|
||||||
|
{
|
||||||
|
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
|
||||||
|
if (!pPalCharacter)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalCharacterParameterComponent* pParams = pPalCharacter->CharacterParameterComponent;
|
||||||
|
if (!pParams)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pParams->ResetSP();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetInfiniteAmmo(bool bInfAmmo)
|
||||||
|
{
|
||||||
|
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
|
||||||
|
if (!pPalCharacter)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalShooterComponent* pShootComponent = pPalCharacter->ShooterComponent;
|
||||||
|
if (!pShootComponent)
|
||||||
|
return;
|
||||||
|
|
||||||
|
APalWeaponBase* pWeapon = pShootComponent->HasWeapon;
|
||||||
|
if (pWeapon)
|
||||||
|
pWeapon->IsRequiredBullet = bInfAmmo ? false : true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetCraftingSpeed(float mNewSpeed, bool bRestoreDefault)
|
||||||
|
{
|
||||||
|
APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
|
||||||
|
if (!pPalCharacter)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalCharacterParameterComponent* pParams = pPalCharacter->CharacterParameterComponent;
|
||||||
|
if (!pParams)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalIndividualCharacterParameter* ivParams = pParams->IndividualParameter;
|
||||||
|
if (!ivParams)
|
||||||
|
return;
|
||||||
|
|
||||||
|
FPalIndividualCharacterSaveParameter sParams = ivParams->SaveParameter;
|
||||||
|
TArray<FFloatContainer_FloatPair> mCraftSpeedArray = sParams.CraftSpeedRates.Values;
|
||||||
|
|
||||||
|
if (mCraftSpeedArray.Count() > 0)
|
||||||
|
mCraftSpeedArray[0].Value = bRestoreDefault ? 1.0f : mNewSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTechPoints(__int32 mPoints)
|
||||||
|
{
|
||||||
|
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
|
||||||
|
if (!mPlayerState)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
|
||||||
|
if (!pTechData)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pTechData->TechnologyPoint += mPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddAncientTechPoints(__int32 mPoints)
|
||||||
|
{
|
||||||
|
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
|
||||||
|
if (!mPlayerState)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
|
||||||
|
if (!pTechData)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pTechData->bossTechnologyPoint += mPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RemoveTechPoints(__int32 mPoints)
|
||||||
|
{
|
||||||
|
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
|
||||||
|
if (!mPlayerState)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
|
||||||
|
if (!pTechData)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pTechData->TechnologyPoint -= mPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RemoveAncientTechPoint(__int32 mPoints)
|
||||||
|
{
|
||||||
|
APalPlayerState* mPlayerState = Config.GetPalPlayerState();
|
||||||
|
if (!mPlayerState)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalTechnologyData* pTechData = mPlayerState->TechnologyData;
|
||||||
|
if (!pTechData)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pTechData->bossTechnologyPoint -= mPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Credit: BennettStaley
|
||||||
|
void AddToInventoryContainer(__int32 mCount, __int32 mIndex)
|
||||||
|
{
|
||||||
|
APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
|
||||||
|
if (!p_appc != NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
APalPlayerController* p_apc = static_cast<APalPlayerController*>(p_appc->Controller);
|
||||||
|
if (!p_apc)
|
||||||
|
return;
|
||||||
|
|
||||||
|
APalPlayerState* p_apps = static_cast<SDK::APalPlayerState*>(p_apc->PlayerState);
|
||||||
|
if (!p_apps)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalPlayerInventoryData* InventoryData = p_apps->GetInventoryData();
|
||||||
|
if (!InventoryData)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalItemContainerMultiHelper* InventoryMultiHelper = InventoryData->InventoryMultiHelper;
|
||||||
|
if (!InventoryMultiHelper)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TArray<class SDK::UPalItemContainer*> Containers = InventoryMultiHelper->Containers;
|
||||||
|
if (Containers.Count() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UPalItemSlot* pSelectedSlot = Containers[0]->Get(mIndex);
|
||||||
|
|
||||||
|
if (!pSelectedSlot != NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
FPalItemId FirstItemId = pSelectedSlot->GetItemId();
|
||||||
|
__int32 StackCount = pSelectedSlot->GetStackCount();
|
||||||
|
__int32 mNewCount = StackCount += mCount;
|
||||||
|
InventoryData->RequestAddItem(FirstItemId.StaticId, mNewCount, true);
|
||||||
|
}
|
17
feature.h
17
feature.h
@ -5,9 +5,26 @@
|
|||||||
|
|
||||||
void ESP();
|
void ESP();
|
||||||
|
|
||||||
|
void ESP_DEBUG(double mDist, SDK::UClass* mEntType = SDK::AActor::StaticClass());
|
||||||
|
|
||||||
void DrawUActorComponent(SDK::TArray<SDK::UActorComponent*> Comps, ImColor color);
|
void DrawUActorComponent(SDK::TArray<SDK::UActorComponent*> Comps, ImColor color);
|
||||||
|
|
||||||
void UnlockAllEffigies();
|
void UnlockAllEffigies();
|
||||||
|
|
||||||
void AddToInventoryContainer(__int32 mCount, __int32 mIndex = 0);
|
void AddToInventoryContainer(__int32 mCount, __int32 mIndex = 0);
|
||||||
|
|
||||||
|
void ResetStamina();
|
||||||
|
|
||||||
|
void SetInfiniteAmmo(bool bInfAmmo);
|
||||||
|
|
||||||
|
void SetCraftingSpeed(float mNewSpeed, bool bRestoreDefault = false);
|
||||||
|
|
||||||
|
void AddTechPoints(__int32 mPoints);
|
||||||
|
|
||||||
|
void AddAncientTechPoints(__int32 mPoints);
|
||||||
|
|
||||||
|
void RemoveTechPoints(__int32 mPoints);
|
||||||
|
|
||||||
|
void RemoveAncientTechPoint(__int32 mPoints);
|
||||||
|
|
||||||
|
void AddToInventoryContainer(__int32 mCount, __int32 mIndex = 0);
|
13
src/Menu.cpp
13
src/Menu.cpp
@ -10,7 +10,7 @@ void DetourEqui(SDK::UPalNetworkIndividualComponent* p_this, SDK::FPalInstanceID
|
|||||||
{
|
{
|
||||||
if(AddStatusPointArray->IsValid())
|
if(AddStatusPointArray->IsValid())
|
||||||
{
|
{
|
||||||
for (int i = 0; i < AddStatusPointArray->Num(); i++)
|
for (int i = 0; i < AddStatusPointArray->Count(); i++)
|
||||||
{
|
{
|
||||||
(*AddStatusPointArray)[i].StatusPoint = -1 * Config.EqModifiler;
|
(*AddStatusPointArray)[i].StatusPoint = -1 * Config.EqModifiler;
|
||||||
}
|
}
|
||||||
@ -271,11 +271,6 @@ namespace DX11_Base {
|
|||||||
// this does not work lol
|
// this does not work lol
|
||||||
// std::stringstream AddItemsString;
|
// std::stringstream AddItemsString;
|
||||||
// AddItemsString << "Give " << Config.AddItemCount << " items from slot" << Config.AddItemSlot;
|
// AddItemsString << "Give " << Config.AddItemCount << " items from slot" << Config.AddItemSlot;
|
||||||
if (ImGui::Button("Give items from slot", ImVec2(ImGui::GetWindowContentRegionMax().x - 3, 20)))
|
|
||||||
{
|
|
||||||
AddToInventoryContainer(Config.AddItemCount, Config.AddItemSlot);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Button("Unlock All Effigies", ImVec2(ImGui::GetWindowContentRegionMax().x - 3, 20)))
|
if (ImGui::Button("Unlock All Effigies", ImVec2(ImGui::GetWindowContentRegionMax().x - 3, 20)))
|
||||||
{
|
{
|
||||||
UnlockAllEffigies();
|
UnlockAllEffigies();
|
||||||
@ -469,10 +464,11 @@ namespace DX11_Base {
|
|||||||
|
|
||||||
if (g_GameVariables->m_ShowDemo)
|
if (g_GameVariables->m_ShowDemo)
|
||||||
ImGui::ShowDemoWindow();
|
ImGui::ShowDemoWindow();
|
||||||
|
|
||||||
|
if (Config.isDebugESP)
|
||||||
|
ESP_DEBUG(Config.mDebugESPDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Menu::MainMenu()
|
void Menu::MainMenu()
|
||||||
{
|
{
|
||||||
if (!g_GameVariables->m_ShowDemo)
|
if (!g_GameVariables->m_ShowDemo)
|
||||||
@ -535,7 +531,6 @@ namespace DX11_Base {
|
|||||||
|
|
||||||
void Menu::HUD(bool* p_open)
|
void Menu::HUD(bool* p_open)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::Loops()
|
void Menu::Loops()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user