public override int Execute(LogicLevel level)
        {
            LogicClientAvatar playerAvatar = level.GetPlayerAvatar();

            if (playerAvatar != null)
            {
                playerAvatar.AddDuelReward(this.m_goldCount, this.m_elixirCount, this.m_bonusGoldCount, this.m_bonusElixirCount, this.m_matchId);
                return(0);
            }

            return(-1);
        }
コード例 #2
0
        public void StateChangeConfirmed()
        {
            switch (this.m_data.GetMissionType())
            {
            case 1:
                if (this.m_progress == 0)
                {
                    this.m_level.GetGameMode().StartDefendState(LogicNpcAvatar.GetNpcAvatar(this.m_data.GetDefendNpcData()));
                    this.m_progress = 1;
                }

                break;

            case 7:
            case 8:
            case 9:
            case 10:
            case 11:
            case 20:
            case 21:
                this.m_progress = 1;
                this.Finished();

                break;

            case 16:
                if (this.m_progress == 0)
                {
                    // ?
                }

                this.m_progress += 1;
                break;

            case 19:
                if (this.m_progress == 1)
                {
                    LogicClientAvatar playerAvatar = this.m_level.GetPlayerAvatar();
                    int duelScoreGain = LogicDataTables.GetGlobals().GetVillage2FirstVictoryTrophies();

                    playerAvatar.AddDuelReward(LogicDataTables.GetGlobals().GetVillage2FirstVictoryGold(), LogicDataTables.GetGlobals().GetVillage2FirstVictoryElixir(), 0, 0,
                                               null);
                    playerAvatar.SetDuelScore(playerAvatar.GetDuelScore() + LogicDataTables.GetGlobals().GetVillage2FirstVictoryTrophies());
                    playerAvatar.GetChangeListener().DuelScoreChanged(playerAvatar.GetAllianceId(), duelScoreGain, -1, false);

                    this.m_progress = 2;
                    this.Finished();
                }

                break;
            }
        }