diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 24 |
2 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index d7962dc..f655674 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -630,6 +630,18 @@ namespace OpenSim.Region.ClientStack | |||
630 | OutPacket(InventoryReply); | 630 | OutPacket(InventoryReply); |
631 | } | 631 | } |
632 | 632 | ||
633 | public void SendRemoveInventoryItem(LLUUID itemID) | ||
634 | { | ||
635 | RemoveInventoryItemPacket remove = new RemoveInventoryItemPacket(); | ||
636 | remove.AgentData.AgentID = this.AgentID; | ||
637 | remove.AgentData.SessionID = this.SessionID; | ||
638 | remove.InventoryData = new RemoveInventoryItemPacket.InventoryDataBlock[1]; | ||
639 | remove.InventoryData[0] = new RemoveInventoryItemPacket.InventoryDataBlock(); | ||
640 | remove.InventoryData[0].ItemID = itemID; | ||
641 | |||
642 | OutPacket(remove); | ||
643 | } | ||
644 | |||
633 | public void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) | 645 | public void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) |
634 | { | 646 | { |
635 | ReplyTaskInventoryPacket replytask = new ReplyTaskInventoryPacket(); | 647 | ReplyTaskInventoryPacket replytask = new ReplyTaskInventoryPacket(); |
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index f380c25..89df290 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -45,12 +45,12 @@ namespace OpenSim.Region.ClientStack | |||
45 | get { return m_moneyBalance; } | 45 | get { return m_moneyBalance; } |
46 | } | 46 | } |
47 | 47 | ||
48 | public bool AddMoney( int debit ) | 48 | public bool AddMoney(int debit) |
49 | { | 49 | { |
50 | if( m_moneyBalance + debit >= 0 ) | 50 | if (m_moneyBalance + debit >= 0) |
51 | { | 51 | { |
52 | m_moneyBalance += debit; | 52 | m_moneyBalance += debit; |
53 | SendMoneyBalance( LLUUID.Zero, true, Helpers.StringToField("Poof Poof!"), m_moneyBalance ); | 53 | SendMoneyBalance(LLUUID.Zero, true, Helpers.StringToField("Poof Poof!"), m_moneyBalance); |
54 | return true; | 54 | return true; |
55 | } | 55 | } |
56 | else | 56 | else |
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack | |||
58 | return false; | 58 | return false; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | protected override void ProcessInPacket(Packet Pack) | 62 | protected override void ProcessInPacket(Packet Pack) |
63 | { | 63 | { |
64 | ack_pack(Pack); | 64 | ack_pack(Pack); |
@@ -126,21 +126,9 @@ namespace OpenSim.Region.ClientStack | |||
126 | break; | 126 | break; |
127 | case PacketType.RezObject: | 127 | case PacketType.RezObject: |
128 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; | 128 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; |
129 | AgentInventory inven = this.m_inventoryCache.GetAgentsInventory(this.AgentID); | 129 | if (OnRezObject != null) |
130 | if (inven != null) | ||
131 | { | 130 | { |
132 | if (inven.InventoryItems.ContainsKey(rezPacket.InventoryData.ItemID)) | 131 | this.OnRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd); |
133 | { | ||
134 | AssetBase asset = this.m_assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID); | ||
135 | if (asset != null) | ||
136 | { | ||
137 | if (OnRezObject != null) | ||
138 | { | ||
139 | this.OnRezObject(asset, rezPacket.RezData.RayEnd); | ||
140 | this.m_inventoryCache.DeleteInventoryItem(this, rezPacket.InventoryData.ItemID); | ||
141 | } | ||
142 | } | ||
143 | } | ||
144 | } | 132 | } |
145 | break; | 133 | break; |
146 | case PacketType.DeRezObject: | 134 | case PacketType.DeRezObject: |