diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 24 |
1 files changed, 6 insertions, 18 deletions
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: |