Example #1
0
 public static void UpdateBpAfterRaidBattle(RaidBattleInfo battleInfo, MainWindowViewModel viewModel)
 {
     if (battleInfo.isPlaying || battleInfo.isWin || battleInfo.isLose)
     {
         viewModel.BpValue = battleInfo.bpValue;
         viewModel.BpMax   = battleInfo.bpMax;
     }
 }
Example #2
0
        private void FuryRaidBattleResult(string raidId)
        {
            var            result     = _client.GetXHR("http://astrum.amebagames.com/_/event/furyraid/battleresult?_id=" + Uri.EscapeDataString(raidId));
            RaidBattleInfo battleInfo = JsonConvert.DeserializeObject <RaidBattleInfo>(result);

            var eventId = battleInfo.eventId;

            _client.GetXHR("http://astrum.amebagames.com/_/event/furyraid/summary?_id=" + Uri.EscapeDataString(eventId));
        }
Example #3
0
        public static void PrintRaidBattleInfo(RaidBattleInfo battleInfo, ViewModel viewModel)
        {
            if (battleInfo.isPlaying || battleInfo.isWin || battleInfo.isLose)
            {
                string history = "";

                string rare = "";
                switch (battleInfo.rare)
                {
                case 1:
                    rare = "初级魔星兽";
                    break;

                case 2:
                    rare = "中级魔星兽";
                    break;

                case 3:
                    rare = "上级魔星兽";
                    break;

                case 4:
                    rare = "星兽王";
                    break;

                default:
                    rare = "魔星兽";
                    break;
                }

                history += String.Format("{0}({1} L{2})出现了", rare, battleInfo.name, battleInfo.level) + Environment.NewLine;
                history += String.Format("血量: {0} / {1}", battleInfo.hp - battleInfo.totalDamage, battleInfo.hp) + Environment.NewLine;

                switch (battleInfo.type)
                {
                case AstrumClient.FIND:
                    history += "类型:发现" + Environment.NewLine;
                    break;

                case AstrumClient.RESCUE:
                    history += "类型:救援" + Environment.NewLine;
                    break;
                }

                viewModel.History = history;
            }
        }
Example #4
0
        public static void PrintRaidBattleInfo(RaidBattleInfo battleInfo, MainWindowViewModel viewModel)
        {
            if (battleInfo.isPlaying || battleInfo.isWin || battleInfo.isLose)
            {
                string history = "";
                history += battleInfo.Boss + Environment.NewLine;
                history += String.Format("血量: {0} / {1}", battleInfo.hp - battleInfo.totalDamage, battleInfo.hp) + Environment.NewLine;

                switch (battleInfo.type)
                {
                case AstrumClient.FIND:
                    history += "类型:发现" + Environment.NewLine;
                    break;

                case AstrumClient.RESCUE:
                    history += "类型:救援" + Environment.NewLine;
                    break;
                }

                viewModel.History = history;
            }
        }