public ToonControl(MainForm mf, Dictionary <string, EliteAPI> chars, EliteAPI api) { InitializeComponent(); Character = new Character(mf.Logger, this, chars, api); TargetComboBox.SelectedIndex = 0; FFxiNAV = new FFXINAV(); Waypoints = new List <position_t>(); TestWorker = new BackgroundWorker(); TestWorker.WorkerSupportsCancellation = true; TestWorker.WorkerReportsProgress = true; backgroundWorker1.WorkerSupportsCancellation = true; backgroundWorker1.WorkerReportsProgress = true; Ppoint = new PointsOfInterest(); TestWorker.DoWork += TestWorker_DoWork; Posi = new position_t(); KeepMovingStartPosi = new position_t(); }
public unsafe void TryGetWaypoints() { waypoints.Clear(); WPz.Clear(); WPx.Clear(); if (pathpoints() > 0) { double *items; int itemsCount; using (FFXINAV.Get_m_points_XWrapper(out items, out itemsCount)) { for (int i = 0; i < itemsCount; i++) { WPx.Add(ToSingle(items[i])); } } } if (pathpoints() > 0) { double *items2; int itemsCount2; using (FFXINAV.Get_m_points_ZWrapper(out items2, out itemsCount2)) { for (int i = 0; i < itemsCount2; i++) { WPz.Add(ToSingle(items2[i])); } } } if (WPx.Count > 0 && WPz.Count > 0) { for (var i = 0; i < pathpoints(); i++) { x = WPx[i]; z = WPz[i]; var position = new position_t { X = x, Z = z }; waypoints.Add(position); } } }