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. --- .../Environment/Scenes/Scene.PacketHandlers.cs | 9 ++++ OpenSim/Region/Environment/Scenes/Scene.cs | 5 +- OpenSim/Region/Environment/Scenes/SceneEvents.cs | 60 +++++++++++++++++++++- 3 files changed, 71 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index ebdb0a6..1c36853 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -130,6 +130,15 @@ namespace OpenSim.Region.Environment.Scenes EventManager.TriggerMoneyTransfer(this, args); } + public virtual void ProcessParcelBuy(LLUUID agentId, LLUUID groupId, bool final, bool groupOwned, + bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated) + { + EventManager.LandBuyArgs args = new EventManager.LandBuyArgs( + agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated); + + m_eventManager.TriggerLandBuy(this, args); + } + public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) { diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index f15ec43..410120f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1001,8 +1001,8 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 RayEnd = new LLVector3(0, 0, 0); LLVector3 RayStart = new LLVector3(0, 0, 0); LLVector3 direction = new LLVector3(0, 0, -1); - Vector3 AXOrigin = new Vector3(); - Vector3 AXdirection = new Vector3(); + //Vector3 AXOrigin = new Vector3(); + //Vector3 AXdirection = new Vector3(); Ray testRay = new Ray(); EntityIntersection rt = new EntityIntersection(); @@ -1573,6 +1573,7 @@ namespace OpenSim.Region.Environment.Scenes client.OnGrabObject += ProcessObjectGrab; client.OnMoneyTransferRequest += ProcessMoneyTransferRequest; + client.OnParcelBuy += ProcessParcelBuy; client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; client.OnPacketStats += AddPacketStats; diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs index 02c9f3f..67edf6b 100644 --- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs @@ -176,10 +176,50 @@ namespace OpenSim.Region.Environment.Scenes } } + public class LandBuyArgs : System.EventArgs + { + public LLUUID agentId = LLUUID.Zero; + + public LLUUID groupId = LLUUID.Zero; + + public LLUUID parcelOwnerID = LLUUID.Zero; + + public bool final = false; + public bool groupOwned = false; + public bool removeContribution = false; + public int parcelLocalID = 0; + public int parcelArea = 0; + public int parcelPrice = 0; + public bool authenticated = false; + public bool landValidated = false; + public bool economyValidated = false; + public int transactionID = 0; + public int amountDebited = 0; + + + public LandBuyArgs(LLUUID pagentId, LLUUID pgroupId, bool pfinal, bool pgroupOwned, + bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, + bool pauthenticated) + { + agentId = pagentId; + groupId = pgroupId; + final = pfinal; + groupOwned = pgroupOwned; + removeContribution = premoveContribution; + parcelLocalID = pparcelLocalID; + parcelArea = pparcelArea; + parcelPrice = pparcelPrice; + authenticated = pauthenticated; + } + } + public delegate void MoneyTransferEvent(Object sender, MoneyTransferArgs e); - public event MoneyTransferEvent OnMoneyTransfer; + public delegate void LandBuy(Object sender, LandBuyArgs e); + public event MoneyTransferEvent OnMoneyTransfer; + public event LandBuy OnLandBuy; + public event LandBuy OnValidatedLandBuy; /* Designated Event Deletage Instances */ @@ -212,6 +252,8 @@ namespace OpenSim.Region.Environment.Scenes private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps; private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null; + private LandBuy handlerLandBuy = null; + private LandBuy handlerValidatedLandBuy = null; public void TriggerOnScriptChangedEvent(uint localID, uint change) { @@ -476,5 +518,21 @@ namespace OpenSim.Region.Environment.Scenes handlerNewInventoryItemUpdateComplete(agentID, AssetID, AssetName, userlevel); } } + public void TriggerLandBuy (Object sender, LandBuyArgs e) + { + handlerLandBuy = OnLandBuy; + if (handlerLandBuy != null) + { + handlerLandBuy(sender, e); + } + } + public void TriggerValidatedLandBuy(Object sender, LandBuyArgs e) + { + handlerValidatedLandBuy = OnValidatedLandBuy; + if (handlerValidatedLandBuy != null) + { + handlerValidatedLandBuy(sender, e); + } + } } } -- cgit v1.1