/// <summary> /// Initializes all game client data associated with a player. /// </summary> /// <param name="classMemory">The application memory for the player's game client.</param> protected TkClient(ClassMemory classMemory) { Activity = new TkActivity(classMemory); Chat = new TkChat(classMemory); Environment = new TkEnvironment(classMemory); Group = new TkGroup(classMemory); Inventory = new TkInventory(classMemory); Npcs = new List <Npc>(); Self = new TkSelf(classMemory); Targeting = new TkTargeting(classMemory); _processId = Convert.ToInt32(classMemory.ToString().Replace("_classMemory", string.Empty)); _botStartTime = DateTime.Now; _startingExp = Self.Exp; _timeOfPreviousNpcScan = DateTime.Now.AddSeconds(-NpcScanCooldownInSeconds); StartAutoHotkeyDllErrorHandler(); }
/// <summary> /// Instantiates a factory for the specified application. /// </summary> /// <param name="processName">The process name of the application.</param> public TkClientFactory(string processName) { ClassMemory = new ClassMemory(processName); TkSelf = new TkSelf(ClassMemory); }
/// <summary> /// Instantiates a factory for the specified application. /// </summary> /// <param name="processId">The process ID of the application.</param> public TkClientFactory(int processId) { ClassMemory = new ClassMemory(processId); TkSelf = new TkSelf(ClassMemory); }