コード例 #1
0
ファイル: EventChoice.cs プロジェクト: yakoder/NRaas
        public override void GiveRewards(bool bDialogResult, Sim sim, string icon, Origin origin)
        {
            if (bDialogResult)
            {
                if (RewardsManager.CheckForWin(mChanceToWin, mModifiersList, sim))
                {
                    base.ShowEventTNS(Common.LocalizeEAString(sim.IsFemale, mYesResultText, new object[] { sim }), sim.ObjectId, icon);
                    RewardsManager.GiveRewards(mYesRewardsList, sim, origin);

                    RewardInfoEx.GiveRewards(sim, null, mYesRewardsList);
                }
                else
                {
                    base.ShowEventTNS(Common.LocalizeEAString(sim.IsFemale, mYesLoseResultText, new object[] { sim }), sim.ObjectId, icon);
                    RewardsManager.GiveRewards(mYesLoseRewardsList, sim, origin);

                    RewardInfoEx.GiveRewards(sim, null, mYesLoseRewardsList);
                }
            }
            else
            {
                base.ShowEventTNS(Common.LocalizeEAString(sim.IsFemale, mNoResultText, new object[] { sim }), sim.ObjectId, icon);
                RewardsManager.GiveRewards(mNoRewardsList, sim, origin);

                RewardInfoEx.GiveRewards(sim, null, mNoRewardsList);
            }
        }
コード例 #2
0
ファイル: OpportunityEx.cs プロジェクト: yakoder/NRaas
        public override void OnCompletion(out OpportunityNames triggerOpportunity)
        {
            bool      opportunityWin = RewardsManager.CheckForWin(mSharedData.mCompletionWinChance, mSharedData.mModifierList, Actor);
            ArrayList rewardsList    = opportunityWin ? mSharedData.mWinRewardsList : mSharedData.mLossRewardsList;

            RewardInfoEx.GiveRewards(Actor, TargetObject, rewardsList);

            base.OnCompletion(out triggerOpportunity);
        }