public void ExecuteRaise(string baseId, object materials, string type) { var values = new Dictionary <string, object> { { "base", baseId }, { "materials", materials }, { "type", type } }; _client.PostXHR("http://astrum.amebagames.com/_/raise/execute", values); }
protected virtual StageInfo ForwardStage(string areaId) { var values = new Dictionary <string, object> { { "areaId", areaId } }; var result = _client.PostXHR("http://astrum.amebagames.com/_/stage", values); var stage = JsonConvert.DeserializeObject <StageInfo>(result); InfoPrinter.PrintStageInfo(stage, _client.ViewModel); InfoUpdater.UpdateStageView(stage, _client.ViewModel); _client.DelayShort(); return(stage); }
private void FuryRaidBattleAttack(string raidId, string attackType) { var values = new Dictionary <string, object> { { "_id", raidId }, { "attackType", attackType } }; //first var battleResult = _client.PostXHR("http://astrum.amebagames.com/_/event/furyraid/battle", values); var battleResultInfo = JsonConvert.DeserializeObject <BossBattleResultInfo>(battleResult); InfoPrinter.PrintBossBattleResult(battleResultInfo, _client.ViewModel); InfoUpdater.UpdateBattleDamage(battleResultInfo, _client.ViewModel); _client.DelayLong(); }
private void GuildBattleStamp(string battleId) { var values = new Dictionary <string, object> { { "_id", battleId } }; _client.PostXHR("http://astrum.amebagames.com/_/guildbattle/stamp", values); _client.DelayShort(); }
protected virtual StageInfo ForwardStage(string areaId) { var values = new Dictionary <string, object> { { "areaId", areaId } }; var result = _client.PostXHR("http://astrum.amebagames.com/_/stage", values); var stage = JsonConvert.DeserializeObject <StageInfo>(result); InfoPrinter.PrintStageInfo(stage, _client.ViewModel); var feverBefore = _client.ViewModel.Fever; InfoUpdater.UpdateStageView(stage, _client.ViewModel); if (_client.ViewModel.Fever && feverBefore != _client.ViewModel.Fever) { _client.RaiseNotificationEvent("Fever start", AstrumClient.SECOND * 60); } _client.DelayShort(); return(stage); }
private void ReceiveGift(int limited) { var values = new Dictionary <string, object> { { "auto", "1" }, { "limited", limited }, { "type", "all" } }; var result = _client.PostXHR("http://astrum.amebagames.com/_/gift", values); var giftResult = JsonConvert.DeserializeObject <GiftResult>(result); InfoPrinter.PrintGiftResult(giftResult, _client.ViewModel); _client.DelayShort(); }
private GachaResult GachaResult(string _id, bool sequence) { var values = new Dictionary <string, object> { { "_id", _id } }; if (sequence) { values.Add("sequence", true); } var result = _client.PostXHR("http://astrum.amebagames.com/_/gacha", values); return(JsonConvert.DeserializeObject <GachaResult>(result)); }
public void UseItem(string type, string itemId, int value) { var responseString = _client.GetXHR("http://astrum.amebagames.com/_/item/common?type=" + type); var itemList = JsonConvert.DeserializeObject <ItemList>(responseString); var item = itemList.list.Find(e => itemId.Equals(e._id)); if (item.stock >= value) { var values = new Dictionary <string, object> { { "itemId", item._id }, { "value", value } }; string result = _client.PostXHR("http://astrum.amebagames.com/_/item/common", values); var useItemResult = JsonConvert.DeserializeObject <UseItemResult>(result); InfoUpdater.UpdateItemStock(useItemResult, _client.ViewModel); } }