mirror of
https://github.com/Ed94/Cog.git
synced 2026-07-12 12:41:26 -07:00
Replace CogAbilityCheat window with CogEngineCheat window
CogEngineCheat window relies on an Execution to execute the cheat which can be extended. One implementation is implemented in CogAbility which applies an effect on the selected target (same logic as the previous CogAbilityCheat window)
This commit is contained in:
@@ -220,3 +220,26 @@ void ACogEngineReplicator::Server_DeleteActor_Implementation(AActor* Actor)
|
||||
|
||||
#endif // !UE_BUILD_SHIPPING
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void ACogEngineReplicator::Server_ApplyCheat_Implementation(const AActor* CheatInstigator, const TArray<AActor*>& Targets, const FCogEngineCheat& Cheat) const
|
||||
{
|
||||
if (Cheat.Execution == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Cheat.Execution->Execute(CheatInstigator, Targets);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
ECogEngineCheat_ActiveState ACogEngineReplicator::IsCheatActiveOnTargets(const TArray<AActor*>& Targets, const FCogEngineCheat& Cheat)
|
||||
{
|
||||
if (Cheat.Execution == nullptr)
|
||||
{
|
||||
return ECogEngineCheat_ActiveState::Inactive;
|
||||
}
|
||||
|
||||
return Cheat.Execution->IsActiveOnTargets(Targets);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user