From 00a1447e3bc7a7bbf216792a574ae32497d2e847 Mon Sep 17 00:00:00 2001 From: Cinder Roxley Date: Fri, 5 Jul 2024 09:37:29 -0500 Subject: [PATCH] Eliminate duplicate CreateInventoryItem function already found in InventoryManager --- Programs/GridProxy/Plugins/ClientAO.cs | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/Programs/GridProxy/Plugins/ClientAO.cs b/Programs/GridProxy/Plugins/ClientAO.cs index 86369fdb..8a7908f2 100644 --- a/Programs/GridProxy/Plugins/ClientAO.cs +++ b/Programs/GridProxy/Plugins/ClientAO.cs @@ -360,7 +360,7 @@ public class ClientAO : ProxyPlugin //configuration notecard if (d.ItemID != UUID.Zero) { - InventoryItem item = CreateInventoryItem((InventoryType)d.InvType, d.ItemID); + InventoryItem item = InventoryManager.CreateInventoryItem((InventoryType)d.InvType, d.ItemID); item.ParentUUID = d.FolderID; item.CreatorID = d.CreatorID; item.AssetType = (AssetType)d.Type; @@ -437,27 +437,6 @@ public class ClientAO : ProxyPlugin } } - public static InventoryItem CreateInventoryItem(InventoryType type, UUID id) - { - switch (type) - { - case InventoryType.Texture: return new InventoryTexture(id); - case InventoryType.Sound: return new InventorySound(id); - case InventoryType.CallingCard: return new InventoryCallingCard(id); - case InventoryType.Landmark: return new InventoryLandmark(id); - case InventoryType.Object: return new InventoryObject(id); - case InventoryType.Notecard: return new InventoryNotecard(id); - case InventoryType.Category: return new InventoryCategory(id); - case InventoryType.LSL: return new InventoryLSL(id); - case InventoryType.Snapshot: return new InventorySnapshot(id); - case InventoryType.Attachment: return new InventoryAttachment(id); - case InventoryType.Wearable: return new InventoryWearable(id); - case InventoryType.Animation: return new InventoryAnimation(id); - case InventoryType.Gesture: return new InventoryGesture(id); - default: return new InventoryItem(type, id); - } - } - //Ask for download of an item public UUID RequestInventoryAsset(InventoryItem item) {