// Token: 0x06009AEA RID: 39658 RVA: 0x0035007C File Offset: 0x0034E27C public override void Cleanup() { try { if (this.mDeathProgress != GrimReaperSituation.ReapSoul.DeathProgress.Complete) { if (this.mDeathProgress == GrimReaperSituation.ReapSoul.DeathProgress.None) { this.mGrave = Urnstone.CreateGrave(this.Target.SimDescription, true, false); this.mDeathProgress = GrimReaperSituation.ReapSoul.DeathProgress.GraveCreated; } if (this.mDeathProgress == GrimReaperSituation.ReapSoul.DeathProgress.GraveCreated) { if (!GlobalFunctions.PlaceAtGoodLocation(this.mGrave, new World.FindGoodLocationParams(this.Target.Position), false)) { this.mGrave.SetPosition(this.Target.Position); } this.mGrave.OnHandToolMovement(); this.mDeathProgress = GrimReaperSituation.ReapSoul.DeathProgress.GravePlaced; } if (this.mDeathProgress == GrimReaperSituation.ReapSoul.DeathProgress.GravePlaced) { this.mGrave.GhostSetup(this.Target, false); } if (this.mDeathFlower == null) { this.mDeathFlower = this.Target.Inventory.Find <DeathFlower>(); } if (this.mDeathProgress == GrimReaperSituation.ReapSoul.DeathProgress.UnluckyStarted || (this.Target.Household != null && this.Target.IsInActiveHousehold && this.Target.SimDescription.DeathStyle != (SimDescription.DeathType) 69u)) { this.EventCallbackResurrectSim(); this.Target.AddExitReason(ExitReason.HigherPriorityNext); } else if (this.mDeathProgress == GrimReaperSituation.ReapSoul.DeathProgress.DeathFlowerStarted || this.mDeathFlower != null) { this.Target.Inventory.RemoveByForce(this.mDeathFlower); this.mDeathFlower.Destroy(); this.EventCallbackResurrectSim(); this.Target.AddExitReason(ExitReason.HigherPriorityNext); } else if (this.mDeathProgress != GrimReaperSituation.ReapSoul.DeathProgress.UnluckyPostEvent) { if (this.mDeathProgress == GrimReaperSituation.ReapSoul.DeathProgress.DeathFlowerPostEvent) { if (this.Target.Inventory.Contains(this.mDeathFlower)) { this.Target.Inventory.RemoveByForce(this.mDeathFlower); } if (this.mDeathFlower != null) { this.mDeathFlower.Destroy(); } } else { this.mDeathProgress = GrimReaperSituation.ReapSoul.DeathProgress.NormalStarted; } } if (this.mDeathProgress == GrimReaperSituation.ReapSoul.DeathProgress.NormalStarted) { this.FinalizeDeath(); this.CleanupAndDestroyDeadSim(true); } this.GrimReaperPostSequenceCleanup(); Urnstone.FogEffectTurnAllOff(this.Actor.LotCurrent); this.StopGhostExplosion(); } SMCDeath.EnterState("x", "Enter"); base.Cleanup(); } catch (Exception exception) { Target.FadeIn(); NiecException.PrintMessage(exception.Message + NiecException.NewLine + exception.StackTrace); base.Cleanup(); } }