Esempio n. 1
0
        public override InteractionInstance CreateVisitInteractionForSim(Sim sim, InteractionDefinition defToPush, List <Sim> alreadyAdded, ref Dictionary <Sim, bool> simArrivalStatus)
        {
            VisitRabbitHoleEx hole = defToPush.CreateInstance(Target, sim, mPriority, false, true) as VisitRabbitHoleEx;

            if (hole != null)
            {
                hole.TourGroup.AddRange(alreadyAdded);
            }
            return(hole);
        }
Esempio n. 2
0
        public override bool InRabbitHole()
        {
            try
            {
                StartStages();
                BeginCommodityUpdates();

                bool succeeded = false;
                try
                {
                    succeeded = DoLoop(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached), new Interaction <Sim, RabbitHole> .InsideLoopFunction(LoopDel), null);
                }
                finally
                {
                    EndCommodityUpdates(succeeded);
                }

                RabbitHole.VisitRabbitHoleBase <EiffelTower.TakeElevatorToTop> .BaseDefinition definition = InteractionDefinition as RabbitHole.VisitRabbitHoleBase <EiffelTower.TakeElevatorToTop> .BaseDefinition;

                if (IsGettingItOn)
                {
                    VisitRabbitHoleEx.GettingItOnInRabbitHole(this, WooHooer, WooHooee, RomanticType, definition.VisitTuning, mStyle, CommonWoohoo.WoohooLocation.EiffelTower, mImpregnate);

                    /*if (Actor == WooHooer)
                     * {
                     *  switch (RomanticType)
                     *  {
                     *      case RabbitHoleRomanticType.TryForBaby:
                     *      case RabbitHoleRomanticType.WooHoo:
                     *                                  CommonWoohoo.RunPostWoohoo(WooHooer, WooHooee, Target, mStyle, CommonWoohoo.WoohooLocation.EiffelTower, true);
                     *          break;
                     *  }
                     *
                     *  Relationship relationship = Relationship.Get(WooHooer, WooHooee, true);
                     *  if (relationship != null)
                     *  {
                     *      relationship.UpdateSTCFromOutsideConversation(WooHooer, WooHooee, definition.VisitTuning.WooHooingCommodity, definition.VisitTuning.WooHooingSTCIncrement);
                     *  }
                     * }
                     *
                     * if ((mImpregnate) && (CommonPregnancy.IsSuccess(WooHooer, WooHooee, Autonomous, mStyle)))
                     * {
                     *  CommonPregnancy.Impregnate(WooHooer, WooHooee, Autonomous, mStyle);
                     * }
                     *
                     * Target.RabbitHoleProxy.TurnOffWooHooEffect();*/
                }

                if (Actor.HasExitReason(ExitReason.StageComplete) || (Actor.HasExitReason(ExitReason.Finished) && !IsGettingItOn))
                {
                    VisitRabbitHoleEx.GiveVisitingBuffs(Actor, Target, definition.VisitTuning, Origin.FromEiffelTower);

                    /*Career occupationAsCareer = Actor.OccupationAsCareer;
                     * if ((occupationAsCareer != null) && (occupationAsCareer.CareerLoc.Owner == Target))
                     * {
                     *  Actor.BuffManager.AddElement(BuffNames.Bored, definition.VisitBuffOrigin);
                     *  return succeeded;
                     * }
                     *
                     * float visitBoredomChanceAdult = definition.VisitTuning.VisitBoredomChanceAdult;
                     * if (Actor.SimDescription.Teen)
                     * {
                     *  visitBoredomChanceAdult = definition.VisitTuning.VisitBoredomChanceTeen;
                     * }
                     * else if (Actor.SimDescription.Child)
                     * {
                     *  visitBoredomChanceAdult = definition.VisitTuning.VisitBoredomChanceChild;
                     * }
                     *
                     * if (RandomUtil.RandomChance(visitBoredomChanceAdult))
                     * {
                     *  Actor.BuffManager.AddElement(BuffNames.Bored, definition.VisitBuffOrigin);
                     *  return succeeded;
                     * }
                     *
                     * BuffNames[] namesArray = new BuffNames[] { BuffNames.Excited, BuffNames.Fascinated, BuffNames.Intrigued, BuffNames.Impressed, BuffNames.Educated };
                     * Actor.BuffManager.AddElement(namesArray[RandomUtil.GetInt(0x4)], definition.VisitBuffOrigin);*/
                }
                return(succeeded);
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, e);
                return(false);
            }
        }