예제 #1
0
파일: TrainSim.cs 프로젝트: yakoder/NRaas
        public static bool CallbackTest(Sim actor, Sim target, ActiveTopic topic, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
        {
            try
            {
                if (!SocialTest.TestTrainSim(actor, target, topic, isAutonomous, ref greyedOutTooltipCallback))
                {
                    return(false);
                }

                if (SkillBasedCareerBooter.GetSkillBasedCareer(actor, SkillNames.Athletic) == null)
                {
                    if (actor.SkillManager.GetSkillLevel(SkillNames.Athletic) < AthleticGameObject.TrainSim.kAthleticSkillLevelGate)
                    {
                        return(false);
                    }
                }

                return(true);
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(actor, target, e);
                return(false);
            }
        }
예제 #2
0
        public static bool FightFirstAction(GoToLotSituation parent, GoToLotSituation.MeetUp meetUp)
        {
            try
            {
                GreyedOutTooltipCallback callBack = null;
                if (SocialTest.TestFight(parent.mSimA, parent.mSimB, null, true, ref callBack))
                {
                    StoryProgression.Main.Situations.IncStat("First Action: Fight");

                    meetUp.ForceSituationSpecificInteraction(parent.mSimA, parent.mSimB, new SocialInteractionA.Definition("Fight!", null, null, false), null, meetUp.OnSocialSucceeded, meetUp.OnSocialFailed);
                    return(true);
                }
                else
                {
                    return(EnemyFirstAction(parent, meetUp));
                }
            }
            catch (Exception e)
            {
                Common.DebugException(parent.mSimA, parent.mSimB, e);
                return(false);
            }
        }