Switch prim items type representation to use int rather than strings.
parent
8ccc470e2a
commit
1e981a7c1c
|
@ -690,8 +690,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
createCol(items, "assetID", typeof (String));
|
||||
createCol(items, "parentFolderID", typeof (String));
|
||||
|
||||
createCol(items, "invType", typeof (String));
|
||||
createCol(items, "assetType", typeof (String));
|
||||
createCol(items, "invType", typeof (Int32));
|
||||
createCol(items, "assetType", typeof (Int32));
|
||||
|
||||
createCol(items, "name", typeof (String));
|
||||
createCol(items, "description", typeof (String));
|
||||
|
@ -895,8 +895,8 @@ namespace OpenSim.Framework.Data.SQLite
|
|||
taskItem.asset_id = new LLUUID((String)row["assetID"]);
|
||||
taskItem.parent_id = new LLUUID((String)row["parentFolderID"]);
|
||||
|
||||
taskItem.inv_type = (String)row["invType"];
|
||||
taskItem.type = (String)row["assetType"];
|
||||
taskItem.inv_type = Convert.ToInt32(row["invType"]);
|
||||
taskItem.type = Convert.ToInt32(row["assetType"]);
|
||||
|
||||
taskItem.name = (String)row["name"];
|
||||
taskItem.desc = (String)row["description"];
|
||||
|
|
|
@ -89,8 +89,8 @@ namespace OpenSim.Framework
|
|||
public LLUUID group_id = LLUUID.Zero;
|
||||
|
||||
public LLUUID asset_id = LLUUID.Zero;
|
||||
public string type = "";
|
||||
public string inv_type = "";
|
||||
public int type = 0;
|
||||
public int inv_type = 0;
|
||||
public uint flags = 0;
|
||||
public string name = "";
|
||||
public string desc = "";
|
||||
|
|
|
@ -175,8 +175,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
taskItem.desc = item.inventoryDescription;
|
||||
taskItem.owner_id = item.avatarID;
|
||||
taskItem.creator_id = item.creatorsID;
|
||||
taskItem.type = TaskInventoryItem.Types[item.assetType];
|
||||
taskItem.inv_type = TaskInventoryItem.InvTypes[item.invType];
|
||||
taskItem.type = item.assetType;
|
||||
taskItem.inv_type = item.invType;
|
||||
part.AddInventoryItem(taskItem);
|
||||
|
||||
// It might seem somewhat crude to update the whole group for a single prim inventory change,
|
||||
|
|
|
@ -89,7 +89,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
foreach (TaskInventoryItem item in m_taskInventory.Values)
|
||||
{
|
||||
if ("lsltext" == item.type)
|
||||
// XXX more hardcoding badness. Should be an enum in TaskInventoryItem
|
||||
if (10 == item.type)
|
||||
{
|
||||
StartScript(item);
|
||||
}
|
||||
|
@ -251,17 +252,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
if (m_taskInventory.ContainsKey(itemID))
|
||||
{
|
||||
string type = m_taskInventory[itemID].inv_type;
|
||||
int type = m_taskInventory[itemID].inv_type;
|
||||
m_taskInventory.Remove(itemID);
|
||||
m_inventorySerial++;
|
||||
if (type == "lsltext")
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -317,8 +312,8 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
invString.AddSectionEnd();
|
||||
|
||||
invString.AddNameValueLine("asset_id", item.asset_id.ToString());
|
||||
invString.AddNameValueLine("type", item.type);
|
||||
invString.AddNameValueLine("inv_type", item.inv_type);
|
||||
invString.AddNameValueLine("type", TaskInventoryItem.Types[item.type]);
|
||||
invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.inv_type]);
|
||||
invString.AddNameValueLine("flags", "0x00");
|
||||
invString.AddNameValueLine("name", item.name + "|");
|
||||
invString.AddNameValueLine("desc", item.desc + "|");
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment
|
|||
{
|
||||
IRegionDataStore plug =
|
||||
(IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||
plug.Initialise(connectionstring, false);
|
||||
plug.Initialise(connectionstring, true);
|
||||
|
||||
m_dataStore = plug;
|
||||
|
||||
|
|
Loading…
Reference in New Issue