aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-01-06 22:55:45 +0000
committerJustin Clarke Casey2008-01-06 22:55:45 +0000
commit286802558e063dd6b3997cefba06f277de51b639 (patch)
tree0e4a9f289141cd569e58ee4acf827d786480063d /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parentFactor out inventory related code in SceneObjectPart into separate class (diff)
downloadopensim-SC_OLD-286802558e063dd6b3997cefba06f277de51b639.zip
opensim-SC_OLD-286802558e063dd6b3997cefba06f277de51b639.tar.gz
opensim-SC_OLD-286802558e063dd6b3997cefba06f277de51b639.tar.bz2
opensim-SC_OLD-286802558e063dd6b3997cefba06f277de51b639.tar.xz
Factor out inventory code in SceneObjectGroup into seperate class.
As was true for the previous update, this might require nant users to re-run prebuild.[sh|bat]
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs97
1 files changed, 1 insertions, 96 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index a9b3fe9..e8d12ff 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Environment.Scenes
44{ 44{
45 public delegate void PrimCountTaintedDelegate(); 45 public delegate void PrimCountTaintedDelegate();
46 46
47 public class SceneObjectGroup : EntityBase 47 public partial class SceneObjectGroup : EntityBase
48 { 48 {
49 private Encoding enc = Encoding.ASCII; 49 private Encoding enc = Encoding.ASCII;
50 50
@@ -1138,101 +1138,6 @@ namespace OpenSim.Region.Environment.Scenes
1138 /// <summary> 1138 /// <summary>
1139 /// 1139 ///
1140 /// </summary> 1140 /// </summary>
1141 /// <param name="remoteClient"></param>
1142 /// <param name="localID"></param>
1143 public bool GetPartInventoryFileName(IClientAPI remoteClient, uint localID)
1144 {
1145 SceneObjectPart part = GetChildPart(localID);
1146 if (part != null)
1147 {
1148 return part.GetInventoryFileName(remoteClient, localID);
1149 }
1150 else
1151 {
1152 MainLog.Instance.Warn(
1153 "SCENE",
1154 "Couldn't find part {0} in object group {1}, {2} to retreive prim inventory",
1155 localID, Name, UUID);
1156 }
1157 return false;
1158 }
1159
1160 public void RequestInventoryFile(uint localID, IXfer xferManager)
1161 {
1162 SceneObjectPart part = GetChildPart(localID);
1163 if (part != null)
1164 {
1165 part.RequestInventoryFile(xferManager);
1166 }
1167 else
1168 {
1169 MainLog.Instance.Warn(
1170 "PRIMINVENTORY",
1171 "Couldn't find part {0} in object group {1}, {2} to request inventory data",
1172 localID, Name, UUID);
1173 }
1174 }
1175
1176 public bool AddInventoryItem(IClientAPI remoteClient, uint localID, InventoryItemBase item)
1177 {
1178 SceneObjectPart part = GetChildPart(localID);
1179 if (part != null)
1180 {
1181 TaskInventoryItem taskItem = new TaskInventoryItem();
1182 taskItem.item_id = item.inventoryID;
1183 taskItem.asset_id = item.assetID;
1184 taskItem.name = item.inventoryName;
1185 taskItem.desc = item.inventoryDescription;
1186 taskItem.owner_id = item.avatarID;
1187 taskItem.creator_id = item.creatorsID;
1188 taskItem.type = TaskInventoryItem.Types[item.assetType];
1189 taskItem.inv_type = TaskInventoryItem.Types[item.invType];
1190 part.AddInventoryItem(taskItem);
1191 return true;
1192 }
1193 return false;
1194 }
1195
1196 public bool AddInventoryItem(IClientAPI remoteClient, uint localID, InventoryItemBase item, LLUUID copyItemID)
1197 {
1198 if (copyItemID != LLUUID.Zero)
1199 {
1200 SceneObjectPart part = GetChildPart(localID);
1201 if (part != null)
1202 {
1203 TaskInventoryItem taskItem = new TaskInventoryItem();
1204 taskItem.item_id = copyItemID;
1205 taskItem.asset_id = item.assetID;
1206 taskItem.name = item.inventoryName;
1207 taskItem.desc = item.inventoryDescription;
1208 taskItem.owner_id = new LLUUID(item.avatarID.ToString());
1209 taskItem.creator_id = new LLUUID(item.creatorsID.ToString());
1210 taskItem.type = TaskInventoryItem.Types[item.assetType];
1211 taskItem.inv_type = TaskInventoryItem.InvTypes[item.invType];
1212 part.AddInventoryItem(taskItem);
1213 return true;
1214 }
1215 }
1216 else
1217 {
1218 return AddInventoryItem(remoteClient, localID, item);
1219 }
1220 return false;
1221 }
1222
1223 public int RemoveInventoryItem(IClientAPI remoteClient, uint localID, LLUUID itemID)
1224 {
1225 SceneObjectPart part = GetChildPart(localID);
1226 if (part != null)
1227 {
1228 return part.RemoveInventoryItem(remoteClient, localID, itemID);
1229 }
1230 return -1;
1231 }
1232
1233 /// <summary>
1234 ///
1235 /// </summary>
1236 /// <param name="localID"></param> 1141 /// <param name="localID"></param>
1237 /// <param name="type"></param> 1142 /// <param name="type"></param>
1238 /// <param name="inUse"></param> 1143 /// <param name="inUse"></param>