internal GameObject(uint parBase, uint parDescriptor, UInt64 parGuid) { baseAdd = parBase; descriptor = parDescriptor; guid = parGuid; Pos = new Location(baseAdd, parDescriptor, 2); }
internal UnitObject(uint parBase, uint parDescriptor, UInt64 parGuid) { this.baseAdd = parBase; this.guid = parGuid; this.descriptor = parDescriptor; Pos = new Location(parBase, descriptor, 1); }
internal float differenceTo(Location to) { return (float)Math.Sqrt(Math.Pow(this.x - to.x, 2) + Math.Pow(this.y - to.y, 2)); }
private static bool extractProfile(string[] wp) { bool error = false; gotVendor = false; for (int i = 0; i < wp.Length && error == false; i = i + 1) { if (i == 0) { foreach (string p in wp[i].Split(',')) { try { Faction.Add(Convert.ToInt32(p)); } catch { error = true; break; } } } else { try { string[] tmp = wp[i].Split('|'); if (tmp[0] == "NWP" && tmp.Length == 4) { float x = ToFloat(tmp[1]); float y = ToFloat(tmp[2]); float z = ToFloat(tmp[3]); Location tmpLoc = new Location(); tmpLoc.x = x; tmpLoc.y = y; tmpLoc.z = z; Profile.Add(tmpLoc); } else if (tmp[0].Contains("Vendor")) { Data.VendorName = tmp[0].Split(':')[1]; float x = ToFloat(tmp[1]); float y = ToFloat(tmp[2]); float z = ToFloat(tmp[3]); Location tmpLoc = new Location(); tmpLoc.x = x; tmpLoc.y = y; tmpLoc.z = z; Data.VendorLocation = tmpLoc; gotVendor = true; } } catch { error = true; } } } if (error == true) { Profile.Clear(); Faction.Clear(); profileName = "None"; MessageBox.Show("There was an error loading your profile"); return false; } else { return true; } }