Esempio n. 1
0
        public override bool Run()
        {
            Common.StringBuilder msg = new Common.StringBuilder(GetType().FullName + ":Run");

            try
            {
                msg += "A";

                IWooHooDefinition interactionDefinition = InteractionDefinition as IWooHooDefinition;

                Sim selectedObject = GetSelectedObject() as Sim;                 //interactionDefinition.GetTarget(Actor, Target, this);
                if (selectedObject == null)
                {
                    return(false);
                }

                msg += "B";

                bool impregnate = true;

                RabbitHoleRomanticType romanticType = RabbitHoleRomanticType.WooHoo;
                if (interactionDefinition.GetStyle(this) == CommonWoohoo.WoohooStyle.TryForBaby)
                {
                    romanticType = RabbitHoleRomanticType.TryForBaby;
                }
                CommonWoohoo.WoohooStyle style = interactionDefinition.GetStyle(this);

                TVisitInteraction currentInteraction = selectedObject.CurrentInteraction as TVisitInteraction;
                if (currentInteraction != null)
                {
                    msg += "C";

                    ConfigureWooHooInteraction(currentInteraction, selectedObject, romanticType, impregnate, style);

                    /*currentInteraction.IsGettingItOn = true;
                     * currentInteraction.WooHooer = Actor;
                     * currentInteraction.WooHooee = selectedObject;
                     *
                     * if (interactionDefinition.GetStyle(this) == CommonWoohoo.WoohooStyle.TryForBaby)
                     * {
                     *      currentInteraction.RomanticType = RabbitHoleRomanticType.TryForBaby;
                     * }
                     * else
                     * {
                     *      currentInteraction.RomanticType = RabbitHoleRomanticType.WooHoo;
                     * }
                     *
                     * currentInteraction.mImpregnate = impregnate;
                     * currentInteraction.mStyle = interactionDefinition.GetStyle(this);
                     * currentInteraction.ActiveStage = currentInteraction.GetStages()[0x1];*/

                    impregnate = false;
                }

                currentInteraction = Actor.CurrentInteraction as TVisitInteraction;
                if (currentInteraction != null)
                {
                    msg += "D";

                    if (Makeout)
                    {
                        romanticType = RabbitHoleRomanticType.MakeOut;
                    }
                    ConfigureWooHooInteraction(currentInteraction, selectedObject, romanticType, impregnate, style);

                    /*currentInteraction.IsGettingItOn = true;
                     * currentInteraction.WooHooer = Actor;
                     * currentInteraction.WooHooee = selectedObject;
                     *
                     * if (interactionDefinition.Makeout)
                     * {
                     *      currentInteraction.RomanticType = RabbitHoleRomanticType.MakeOut;
                     * }
                     * else if (interactionDefinition.GetStyle(this) == CommonWoohoo.WoohooStyle.TryForBaby)
                     * {
                     *      currentInteraction.RomanticType = RabbitHoleRomanticType.TryForBaby;
                     * }
                     * else
                     * {
                     *      currentInteraction.RomanticType = RabbitHoleRomanticType.WooHoo;
                     * }
                     * currentInteraction.mImpregnate = impregnate;
                     * currentInteraction.mStyle = interactionDefinition.GetStyle(this);
                     * currentInteraction.ActiveStage = currentInteraction.GetStages()[0x1];*/
                }

                msg += "E";

                Target.RabbitHoleProxy.TurnOnWooHooEffect();

                CommonWoohoo.CheckForWitnessedCheating(Actor, selectedObject, true);

                if (Makeout)
                {
                    EventTracker.SendEvent(new WooHooEvent(EventTypeId.kMadeOut, Actor, selectedObject, Target));
                    EventTracker.SendEvent(new WooHooEvent(EventTypeId.kMadeOut, selectedObject, Actor, Target));

                    EventTracker.SendEvent(new SocialEvent(EventTypeId.kSocialInteraction, Actor, selectedObject, "Make Out", false, true, false, CommodityTypes.Undefined));
                    EventTracker.SendEvent(new SocialEvent(EventTypeId.kSocialInteraction, selectedObject, Actor, "Make Out", true, true, false, CommodityTypes.Undefined));
                }

                return(true);
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, msg, e);
                return(false);
            }
            finally
            {
                Common.DebugNotify(msg);
            }
        }
Esempio n. 2
0
        public static void GettingItOnInRabbitHole(InteractionInstance instance, Sim wooHooer, Sim wooHooee, RabbitHoleRomanticType romanticType, RabbitHole.VisitRabbitHoleTuningClass visitTuning, CommonWoohoo.WoohooStyle style, CommonWoohoo.WoohooLocation location, bool impregnate)
        {
            RabbitHole target = instance.Target as RabbitHole;

            if (instance.InstanceActor == wooHooer)
            {
                switch (romanticType)
                {
                case RabbitHoleRomanticType.TryForBaby:
                case RabbitHoleRomanticType.WooHoo:
                    CommonWoohoo.RunPostWoohoo(wooHooer, wooHooee, target, style, location, true);
                    break;
                }

                Relationship relationship = Relationship.Get(wooHooer, wooHooee, true);
                if (relationship != null)
                {
                    relationship.UpdateSTCFromOutsideConversation(wooHooer, wooHooee, visitTuning.WooHooingCommodity, visitTuning.WooHooingSTCIncrement);
                }
            }

            if ((impregnate) && (CommonPregnancy.IsSuccess(wooHooer, wooHooee, instance.Autonomous, style)))
            {
                CommonPregnancy.Impregnate(wooHooer, wooHooee, instance.Autonomous, style);
            }

            target.RabbitHoleProxy.TurnOffWooHooEffect();
        }
Esempio n. 3
0
        public void ConfigureWooHooInteraction(TVisitInteraction currentInteraction, Sim selectedObject, RabbitHoleRomanticType romanticType, bool impregnate, CommonWoohoo.WoohooStyle style)
        {
            currentInteraction.IsGettingItOn = true;
            currentInteraction.WooHooer      = Actor;
            currentInteraction.WooHooee      = selectedObject;

            currentInteraction.RomanticType = romanticType;

            SetWooHooImpregnateAndStyle(currentInteraction, impregnate, style);
            currentInteraction.ActiveStage = currentInteraction.GetStages()[0x1];
        }