public void LoadDefaults() { GroupName = "Default"; AuthType = AuthType.Ptc; Location = new cLocation(40.764665, -73.973184, 10); MimicWalking = true; CatchPokemon = true; WalkingSpeed = 7; MaxTravelDistance = 1000; EncounterWhileWalking = false; EnableHumanization = false; InsideReticuleChance = 100; MinPokemonBeforeEvolve = 0; StopAtMinAccountState = AccountState.SoftBan; DelayBetweenPlayerActions = 500; DelayBetweenLocationUpdates = 1000; GeneralDelay = 800; MaxLogs = 400; MaxFailBeforeReset = 3; StopOnIPBan = true; SearchFortBelowPercent = 1000; ForceEvolveAbovePercent = 1000; StopOnAPIUpdate = true; SpinGyms = true; HashHost = new Uri("https://pokehash.buddyauth.com/"); HashEndpoint = "api/v157_5/hash"; AuthAPIKey = "XXXXXXXXXXXXXXXXXXXX"; PlayerLocale.Country = "US"; PlayerLocale.Language = "en"; PlayerLocale.Timezone = "America/New_York"; PlayerLocale.POSIX = "en-us"; DisableCatchDelay = 8; DownloadResources = true; }
/// <summary> /// Creates a cLocation object. It will be saved in permanent storage only /// on calling Save() /// </summary> /// <returns>cLocation object</returns> public static cLocation Create() { cLocation oObj = new cLocation(); SecurityCheck((int)enLocation_Action.Create); // Create an object in memory, will be saved to storage on calling Save() oObj.m_bCreating = true; oObj.m_bInvalid = false; return(oObj); }
/// <summary> /// Ensures that an object with the specified name exists, while creating other properties are set to their default values /// </summary> /// <param name="i_sName">Name</param> /// <returns>cLocation object</returns> public static cLocation CreateIfRequiredAndGet(string i_sName) { cLocation oObj = cLocation.Get_Name(i_sName); if (oObj == null) { oObj = cLocation.Create(); oObj.sName = i_sName; oObj.Save(); } return(oObj); }
/// <summary> /// Finds and return cLocation objects matching the specified criteria /// </summary> /// <param name="i_oFilter">Filter criteria (WHERE clause)</param> /// <returns>cLocation objects</returns> public static List <cLocation> Find(cFilter i_oFilter) { DataTable dt = Find_DataTable(i_oFilter, null); List <cLocation> l = new List <cLocation>(); cLocation oObj; for (int i = 0; i < dt.Rows.Count; i++) { oObj = new cLocation(); oObj.m_iID = Convert.ToInt32(dt.Rows[i]["iID"]); oObj.m_sName = dt.Rows[i]["sName"].ToString(); oObj.m_dtCreatedOn = Convert.ToDateTime(dt.Rows[i]["dtCreatedOn"]); oObj.m_dtLastUpdatedOn = Convert.ToDateTime(dt.Rows[i]["dtLastUpdatedOn"]); oObj.m_bInvalid = false; l.Add(oObj); } return(l); }
using System;