Ejemplo n.º 1
0
        public override bool RunBehavior()
        {
            GameObject gameObject = this.mDestination.Object.GetContainedObject(this.mDestination.PlacementSlot) as GameObject;
            TrueBlood  tb         = gameObject as TrueBlood;

            if (tb != null)
            {
                int num;
                if (this.RunPaymentBehavior(out num))
                {
                    Sim        instanceActor = this.LinkedInteractionInstance.InstanceActor;
                    Bartending bartending    = (Bartending)instanceActor.SkillManager.AddElement(SkillNames.Bartending);
                    if (bartending != null)
                    {
                        Sim simInChargeOfBar = this.GetSimInChargeOfBar();
                        bartending.OnServedSim(this.Actor, simInChargeOfBar, num, Quality.Nice, this.Target.LotCurrent, DrinkDescription);
                        instanceActor.ModifyFunds(num);
                    }


                    if (CarrySystem.PickUpWithoutRouting(this.Actor, tb, true))
                    {
                        tb.PushEatHeldFoodInteraction(this.Actor);
                    }
                    else
                    {
                        gameObject.FadeOut(false, true);
                    }

                    return(true);
                }
                gameObject.FadeOut(true, true);
            }
            return(false);
        }