//private void timesUpdater(object sender) //{ // Dictionary<string, string> dat = (Dictionary<string, string>)sender; // send(dat, true); // /* // if (lastUpdate.AddSeconds(25) < DateTime.Now) // { // if (BuddyConSettings.Instance.pdebug) Logging.Write(string.Format("[bC]: times start")); // if (BuddyConSettings.Instance.debug) Logging.Write(string.Format("[bC]: start update")); // Dictionary<string, string> dat =getData(); // send(dat); // if (BuddyConSettings.Instance.pdebug) Logging.Write(string.Format("[bC]: times end")); // lastUpdate = DateTime.Now; // }*/ //} private Dictionary<string, string> getData() { try { using (Styx.StyxWoW.Memory.AcquireFrame()) { if (Sessao.id != 0) { WSBot.estDetalhe d = new WSBot.estDetalhe(); d.lvl = Convert.ToInt32(Styx.StyxWoW.Me.Level).ToString(); d.runningtime = (DateTime.Now - startTime).TotalSeconds.ToString(); d.xp = Convert.ToUInt32(Styx.StyxWoW.Me.Experience).ToString(); d.xp_needed = Convert.ToUInt32(Styx.StyxWoW.Me.NextLevelExperience).ToString(); d.xph = Convert.ToUInt32(Styx.CommonBot.GameStats.XPPerHour).ToString(); d.timetolevel = Convert.ToUInt32(Styx.CommonBot.GameStats.TimeToLevel.TotalSeconds).ToString(); d.kills = Convert.ToUInt32(Styx.CommonBot.GameStats.MobsKilled).ToString(); d.killsh = Convert.ToUInt32(Styx.CommonBot.GameStats.MobsPerHour).ToString(); d.honor = Convert.ToUInt32(Styx.CommonBot.GameStats.HonorGained).ToString(); d.honorh = Convert.ToUInt32(Styx.CommonBot.GameStats.HonorPerHour).ToString(); d.bgwin = Convert.ToUInt32(Styx.CommonBot.GameStats.BGsWon).ToString(); d.bglost = Convert.ToUInt32(Styx.CommonBot.GameStats.BGsLost).ToString(); var prof = Styx.CommonBot.Profiles.ProfileManager.CurrentProfile.Name; d.gold = Convert.ToUInt32(Styx.StyxWoW.Me.Copper).ToString(); //d.nodeh = JSON.JsonEncode(Bots.Gatherbuddy.GatherbuddyBot.NodeCollectionCount); d.RealZoneText = RetornaZoneName(); d.SubZoneText = RetornaSubZoneName(); b.IncluirDetalhe(Sessao, d, SECURETY_KEY); } } } catch (System.Web.Services.Protocols.SoapException e) { if (MasterControlSettings.Instance.debug) Logging.Write(string.Format("[bC]: getting error {0} stack: {1}", e.Message, e.StackTrace)); } //} return data; }
/// <remarks/> public void IncluirDetalheAsync(estSessao s, estDetalhe d, string key) { this.IncluirDetalheAsync(s, d, key, null); }
/// <remarks/> public void IncluirDetalheAsync(estSessao s, estDetalhe d, string key, object userState) { if ((this.IncluirDetalheOperationCompleted == null)) { this.IncluirDetalheOperationCompleted = new System.Threading.SendOrPostCallback(this.OnIncluirDetalheOperationCompleted); } this.InvokeAsync("IncluirDetalhe", new object[] { s, d, key}, this.IncluirDetalheOperationCompleted, userState); }
public void IncluirDetalhe(estSessao s, estDetalhe d, string key) { this.Invoke("IncluirDetalhe", new object[] { s, d, key}); }