예제 #1
0
        private static void OnSavingGame(IScriptObjectGroup group)
        {
            var p = Sims3.NiecModList.Persistable.ListCollon.NullSimSimDescription;

            if (p != null)
            {
                if (p.mSim != null)
                {
                    try
                    {
                        Bim.bSDestroy(p.mSim);
                    }
                    catch (Exception) { }
                }

                if (NiecHelperSituation.__acorewIsnstalled__)
                {
                    foreach (var item in Sims3.NiecModList.Persistable.ListCollon.SafeObjectGC_TempBim)
                    {
                        var itemSim = item as Sim;
                        if (itemSim == null)
                        {
                            continue;
                        }
                        itemSim.mSimDescription = p;
                    }
                }

                if (!NFinalizeDeath.IsNullOrEmpty(p.mFirstName) || (p.Household == Household.sNpcHousehold || p.Household == Household.sPetHousehold || p.Household == Household.sAlienHousehold))
                {
                    NFinalizeDeath.Household_Remove(p, true);
                    if (!NFinalizeDeath.IsNullOrEmpty(p.mFirstName) || p.IsValid || p.IsValidDescription)
                    {
                        NFinalizeDeath.RemoveAllSimNiecNullForGrave(true);
                        SimDescCleanseTask.SafeCallSimDescCleanseO1(p);
                    }
                }
                else
                {
                    p.mSim = null;
                }
            }
        }