mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 11:12:23 +01:00
<feat: New project structure>
<feat: New release>
This commit is contained in:
39
dependencies/reboot/Project Reboot 3.0/FortPlayerState.cpp
vendored
Normal file
39
dependencies/reboot/Project Reboot 3.0/FortPlayerState.cpp
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
#include "FortPlayerState.h"
|
||||
|
||||
void AFortPlayerState::EndDBNOAbilities()
|
||||
{
|
||||
static auto GAB_AthenaDBNOClass = FindObject<UClass>(L"/Game/Abilities/NPC/Generic/GAB_AthenaDBNO.Default__GAB_AthenaDBNO_C");
|
||||
|
||||
auto ASC = this->GetAbilitySystemComponent();
|
||||
|
||||
if (!ASC)
|
||||
return;
|
||||
|
||||
FGameplayAbilitySpec* DBNOSpec = nullptr;
|
||||
|
||||
UObject* ClassToFind = GAB_AthenaDBNOClass->ClassPrivate;
|
||||
|
||||
auto compareAbilities = [&DBNOSpec, &ClassToFind](FGameplayAbilitySpec* Spec) {
|
||||
auto CurrentAbility = Spec->GetAbility();
|
||||
|
||||
if (CurrentAbility->ClassPrivate == ClassToFind)
|
||||
{
|
||||
DBNOSpec = Spec;
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
LoopSpecs(ASC, compareAbilities);
|
||||
|
||||
if (!DBNOSpec)
|
||||
return;
|
||||
|
||||
ASC->ClientCancelAbility(DBNOSpec->GetHandle(), DBNOSpec->GetActivationInfo());
|
||||
ASC->ClientEndAbility(DBNOSpec->GetHandle(), DBNOSpec->GetActivationInfo());
|
||||
ASC->ServerEndAbility(DBNOSpec->GetHandle(), DBNOSpec->GetActivationInfo(), nullptr);
|
||||
}
|
||||
|
||||
bool AFortPlayerState::AreUniqueIDsIdentical(FUniqueNetIdRepl* A, FUniqueNetIdRepl* B)
|
||||
{
|
||||
return A->IsIdentical(B);
|
||||
}
|
||||
Reference in New Issue
Block a user