Example #1
0
        protected void ChallengeSuccessful()
        {
            if (this.m_state == ChallengeStateEnum.CHALLENGE_STATE_PENDING)
            {
                this.m_state = ChallengeStateEnum.CHALLENGE_STATE_SUCESSFUL;

                this.UnbindEvents();

                if (!this.Hidden)
                {
                    ContextHandler.SendChallengeResultMessage(this.m_fight.Clients, this.ChallengeId, true);
                }
            }
        }
Example #2
0
        public void UpdateStatus(ChallengeStatusEnum status, FightActor from = null)
        {
            if (Status != ChallengeStatusEnum.RUNNING)
            {
                return;
            }

            Status = status;

            ContextHandler.SendChallengeResultMessage(Fight.Clients, this);

            if (Status == ChallengeStatusEnum.FAILED && @from is CharacterFighter)
            {
                BasicHandler.SendTextInformationMessage(Fight.Clients, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 188, ((CharacterFighter)from).Name, Id);
            }
        }
Example #3
0
        protected void ChallengeFailed()
        {
            if (this.m_state == ChallengeStateEnum.CHALLENGE_STATE_PENDING)
            {
                this.m_state = ChallengeStateEnum.CHALLENGE_STATE_FAILED;

                this.UnbindEvents();

                if (!this.Hidden)
                {
                    ContextHandler.SendChallengeResultMessage(this.m_fight.Clients, this.ChallengeId, false);

                    if (this.m_fight.FighterPlaying is CharacterFighter)
                    {
                        BasicHandler.SendTextInformationMessage(this.m_fight.Clients, TextInformationTypeEnum.TEXT_INFORMATION_MESSAGE, 188, (this.m_fight.FighterPlaying as CharacterFighter).Character.Name, this.ChallengeId);
                    }
                }
            }
        }