public void BreedingAreaBossBattle(string areaId) { var url = string.Format("http://astrum.amebagames.com/_/event/areaboss/battle?areaId={0}&eventId={1}", areaId, Uri.EscapeDataString(_client.ViewModel.BreedingEventId)); var result = _client.GetXHR(url); AreaBossInfo boss = JsonConvert.DeserializeObject <AreaBossInfo>(result); _client.Access("areaboss"); InfoPrinter.PrintAreaBossInfo(boss, _client.ViewModel); var values = new Dictionary <string, object> { { "areaId", areaId }, { "eventId", _client.ViewModel.BreedingEventId } }; var battleResult = _client.PostXHR("http://astrum.amebagames.com/_/event/areaboss/battle", values); var battleResultInfo = JsonConvert.DeserializeObject <BossBattleResultInfo>(battleResult); InfoPrinter.PrintBossBattleResult(battleResultInfo, _client.ViewModel); _client.DelayLong(); }
protected virtual void AreaBossBattle(string areaId) { var result = _client.GetXHR("http://astrum.amebagames.com/_/areaboss/battle?_id=" + areaId); AreaBossInfo boss = JsonConvert.DeserializeObject <AreaBossInfo>(result); InfoPrinter.PrintAreaBossInfo(boss, _client.ViewModel); _client.Access("areaboss"); _client.DelayShort(); var values = new Dictionary <string, object> { { "_id", areaId } }; var battleResult = _client.PostXHR("http://astrum.amebagames.com/_/areaboss/battle", values); var battleResultInfo = JsonConvert.DeserializeObject <BossBattleResultInfo>(battleResult); InfoPrinter.PrintBossBattleResult(battleResultInfo, _client.ViewModel); _client.DelayLong(); }