static void endPlayerJob()
    {
        OnJobEnd.Invoke();
        EventControl.removeEvents(PlayerDataHolder.Current.PlayerJob.getJobEvents());
        PaerToolBox.callNonUniqueStatChange(PlayerDataHolder.Current.PlayerJob);
        PlayerDataHolder.Current.PlayerJob = null;
        Flag flag = new Flag("PLAYER_JOB_CONTRACT_END", 0, false);

        flag.FireFlag();
    }
    //Rekisteröi valittu työpaikka.
    static void registerJob(EventInfo info)
    {
        JobInfo job    = (JobInfo)info;
        Job     newJob = createJob(job);

        PlayerDataHolder.Current.PlayerJob = newJob;
        OnJobApply?.Invoke(job.jobNotice);
        PaerToolBox.callNonUniqueStatChange(PlayerDataHolder.Current.PlayerJob);

        createOnJobRegisterCall(PlayerDataHolder.Current.PlayerJob);

        List <GameEvent> gameEvents = EventControl.createEvents(job.jobNotice.scriptable.jobEvents);

        newJob.setJobEvents(gameEvents);

        EventControl.AggregateNewGameEvents(gameEvents);
    }