コード例 #1
0
        public override void ApplyAvatarChange(LogicClientAvatar avatar)
        {
            avatar.SetDuelScore(avatar.GetDuelScore() + this.DuelScoreGain);

            switch (this.ResultType)
            {
            case 0:
                avatar.SetDuelLoseCount(avatar.GetDuelLoseCount() + 1);
                break;

            case 1:
                avatar.SetDuelWinCount(avatar.GetDuelWinCount() + 1);
                break;

            case 2:
                avatar.SetDuelDrawCount(avatar.GetDuelDrawCount() + 1);
                break;
            }
        }
コード例 #2
0
        public override int Execute(LogicLevel level)
        {
            LogicClientAvatar playerAvatar = level.GetPlayerAvatar();

            if (playerAvatar != null)
            {
                playerAvatar.SetDuelScore(playerAvatar.GetDuelScore() + this.m_scoreGain);

                switch (this.m_resultType)
                {
                case 0:
                    playerAvatar.SetDuelLoseCount(playerAvatar.GetDuelLoseCount() + 1);
                    break;

                case 1:
                    playerAvatar.SetDuelWinCount(playerAvatar.GetDuelWinCount() + 1);
                    break;

                case 2:
                    playerAvatar.SetDuelDrawCount(playerAvatar.GetDuelDrawCount() + 1);
                    break;
                }

                level.GetAchievementManager().RefreshStatus();

                LogicAvatar homeOwnerAvatar = level.GetHomeOwnerAvatar();

                if (homeOwnerAvatar.GetChangeListener() != null)
                {
                    homeOwnerAvatar.GetChangeListener().DuelScoreChanged(homeOwnerAvatar.GetAllianceId(), this.m_scoreGain, this.m_resultType, true);
                }

                return(0);
            }

            return(-1);
        }