コード例 #1
0
ファイル: KillScenario.cs プロジェクト: Robobeurre/NRaas
 protected KillScenario(KillScenario scenario)
     : base (scenario)
 {
     mKiller = scenario.mKiller;
     mDeathType = scenario.mDeathType;
     mStoryName = scenario.mStoryName;
 }
コード例 #2
0
        internal static SimDescription.DeathType SafeGetDeathType(SimDescription targetDesc)
        {
            List <SimDescription.DeathType> listr = new List <SimDescription.DeathType>();

            listr.Add(SimDescription.DeathType.Drown);
            if (targetDesc != null && !targetDesc.IsVampire)
            {
                listr.Add(SimDescription.DeathType.Starve);
            }
            else
            {
                listr.Add(SimDescription.DeathType.Thirst);
            }

            listr.Add(SimDescription.DeathType.Burn);

            listr.Add(SimDescription.DeathType.Freeze);
            //listr.Add(SimDescription.DeathType.ScubaDrown);
            //listr.Add(SimDescription.DeathType.Shark);
            //listr.Add(SimDescription.DeathType.Jetpack);
            listr.Add(SimDescription.DeathType.Meteor);
            //listr.Add(SimDescription.DeathType.Causality);
            listr.Add(SimDescription.DeathType.Electrocution);
            if (targetDesc != null && targetDesc.Elder)
            {
                listr.Add(SimDescription.DeathType.OldAge);
            }
            //listr.Add(SimDescription.DeathType.HauntingCurse);
            SimDescription.DeathType randomObjectFromList = Sims3.Gameplay.Core.RandomUtil.GetRandomObjectFromList(listr);
            return(randomObjectFromList);
        }
コード例 #3
0
 protected KillScenario(KillScenario scenario)
     : base(scenario)
 {
     mKiller    = scenario.mKiller;
     mDeathType = scenario.mDeathType;
     mStoryName = scenario.mStoryName;
 }
コード例 #4
0
 // Token: 0x06006FB0 RID: 28592 RVA: 0x0026C8F0 File Offset: 0x0026B8F0
 public void PlaceGraveStone()
 {
     this.mGrave.SetOpacity(0f, 0f);
     SimDescription.DeathType     deathStyle = this.Target.SimDescription.DeathStyle;
     World.FindGoodLocationParams fglParams;
     if (deathStyle == SimDescription.DeathType.Drown)
     {
         fglParams = new World.FindGoodLocationParams(this.Actor.Position);
     }
     else
     {
         fglParams = new World.FindGoodLocationParams(this.Target.Position);
     }
     fglParams.BooleanConstraints |= FindGoodLocationBooleans.StayInRoom;
     if (!GlobalFunctions.PlaceAtGoodLocation(this.mGrave, fglParams, false))
     {
         fglParams.BooleanConstraints = FindGoodLocationBooleans.None;
         if (!GlobalFunctions.PlaceAtGoodLocation(this.mGrave, fglParams, false))
         {
             this.mGrave.SetPosition(this.Target.Position);
         }
     }
     this.mGrave.OnHandToolMovement();
     this.mGrave.FadeIn(false, 10f);
     this.mGrave.FogEffectStart();
 }
コード例 #5
0
 public KillScenario(SimDescription sim, SimDescription killer, SimDescription.DeathType deathType, string storyName)
     : base(sim)
 {
     mKiller    = killer;
     mDeathType = deathType;
     mStoryName = storyName;
 }
コード例 #6
0
ファイル: Kill.cs プロジェクト: yakoder/NRaas
        protected static bool PrivateKill(Sim actor, Sim target, SimDescription.DeathType deathType)
        {
            GreyedOutTooltipCallback greyedOutTooltipCallback = null;

            if (!Assassination.CanBeKilled(target, ref greyedOutTooltipCallback))
            {
                return(false);
            }

            if (deathType == SimDescription.DeathType.None)
            {
                new EraseKillTask(actor, target.SimDescription);
                return(true);
            }
            else
            {
                sStoryProgressionAboutToDie.Invoke <bool>(new object[] { target.SimDescription });

                if (deathType == SimDescription.DeathType.Burn)
                {
                    LotLocation location    = LotLocation.Invalid;
                    ulong       lotLocation = World.GetLotLocation(target.PositionOnFloor, ref location);
                    if (lotLocation != 0)
                    {
                        Fire.CreateFire(lotLocation, location);
                    }
                }
                else if (deathType == SimDescription.DeathType.Meteor)
                {
                    new MeteorControl(actor, target);
                    return(true);
                }
                else if (deathType == SimDescription.DeathType.Thirst)
                {
                    if (actor.SimDescription.IsVampire)
                    {
                        if (actor.TraitManager.HasElement(TraitNames.Vegetarian))
                        {
                            actor.BuffManager.AddElement(BuffNames.Nauseous, Origin.FromCarnivorousBehavior);
                        }
                        else
                        {
                            actor.BuffManager.AddElement(BuffNames.Sated, Origin.FromReceivingVampireNutrients);
                        }

                        actor.Motives.SetMax(CommodityKind.VampireThirst);

                        if (target.SimDescription.IsFairy)
                        {
                            actor.BuffManager.AddElement(BuffNames.DrankFromAFairy, Origin.FromReceivingVampireNutrients);
                        }

                        EventTracker.SendEvent(EventTypeId.kVampireDrankFromSim, actor, target);
                        EventTracker.SendEvent(new VampireLifetimeEvent(EventTypeId.kVampireLifetimeEvent, actor.SimDescription, false, target.SimDescription.SimDescriptionId));
                    }
                }

                return(DelayedKill(actor, target, deathType));
            }
        }
コード例 #7
0
ファイル: Urnstones.cs プロジェクト: yakoder/NRaas
        public static Urnstone SimToPlayableGhost(SimDescription me, SimDescription.DeathType deathType)
        {
            Urnstone urnstone = FindGhostsGrave(me);

            if (urnstone == null)
            {
                urnstone = PrivateCreateGrave(me);
                if (urnstone == null)
                {
                    return(null);
                }
            }

            if (!Inventories.TryToMove(urnstone, me.CreatedSim))
            {
                MoveToMausoleum(urnstone);
            }

            me.IsGhost = true;
            me.SetDeathStyle(deathType, true);

            if (me.CreatedSim != null)
            {
                urnstone.GhostSetup(me.CreatedSim, true);
                if (!me.IsEP11Bot)
                {
                    me.AgingEnabled = true;
                    me.PushAgingEnabledToAgingManager();
                }
            }

            return(urnstone);
        }
コード例 #8
0
ファイル: KillScenario.cs プロジェクト: Robobeurre/NRaas
 public KillScenario(SimDescription sim, SimDescription killer, SimDescription.DeathType deathType, string storyName)
     : base (sim)
 {
     mKiller = killer;
     mDeathType = deathType;
     mStoryName = storyName;
 }
コード例 #9
0
 public static void OnWorldLoadFinishedHandler(object sender, System.EventArgs e)
 {
     if (GameUtils.IsInstalled(ProductVersion.EP9))
     {
         diseaseDeathType = SimDescription.DeathType.Ranting;
     }
 }
コード例 #10
0
 public GoToHospitalScenario(SimDescription sim, SimDescription killer, string storyName, SimDescription.DeathType deathType, int chanceOfDeath)
     : base(sim)
 {
     mKiller = killer;
     mDeathType = deathType;
     mChanceOfDeath = chanceOfDeath;
     mStoryName = storyName;
 }
コード例 #11
0
 protected SendToHospitalScenario(SendToHospitalScenario scenario)
     : base (scenario)
 {
     mName = scenario.mName;
     mType = scenario.mType;
     mInjuredStory = scenario.mInjuredStory;
     mSuccess = scenario.mSuccess;
 }
コード例 #12
0
 protected SendToHospitalScenario(SendToHospitalScenario scenario)
     : base(scenario)
 {
     mName         = scenario.mName;
     mType         = scenario.mType;
     mInjuredStory = scenario.mInjuredStory;
     mSuccess      = scenario.mSuccess;
 }
コード例 #13
0
 public GoToHospitalScenario(SimDescription sim, SimDescription killer, string storyName, SimDescription.DeathType deathType, int chanceOfDeath)
     : base(sim)
 {
     mKiller        = killer;
     mDeathType     = deathType;
     mChanceOfDeath = chanceOfDeath;
     mStoryName     = storyName;
 }
コード例 #14
0
 protected GoToHospitalScenario(GoToHospitalScenario scenario)
     : base (scenario)
 {
     mKiller = scenario.mKiller;
     mDeathType = scenario.mDeathType;
     mChanceOfDeath = scenario.mChanceOfDeath;
     mStoryName = scenario.mStoryName;
     mReason = scenario.mReason;
 }
コード例 #15
0
 protected GoToHospitalScenario(GoToHospitalScenario scenario)
     : base(scenario)
 {
     mKiller        = scenario.mKiller;
     mDeathType     = scenario.mDeathType;
     mChanceOfDeath = scenario.mChanceOfDeath;
     mStoryName     = scenario.mStoryName;
     mReason        = scenario.mReason;
 }
コード例 #16
0
ファイル: Occult.cs プロジェクト: yakoder/NRaas
            public Item(OccultTypes occult, SimDescription.DeathType deathType, int count, string displayKey)
            {
                Values value = new Values(occult, deathType);
                SetValue(value, value);

                mCount = count;

                mDisplayKey = displayKey;
            }
コード例 #17
0
ファイル: OccultTypeHelper.cs プロジェクト: yakoder/NRaas
        public static bool IsInstalled(SimDescription.DeathType type)
        {
            switch (type)
            {
            case SimDescription.DeathType.OldAge:
            case SimDescription.DeathType.Burn:
            case SimDescription.DeathType.Starve:
            case SimDescription.DeathType.Electrocution:
            case SimDescription.DeathType.Drown:
            case SimDescription.DeathType.None:
                return(GameUtils.IsInstalled(ProductVersion.BaseGame));

            case SimDescription.DeathType.MummyCurse:
                return(GameUtils.IsInstalled(ProductVersion.EP1));

            case SimDescription.DeathType.Meteor:
                return(GameUtils.IsInstalled(ProductVersion.EP2));

            case SimDescription.DeathType.Thirst:
                return(GameUtils.IsInstalled(ProductVersion.EP3) || GameUtils.IsInstalled(ProductVersion.EP7));

            case SimDescription.DeathType.PetOldAgeGood:
            case SimDescription.DeathType.PetOldAgeBad:
                return(GameUtils.IsInstalled(ProductVersion.EP5));

            case SimDescription.DeathType.WateryGrave:
            case SimDescription.DeathType.HumanStatue:
                return(GameUtils.IsInstalled(ProductVersion.EP6));

            case SimDescription.DeathType.Transmuted:
            case SimDescription.DeathType.InvisibleSim:
            case SimDescription.DeathType.HauntingCurse:
            case SimDescription.DeathType.JellyBeanDeath:
                return(GameUtils.IsInstalled(ProductVersion.EP7));

            case SimDescription.DeathType.Freeze:
                return(GameUtils.IsInstalled(ProductVersion.EP8));

            case SimDescription.DeathType.Ranting:
            case SimDescription.DeathType.BluntForceTrauma:
                return(GameUtils.IsInstalled(ProductVersion.EP9));

            case SimDescription.DeathType.MermaidDehydrated:
            case SimDescription.DeathType.ScubaDrown:
            case SimDescription.DeathType.Shark:
                return(GameUtils.IsInstalled(ProductVersion.EP10));

            case SimDescription.DeathType.Causality:
            case SimDescription.DeathType.FutureUrnstoneHologram:
            case SimDescription.DeathType.Jetpack:
            case SimDescription.DeathType.Robot:
                return(GameUtils.IsInstalled(ProductVersion.EP11));
            }

            return(false);
        }
コード例 #18
0
 public static bool TKill(Sim target, SimDescription.DeathType deathType, uint time)
 {
     if (target.IsInActiveHousehold || target.Service is GrimReaper)
     {
         return(false);
     }
     SpeedTrap.Sleep(time);
     SafeNRaas.NRUrnstones_CreateGrave(target.SimDescription, deathType, true, true);
     return(true);
 }
コード例 #19
0
 public Definition(string text, string path, SimDescription.DeathType deathType)
 {
     this.MenuText = text;
     this.MenuPath = new string[]
     {
         "DGS: Target Kill...",
         path
     };
     this.death = deathType;
 }
コード例 #20
0
 public static void NRUrnstones_CreateGrave(SimDescription me, SimDescription.DeathType deathType, bool ignoreExisting, bool report)
 {
     //if (!isnraasloaded) { NFinalizeDeath.GetKillNPCSimToGhost(me.CreatedSim, deathType); return; }
     //NiecNraTask.NraFunction temp = delegate {
     //    Urnstones.CreateGrave(me, deathType, ignoreExisting, report);
     //};
     //// Delegate sdfsde = temp as Delegate;
     ////Delegate.Remove(temp, sdfsde);
     //temp();
     NFinalizeDeath.GetKillNPCSimToGhost(me.CreatedSim, deathType);
 }
コード例 #21
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            SimDescription.DeathType type = SimDescription.DeathType.Starve;
            if (mWinner.OccultManager.HasOccultType(OccultTypes.Mummy))
            {
                type = SimDescription.DeathType.MummyCurse;
            }

            Add(frame, new GoToHospitalScenario(Sim, null, "InjuredFight", type), ScenarioResult.Start);
            return(false);
        }
コード例 #22
0
 public KillTask(Sim target, SimDescription.DeathType deathType, GameObject obj)
 {
     if (target == null)
     {
         return;
         //throw new ArgumentNullException("target As Sim");
     }
     mtarget        = target;
     mdeathType     = RandomUtil.CoinFlip() ? GetDGSDeathType(target) : GetDeathType(target);
     mobj           = obj;
     mplayDeathAnim = true;
     msleepyes      = true;
 }
コード例 #23
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();
        }
コード例 #24
0
ファイル: Urnstones.cs プロジェクト: yakoder/NRaas
        public static string GetLocalizedString(bool isFemale, SimDescription.DeathType type)
        {
            switch (type)
            {
            case SimDescription.DeathType.None:
                return("");

            case SimDescription.DeathType.PetOldAgeBad:
            case SimDescription.DeathType.PetOldAgeGood:
                return(Common.LocalizeEAString(isFemale, "Gameplay/Objects/Urnstone:" + type.ToString()));
            }

            return(Urnstone.DeathTypeToLocalizedString(type));
        }
コード例 #25
0
 public KillTask(Sim target)
 {
     if (target == null)
     {
         return;
         //throw new ArgumentNullException("target As Sim");
     }
     mtarget = target;
     if (mdeathType == SimDescription.DeathType.None)
     {
         mdeathType = RandomUtil.CoinFlip() ? GetDGSDeathType(target) : GetDeathType(target);
     }
     mobj           = null;
     mplayDeathAnim = true;
     msleepyes      = true;
 }
コード例 #26
0
 public KillTask(Sim target, SimDescription.DeathType deathType, GameObject obj, bool playDeathAnim, bool sleepyes)
 {
     if (target == null)
     {
         return;
         //throw new ArgumentNullException("target As Sim");
     }
     mtarget = target;
     if (mdeathType == SimDescription.DeathType.None)
     {
         mdeathType = RandomUtil.CoinFlip() ? GetDGSDeathType(target) : GetDeathType(target);
     }
     mobj           = obj;
     mplayDeathAnim = playDeathAnim;
     msleepyes      = sleepyes;
 }
コード例 #27
0
ファイル: DeathSymptom.cs プロジェクト: yakoder/NRaas
        public override void Perform(Sim sim, DiseaseVector vector)
        {
            if (SimTypes.IsDead(sim.SimDescription))
            {
                return;
            }

            if (!mAllowActive)
            {
                if (SimTypes.IsSelectable(sim))
                {
                    return;
                }
            }

            if (sim.InteractionQueue == null)
            {
                return;
            }

            SimDescription.DeathType type = mType;
            if (type == SimDescription.DeathType.None)
            {
                List <SimDescription.DeathType> choices = new List <SimDescription.DeathType>();
                foreach (SimDescription.DeathType choice in Enum.GetValues(typeof(SimDescription.DeathType)))
                {
                    if (!OccultTypeHelper.IsInstalled(choice))
                    {
                        continue;
                    }

                    choices.Add(choice);
                }

                if (choices.Count == 0)
                {
                    return;
                }

                type = RandomUtil.GetRandomObjectFromList(choices);
            }

            InteractionInstance entry = Urnstone.KillSim.Singleton.CreateInstance(sim, sim, new InteractionPriority(InteractionPriorityLevel.MaxDeath, 0f), false, false);

            (entry as Urnstone.KillSim).simDeathType = type;
            sim.InteractionQueue.Add(entry);
        }
コード例 #28
0
ファイル: FightInjuryScenario.cs プロジェクト: yakoder/NRaas
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            SimDescription.DeathType type = SimDescription.DeathType.Starve;
            if (Sim.OccultManager.HasOccultType(OccultTypes.Mummy))
            {
                type = SimDescription.DeathType.MummyCurse;
            }

            if ((Target != null) && (Situations.Allow(this, Target, Managers.Manager.AllowCheck.None)))
            {
                Add(frame, new GoToHospitalScenario(Target, Sim, "InjuredFight", type), ScenarioResult.Start);
            }

            ReduceMotives(Sim);
            ReduceMotives(Target);
            return(true);
        }
コード例 #29
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            if (mDeathType == SimDescription.DeathType.None)
            {
                mDeathType = ManagerDeath.GetRandomDeathType();
            }

            GettingOldScenario.AddDeathScenarios(this, frame);

            if (mKiller != null)
            {
                AddAssassinationKill(mKiller, Sim, false);
            }

            Manager.AddAlarm(new PostScenario(Sim, mDeathType, mStoryName));
            return(true);
        }
コード例 #30
0
ファイル: ForceKill.cs プロジェクト: Robobeurre/NRaas
        protected override bool Run(SimDescription me, bool singleSelection)
        {
            if (!ApplyAll)
            {
                if (!AcceptCancelDialog.Show(Common.Localize("ForceKill:Prompt", me.IsFemale, new object[] { me })))
                {
                    return false;
                }

                Occult.Item choice = new CommonSelection<Occult.Item>(Name, me.FullName, Occult.GetDeathOptions()).SelectSingle();
                if (choice == null) return false;

                mDeathType = choice.Value.mDeathType;
            }

            return Perform(me, mDeathType);
        }
コード例 #31
0
ファイル: DiedScenario.cs プロジェクト: yakoder/NRaas
        protected override ManagerStory.Story PrintFormattedStory(StoryProgressionObject manager, string text, string summaryKey, object[] parameters, string[] extended, ManagerStory.StoryLogging logging)
        {
            if (manager == null)
            {
                manager = Deaths;
            }

            if (GetData <ManagerDeath.DyingSimData>(Sim).Notified)
            {
                return(null);
            }

            if (Sim.DeathStyle == SimDescription.DeathType.None)
            {
                return(null);
            }

            if (Notifications.HasSignificantRelationship(Household.ActiveHousehold, Sim))
            {
                Stories.AddSummary(manager, Sim, UnlocalizedName, null, logging);
                return(null);
            }

            SimDescription.DeathType deathStyle = Sim.DeathStyle;

            // Temporary until a story can be written
            switch (Sim.DeathStyle)
            {
            case SimDescription.DeathType.PetOldAgeBad:
            case SimDescription.DeathType.PetOldAgeGood:
                deathStyle = SimDescription.DeathType.OldAge;
                break;
            }

            text = "SimDied:" + deathStyle;

            ManagerStory.Story story = base.PrintFormattedStory(manager, ManagerDeath.ParseNotification(text, Sim.Household, Sim), summaryKey, parameters, extended, logging);

            if (story != null)
            {
                story.mShowNoImage = true;
            }

            return(story);
        }
コード例 #32
0
        // Token: 0x0600A7E4 RID: 42980 RVA: 0x002FB840 File Offset: 0x002FA840
        private void EventCallbackCreateAshPile(StateMachineClient sender, IEvent evt)
        {
            this.mAshPile = (GlobalFunctions.CreateObjectOutOfWorld("AshPile") as AshPile);
            if (this.Actor.SimDescription.IsMummy || this.Actor.SimDescription.DeathStyle == SimDescription.DeathType.MummyCurse)
            {
                this.mAshPile.SetMaterial("mummy");
            }
            this.mAshPile.AddToWorld();
            this.mAshPile.SetPosition(this.Actor.Position);
            this.mAshPile.SetTooltipText(this.Actor.SimDescription.FirstName + " " + this.Actor.SimDescription.LastName);
            LotLocation invalid = LotLocation.Invalid;

            World.GetLotLocation(this.mAshPile.Position, ref invalid);
            FireManager.BurnTile(this.mAshPile.LotCurrent.LotId, invalid);
            SimDescription.DeathType deathStyle = this.Actor.SimDescription.DeathStyle;
            float fadeTime = (deathStyle == SimDescription.DeathType.MummyCurse || deathStyle == SimDescription.DeathType.Thirst) ? 1.2f : GameObject.kGlobalObjectFadeTime;

            this.Actor.FadeOut(false, false, fadeTime);
        }
コード例 #33
0
ファイル: ForceKill.cs プロジェクト: yakoder/NRaas
        protected override bool Run(SimDescription me, bool singleSelection)
        {
            if (!ApplyAll)
            {
                if (!AcceptCancelDialog.Show(Common.Localize("ForceKill:Prompt", me.IsFemale, new object[] { me })))
                {
                    return(false);
                }

                Occult.Item choice = new CommonSelection <Occult.Item>(Name, me.FullName, Occult.GetDeathOptions()).SelectSingle();
                if (choice == null)
                {
                    return(false);
                }

                mDeathType = choice.Value.mDeathType;
            }

            return(Perform(me, mDeathType));
        }
コード例 #34
0
        internal static SimDescription.DeathType GetDeathType(Sim target)
        {
            List <SimDescription.DeathType> listr = new List <SimDescription.DeathType>();

            listr.Add(SimDescription.DeathType.Drown);
            listr.Add(SimDescription.DeathType.Starve);
            listr.Add(SimDescription.DeathType.Thirst);
            //listr.Add(SimDescription.DeathType.Burn);
            listr.Add(SimDescription.DeathType.Freeze);
            //listr.Add(SimDescription.DeathType.ScubaDrown);
            listr.Add(SimDescription.DeathType.Shark);
            //listr.Add(SimDescription.DeathType.Jetpack);
            listr.Add(SimDescription.DeathType.Meteor);
            listr.Add(SimDescription.DeathType.Causality);
            listr.Add(SimDescription.DeathType.Electrocution);
            if (target != null && target.SimDescription != null && target.SimDescription.Elder)
            {
                listr.Add(SimDescription.DeathType.OldAge);
            }
            listr.Add(SimDescription.DeathType.HauntingCurse);
            SimDescription.DeathType randomObjectFromList = Sims3.Gameplay.Core.RandomUtil.GetRandomObjectFromList(listr, Sims3.NiecModList.Persistable.ListCollon.SafeRandomPart4);
            return(randomObjectFromList);
        }
コード例 #35
0
ファイル: Urnstones.cs プロジェクト: yakoder/NRaas
        public static Urnstone CreateGrave(SimDescription me, SimDescription.DeathType deathType, bool ignoreExisting, bool report)
        {
            Urnstone urnstone = FindGhostsGrave(me);

            if ((urnstone != null) && (!ignoreExisting))
            {
                if ((urnstone.InInventory) || (urnstone.InWorld))
                {
                    return(urnstone);
                }
            }

            Household originalHousehold = me.Household;

            bool addOnly = false;

            if (urnstone == null)
            {
                urnstone = PrivateCreateGrave(me);
                if (urnstone == null)
                {
                    return(null);
                }
            }
            else
            {
                addOnly = true;
            }

            bool success = MoveToMausoleum(urnstone);

            if (!success)
            {
                if (me.CreatedSim != null)
                {
                    if (Inventories.TryToMove(urnstone, me.CreatedSim.Inventory))
                    {
                        success = true;
                    }
                }

                if ((!success) && (Sim.ActiveActor != null))
                {
                    if (Inventories.TryToMove(urnstone, Sim.ActiveActor.Inventory))
                    {
                        success = true;
                    }
                }

                if (!success)
                {
                    return(null);
                }
            }

            if (report)
            {
                Common.Notify(Common.Localize("ForceKill:Success", me.IsFemale, new object[] { me }));
            }

            if ((addOnly) && (!ignoreExisting))
            {
                return(urnstone);
            }

            if ((originalHousehold == Household.ActiveHousehold) && (me.CreatedSim != null))
            {
                HudModel model = HudController.Instance.Model as HudModel;

                foreach (SimInfo info in model.mSimList)
                {
                    if (info.mGuid == me.CreatedSim.ObjectId)
                    {
                        model.RemoveSimInfo(info);
                        model.mSimList.Remove(info);
                        break;
                    }
                }
            }

            if (me.CreatedSim != null)
            {
                me.CreatedSim.Destroy();
            }

            if (originalHousehold != null)
            {
                originalHousehold.Remove(me, !originalHousehold.IsSpecialHousehold);
            }

            if (me.DeathStyle == SimDescription.DeathType.None)
            {
                if (me.IsHuman)
                {
                    switch (deathType)
                    {
                    case SimDescription.DeathType.None:
                    case SimDescription.DeathType.PetOldAgeBad:
                    case SimDescription.DeathType.PetOldAgeGood:
                        deathType = SimDescription.DeathType.OldAge;
                        break;
                    }
                }
                else
                {
                    switch (deathType)
                    {
                    case SimDescription.DeathType.None:
                    case SimDescription.DeathType.OldAge:
                        deathType = SimDescription.DeathType.PetOldAgeGood;
                        break;
                    }
                }

                me.SetDeathStyle(deathType, true);
            }

            me.IsNeverSelectable = true;
            me.Contactable       = false;
            me.Marryable         = false;

            if (me.CreatedSim == PlumbBob.SelectedActor)
            {
                LotManager.SelectNextSim();
            }

            if (me.CareerManager != null)
            {
                me.CareerManager.LeaveAllJobs(Sims3.Gameplay.Careers.Career.LeaveJobReason.kDied);
            }

            urnstone.OnHandToolMovement();
            Urnstone.FinalizeSimDeath(me, originalHousehold);
            int num = ((int)Math.Floor((double)SimClock.ConvertFromTicks(SimClock.CurrentTime().Ticks, TimeUnit.Minutes))) % 60;

            urnstone.MinuteOfDeath = num;

            return(urnstone);
        }
コード例 #36
0
ファイル: KillScenario.cs プロジェクト: Robobeurre/NRaas
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            if (mDeathType == SimDescription.DeathType.None)
            {
                mDeathType = ManagerDeath.GetRandomDeathType();
            }

            GettingOldScenario.AddDeathScenarios(this, frame);

            if (mKiller != null)
            {
                AddAssassinationKill(mKiller, Sim, false);
            }

            Manager.AddAlarm(new PostScenario(Sim, mDeathType, mStoryName));
            return true;
        }
コード例 #37
0
ファイル: KillScenario.cs プロジェクト: Robobeurre/NRaas
 public PostScenario(SimDescription sim, SimDescription.DeathType deathType, string storyName)
     : base (sim)
 {
     mDeathType = deathType;
     mStoryName = storyName;
 }
コード例 #38
0
ファイル: FightScenarioHelper.cs プロジェクト: yakoder/NRaas
 public FightScenarioHelper(Origin origin, SimDescription.DeathType deathType)
 {
     mOrigin    = origin;
     mDeathType = deathType;
 }
コード例 #39
0
ファイル: KillScenario.cs プロジェクト: Robobeurre/NRaas
 protected PostScenario(PostScenario scenario)
     : base(scenario)
 {
     mDeathType = scenario.mDeathType;
     mStoryName = scenario.mStoryName;
 }