Exemple #1
0
        public CareerStore(Household house, SafeStore.Flag flags)
        {
            mSafeStore = new Dictionary<ulong, SafeStore>();

            foreach (SimDescription sim in Households.All(house))
            {
                mSafeStore[sim.SimDescriptionId] = new SafeStore(sim, flags);
            }
        }
Exemple #2
0
        protected override bool Run(SimDescription me, bool singleSelection)
        {
            if (!ApplyAll)
            {
                string msg = "Selectability:UnPrompt";
                if (me.IsNeverSelectable)
                {
                    msg = "Selectability:Prompt";
                }

                if (!AcceptCancelDialog.Show(Common.Localize(msg, me.IsFemale, new object[] { me })))
                {
                    return false;
                }

                mSelectable = !me.IsNeverSelectable;
            }

            me.IsNeverSelectable = mSelectable;

            if ((!me.IsNeverSelectable) && (me.CreatedSim != null) && (me.Household == Household.ActiveHousehold))
            {
                using (SafeStore store = new SafeStore(me, SafeStore.Flag.None))
                {
                    if (Household.RoommateManager.IsNPCRoommate(me))
                    {
                        Household.RoommateManager.MakeRoommateSelectable(me);
                    }
                    else
                    {
                        me.CreatedSim.OnBecameSelectable();
                    }
                }
            }
            return true;
        }
Exemple #3
0
        // From SimDescription.Instantiate
        private static Sim Perform(SimDescription ths, Vector3 position, ResourceKey outfitKey, bool forceAlwaysAnimate, OnReset reset)
        {
            Household.HouseholdSimsChangedCallback changedCallback = null;
            Household changedHousehold = null;

            bool isChangingWorlds = GameStates.sIsChangingWorlds;

            bool isLifeEventManagerEnabled = LifeEventManager.sIsLifeEventManagerEnabled;

            Corrections.RemoveFreeStuffAlarm(ths);

            using (SafeStore store = new SafeStore(ths, SafeStore.Flag.LoadFixup | SafeStore.Flag.Selectable | SafeStore.Flag.Unselectable))
            {
                try
                {
                    // Stops the memories system from interfering
                    LifeEventManager.sIsLifeEventManagerEnabled = false;

                    // Stops UpdateInformationKnownAboutRelationships()
                    GameStates.sIsChangingWorlds = true;

                    if (ths.Household != null)
                    {
                        changedCallback = ths.Household.HouseholdSimsChanged;
                        changedHousehold = ths.Household;

                        ths.Household.HouseholdSimsChanged = null;
                    }

                    if (ths.CreatedSim != null)
                    {
                        AttemptToPutInSafeLocation(ths.CreatedSim, false);

                        if (reset != null)
                        {
                            ths.CreatedSim.SetObjectToReset();

                            reset(ths.CreatedSim, false);
                        }

                        return ths.CreatedSim;
                    }

                    if (ths.AgingState != null)
                    {
                        bool flag = outfitKey == ths.mDefaultOutfitKey;

                        ths.AgingState.SimBuilderTaskDeferred = false;

                        ths.AgingState.PreInstantiateSim(ref outfitKey);
                        if (flag)
                        {
                            ths.mDefaultOutfitKey = outfitKey;
                        }
                    }

                    int capacity = forceAlwaysAnimate ? 0x4 : 0x2;
                    Hashtable overrides = new Hashtable(capacity);
                    overrides["simOutfitKey"] = outfitKey;
                    overrides["rigKey"] = CASUtils.GetRigKeyForAgeGenderSpecies((ths.Age | ths.Gender) | ths.Species);
                    if (forceAlwaysAnimate)
                    {
                        overrides["enableSimPoseProcessing"] = 0x1;
                        overrides["animationRunsInRealtime"] = 0x1;
                    }

                    string instanceName = "GameSim";
                    ProductVersion version = ProductVersion.BaseGame;
                    if (ths.Species != CASAgeGenderFlags.Human)
                    {
                        instanceName = "Game" + ths.Species;
                        version = ProductVersion.EP5;
                    }

                    SimInitParameters initData = new SimInitParameters(ths);
                    Sim target = GlobalFunctions.CreateObjectWithOverrides(instanceName, version, position, 0x0, Vector3.UnitZ, overrides, initData) as Sim;
                    if (target != null)
                    {
                        if (target.SimRoutingComponent == null)
                        {
                            // Performed to ensure that a useful error message is produced when the Sim construction fails
                            target.OnCreation();
                            target.OnStartup();
                        }

                        target.SimRoutingComponent.EnableDynamicFootprint();
                        target.SimRoutingComponent.ForceUpdateDynamicFootprint();

                        ths.PushAgingEnabledToAgingManager();

                        /* This code is idiotic
                        if ((ths.Teen) && (target.SkillManager != null))
                        {
                            Skill skill = target.SkillManager.AddElement(SkillNames.Homework);
                            while (skill.SkillLevel < SimDescription.kTeenHomeworkSkillStartLevel)
                            {
                                skill.ForceGainPointsForLevelUp();
                            }
                        }
                        */

                        // Custom
                        OccultTypeHelper.SetupForInstantiatedSim(ths.OccultManager);

                        if (ths.IsAlien)
                        {
                            World.ObjectSetVisualOverride(target.ObjectId, eVisualOverrideTypes.Alien, null);
                        }

                        AttemptToPutInSafeLocation(target, false);

                        EventTracker.SendEvent(EventTypeId.kSimInstantiated, null, target);

                        /*
                        MiniSimDescription description = MiniSimDescription.Find(ths.SimDescriptionId);
                        if ((description == null) || (!GameStates.IsTravelling && (ths.mHomeWorld == GameUtils.GetCurrentWorld())))
                        {
                            return target;
                        }
                        description.UpdateInWorldRelationships(ths);
                        */

                        if (ths.HealthManager != null)
                        {
                            ths.HealthManager.Startup();
                        }

                        if (((ths.SkinToneKey.InstanceId == 15475186560318337848L) && !ths.OccultManager.HasOccultType(OccultTypes.Vampire)) && (!ths.OccultManager.HasOccultType(OccultTypes.Werewolf) && !ths.IsGhost))
                        {
                            World.ObjectSetVisualOverride(ths.CreatedSim.ObjectId, eVisualOverrideTypes.Genie, null);
                        }

                        if (ths.Household.IsAlienHousehold)
                        {
                            (Sims3.UI.Responder.Instance.HudModel as HudModel).OnSimCurrentWorldChanged(true, ths);
                        }

                        if (Household.RoommateManager.IsNPCRoommate(ths.SimDescriptionId))
                        {
                            Household.RoommateManager.AddRoommateInteractions(target);
                        }
                    }

                    return target;
                }
                finally
                {
                    LifeEventManager.sIsLifeEventManagerEnabled = isLifeEventManagerEnabled;

                    GameStates.sIsChangingWorlds = isChangingWorlds;

                    if ((changedHousehold != null) && (changedCallback != null))
                    {
                        changedHousehold.HouseholdSimsChanged = changedCallback;

                        if (changedHousehold.HouseholdSimsChanged != null)
                        {
                            changedHousehold.HouseholdSimsChanged(Sims3.Gameplay.CAS.HouseholdEvent.kSimAdded, ths.CreatedSim, null);
                        }
                    }
                }
            }
        }        
Exemple #4
0
            public CreationProtection(SimDescription sim, Sim createdSim, bool performLoadFixup, bool performSelectable, bool performUnselectable)
            {
                try
                {
                    mSim = sim;

                    Corrections.RemoveFreeStuffAlarm(sim);

                    // Stops an issue in "GrantFutureObjects" regarding the use of sIsChangingWorlds=true
                    mWasFutureSim = sim.TraitManager.HasElement(TraitNames.FutureSim);
                    sim.TraitManager.RemoveElement(TraitNames.FutureSim);

                    if (SimTypes.IsSelectable(mSim))
                    {
                        Corrections.CleanupBrokenSkills(mSim, null);
                    }

                    if (OpportunityTrackerModel.gSingleton != null)
                    {
                        mOpportunitiesChanged = OpportunityTrackerModel.gSingleton.OpportunitiesChanged;
                        OpportunityTrackerModel.gSingleton.OpportunitiesChanged = null;
                    }

                    if (mSim.TraitChipManager != null)
                    {
                        mChips = mSim.TraitChipManager.GetAllTraitChips();
                        mSim.TraitChipManager.mTraitChipSlots = new TraitChip[7];
                        mSim.TraitChipManager.mValues.Clear();
                    }

                    if (createdSim != null)
                    {
                        if (createdSim.BuffManager != null)
                        {
                            mBuffs = new List<BuffInstance>();

                            foreach (BuffInstance buff in createdSim.BuffManager.List)
                            {
                                mBuffs.Add(buff);
                            }
                        }

                        if (createdSim.Motives != null)
                        {
                            Motive motive = createdSim.Motives.GetMotive(CommodityKind.AcademicPerformance);
                            if (motive != null)
                            {
                                mAcademicPerformance = motive.Value;
                            }

                            motive = createdSim.Motives.GetMotive(CommodityKind.UniversityStudy);
                            if (motive != null)
                            {
                                mUniversityStudy = motive.Value;
                            }
                        }

                        if (createdSim.Inventory != null)
                        {
                            mInventory = createdSim.Inventory.DestroyInventoryAndStoreInList();
                        }

                        mDreamStore = new DreamCatcher.DreamStore(createdSim, false, false);

                        mReservedVehicle = createdSim.GetReservedVehicle();
                        createdSim.ReservedVehicle = null;
                    }

                    SafeStore.Flag flags = SafeStore.Flag.None;

                    if (performSelectable)
                    {
                        flags |= SafeStore.Flag.Selectable;
                    }

                    if (performLoadFixup)
                    {
                        flags |= SafeStore.Flag.LoadFixup;
                    }

                    if (performUnselectable)
                    {
                        flags |= SafeStore.Flag.Unselectable;
                    }

                    mSafeStore = new SafeStore(mSim, flags);

                    // Stops the startup errors when the imaginary friend is broken
                    mDoll = GetDollForSim(sim);
                    if (mDoll != null)
                    {
                        mDoll.mOwner = null;
                    }

                    mGenealogy = sim.mGenealogy;

                    mRelations = Relationships.StoreRelations(sim, null);

                    // Stops all event processing during the creation process
                    EventTracker.sCurrentlyUpdatingDreamsAndPromisesManagers = true;

                    // Stops the interface from updating during OnCreation
                    if (sim.Household != null)
                    {
                        mChangedCallback = sim.Household.HouseholdSimsChanged;
                        mChangedHousehold = sim.Household;

                        sim.Household.HouseholdSimsChanged = null;
                    }

                    sChangingWorldsSuppression.Push();

                    // Stops SetGeneologyRelationshipBits()
                    sim.mGenealogy = new Genealogy(sim);
                }
                catch (Exception e)
                {
                    Common.Exception(sim, e);
                }
            }
Exemple #5
0
        private static void VacationArrival(Household travelHouse)
        {
            Common.StringBuilder msg = new Common.StringBuilder("VacationArrival");
            Traveler.InsanityWriteLog(msg);

            foreach (SimDescription description in Households.All(travelHouse))
            {
                try
                {
                    msg += Common.NewLine + description.FullName;
                    Traveler.InsanityWriteLog(msg);

                    WorldName currentWorld = GameUtils.GetCurrentWorld();
                    description.VisaManager.UpdateWorldVisit(currentWorld);
                    if (description.CreatedSim != null)
                    {
                        msg += Common.NewLine + "A";
                        Traveler.InsanityWriteLog(msg);

                        Corrections.CleanupBrokenSkills(description, null);

                        msg += Common.NewLine + "B";
                        Traveler.InsanityWriteLog(msg);

                        using (SafeStore store = new SafeStore(description, SafeStore.Flag.None))
                        {
                            if (!Household.RoommateManager.IsNPCRoommate(description))
                            {
                                description.CreatedSim.OnBecameSelectable();
                            }
                        }

                        msg += Common.NewLine + "C";
                        Traveler.InsanityWriteLog(msg);
                    }
                }
                catch (Exception e)
                {
                    Common.Exception(description, e);
                }
            }

            msg += Common.NewLine + "D";
            Traveler.InsanityWriteLog(msg);

            // Custom
            UnstashHousehold(GameStates.sTravelData.mStache, travelHouse);

            msg += Common.NewLine + "E";
            Traveler.InsanityWriteLog(msg);

            travelHouse.RealEstateManager = GameStates.sTravelData.mRealEstateManager;
            //travelHouse.SetupVacationAlarms();

            // From Household:SetupVacationAlarms
            HouseholdEx.OneDayPassed(travelHouse);
            travelHouse.mTriggerVacationEventAlarm = AlarmManager.Global.AddAlarm(Household.kOnVacationTriggerTime, TimeUnit.Minutes, travelHouse.OnTriggerVacationEvent, "Initial On Vacation Trigger", AlarmType.AlwaysPersisted, travelHouse);

            msg += Common.NewLine + "F";
            Traveler.InsanityWriteLog(msg);

            if (GameUtils.IsOnVacation())
            {
                WorldData.ForceSpawners();
            }

            msg += Common.NewLine + "G";
            Traveler.InsanityWriteLog(msg);
        }
Exemple #6
0
        public static List<SimDescription> PostTravelingFixUp()
        {
            Common.StringBuilder msg = new Common.StringBuilder("PostTravelingFixup" + Common.NewLine);
            Traveler.InsanityWriteLog(msg);

            List<SimDescription> list = new List<SimDescription>();
            try
            {
                if (GameStates.TravelComplete != null)
                {
                    GameStates.TravelComplete();
                }

                msg += "A";
                Traveler.InsanityWriteLog(msg);

                Dictionary<ulong, SimDescription> allSims = GetAllSims();

                foreach (SimDescription description in allSims.Values)
                {
                    try
                    {
                        MiniSimDescription msd = MiniSimDescription.Find(description.SimDescriptionId);
                        if ((msd != null) && !GameStates.sTravelData.mTravelerIds.Contains(description.SimDescriptionId))
                        {
                            SimDescriptionEx.MergeTravelInformation(description, msd, allSims);
                            if (msd.mDeathStyle != description.DeathStyle)
                            {
                                list.Add(description);
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        Common.Exception(description, null, msg, e);
                    }
                }

                msg += "B1";
                Traveler.InsanityWriteLog(msg);

                UpdateMiniSims(allSims);

                msg += "B2";
                Traveler.InsanityWriteLog(msg);

                foreach (MiniSimDescription description3 in MiniSimDescription.GetChildrenNeedFixUp())
                {
                    try
                    {
                        SimDescription description4 = SimDescription.Find(description3.mMotherDescId);
                        if (((description4 == null) || GameStates.sTravelData.mTravelerIds.Contains(description3.mMotherDescId)) && ((description3.HouseholdMembers != null) && (description3.HouseholdMembers.Count > 0x0)))
                        {
                            foreach (ulong num in description3.HouseholdMembers)
                            {
                                description4 = SimDescription.Find(num);
                                if (description4 != null)
                                {
                                    break;
                                }
                            }
                        }
                        if ((description4 != null) && (description4.Household != null))
                        {
                            SimDescription simDescription = MiniSims.UnpackSim(description3);
                            if (simDescription != null)
                            {
                                description4.Household.Add(simDescription);
                                description3.Instantiated = true;
                                simDescription.MergeTravelInformation(description3);
                                if (description3.mDeathStyle != simDescription.DeathStyle)
                                {
                                    list.Add(simDescription);
                                }
                                else if ((simDescription.CreatedSim == null) && (simDescription.LotHome != null))
                                {
                                    Sim.MakeSimGoHome(Instantiation.PerformOffLot(simDescription, simDescription.LotHome, null), false);
                                }
                                description3.mMotherDescId = 0x0L;
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        Common.Exception(description3, null, msg, e);
                    }
                }

                msg += "C";
                Traveler.InsanityWriteLog(msg);

                if (GameStates.sTravelData.mState == GameStates.TravelData.TravelState.EndVacation)
                {
                    if (GameStates.sTravelData.mSimDescriptionNeedPostFixUp != null)
                    {
                        Household activeHousehold2 = Household.ActiveHousehold;

                        foreach (SimDescription description6 in GameStates.sTravelData.mSimDescriptionNeedPostFixUp)
                        {
                            try
                            {
                                activeHousehold2.RemoveTemporary(description6);

                                MiniSims.ProtectedAddHousehold(activeHousehold2, description6);
                            }
                            catch (Exception e)
                            {
                                Common.Exception(description6, e);
                            }
                        }
                    }

                    if (GameStates.sTravelData.mSimDescriptionAgedUpFixUp != null)
                    {
                        Household household1 = Household.ActiveHousehold;
                        foreach (GameStates.SimRefreshData data in GameStates.sTravelData.mSimDescriptionAgedUpFixUp)
                        {
                            if (data.mInWorldDesc.CreatedSim == null)
                            {
                                Bin.ImportSim(data.mInWorldDesc, data.mPosition, data.mInventoryId);
                                Sim createdSim = data.mInWorldDesc.CreatedSim;
                                createdSim.SwitchToOutfitWithoutSpin(createdSim.CurrentOutfitCategory);
                                createdSim.BuffManager.LoadBuffsFromTravel(data.mImportedDesc);
                                if (data.mIsSelected)
                                {
                                    PlumbBob.SelectActor(createdSim);
                                }
                            }
                            data.mImportedDesc.DisposeTravelImportedSimDesc();
                        }

                        GameStates.sTravelData.mSimDescriptionAgedUpFixUp.Clear();
                    }

                    msg += "D";
                    Traveler.InsanityWriteLog(msg);

                    foreach (SimDescription sim in Households.All(Household.ActiveHousehold))
                    {
                        try
                        {
                            ulong simDescriptionId = sim.SimDescriptionId;
                            MiniSimDescription miniSim = MiniSimDescription.Find(simDescriptionId);
                            if (miniSim != null)
                            {
                                if (!GameStates.sTravelData.mTravelerIds.Contains(simDescriptionId))
                                {
                                    sim.MergeTravelInformation(miniSim);
                                }
                                miniSim.Instantiated = true;
                            }
                        }
                        catch (Exception e)
                        {
                            Common.Exception(sim, null, msg, e);
                        }
                    }

                    msg += "E";
                    Traveler.InsanityWriteLog(msg);

                    if (GameStates.sTravelData.mTravelingRelationships != null)
                    {
                        Dictionary<ulong, SimDescription> sims = SimListing.GetResidents(false);

                        foreach (GameStates.TravelRelationship relationship in GameStates.sTravelData.mTravelingRelationships)
                        {
                            SimDescription x;
                            if (sims.TryGetValue(relationship.simXId, out x))
                            {
                                for (int i = 0x0; i < relationship.simyIds.Count; i++)
                                {
                                    SimDescription y;
                                    if (sims.TryGetValue(relationship.simyIds[i], out y))
                                    {
                                        Relationship relation = Relationship.Get(x, y, true);
                                        if (relation != null)
                                        {
                                            Relationship relation2 = relationship.rels[i];
                                            if (relation2 != null)
                                            {
                                                relation.CopyRelationship(relation2);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        GameStates.sTravelData.mTravelingRelationships.Clear();
                        GameStates.sTravelData.mTravelingRelationships = null;
                    }

                    msg += "F";
                    Traveler.InsanityWriteLog(msg);

                    float timeoutToAdd = 0f;
                    foreach (Sim sim2 in Households.AllSims(Household.ActiveHousehold))
                    {
                        try
                        {
                            string reason = null;
                            if (CrossWorldControl.sRetention.RestoreHousehold(sim2.SimDescription, ref reason))
                            {
                                msg += Common.NewLine + "Restore: " + sim2.FullName;
                            }
                            else
                            {
                                msg += Common.NewLine + "Restore: " + sim2.FullName + " (" + reason + ")";
                            }

                            SimDescription description11 = sim2.SimDescription;
                            ulong item = description11.SimDescriptionId;
                            if (GameStates.sTravelData.mTravelerIds.Contains(item) && !GameStates.sTravelData.mDeadSims.Contains(item))
                            {
                                BuffInstance element = sim2.BuffManager.GetElement(BuffNames.Mourning);
                                if ((element != null) && (element.TimeoutCount > timeoutToAdd))
                                {
                                    timeoutToAdd = element.TimeoutCount;
                                }

                                BuffHeartBroken.BuffInstanceHeartBroken broken = sim2.BuffManager.GetElement(BuffNames.Undefined | BuffNames.HeartBroken) as BuffHeartBroken.BuffInstanceHeartBroken;
                                if (((broken != null) && (broken.BuffOrigin == (Origin.FromWitnessingDeath))) && (broken.TimeoutCount > timeoutToAdd))
                                {
                                    timeoutToAdd = broken.TimeoutCount;
                                }

                                MiniSimDescription description12 = MiniSimDescription.Find(item);
                                if (description12 != null)
                                {
                                    foreach (MiniRelationship relationship3 in description12.MiniRelationships)
                                    {
                                        SimDescription description13 = SimDescription.Find(relationship3.SimDescriptionId);
                                        if (description13 != null)
                                        {
                                            Relationship unsafely = Relationship.GetUnsafely(description11, description13);
                                            RomanceVisibilityState.MergeTravelInformationOnTravelBackHome(relationship3, unsafely);
                                        }
                                        else if ((relationship3.RomanceState != RomanceVisibilityStateType.None) && (relationship3.RomanceStartTime.Ticks == 0x0L))
                                        {
                                            MiniSimDescription description14 = MiniSimDescription.Find(relationship3.SimDescriptionId);
                                            if ((description14 != null) && (description14.HomeWorld != description12.HomeWorld))
                                            {
                                                relationship3.RomanceStartTime = SimClock.CurrentTime();
                                            }
                                        }
                                    }
                                    continue;
                                }
                            }
                        }
                        catch (Exception e)
                        {
                            Common.Exception(sim2, null, msg, e);
                        }
                    }

                    msg += "G";
                    Traveler.InsanityWriteLog(msg);

                    Household activeHousehold = null;
                    foreach (ulong num6 in GameStates.sTravelData.mDeadSims)
                    {
                        SimDescription simDesc = SimDescription.Find(num6);
                        try
                        {
                            if (simDesc != null)
                            {
                                MidlifeCrisisManager.OnSimDied(simDesc);
                                if ((simDesc.CreatedSim != null) && (Sim.ActiveActor == simDesc.CreatedSim))
                                {
                                    activeHousehold = Household.ActiveHousehold;
                                    PlumbBob.ForceSelectActor(null);
                                }
                                if ((timeoutToAdd != 0f) || (GameStates.sTravelData.mTravelerIds.Count == GameStates.sTravelData.mDeadSims.Count))
                                {
                                    Urnstone.FinalizeSimDeathRelationships(simDesc, timeoutToAdd);
                                }
                                simDesc.Household.Remove(simDesc);
                                if (Urnstone.FindGhostsGrave(simDesc) == null)
                                {
                                    simDesc.Dispose();
                                }
                            }
                        }
                        catch (Exception e)
                        {
                            Common.Exception(simDesc, null, msg, e);
                        }
                    }

                    msg += "H";
                    Traveler.InsanityWriteLog(msg);

                    if (activeHousehold != null)
                    {
                        if (activeHousehold.AllActors.Count > 0x0)
                        {
                            GameStates.sNextSimToSelect = RandomUtil.GetRandomObjectFromList(activeHousehold.AllActors);
                        }
                        else
                        {
                            msg += "H1";

                            GameStates.sStartupState = InWorldState.SubState.PlayFlow;
                        }
                    }

                    msg += "I";
                    Traveler.InsanityWriteLog(msg);

                    Household newActiveHousehold = Household.ActiveHousehold ?? activeHousehold;
                    if (newActiveHousehold != null)
                    {
                        GameStates.UnstashHousehold(GameStates.sTravelData.mStache, newActiveHousehold);

                        msg += "I1";
                        Traveler.InsanityWriteLog(msg);

                        foreach (ulong simID in GameStates.sTravelData.mTravelerIds)
                        {
                            SimDescription activeSimDesc = newActiveHousehold.FindMember(simID);

                            if (activeSimDesc != null)
                            {
                                msg += Common.NewLine + activeSimDesc.FullName;
                            }
                            else
                            {
                                msg += Common.NewLine + simID;
                            }
                            Traveler.InsanityWriteLog(msg);

                            try
                            {
                                if (((activeSimDesc != null) || ((GameStates.sTravelData.mDeadSims != null) && GameStates.sTravelData.mDeadSims.Contains(simID))) && ((activeSimDesc != null) && (activeSimDesc.CreatedSim != null)))
                                {
                                    msg += "I2";
                                    Traveler.InsanityWriteLog(msg);

                                    EventTracker.SendEvent(EventTypeId.kSimReturnedFromVacationWorld, activeSimDesc.CreatedSim);
                                }
                            }
                            catch (Exception e)
                            {
                                Common.Exception(activeSimDesc, null, msg, e);
                            }
                        }

                        msg += "J";

                        //GrimReaperSituation.CheckForAbandonedChildren(household2);
                        foreach (Sim sim3 in Households.AllSims(newActiveHousehold))
                        {
                            using (SafeStore store = new SafeStore(sim3.SimDescription, SafeStore.Flag.None))
                            {
                                try
                                {
                                    if (!Household.RoommateManager.IsNPCRoommate(sim3))
                                    {
                                        sim3.OnBecameSelectable();
                                    }
                                }
                                catch (Exception e)
                                {
                                    Common.Exception(sim3, null, msg, e);
                                }
                            }
                        }
                    }

                    msg += "K";
                    Traveler.InsanityWriteLog(msg);

                    GameStates.GiveWeddingGiftsIfOwed();
                }

                msg += "L";
                Traveler.InsanityWriteLog(msg);
            }
            catch (Exception e)
            {
                Traveler.InsanityException(msg, e);
            }

            GameStates.sTravelData.mStache.RemoveAllItems();

            if (GameStates.sTravelData.mState == GameStates.TravelData.TravelState.EndVacation)
            {
                GameStates.sTravelData = null;
                GameStates.sIsChangingWorlds = false;
            }

            return list;
        }