public static MonsterStat Download(StatReference refer) { HttpWebRequest req = (HttpWebRequest) HttpWebRequest.Create(refer.URL); req.Accept = "application/json"; string resp = ""; using (var stream = new StreamReader(req.GetResponse().GetResponseStream())) { resp = stream.ReadToEnd(); } var ret = JsonConvert.DeserializeObject<MonsterStat>(resp); return ret; }
public Monster GetMon(StatReference mref, Monster mon) { var mstat = mref.Download(); return GetMon(mon); }