protected override List <IGenericValueOption <LifetimeWant> > GetAllOptions() { List <IGenericValueOption <LifetimeWant> > results = new List <IGenericValueOption <LifetimeWant> >(); if (Sims3.Gameplay.Actors.Sim.ActiveActor != null) { List <IInitialMajorWish> allMajorDreamMatches = DreamsAndPromisesManager.GetAllMajorDreamMatches(Sims3.Gameplay.Actors.Sim.ActiveActor.SimDescription); foreach (IInitialMajorWish ltw in allMajorDreamMatches) { results.Add(new ListItem(this, ltw)); } } return(results); }
public static bool SetLifetimeWant(SimDescription me) { List <IInitialMajorWish> topMajorDreamMatches = DreamsAndPromisesManager.GetTopMajorDreamMatches(me); List <IInitialMajorWish> allMajorDreamMatches = DreamsAndPromisesManager.GetAllMajorDreamMatches(me); if ((topMajorDreamMatches.Count > 0x0) || (allMajorDreamMatches.Count > 0x0)) { uint oldLifetimeWish = me.LifetimeWish; uint newLifetimeWish = LifetimeWishSelectionDialog.Show(me, Localization.LocalizeString("Ui/Caption/LifetimeWishSelectionDialog:InitialCaption", new object[0x0]), topMajorDreamMatches, allMajorDreamMatches, true); if ((oldLifetimeWish != newLifetimeWish) && (newLifetimeWish != 0x0)) { me.HasCompletedLifetimeWish = false; me.LifetimeWish = newLifetimeWish; if (me.CreatedSim.DreamsAndPromisesManager != null) { me.CreatedSim.DreamsAndPromisesManager.TryAddLifetimeWish(); return(true); } } } return(false); }