diff options
author | Melanie Thielker | 2008-10-06 00:09:49 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-10-06 00:09:49 +0000 |
commit | 6ab5b523f8b6bdd056cb033c17811ae720564428 (patch) | |
tree | a683bb6124e3988ba7c59a02c306edbe39f7d13f | |
parent | * Green dots on the mainmap for avatar. (diff) | |
download | opensim-SC-6ab5b523f8b6bdd056cb033c17811ae720564428.zip opensim-SC-6ab5b523f8b6bdd056cb033c17811ae720564428.tar.gz opensim-SC-6ab5b523f8b6bdd056cb033c17811ae720564428.tar.bz2 opensim-SC-6ab5b523f8b6bdd056cb033c17811ae720564428.tar.xz |
Implements ObjectOwner god mode packet (Set Owner To Me admin option)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 1 |
6 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 7095387..dbaa0a8 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -308,6 +308,7 @@ namespace OpenSim.Framework | |||
308 | public delegate void DeactivateGesture(IClientAPI client, UUID gestureid); | 308 | public delegate void DeactivateGesture(IClientAPI client, UUID gestureid); |
309 | 309 | ||
310 | public delegate void TerrainUnacked(IClientAPI remoteClient, int patchX, int patchY); | 310 | public delegate void TerrainUnacked(IClientAPI remoteClient, int patchX, int patchY); |
311 | public delegate void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs); | ||
311 | 312 | ||
312 | public delegate void DirPlacesQuery(IClientAPI remoteClient, UUID queryID, string queryText, int queryFlags, int category, string simName, int queryStart); | 313 | public delegate void DirPlacesQuery(IClientAPI remoteClient, UUID queryID, string queryText, int queryFlags, int category, string simName, int queryStart); |
313 | 314 | ||
@@ -546,6 +547,7 @@ namespace OpenSim.Framework | |||
546 | event TerrainUnacked OnUnackedTerrain; | 547 | event TerrainUnacked OnUnackedTerrain; |
547 | event ActivateGesture OnActivateGesture; | 548 | event ActivateGesture OnActivateGesture; |
548 | event DeactivateGesture OnDeactivateGesture; | 549 | event DeactivateGesture OnDeactivateGesture; |
550 | event ObjectOwner OnObjectOwner; | ||
549 | 551 | ||
550 | event DirPlacesQuery OnDirPlacesQuery; | 552 | event DirPlacesQuery OnDirPlacesQuery; |
551 | 553 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 92275e8..102b9c4 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -259,6 +259,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
259 | //Gesture | 259 | //Gesture |
260 | private ActivateGesture handlerActivateGesture = null; | 260 | private ActivateGesture handlerActivateGesture = null; |
261 | private DeactivateGesture handlerDeactivateGesture = null; | 261 | private DeactivateGesture handlerDeactivateGesture = null; |
262 | private ObjectOwner handlerObjectOwner = null; | ||
262 | 263 | ||
263 | private DirPlacesQuery handlerDirPlacesQuery = null; | 264 | private DirPlacesQuery handlerDirPlacesQuery = null; |
264 | 265 | ||
@@ -987,6 +988,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
987 | 988 | ||
988 | public event ActivateGesture OnActivateGesture; | 989 | public event ActivateGesture OnActivateGesture; |
989 | public event DeactivateGesture OnDeactivateGesture; | 990 | public event DeactivateGesture OnDeactivateGesture; |
991 | public event ObjectOwner OnObjectOwner; | ||
990 | 992 | ||
991 | public event DirPlacesQuery OnDirPlacesQuery; | 993 | public event DirPlacesQuery OnDirPlacesQuery; |
992 | 994 | ||
@@ -6186,6 +6188,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6186 | handlerDeactivateGesture(this, deactivateGesturePacket.Data[0].ItemID); | 6188 | handlerDeactivateGesture(this, deactivateGesturePacket.Data[0].ItemID); |
6187 | } | 6189 | } |
6188 | break; | 6190 | break; |
6191 | case PacketType.ObjectOwner: | ||
6192 | ObjectOwnerPacket objectOwnerPacket = (ObjectOwnerPacket)Pack; | ||
6193 | |||
6194 | List<uint> localIDs = new List<uint>(); | ||
6195 | |||
6196 | foreach (ObjectOwnerPacket.ObjectDataBlock d in objectOwnerPacket.ObjectData) | ||
6197 | localIDs.Add(d.ObjectLocalID); | ||
6198 | |||
6199 | handlerObjectOwner = OnObjectOwner; | ||
6200 | if (handlerObjectOwner != null) | ||
6201 | { | ||
6202 | handlerObjectOwner(this, objectOwnerPacket.HeaderData.OwnerID, objectOwnerPacket.HeaderData.GroupID, localIDs); | ||
6203 | } | ||
6204 | break; | ||
6189 | 6205 | ||
6190 | #endregion | 6206 | #endregion |
6191 | 6207 | ||
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index ff54ed3..972491d 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -321,6 +321,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
321 | 321 | ||
322 | public event ActivateGesture OnActivateGesture; | 322 | public event ActivateGesture OnActivateGesture; |
323 | public event DeactivateGesture OnDeactivateGesture; | 323 | public event DeactivateGesture OnDeactivateGesture; |
324 | public event ObjectOwner OnObjectOwner; | ||
324 | 325 | ||
325 | public event DirPlacesQuery OnDirPlacesQuery; | 326 | public event DirPlacesQuery OnDirPlacesQuery; |
326 | 327 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 729572a..04076da 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -2340,5 +2340,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
2340 | { | 2340 | { |
2341 | EventManager.TriggerGetScriptRunning(controllingClient, objectID, itemID); | 2341 | EventManager.TriggerGetScriptRunning(controllingClient, objectID, itemID); |
2342 | } | 2342 | } |
2343 | |||
2344 | void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs) | ||
2345 | { | ||
2346 | if (!ExternalChecks.ExternalChecksCanBeGodLike(remoteClient.AgentId)) | ||
2347 | return; | ||
2348 | |||
2349 | foreach (uint localID in localIDs) | ||
2350 | { | ||
2351 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
2352 | if (part != null && part.ParentGroup != null) | ||
2353 | { | ||
2354 | part.ParentGroup.SetOwnerId(ownerID); | ||
2355 | part.ParentGroup.SetGroup(groupID, remoteClient); | ||
2356 | } | ||
2357 | } | ||
2358 | } | ||
2343 | } | 2359 | } |
2344 | } | 2360 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index fcd50a9..735de7e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2227,6 +2227,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2227 | client.OnActivateGesture += ActivateGesture; | 2227 | client.OnActivateGesture += ActivateGesture; |
2228 | client.OnDeactivateGesture += DeactivateGesture; | 2228 | client.OnDeactivateGesture += DeactivateGesture; |
2229 | 2229 | ||
2230 | client.OnObjectOwner += ObjectOwner; | ||
2231 | |||
2230 | // EventManager.TriggerOnNewClient(client); | 2232 | // EventManager.TriggerOnNewClient(client); |
2231 | } | 2233 | } |
2232 | 2234 | ||
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 60a66aa..b7ff879 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -216,6 +216,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
216 | 216 | ||
217 | public event ActivateGesture OnActivateGesture; | 217 | public event ActivateGesture OnActivateGesture; |
218 | public event DeactivateGesture OnDeactivateGesture; | 218 | public event DeactivateGesture OnDeactivateGesture; |
219 | public event ObjectOwner OnObjectOwner; | ||
219 | 220 | ||
220 | public event DirPlacesQuery OnDirPlacesQuery; | 221 | public event DirPlacesQuery OnDirPlacesQuery; |
221 | 222 | ||