a bit of stuff

toys, ammo in bottom right kinda, fix lootin speeds, being inaccurate, playlist looting kindof, or some things just not working.
This commit is contained in:
Milxnor
2023-04-01 15:54:47 -04:00
parent a03c1cef2b
commit 701d3ad0d0
23 changed files with 437 additions and 149 deletions

View File

@@ -96,46 +96,6 @@ void UAbilitySystemComponent::InternalServerTryActivateAbilityHook(UAbilitySyste
{
// LOG_INFO(LogAbilities, "InternalServerTryActivateAbility. Activated {}", AbilityToActivate->GetName());
}
// bro ignore this next part idk where to put it ok
/* static auto OwnerActorOffset = AbilitySystemComponent->GetOffset("OwnerActor");
auto PlayerState = Cast<AFortPlayerStateAthena>(AbilitySystemComponent->Get<AActor*>(OwnerActorOffset));
if (!PlayerState)
return;
auto Controller = Cast<AFortPlayerController>(PlayerState->GetOwner());
LOG_INFO(LogAbilities, "Owner {}", PlayerState->GetOwner()->GetFullName());
if (!Controller)
return;
auto Pawn = Controller->GetMyFortPawn();
if (!Pawn)
return;
auto CurrentWeapon = Pawn->GetCurrentWeapon();
auto WorldInventory = Controller ? Controller->GetWorldInventory() : nullptr;
if (!WorldInventory || !CurrentWeapon)
return;
auto CurrentWeaponInstance = WorldInventory->FindItemInstance(CurrentWeapon->GetItemEntryGuid());
auto CurrentWeaponReplicatedEntry = WorldInventory->FindReplicatedEntry(CurrentWeapon->GetItemEntryGuid());
static auto AmmoCountOffset = CurrentWeapon->GetOffset("AmmoCount");
auto AmmoCount = CurrentWeapon->Get<int>(AmmoCountOffset);
if (CurrentWeaponReplicatedEntry->GetLoadedAmmo() != AmmoCount)
{
CurrentWeaponInstance->GetItemEntry()->GetLoadedAmmo() = AmmoCount;
CurrentWeaponReplicatedEntry->GetLoadedAmmo() = AmmoCount;
WorldInventory->GetItemList().MarkItemDirty(CurrentWeaponInstance->GetItemEntry());
WorldInventory->GetItemList().MarkItemDirty(CurrentWeaponReplicatedEntry);
} */
}
FGameplayAbilitySpecHandle UAbilitySystemComponent::GiveAbilityEasy(UClass* AbilityClass)