Beispiel #1
0
            public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
            {
                InteractionInstance na = new GiveTattooEx();

                na.Init(ref parameters);
                return(na);
            }
Beispiel #2
0
        public override bool InRabbitHole()
        {
            try
            {
                bool tookSemaphore = mTookSemaphore;
                GiveTattooEx.DisplayCAS(base.Actor, ref tookSemaphore);
                mTookSemaphore = tookSemaphore;

                if (!CelebrityManager.TryModifyFundsWithCelebrityDiscount(Actor, Target, Tattooing.kCostTattooDaySpa, true))
                {
                    return(false);
                }

                EventTracker.SendEvent(EventTypeId.kGotTattoo, Actor);
                Actor.BuffManager.AddElement(BuffNames.FightThePower, Origin.FromTattoo);
                return(true);
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, e);
                return(false);
            }
        }
Beispiel #3
0
 private new void OnDisplayCas()
 {
     try
     {
         if (!Target.Repairable.Broken && (Target.Upgradable.Inkinization || !RandomUtil.RandomChance01(Tattooing.GetChanceOfFailure(Actor, Actor))))
         {
             if (Target.TryDeductFunds(Actor, Actor))
             {
                 bool tookSemaphore = mTookSemaphore;
                 GiveTattooEx.DisplayCAS(Actor, ref tookSemaphore);
                 mTookSemaphore = tookSemaphore;
                 EventTracker.SendEvent(EventTypeId.kGotTattoo, Actor);
             }
         }
         else
         {
             TattooChair.AddFailureTattoo(Actor);
             EventTracker.SendEvent(EventTypeId.kGotTattoo, Actor);
             Actor.ShowTNSIfSelectable(TattooChair.LocalizeString("FailureTnsSelf", new object[] { Actor }), StyledNotification.NotificationStyle.kGameMessageNegative, Target.ObjectId, Actor.ObjectId);
         }
     }
     catch (ResetException)
     {
         throw;
     }
     catch (Exception e)
     {
         Common.Exception(Actor, Target, e);
     }
 }
Beispiel #4
0
 public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters)
 {
     InteractionInstance na = new GiveTattooEx();
     na.Init(ref parameters);
     return na;
 }