From e21886eea0a4d2782a74bb1f974b2e1056fea055 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 14 Apr 2008 17:13:38 +0000 Subject: * Fixed a few warnings. * Added license info to a few files it was missing from. * Fleshed out the landbuy interfaces * If you add '-helperuri http://127.0.0.1:9000/' to your list of parameters you tell the client to use when you start it up you can transfer ownership of parcels now in standalone. Structured gridmode requires a lot more work, see the documentation in the example money module. The example money module is not secure especially in standalone mode. --- OpenSim/Region/ClientStack/ClientView.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'OpenSim/Region/ClientStack/ClientView.cs') 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 private ViewerEffectEventHandler handlerViewerEffect = null; //OnViewerEffect; private Action handlerLogout = null; //OnLogout; private MoneyTransferRequest handlerMoneyTransferRequest = null; //OnMoneyTransferRequest; + private ParcelBuy handlerParcelBuy = null; private EconomyDataRequest handlerEconomoyDataRequest = null; private UpdateVector handlerUpdatePrimSinglePosition = null; //OnUpdatePrimSinglePosition; @@ -769,6 +770,7 @@ namespace OpenSim.Region.ClientStack public event EconomyDataRequest OnEconomyDataRequest; public event MoneyBalanceRequest OnMoneyBalanceRequest; + public event ParcelBuy OnParcelBuy; #region Scene/Avatar to Client @@ -2396,6 +2398,7 @@ namespace OpenSim.Region.ClientStack AddLocalPacketHandler(PacketType.AgentCachedTexture, AgentTextureCached); AddLocalPacketHandler(PacketType.MultipleObjectUpdate, MultipleObjUpdate); AddLocalPacketHandler(PacketType.MoneyTransferRequest, HandleMoneyTransferRequest); + AddLocalPacketHandler(PacketType.ParcelBuy, HandleParcelBuyRequest); } private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack) @@ -2420,6 +2423,28 @@ namespace OpenSim.Region.ClientStack } } + private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) + { + ParcelBuyPacket parcel = (ParcelBuyPacket)Pack; + if (parcel.AgentData.AgentID == AgentId && parcel.AgentData.SessionID == this.SessionId) + { + handlerParcelBuy = OnParcelBuy; + if (handlerParcelBuy != null) + { + handlerParcelBuy(parcel.AgentData.AgentID, parcel.Data.GroupID, parcel.Data.Final, parcel.Data.IsGroupOwned, + parcel.Data.RemoveContribution, parcel.Data.LocalID, parcel.ParcelData.Area, parcel.ParcelData.Price, + false); + } + return true; + + } + else + { + return false; + } + + } + private bool HandleViewerEffect(IClientAPI sender, Packet Pack) { ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; -- cgit v1.1