mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
add skunyk siphon
This commit is contained in:
@@ -1374,28 +1374,58 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
|
||||
KillerPlayerState->ClientReportKill(DeadPlayerState);
|
||||
|
||||
/* LoopMutators([&](AFortAthenaMutator* Mutator) {
|
||||
if (auto TDM_Mutator = Cast<AFortAthenaMutator_TDM>(Mutator))
|
||||
{
|
||||
struct
|
||||
{
|
||||
int EventId; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
int EventParam1; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
int EventParam2; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
int EventParam3; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
} AFortAthenaMutator_TDM_OnMutatorGameplayEvent_Params{ 1, 0, 0, 0 };
|
||||
|
||||
static auto TDM_OnMutatorGameplayEventFn = FindObject<UFunction>("/Script/FortniteGame.FortAthenaMutator_TDM.OnMutatorGameplayEvent");
|
||||
TDM_Mutator->ProcessEvent(TDM_OnMutatorGameplayEventFn, &AFortAthenaMutator_TDM_OnMutatorGameplayEvent_Params);
|
||||
}
|
||||
}); */
|
||||
|
||||
// KillerPlayerState->OnRep_Kills();
|
||||
|
||||
if (AmountOfHealthSiphon > 0)
|
||||
{
|
||||
auto KillerAbilityComp = KillerPlayerState->GetAbilitySystemComponent();
|
||||
|
||||
if (KillerAbilityComp)
|
||||
{
|
||||
auto ActivatableAbilities = KillerAbilityComp->GetActivatableAbilities();
|
||||
auto& Items = ActivatableAbilities->GetItems();
|
||||
for (size_t i = 0; i < Items.Num(); ++i)
|
||||
{
|
||||
auto& Item = Items.At(i, FGameplayAbilitySpec::GetStructSize());
|
||||
auto Ability = Item.GetAbility();
|
||||
if (Ability && Ability->ClassPrivate && Ability->ClassPrivate->GetName().contains("Siphon"))
|
||||
{
|
||||
FGameplayTag Tag{};
|
||||
Tag.TagName = UKismetStringLibrary::Conv_StringToName(TEXT("GameplayCue.Shield.PotionConsumed"));
|
||||
|
||||
auto NetMulticast_InvokeGameplayCueAdded = FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.NetMulticast_InvokeGameplayCueAdded");
|
||||
auto NetMulticast_InvokeGameplayCueExecuted = FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.NetMulticast_InvokeGameplayCueExecuted");
|
||||
|
||||
if (!NetMulticast_InvokeGameplayCueAdded || !NetMulticast_InvokeGameplayCueExecuted)
|
||||
break;
|
||||
|
||||
static auto GameplayCueTagOffsetAdded = NetMulticast_InvokeGameplayCueAdded->GetOffsetFunc("GameplayCueTag");
|
||||
static auto GameplayCueTagOffsetExecuted = NetMulticast_InvokeGameplayCueExecuted->GetOffsetFunc("GameplayCueTag");
|
||||
static auto PredictionKeyOffsetAdded = NetMulticast_InvokeGameplayCueAdded->GetOffsetFunc("PredictionKey");
|
||||
|
||||
auto AddedParams = Alloc<void>(NetMulticast_InvokeGameplayCueAdded->GetPropertiesSize());
|
||||
auto ExecutedParams = Alloc<void>(NetMulticast_InvokeGameplayCueExecuted->GetPropertiesSize());
|
||||
|
||||
if (!AddedParams || !ExecutedParams)
|
||||
break;
|
||||
|
||||
*(FGameplayTag*)(int64(AddedParams) + GameplayCueTagOffsetAdded) = Tag;
|
||||
*(FGameplayTag*)(int64(ExecutedParams) + GameplayCueTagOffsetExecuted) = Tag;
|
||||
//(FPredictionKey*)(int64(AddedParams) + PredictionKeyOffsetAdded) = Tag;
|
||||
|
||||
KillerAbilityComp->ProcessEvent(NetMulticast_InvokeGameplayCueAdded, AddedParams);
|
||||
KillerAbilityComp->ProcessEvent(NetMulticast_InvokeGameplayCueExecuted, ExecutedParams);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LOG_INFO(LogDev, "Reported kill.");
|
||||
|
||||
if (AmountOfHealthSiphon != 0)
|
||||
if (AmountOfHealthSiphon > 0)
|
||||
{
|
||||
if (KillerPawn && KillerPawn != DeadPawn)
|
||||
{
|
||||
@@ -1550,20 +1580,6 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
||||
|
||||
/*
|
||||
|
||||
STATS:
|
||||
|
||||
Note: This isn't the exact order relative to other functions.
|
||||
|
||||
ClientSendMatchStatsForPlayer
|
||||
ClientSendTeamStatsForPlayer
|
||||
ClientSendEndBattleRoyaleMatchForPlayer
|
||||
|
||||
*/
|
||||
|
||||
// FAthenaMatchStats.Stats[ERewardSource] // hmm
|
||||
|
||||
/*
|
||||
|
||||
// We need to check if their entire team is dead then I think we send it????
|
||||
|
||||
auto DeadControllerAthena = Cast<AFortPlayerControllerAthena>(PlayerController);
|
||||
|
||||
Reference in New Issue
Block a user