示例#1
0
文件: Kill.cs 项目: pepoluan/NRaas
            /*
             * public override InteractionTestResult Test(ref InteractionInstanceParameters parameters, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
             * {
             *  InteractionTestResult result = base.Test(ref parameters, ref greyedOutTooltipCallback);
             *
             *  Common.Notify(result.ToString());
             *
             *  return result;
             * }
             */
            public override bool Test(Sim actor, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if ((mDirect) || (mMassDeath))
                {
                    if (isAutonomous)
                    {
                        return(false);
                    }
                }

                return(Assassination.Allow(actor, target, mType, isAutonomous, mDirect, mMassDeath, ref greyedOutTooltipCallback));
            }
示例#2
0
 public static bool CallbackTest(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
 {
     try
     {
         return(Assassination.Allow(actor, target, SimDescription.DeathType.Drown, isAutonomous, false, false, ref greyedOutTooltipCallback));
     }
     catch (Exception e)
     {
         Common.Exception(actor, target, e);
         return(false);
     }
 }
示例#3
0
            public override bool Test(Sim a, Sim target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (a.FamilyFunds < Assassination.Settings.mHiringCost)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("Funds Fail");
                    return(false);
                }

                if (!Assassination.Allow(a, target, mType, isAutonomous, true, false, ref greyedOutTooltipCallback))
                {
                    return(false);
                }

                return(base.Test(a, target, isAutonomous, ref greyedOutTooltipCallback));
            }
示例#4
0
文件: Thirst.cs 项目: yakoder/NRaas
        public static bool CallbackTest(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
        {
            try
            {
                if (!GameUtils.IsInstalled(ProductVersion.EP3))
                {
                    return(false);
                }

                return(Assassination.Allow(actor, target, SimDescription.DeathType.Thirst, isAutonomous, false, false, ref greyedOutTooltipCallback));
            }
            catch (Exception e)
            {
                Common.Exception(actor, target, e);
                return(false);
            }
        }