diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 9fe2144..2599456 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -214,6 +214,7 @@ namespace OpenSim.Region.ClientStack | |||
214 | private ViewerEffectEventHandler handlerViewerEffect = null; //OnViewerEffect; | 214 | private ViewerEffectEventHandler handlerViewerEffect = null; //OnViewerEffect; |
215 | private Action<IClientAPI> handlerLogout = null; //OnLogout; | 215 | private Action<IClientAPI> handlerLogout = null; //OnLogout; |
216 | private MoneyTransferRequest handlerMoneyTransferRequest = null; //OnMoneyTransferRequest; | 216 | private MoneyTransferRequest handlerMoneyTransferRequest = null; //OnMoneyTransferRequest; |
217 | private ParcelBuy handlerParcelBuy = null; | ||
217 | private EconomyDataRequest handlerEconomoyDataRequest = null; | 218 | private EconomyDataRequest handlerEconomoyDataRequest = null; |
218 | 219 | ||
219 | private UpdateVector handlerUpdatePrimSinglePosition = null; //OnUpdatePrimSinglePosition; | 220 | private UpdateVector handlerUpdatePrimSinglePosition = null; //OnUpdatePrimSinglePosition; |
@@ -769,6 +770,7 @@ namespace OpenSim.Region.ClientStack | |||
769 | public event EconomyDataRequest OnEconomyDataRequest; | 770 | public event EconomyDataRequest OnEconomyDataRequest; |
770 | 771 | ||
771 | public event MoneyBalanceRequest OnMoneyBalanceRequest; | 772 | public event MoneyBalanceRequest OnMoneyBalanceRequest; |
773 | public event ParcelBuy OnParcelBuy; | ||
772 | 774 | ||
773 | 775 | ||
774 | #region Scene/Avatar to Client | 776 | #region Scene/Avatar to Client |
@@ -2396,6 +2398,7 @@ namespace OpenSim.Region.ClientStack | |||
2396 | AddLocalPacketHandler(PacketType.AgentCachedTexture, AgentTextureCached); | 2398 | AddLocalPacketHandler(PacketType.AgentCachedTexture, AgentTextureCached); |
2397 | AddLocalPacketHandler(PacketType.MultipleObjectUpdate, MultipleObjUpdate); | 2399 | AddLocalPacketHandler(PacketType.MultipleObjectUpdate, MultipleObjUpdate); |
2398 | AddLocalPacketHandler(PacketType.MoneyTransferRequest, HandleMoneyTransferRequest); | 2400 | AddLocalPacketHandler(PacketType.MoneyTransferRequest, HandleMoneyTransferRequest); |
2401 | AddLocalPacketHandler(PacketType.ParcelBuy, HandleParcelBuyRequest); | ||
2399 | } | 2402 | } |
2400 | 2403 | ||
2401 | private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack) | 2404 | private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack) |
@@ -2420,6 +2423,28 @@ namespace OpenSim.Region.ClientStack | |||
2420 | } | 2423 | } |
2421 | } | 2424 | } |
2422 | 2425 | ||
2426 | private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) | ||
2427 | { | ||
2428 | ParcelBuyPacket parcel = (ParcelBuyPacket)Pack; | ||
2429 | if (parcel.AgentData.AgentID == AgentId && parcel.AgentData.SessionID == this.SessionId) | ||
2430 | { | ||
2431 | handlerParcelBuy = OnParcelBuy; | ||
2432 | if (handlerParcelBuy != null) | ||
2433 | { | ||
2434 | handlerParcelBuy(parcel.AgentData.AgentID, parcel.Data.GroupID, parcel.Data.Final, parcel.Data.IsGroupOwned, | ||
2435 | parcel.Data.RemoveContribution, parcel.Data.LocalID, parcel.ParcelData.Area, parcel.ParcelData.Price, | ||
2436 | false); | ||
2437 | } | ||
2438 | return true; | ||
2439 | |||
2440 | } | ||
2441 | else | ||
2442 | { | ||
2443 | return false; | ||
2444 | } | ||
2445 | |||
2446 | } | ||
2447 | |||
2423 | private bool HandleViewerEffect(IClientAPI sender, Packet Pack) | 2448 | private bool HandleViewerEffect(IClientAPI sender, Packet Pack) |
2424 | { | 2449 | { |
2425 | ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; | 2450 | ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; |