public GameStats() { Profiles = new List<TrackedProfile>(); MonsterPower = Bot.Settings.Demonbuddy.EnableDemonBuddyCharacterSettings ? Bot.Settings.Demonbuddy.MonsterPower : Funky.iDemonbuddyMonsterPowerLevel; //note: this will change on first ProfileChanged call! currentprofile = new TrackedProfile(GlobalSettings.Instance.LastProfile); }
public GameStats() { Profiles = new List <TrackedProfile>(); MonsterPower = Bot.Settings.Demonbuddy.EnableDemonBuddyCharacterSettings ? Bot.Settings.Demonbuddy.MonsterPower : Funky.iDemonbuddyMonsterPowerLevel; //note: this will change on first ProfileChanged call! currentprofile = new TrackedProfile(GlobalSettings.Instance.LastProfile); }
///<summary> ///Adds the sum of each property of the given TrackedProfile to this instance. ///</summary> public void MergeStats(TrackedProfile other) { TotalGold += other.TotalGold; TotalXP += other.TotalXP; DeathCount += other.DeathCount; TotalTimeSpan = TotalTimeSpan.Add(other.TotalTimeSpan); LootTracker.Merge(other.LootTracker); }
public static bool Equals(TrackedProfile P, string name) { //Check for null and compare run-time types. if (P == null) { return false; } return P.ProfileName.Equals(name); }
public static bool Equals(TrackedProfile P, string name) { //Check for null and compare run-time types. if (P == null) { return(false); } return(P.ProfileName.Equals(name)); }
public void ProfileChanged(string sThisProfile) { //fresh profile? if (Profiles.Count == 0) { //Lets create a new profile Profiles.Add(new TrackedProfile(sThisProfile)); //Reference it to the Collection currentprofile = Profiles[Profiles.Count - 1]; } //Did we really change profiles? if (Profiles.Count > 0 && Profiles.Last().ProfileName != sThisProfile) { //Refresh Profile Target Blacklist BlacklistCache.UpdateProfileBlacklist(); //Set the "end" date for current profile Profiles.Last().UpdateRangeVariables(); bool foundPreviousEntry = false; foreach (TrackedProfile item in Profiles) { //Found the profile so lets use that instead! if (item.ProfileName == sThisProfile) { foundPreviousEntry = true; item.RestartRangeVariables(); //reset Starting variables //Reference it to the Collection currentprofile = item; break; } } //Profile was not found.. so lets add it and set it as current. if (!foundPreviousEntry) { //Lets create a new profile Profiles.Add(new TrackedProfile(sThisProfile)); //Reference it to the Collection currentprofile = Profiles[Profiles.Count - 1]; } } }
public void ProfileChanged(string sThisProfile) { //fresh profile? if (Profiles.Count == 0) { //Lets create a new profile Profiles.Add(new TrackedProfile(sThisProfile)); //Reference it to the Collection currentprofile = Profiles[Profiles.Count - 1]; } //Did we really change profiles? if (Profiles.Count > 0 && Profiles.Last().ProfileName != sThisProfile) { //Refresh Profile Target Blacklist BlacklistCache.UpdateProfileBlacklist(); //Set the "end" date for current profile Profiles.Last().UpdateRangeVariables(); bool foundPreviousEntry = false; foreach (TrackedProfile item in Profiles) { //Found the profile so lets use that instead! if (item.ProfileName == sThisProfile) { foundPreviousEntry = true; item.RestartRangeVariables();//reset Starting variables //Reference it to the Collection currentprofile = item; break; } } //Profile was not found.. so lets add it and set it as current. if (!foundPreviousEntry) { //Lets create a new profile Profiles.Add(new TrackedProfile(sThisProfile)); //Reference it to the Collection currentprofile = Profiles[Profiles.Count - 1]; } } }