示例#1
0
        private void _admin_ChangeQuestState(DailyQuestType dqtype, bool success)
        {
            if (!success)
            {
                return;
            }

            switch (dqtype)
            {
            case DailyQuestType.Normal:
                SetQuestState(-1, border_normal, tbNormalQuest);
                btn_getnormal.Visibility = Visibility.Hidden;
                break;

            case DailyQuestType.Special:
                SetQuestState(-1, border_special, tbSpecialQuest);
                btn_getspecial.Visibility = Visibility.Hidden;
                break;

            case DailyQuestType.Fun:
                SetQuestState(-1, border_fun, tbFunQuest);
                btn_getfun.Visibility = Visibility.Hidden;
                break;
            }
        }
 public void SendChangeDailyQuest(DailyQuestType dqtype)
 {
     Client.Send(PacketType.ChangeDailyQuest, new StandardClientChangeDailyQuest
     {
         DQType = dqtype
     });
 }
 public void SendGetReward(DailyQuestType dqtype)
 {
     Client.Send(PacketType.GetDailyQuest, new StandardClientGetQuestReward
     {
         DQType = dqtype
     });
 }
示例#4
0
 public void UpdateDailyQuest(DailyQuestType type, params object[] param)
 {
     foreach (var quest in m_DailyQuestInfo.TrackingDailyQuests)
     {
         if (quest.Value.Type == (int)type)
         {
             m_DailyQuestUpdaters[quest.Value.Type](quest.Value, param);
         }
     }
 }
 private void Client_ChangeDailyQuest(bool success, DailyQuestType dqtype, string quest)
 {
     if (success)
     {
         ChangeQuest?.Invoke(dqtype, quest);
     }
     else
     {
         FormExecution.Client_PopMessageBox("Tu as déjà utilisé ton changement de quête aujourd'hui ! (Un seul changement par jour)", "Quête journalière !");
     }
 }
示例#6
0
        private void _admin_ChangeQuest(DailyQuestType dqtype, string quest, bool savequest = false)
        {
            TextBlock target = tbNormalQuest;

            switch (dqtype)
            {
            case DailyQuestType.Normal:
                target = tbNormalQuest;
                if (savequest)
                {
                    _quests[0] = quest;
                }
                break;

            case DailyQuestType.Special:
                target = tbSpecialQuest;
                if (savequest)
                {
                    _quests[1] = quest;
                }
                break;

            case DailyQuestType.Fun:
                target = tbFunQuest;
                if (savequest)
                {
                    _quests[2] = quest;
                }
                break;
            }
            Storyboard storyboard = new Storyboard();

            ScaleTransform scale = new ScaleTransform(1.0, 1.0);

            target.RenderTransformOrigin = new Point(0.5, 0.5);
            target.RenderTransform       = scale;

            DoubleAnimation growAnimationClose = new DoubleAnimation();

            growAnimationClose.Duration = TimeSpan.FromMilliseconds(100);
            growAnimationClose.From     = 1.0;
            growAnimationClose.To       = 0.0;
            storyboard.Children.Add(growAnimationClose);

            Storyboard.SetTargetProperty(growAnimationClose, new PropertyPath("RenderTransform.ScaleX"));
            Storyboard.SetTarget(growAnimationClose, target);

            storyboard.Completed += (sender, e) => changeTextAnimation_Completed(sender, e, target, quest);
            storyboard.Begin();
        }
 private void Client_DailyQuestReward(bool success, DailyQuestType dqtype, int amount, bool allquest)
 {
     if (allquest)
     {
         FormExecution.Client_PopMessageBox("Félicitations ! Tu as rempli toutes les quêtes possible aujourd'hui ! Tu remportes un bonus de 400 BPs supplémentaire !", "Quête journalière !");
     }
     else
     {
         if (success)
         {
             ChangeQuestState?.Invoke(dqtype, success);
             FormExecution.Client_PopMessageBox("Félicitations ! La quête est complétée ! Tu remportes " + amount + " BPs." + Environment.NewLine + "Reviens demain pour de nouveaux défis !", "Quête journalière !");
         }
         else
         {
             FormExecution.Client_PopMessageBox("La quête n'est pas encore terminée ! Encore un petit effort...", "Quête journalière !");
         }
     }
 }
示例#8
0
 private void btn_changeClicked(object sender, MouseButtonEventArgs e, DailyQuestType dqtype)
 {
     _admin.SendChangeDailyQuest(dqtype);
 }
示例#9
0
 private void btn_getClicked(object sender, MouseButtonEventArgs e, DailyQuestType dqtype)
 {
     _admin.SendGetReward(dqtype);
 }