Example #1
0
 public override void Cleanup()
 {
     //if (!Actor.IsInActiveHousehold || !(Actor.Service is GrimReaper)) //?? Fail and Ok?
     if (Actor.IsNPC && !Actor.IsInActiveHousehold && !(Actor.Service is GrimReaper))
     {
         SafeNRaas.NRUrnstones_CreateGrave(Actor.SimDescription, SimDescription.DeathType.Drown, true, true);
     }
     //base.Cleanup();
 }
Example #2
0
        // Token: 0x0600A7E3 RID: 42979 RVA: 0x002FB788 File Offset: 0x002FA788
        public override void Cleanup()
        {
            if (this.FixNotExit)
            {
                if (!Actor.IsInActiveHousehold)
                {
                    this.DeathTypeFix = false;
                    this.ActiveFix    = false;
                    this.Actor.MoveInventoryItemsToAFamilyMember();
                    SafeNRaas.NRUrnstones_CreateGrave(Actor.SimDescription, this.simDeathType, true, true);
                }
            }
            this.Actor.RemoveInteractionByType(Sim.DeathReaction.Singleton);
            if (this.CancelDeath)
            {
                SimDescription.DeathType deathStyle     = this.Actor.SimDescription.DeathStyle;
                SimDescription           simDescription = this.Actor.SimDescription;

                if (!simDescription.IsEP11Bot)
                {
                    simDescription.AgingEnabled = true;
                    if (simDescription.DeathStyle == SimDescription.DeathType.OldAge)
                    {
                        simDescription.AgingState.ResetAndExtendAgingStage(0f);
                    }
                }
                simDescription.ShowSocialsOnSim = true;
                World.ObjectSetGhostState(this.Actor.ObjectId, 0u, (uint)simDescription.AgeGenderSpecies);
                simDescription.IsNeverSelectable = false;
                if (this.ActiveFix)
                {
                    if (!Actor.IsInActiveHousehold)
                    {
                        //Actor.SimDescription.Contactable = false;
                        this.Actor.MoveInventoryItemsToAFamilyMember();
                        this.DeathTypeFix = false;
                        SafeNRaas.NRUrnstones_CreateGrave(Actor.SimDescription, this.simDeathType, true, true);
                    }
                }
                if (this.DeathTypeFix)
                {
                    simDescription.SetDeathStyle(SimDescription.DeathType.None, false);
                }
            }
            if (this.SocialJig != null)
            {
                this.SocialJig.Destroy();
                this.SocialJig = null;
            }
            base.Cleanup();
        }
Example #3
0
        public override bool Run()
        {
            ForceKillSimNiec.Definition definition = base.InteractionDefinition as ForceKillSimNiec.Definition;
            List <Sim> list = new List <Sim>();

            foreach (Sim sim in NFinalizeDeath.SC_GetObjects <Sim>())
            {
                if (sim.SimDescription.ToddlerOrAbove && !sim.IsInActiveHousehold && sim.LotCurrent != Household.ActiveHousehold.LotHome)
                {
                    //
                    SpeedTrap.Sleep(10);
                    sim.BuffManager.AddElement(BuffNames.Mourning, Origin.FromWitnessingDeath);
                    BuffMourning.BuffInstanceMourning buffInstanceMourning = sim.BuffManager.GetElement(BuffNames.Mourning) as BuffMourning.BuffInstanceMourning;
                    if (buffInstanceMourning != null)
                    {
                        buffInstanceMourning.MissedSim = Target.SimDescription;
                    }
                    //
                    SpeedTrap.Sleep(10);
                    sim.BuffManager.AddElement(BuffNames.HeartBroken, Urnstone.CalculateMourningMoodStrength(sim, sim.SimDescription), Origin.FromWitnessingDeath);
                    BuffHeartBroken.BuffInstanceHeartBroken buffInstanceHeartBroken = sim.BuffManager.GetElement(BuffNames.HeartBroken) as BuffHeartBroken.BuffInstanceHeartBroken;
                    if (buffInstanceHeartBroken != null)
                    {
                        buffInstanceHeartBroken.MissedSim = Target.SimDescription;
                    }
                    //
                    SpeedTrap.Sleep(10);
                    sim.BuffManager.AddElement(BuffNames.Negligent, Origin.FromNeglectingChildren);
                    BuffNegligent.BuffInstanceNegligent buffInstanceNegligent = sim.BuffManager.GetElement(BuffNames.Negligent) as BuffNegligent.BuffInstanceNegligent;
                    if (buffInstanceNegligent != null)
                    {
                        buffInstanceNegligent.MissedSims.Add(Target.SimDescription);
                    }
                }
            }
            SpeedTrap.Sleep(10);
            if (Target.IsNPC)
            {
                SafeNRaas.NRUrnstones_CreateGrave(Target.SimDescription, definition.death, true, true);
            }

            return(true);
        }