/// <summary> /// Returns the mission with a given id from the mission inventory. /// </summary> /// <param name="id">The id of the mission to get from the inventory</param> /// <returns>A mission instance if the player has this mission, <c>default</c> otherwise.</returns> public MissionInstance GetMission(int id) { lock (Missions) { return(Missions.FirstOrDefault(m => m.MissionId == id)); } }
public Mission GetTask(int EmployerId) { var task = Missions.FirstOrDefault(p => p.Id == EmployerId); return(task); }