diff options
author | Melanie | 2010-09-30 16:01:45 +0100 |
---|---|---|
committer | Melanie | 2010-09-30 16:01:45 +0100 |
commit | 521e2c83558d77c0482bebb6764a22c1fb8c5fd9 (patch) | |
tree | b58fdcab0d9ac8c9056413f005144384da1686a3 /OpenSim/Region | |
parent | Fix an inventory fetch issue (diff) | |
parent | Prevent dropping someone else's attachments (diff) | |
download | opensim-SC-521e2c83558d77c0482bebb6764a22c1fb8c5fd9.zip opensim-SC-521e2c83558d77c0482bebb6764a22c1fb8c5fd9.tar.gz opensim-SC-521e2c83558d77c0482bebb6764a22c1fb8c5fd9.tar.bz2 opensim-SC-521e2c83558d77c0482bebb6764a22c1fb8c5fd9.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
7 files changed, 30 insertions, 20 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 6f7256e..9807ea5 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -426,6 +426,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
426 | if (part == null || part.ParentGroup == null) | 426 | if (part == null || part.ParentGroup == null) |
427 | return; | 427 | return; |
428 | 428 | ||
429 | if (part.ParentGroup.RootPart.AttachedAvatar != remoteClient.AgentId) | ||
430 | return; | ||
431 | |||
429 | UUID inventoryID = part.ParentGroup.GetFromItemID(); | 432 | UUID inventoryID = part.ParentGroup.GetFromItemID(); |
430 | 433 | ||
431 | ScenePresence presence; | 434 | ScenePresence presence; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs index 83c8eac..a64f785 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | |||
@@ -42,7 +42,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 43 | ||
44 | private IGridUserService m_GridUserService; | 44 | private IGridUserService m_GridUserService; |
45 | private Scene m_aScene; | ||
46 | 45 | ||
47 | public ActivityDetector(IGridUserService guservice) | 46 | public ActivityDetector(IGridUserService guservice) |
48 | { | 47 | { |
@@ -56,9 +55,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
56 | // But we could trigger the position update more often | 55 | // But we could trigger the position update more often |
57 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; | 56 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; |
58 | scene.EventManager.OnNewClient += OnNewClient; | 57 | scene.EventManager.OnNewClient += OnNewClient; |
59 | |||
60 | if (m_aScene == null) | ||
61 | m_aScene = scene; | ||
62 | } | 58 | } |
63 | 59 | ||
64 | public void RemoveRegion(Scene scene) | 60 | public void RemoveRegion(Scene scene) |
@@ -70,8 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
70 | public void OnMakeRootAgent(ScenePresence sp) | 66 | public void OnMakeRootAgent(ScenePresence sp) |
71 | { | 67 | { |
72 | m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); | 68 | m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); |
73 | 69 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | |
74 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
75 | } | 70 | } |
76 | 71 | ||
77 | public void OnNewClient(IClientAPI client) | 72 | public void OnNewClient(IClientAPI client) |
@@ -99,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
99 | } | 94 | } |
100 | } | 95 | } |
101 | m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); | 96 | m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); |
102 | m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat); | 97 | m_GridUserService.LoggedOut(client.AgentId.ToString(), client.SessionId, client.Scene.RegionInfo.RegionID, position, lookat); |
103 | } | 98 | } |
104 | 99 | ||
105 | } | 100 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs index d914a57..985acec 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/LocalGridUserServiceConnector.cs | |||
@@ -152,9 +152,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
152 | return m_GridUserService.LoggedIn(userID); | 152 | return m_GridUserService.LoggedIn(userID); |
153 | } | 153 | } |
154 | 154 | ||
155 | public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) | 155 | public bool LoggedOut(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) |
156 | { | 156 | { |
157 | return m_GridUserService.LoggedOut(userID, regionID, lastPosition, lastLookAt); | 157 | return m_GridUserService.LoggedOut(userID, sessionID, regionID, lastPosition, lastLookAt); |
158 | } | 158 | } |
159 | 159 | ||
160 | public bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt) | 160 | public bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt) |
@@ -162,9 +162,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
162 | return m_GridUserService.SetHome(userID, homeID, homePosition, homeLookAt); | 162 | return m_GridUserService.SetHome(userID, homeID, homePosition, homeLookAt); |
163 | } | 163 | } |
164 | 164 | ||
165 | public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) | 165 | public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) |
166 | { | 166 | { |
167 | return m_GridUserService.SetLastPosition(userID, regionID, lastPosition, lastLookAt); | 167 | return m_GridUserService.SetLastPosition(userID, sessionID, regionID, lastPosition, lastLookAt); |
168 | } | 168 | } |
169 | 169 | ||
170 | public GridUserInfo GetGridUserInfo(string userID) | 170 | public GridUserInfo GetGridUserInfo(string userID) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs index e3e2e61..95b3591 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/RemoteGridUserServiceConnector.cs | |||
@@ -126,9 +126,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
126 | return null; | 126 | return null; |
127 | } | 127 | } |
128 | 128 | ||
129 | public bool LoggedOut(string userID, UUID region, Vector3 position, Vector3 lookat) | 129 | public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat) |
130 | { | 130 | { |
131 | return m_RemoteConnector.LoggedOut(userID, region, position, lookat); | 131 | return m_RemoteConnector.LoggedOut(userID, sessionID, region, position, lookat); |
132 | } | 132 | } |
133 | 133 | ||
134 | 134 | ||
@@ -137,9 +137,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
137 | return m_RemoteConnector.SetHome(userID, regionID, position, lookAt); | 137 | return m_RemoteConnector.SetHome(userID, regionID, position, lookAt); |
138 | } | 138 | } |
139 | 139 | ||
140 | public bool SetLastPosition(string userID, UUID regionID, Vector3 position, Vector3 lookAt) | 140 | public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt) |
141 | { | 141 | { |
142 | return m_RemoteConnector.SetLastPosition(userID, regionID, position, lookAt); | 142 | return m_RemoteConnector.SetLastPosition(userID, sessionID, regionID, position, lookAt); |
143 | } | 143 | } |
144 | 144 | ||
145 | public GridUserInfo GetGridUserInfo(string userID) | 145 | public GridUserInfo GetGridUserInfo(string userID) |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index c8fb9da..a674d60 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
104 | part.GetProperties(client); | 104 | part.GetProperties(client); |
105 | } | 105 | } |
106 | 106 | ||
107 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) | 107 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType, int salePrice) |
108 | { | 108 | { |
109 | SceneObjectPart part = m_scene.GetSceneObjectPart(localID); | 109 | SceneObjectPart part = m_scene.GetSceneObjectPart(localID); |
110 | 110 | ||
@@ -114,6 +114,18 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
114 | if (part.ParentGroup == null) | 114 | if (part.ParentGroup == null) |
115 | return false; | 115 | return false; |
116 | 116 | ||
117 | if (part.ObjectSaleType != saleType) | ||
118 | { | ||
119 | m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the type of sale specified"); | ||
120 | return false; | ||
121 | } | ||
122 | |||
123 | if (part.SalePrice != salePrice) | ||
124 | { | ||
125 | m_dialogModule.SendAlertToUser(remoteClient, "This item is not available for the price specified"); | ||
126 | return false; | ||
127 | } | ||
128 | |||
117 | SceneObjectGroup group = part.ParentGroup; | 129 | SceneObjectGroup group = part.ParentGroup; |
118 | 130 | ||
119 | switch (saleType) | 131 | switch (saleType) |
diff --git a/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs index 0132bae..d1ce4c0 100644 --- a/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs | |||
@@ -42,6 +42,6 @@ namespace OpenSim.Region.Framework.Interfaces | |||
42 | /// <returns> | 42 | /// <returns> |
43 | /// True on a successful purchase, false on failure | 43 | /// True on a successful purchase, false on failure |
44 | /// </returns> | 44 | /// </returns> |
45 | bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType); | 45 | bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType, int salePrice); |
46 | } | 46 | } |
47 | } \ No newline at end of file | 47 | } |
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index cc51c3b..d364df6 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -814,7 +814,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
814 | 814 | ||
815 | IBuySellModule module = s.RequestModuleInterface<IBuySellModule>(); | 815 | IBuySellModule module = s.RequestModuleInterface<IBuySellModule>(); |
816 | if (module != null) | 816 | if (module != null) |
817 | module.BuyObject(remoteClient, categoryID, localID, saleType); | 817 | module.BuyObject(remoteClient, categoryID, localID, saleType, salePrice); |
818 | } | 818 | } |
819 | } | 819 | } |
820 | 820 | ||
@@ -825,4 +825,4 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
825 | Gift = 2, | 825 | Gift = 2, |
826 | Purchase = 3 | 826 | Purchase = 3 |
827 | } | 827 | } |
828 | } \ No newline at end of file | 828 | } |