/// <summary> /// Gets the component. /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> public static ITibiaAction GetAction(Type type, TibiaClient client, ScriptInfo script) { if (Container == null) { InitializeContainer(); } var res = (ITibiaAction)Container.Resolve(type); res.Client = client; res.Script = script; return res; }
/// <summary> /// Initializes a new instance of the <see cref="ScriptRunner"/> class. /// </summary> /// <param name="file">The file.</param> /// <param name="client">The client.</param> public ScriptRunner(ScriptFile file, TibiaClient tibiaClient) { this.File = file; this.File.ScriptInfo.TibiaClient = tibiaClient; this.TibiaClient = tibiaClient; foreach (var row in File.Rows) { row.OnActionComplete += row_OnActionComplete; row.SetupRow(tibiaClient); } }
/// <summary> /// Initializes a new instance of the <see cref="BaseComponent"/> class. /// </summary> /// <param name="client">The client.</param> public ActionBaseComponent(TibiaClient client) { this.Client = client; }
/// <summary> /// Connects the client. /// </summary> public void ConnectClient() { if (ClientProcess != null && !ClientProcess.HasExited) { Output.Add("Connecting Tibia Client on server: ", SelectedServer.Ip, ":", SelectedServer.Port.ToString()); TibiaClient = new TibiaClient(ClientProcess); var connect = new Callback(delegate() { TibiaClient.Connect(SelectedServer.Ip, SelectedServer.Port, SelectedServer.IsOtServer); }); connect.BeginInvoke(ConnectionComplete, connect); } }
/// <summary> /// Initializes a new instance of the <see cref="DepotActions"/> class. /// </summary> /// <param name="client">The client.</param> public eDepotActions(TibiaClient client) : base(client) { }
/// <summary> /// Initializes a new instance of the <see cref="Goto"/> class. /// </summary> /// <param name="client">The client.</param> public eGotoAction(TibiaClient client) : base(client) { }
/// <summary> /// Initializes a new instance of the <see cref="TibiaClientEventArgs"/> class. /// </summary> /// <param name="tibiaClient">The tibiaClient.</param> public TibiaClientEventArgs(TibiaClient tibiaClient) { TibiaClient = tibiaClient; }
public void FixTibiaPrc(Process prc) { if (prc.ProcessName == "Tibia") { TibiaClient = new TibiaClient(prc); TibiaClient.Connection = new Local(TibiaClient.Memory, TibiaClient.Process.Id); TibiaClient.Connection.Connect(); } }
/// <summary> /// Initializes a new instance of the <see cref="ScriptParser"/> class. /// </summary> /// <param name="editor">The editor.</param> /// <param name="client">The client.</param> public ScriptParser(ScriptEditor editor, TibiaClient client) { this.Editor = editor; }
/// <summary> /// Initializes a new instance of the <see cref="ItemActions"/> class. /// </summary> /// <param name="client">The client.</param> public eItemActions(TibiaClient client) : base(client) { }