private void OutputRegionToConsole(RegionData r) { OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]); ConsoleDisplayList dispList = new ConsoleDisplayList(); dispList.AddRow("Region Name", r.RegionName); dispList.AddRow("Region ID", r.RegionID); dispList.AddRow("Location", string.Format("{0},{1}", r.coordX, r.coordY)); dispList.AddRow("URI", r.Data["serverURI"]); dispList.AddRow("Owner ID", r.Data["owner_uuid"]); dispList.AddRow("Flags", flags); MainConsole.Instance.Output(dispList.ToString()); }
public RegionData RegionInfo2RegionData(GridRegion rinfo) { RegionData rdata = new RegionData(); rdata.posX = (int)rinfo.RegionLocX; rdata.posY = (int)rinfo.RegionLocY; rdata.RegionID = rinfo.RegionID; rdata.RegionName = rinfo.RegionName; rdata.Data = rinfo.ToKeyValuePairs(); rdata.Data["regionHandle"] = Utils.UIntsToLong((uint)rdata.posX, (uint)rdata.posY); rdata.Data["owner_uuid"] = rinfo.EstateOwner.ToString(); return rdata; }
public GridRegion RegionData2RegionInfo(RegionData rdata) { GridRegion rinfo = new GridRegion(rdata.Data); rinfo.RegionLocX = rdata.posX; rinfo.RegionLocY = rdata.posY; rinfo.RegionID = rdata.RegionID; rinfo.RegionName = rdata.RegionName; rinfo.ScopeID = rdata.ScopeID; return rinfo; }
public bool Store(RegionData data) { if (m_useStaticInstance && Instance != this) return Instance.Store(data); // m_log.DebugFormat( // "[NULL REGION DATA]: Storing region {0} {1}, scope {2}", data.RegionName, data.RegionID, data.ScopeID); m_regionData[data.RegionID] = data; return true; }
public List<RegionData> RunCommand(MySqlCommand cmd) { List<RegionData> retList = new List<RegionData>(); using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { dbcon.Open(); cmd.Connection = dbcon; using (IDataReader result = cmd.ExecuteReader()) { while (result.Read()) { RegionData ret = new RegionData(); ret.Data = new Dictionary<string, object>(); ret.RegionID = DBGuid.FromDB(result["uuid"]); ret.ScopeID = DBGuid.FromDB(result["ScopeID"]); ret.RegionName = result["regionName"].ToString(); ret.posX = Convert.ToInt32(result["locX"]); ret.posY = Convert.ToInt32(result["locY"]); ret.sizeX = Convert.ToInt32(result["sizeX"]); ret.sizeY = Convert.ToInt32(result["sizeY"]); if (m_ColumnNames == null) { m_ColumnNames = new List<string>(); DataTable schemaTable = result.GetSchemaTable(); foreach (DataRow row in schemaTable.Rows) { if (row["ColumnName"] != null) m_ColumnNames.Add(row["ColumnName"].ToString()); } } foreach (string s in m_ColumnNames) { if (s == "uuid") continue; if (s == "ScopeID") continue; if (s == "regionName") continue; if (s == "locX") continue; if (s == "locY") continue; ret.Data[s] = result[s].ToString(); } retList.Add(ret); } } } return retList; }
public bool Store(RegionData data) { if (Instance != this) return Instance.Store(data); m_regionData[data.RegionID] = data; return true; }
// String describing name and region location of passed region private String RegionString(RegionData reg) { return String.Format("{0}/{1} at <{2},{3}>", reg.RegionName, reg.RegionID, reg.coordX, reg.coordY); }
public bool Store(RegionData data) { m_regionData[data.RegionID] = data; return true; }