pickup combining, almost finish shadow stones, fix some bugs with gadgets, clean up some code.
This commit is contained in:
Milxnor
2023-05-02 23:48:05 -04:00
parent 3b0f0ad4e1
commit f49f166c2d
27 changed files with 574 additions and 216 deletions

View File

@@ -394,27 +394,6 @@ void UFortKismetLibrary::K2_GiveBuildingResourceHook(UObject* Context, FFrame& S
return K2_GiveBuildingResourceOriginal(Context, Stack, Ret);
}
int UFortKismetLibrary::K2_RemoveFortItemFromPlayerHook1(AFortPlayerController* PlayerController, UFortItem* Item, int AmountToRemove, bool bForceRemoval)
{
LOG_INFO(LogDev, "K2_RemoveFortItemFromPlayerHookNative!");
if (!PlayerController || !Item)
return 0;
auto WorldInventory = PlayerController->GetWorldInventory();
if (!WorldInventory)
return 0;
bool bShouldUpdate = false;
WorldInventory->RemoveItem(Item->GetItemEntry()->GetItemGuid(), &bShouldUpdate, AmountToRemove, bForceRemoval);
if (bShouldUpdate)
WorldInventory->Update();
return 1; // idk probably how much we removed
}
void UFortKismetLibrary::K2_RemoveFortItemFromPlayerHook(UObject* Context, FFrame& Stack, void* Ret)
{
AFortPlayerController* PlayerController = nullptr; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)