CovertAction_PreventGiveRewards

Tracking Issue: #438

Tags: events

Fires an event that allows listeners to prevent the covert action from awarding the action's rewards to the player. Note that if the PreventGiveRewards boolean is true then not only are the rewards not given, but the soldiers on the covert action get no XP or cohesion. The results are saved and are used to adjust UI later.

CovertAction_PreventGiveRewards event

Param Value
EventID CovertAction_PreventGiveRewards
EventData XComLWTuple
EventSource XComGameState_CovertAction
NewGameState none

Tuple contents

Index Name Type Direction
0 PreventGiveRewards bool inout

Listener template

static function EventListenerReturn OnCovertAction_PreventGiveRewards(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local XComGameState_CovertAction CAState;
    local XComLWTuple Tuple;
    local bool PreventGiveRewards;

    CAState = XComGameState_CovertAction(EventSource);
    Tuple = XComLWTuple(EventData);

    PreventGiveRewards = Tuple.Data[0].b;

    // Your code here

    Tuple.Data[0].b = PreventGiveRewards;

    return ELR_NoInterrupt;
}

Source code references