mirror of
https://github.com/swordbluesword/PalWorld-NetCrack.git
synced 2025-04-29 19:07:15 +09:00
reworked features
This commit is contained in:
parent
6b548a4756
commit
95f0186c75
2
config.h
2
config.h
@ -43,6 +43,8 @@ public:
|
|||||||
SDK::TArray<SDK::APalPlayerCharacter*> AllPlayers = {};
|
SDK::TArray<SDK::APalPlayerCharacter*> AllPlayers = {};
|
||||||
SDK::UPalCharacterImportanceManager* UCIM = NULL;
|
SDK::UPalCharacterImportanceManager* UCIM = NULL;
|
||||||
SDK::UObject* WorldContextObject = NULL;
|
SDK::UObject* WorldContextObject = NULL;
|
||||||
|
int AddItemSlot = 0;
|
||||||
|
int AddItemCount = 2;
|
||||||
|
|
||||||
enum QuickItemSet
|
enum QuickItemSet
|
||||||
{
|
{
|
||||||
|
71
feature.cpp
71
feature.cpp
@ -41,5 +41,74 @@ void DrawUActorComponent(SDK::TArray<SDK::UActorComponent*> Comps,ImColor color)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AddToInventoryContainer(__int32 mCount, __int32 mIndex)
|
||||||
|
{
|
||||||
|
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
|
||||||
|
if (!p_appc != NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SDK::APalPlayerController* p_apc = static_cast<SDK::APalPlayerController*>(p_appc->Controller);
|
||||||
|
if (!p_apc)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SDK::APalPlayerState* p_apps = static_cast<SDK::APalPlayerState*>(p_apc->PlayerState);
|
||||||
|
if (!p_apps)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SDK::UPalPlayerInventoryData* InventoryData = p_apps->GetInventoryData();
|
||||||
|
if (!InventoryData)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SDK::UPalItemContainerMultiHelper* InventoryMultiHelper = InventoryData->InventoryMultiHelper;
|
||||||
|
if (!InventoryMultiHelper)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SDK::TArray<class SDK::UPalItemContainer*> Containers = InventoryMultiHelper->Containers;
|
||||||
|
if (Containers.Num() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SDK::UPalItemSlot* pSelectedSlot = Containers[0]->Get(mIndex);
|
||||||
|
|
||||||
|
if (!pSelectedSlot != NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SDK::FPalItemId FirstItemId = pSelectedSlot->GetItemId();
|
||||||
|
int32 StackCount = pSelectedSlot->GetStackCount();
|
||||||
|
__int32 mNewCount = StackCount += mCount;
|
||||||
|
InventoryData->RequestAddItem(FirstItemId.StaticId, mNewCount, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void UnlockAllEffigies() {
|
||||||
|
SDK::APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
|
||||||
|
if (!pPalCharacter)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SDK::UWorld* world = Config.GetUWorld();
|
||||||
|
if (!world)
|
||||||
|
return;
|
||||||
|
|
||||||
|
SDK::TUObjectArray* objects = world->GObjects;
|
||||||
|
|
||||||
|
for (int i = 0; i < objects->NumElements; ++i) {
|
||||||
|
SDK::UObject* object = objects->GetByIndex(i);
|
||||||
|
|
||||||
|
if (!object) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!object->IsA(SDK::APalLevelObjectRelic::StaticClass())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDK::APalLevelObjectObtainable* relic = (SDK::APalLevelObjectObtainable*)object;
|
||||||
|
if (!relic) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
((SDK::APalPlayerState*)pPalCharacter->PlayerState)->RequestObtainLevelObject_ToServer(relic);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,5 +7,7 @@ void ESP();
|
|||||||
|
|
||||||
void DrawUActorComponent(SDK::TArray<SDK::UActorComponent*> Comps,ImColor color);
|
void DrawUActorComponent(SDK::TArray<SDK::UActorComponent*> Comps,ImColor color);
|
||||||
|
|
||||||
void DrawPosition();
|
void UnlockAllEffigies();
|
||||||
|
|
||||||
|
void AddToInventoryContainer(__int32 mCount, __int32 mIndex = 0);
|
||||||
|
|
||||||
|
69
src/Menu.cpp
69
src/Menu.cpp
@ -265,69 +265,20 @@ namespace DX11_Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::Button("Give x2 first item", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
|
ImGui::InputInt("Slot to modify (start 0):", &Config.AddItemSlot);
|
||||||
|
ImGui::InputInt("Multiple of how much:", &Config.AddItemCount);
|
||||||
|
|
||||||
|
// this does not work lol
|
||||||
|
// std::stringstream AddItemsString;
|
||||||
|
// AddItemsString << "Give " << Config.AddItemCount << " items from slot" << Config.AddItemSlot;
|
||||||
|
if (ImGui::Button("Give items from slot", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
|
||||||
{
|
{
|
||||||
SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter();
|
AddToInventoryContainer(Config.AddItemCount, Config.AddItemSlot);
|
||||||
if (p_appc != NULL)
|
|
||||||
{
|
|
||||||
if (Config.GetPalPlayerCharacter()->GetPalPlayerController() != NULL)
|
|
||||||
{
|
|
||||||
if (Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState() != NULL)
|
|
||||||
{
|
|
||||||
SDK::UPalPlayerInventoryData* InventoryData = Config.GetPalPlayerCharacter()->GetPalPlayerController()->GetPalPlayerState()->GetInventoryData();
|
|
||||||
if (InventoryData != NULL) {
|
|
||||||
SDK::UPalItemContainerMultiHelper* InventoryMultiHelper = InventoryData->InventoryMultiHelper;
|
|
||||||
if (InventoryMultiHelper != NULL) {
|
|
||||||
SDK::TArray<class SDK::UPalItemContainer*> Containers = InventoryMultiHelper->Containers;
|
|
||||||
if (Containers.Num() == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SDK::UPalItemSlot* FirstSlot = Containers[0]->Get(0);
|
|
||||||
|
|
||||||
if (FirstSlot != NULL)
|
|
||||||
{
|
|
||||||
SDK::FPalItemId FirstItemId = FirstSlot->GetItemId();
|
|
||||||
int32 StackCount = FirstSlot->GetStackCount();
|
|
||||||
InventoryData->RequestAddItem(FirstItemId.StaticId, StackCount * 2, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::Button("All Effigies", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
|
if (ImGui::Button("Unlock All Effigies", ImVec2(ImGui::GetWindowContentRegionWidth() - 3, 20)))
|
||||||
{
|
{
|
||||||
SDK::APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter();
|
UnlockAllEffigies();
|
||||||
if (!pPalCharacter)
|
|
||||||
return;
|
|
||||||
|
|
||||||
SDK::UWorld* world = Config.GetUWorld();
|
|
||||||
if (!world)
|
|
||||||
return;
|
|
||||||
|
|
||||||
SDK::TUObjectArray* objects = world->GObjects;
|
|
||||||
|
|
||||||
for (int i = 0; i < objects->NumElements; ++i) {
|
|
||||||
SDK::UObject* object = objects->GetByIndex(i);
|
|
||||||
|
|
||||||
if (!object) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!object->IsA(SDK::APalLevelObjectRelic::StaticClass())) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
SDK::APalLevelObjectObtainable* relic = (SDK::APalLevelObjectObtainable*)object;
|
|
||||||
if (!relic) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
((SDK::APalPlayerState*)pPalCharacter->PlayerState)->RequestObtainLevelObject_ToServer(relic);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////ImGui::InputText("Pal Name", Config.PalName, sizeof(Config.PalName));
|
////ImGui::InputText("Pal Name", Config.PalName, sizeof(Config.PalName));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user