aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-01 01:21:20 +0100
committerJustin Clark-Casey (justincc)2011-10-01 01:21:20 +0100
commit42fe774ad10d469c11fe58731fcab0e4df760871 (patch)
treea3e44ef46acabd92ccd470a690fa8cbbc5e006fc /OpenSim/Region
parentllGetLinkKey, llGetLinkName Fix for sitting Avatar (diff)
downloadopensim-SC-42fe774ad10d469c11fe58731fcab0e4df760871.zip
opensim-SC-42fe774ad10d469c11fe58731fcab0e4df760871.tar.gz
opensim-SC-42fe774ad10d469c11fe58731fcab0e4df760871.tar.bz2
opensim-SC-42fe774ad10d469c11fe58731fcab0e4df760871.tar.xz
Remove OpenSim.Region.Examples.SimpleModule
This module is more than 2 years old and at least some of the 'example' code it gives is now misleading. Even the logs say it say some bits were broken where it was put in!
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Examples/SimpleModule/ComplexObject.cs130
-rw-r--r--OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs68
-rw-r--r--OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs51
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs1167
-rw-r--r--OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs62
-rw-r--r--OpenSim/Region/Examples/SimpleModule/README.txt9
-rw-r--r--OpenSim/Region/Examples/SimpleModule/RegionModule.cs147
7 files changed, 0 insertions, 1634 deletions
diff --git a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
deleted file mode 100644
index e951bef..0000000
--- a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs
+++ /dev/null
@@ -1,130 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenMetaverse;
29using OpenSim.Framework;
30using OpenSim.Region.Framework.Scenes;
31
32namespace OpenSim.Region.Examples.SimpleModule
33{
34 public class ComplexObject : SceneObjectGroup
35 {
36 private readonly Quaternion m_rotationDirection;
37
38 protected override bool InSceneBackup
39 {
40 get
41 {
42 return false;
43 }
44 }
45
46 private class RotatingWheel : SceneObjectPart
47 {
48 private readonly Quaternion m_rotationDirection;
49
50 public RotatingWheel()
51 {
52 }
53
54 public RotatingWheel(
55 UUID ownerID, Vector3 groupPosition, Vector3 offsetPosition, Quaternion rotationDirection)
56 : base(ownerID, PrimitiveBaseShape.Default, groupPosition, Quaternion.Identity, offsetPosition)
57 {
58 m_rotationDirection = rotationDirection;
59
60 Flags |= PrimFlags.Touch;
61 }
62
63 public override void UpdateMovement()
64 {
65 UpdateRotation(RotationOffset * m_rotationDirection);
66 }
67 }
68
69 public override void UpdateMovement()
70 {
71 UpdateGroupRotationR(GroupRotation * m_rotationDirection);
72
73 base.UpdateMovement();
74 }
75
76 public ComplexObject()
77 {
78 }
79
80 public ComplexObject(Scene scene, ulong regionHandle, UUID ownerID, uint localID, Vector3 pos)
81 : base(ownerID, pos, PrimitiveBaseShape.Default)
82 {
83 m_rotationDirection = new Quaternion(0.05f, 0.1f, 0.15f);
84
85 AddPart(
86 new RotatingWheel(ownerID, pos, new Vector3(0, 0, 0.75f),
87 new Quaternion(0.05f, 0, 0)));
88 AddPart(
89 new RotatingWheel(ownerID, pos, new Vector3(0, 0, -0.75f),
90 new Quaternion(-0.05f, 0, 0)));
91
92 AddPart(
93 new RotatingWheel(ownerID, pos, new Vector3(0, 0.75f, 0),
94 new Quaternion(0.5f, 0, 0.05f)));
95 AddPart(
96 new RotatingWheel(ownerID, pos, new Vector3(0, -0.75f, 0),
97 new Quaternion(-0.5f, 0, -0.05f)));
98
99 AddPart(
100 new RotatingWheel(ownerID, pos, new Vector3(0.75f, 0, 0),
101 new Quaternion(0, 0.5f, 0.05f)));
102 AddPart(
103 new RotatingWheel(ownerID, pos, new Vector3(-0.75f, 0, 0),
104 new Quaternion(0, -0.5f, -0.05f)));
105
106 RootPart.Flags |= PrimFlags.Touch;
107 }
108
109 public override void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient)
110 {
111 m_parts.Remove(part.UUID);
112
113 remoteClient.SendKillObject(m_regionHandle, part.LocalId);
114 remoteClient.AddMoney(1);
115 remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
116 }
117
118 public override void OnGrabGroup(Vector3 offsetPos, IClientAPI remoteClient)
119 {
120 if (m_parts.Count == 1)
121 {
122 m_parts.Remove(m_rootPart.UUID);
123 m_scene.DeleteSceneObject(this, false);
124 remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId);
125 remoteClient.AddMoney(50);
126 remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully);
127 }
128 }
129 }
130}
diff --git a/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs b/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs
deleted file mode 100644
index 8669139..0000000
--- a/OpenSim/Region/Examples/SimpleModule/CpuCounterObject.cs
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Diagnostics;
30using OpenMetaverse;
31using OpenSim.Framework;
32using OpenSim.Region.Framework.Scenes;
33
34namespace OpenSim.Region.Examples.SimpleModule
35{
36 public class CpuCounterObject : SceneObjectGroup
37 {
38 protected override bool InSceneBackup
39 {
40 get
41 {
42 return false;
43 }
44 }
45
46 private PerformanceCounter m_counter;
47
48 public CpuCounterObject(UUID ownerID, Vector3 pos)
49 : base(ownerID, pos, PrimitiveBaseShape.Default)
50 {
51 String objectName = "Processor";
52 String counterName = "% Processor Time";
53 String instanceName = "_Total";
54
55 m_counter = new PerformanceCounter(objectName, counterName, instanceName);
56 }
57
58 public override void UpdateMovement()
59 {
60 float cpu = m_counter.NextValue()/40f;
61 Vector3 size = new Vector3(cpu, cpu, cpu);
62
63 RootPart.Resize(size);
64
65 base.UpdateMovement();
66 }
67 }
68}
diff --git a/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs b/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs
deleted file mode 100644
index f0f684c..0000000
--- a/OpenSim/Region/Examples/SimpleModule/FileSystemObject.cs
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.IO;
29using OpenMetaverse;
30using OpenSim.Framework;
31using OpenSim.Region.Framework.Scenes;
32
33namespace OpenSim.Region.Examples.SimpleModule
34{
35 public class FileSystemObject : SceneObjectGroup
36 {
37 public FileSystemObject(FileInfo fileInfo, Vector3 pos)
38 : base(UUID.Zero, pos, PrimitiveBaseShape.Default)
39 {
40 Text = fileInfo.Name;
41 }
42
43 protected override bool InSceneBackup
44 {
45 get
46 {
47 return false;
48 }
49 }
50 }
51}
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
deleted file mode 100644
index b0266c5..0000000
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ /dev/null
@@ -1,1167 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Net;
31using OpenMetaverse;
32using OpenMetaverse.Packets;
33using OpenSim.Framework;
34using OpenSim.Region.Framework.Scenes;
35
36namespace OpenSim.Region.Examples.SimpleModule
37{
38 public class MyNpcCharacter : IClientAPI
39 {
40 private uint movementFlag = 0;
41 private short flyState = 0;
42 private Quaternion bodyDirection = Quaternion.Identity;
43 private short count = 0;
44 private short frame = 0;
45 private Scene m_scene;
46
47// disable warning: public events, part of the public API
48#pragma warning disable 67
49
50 public event Action<IClientAPI> OnLogout;
51 public event ObjectPermissions OnObjectPermissions;
52
53 public event MoneyTransferRequest OnMoneyTransferRequest;
54 public event ParcelBuy OnParcelBuy;
55 public event Action<IClientAPI> OnConnectionClosed;
56
57 public event ImprovedInstantMessage OnInstantMessage;
58 public event ChatMessage OnChatFromClient;
59 public event TextureRequest OnRequestTexture;
60 public event RezObject OnRezObject;
61 public event ModifyTerrain OnModifyTerrain;
62 public event BakeTerrain OnBakeTerrain;
63 public event SetAppearance OnSetAppearance;
64 public event AvatarNowWearing OnAvatarNowWearing;
65 public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
66 public event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv;
67 public event UUIDNameRequest OnDetachAttachmentIntoInv;
68 public event ObjectAttach OnObjectAttach;
69 public event ObjectDeselect OnObjectDetach;
70 public event ObjectDrop OnObjectDrop;
71 public event StartAnim OnStartAnim;
72 public event StopAnim OnStopAnim;
73 public event LinkObjects OnLinkObjects;
74 public event DelinkObjects OnDelinkObjects;
75 public event RequestMapBlocks OnRequestMapBlocks;
76 public event RequestMapName OnMapNameRequest;
77 public event TeleportLocationRequest OnTeleportLocationRequest;
78 public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
79 public event DisconnectUser OnDisconnectUser;
80 public event RequestAvatarProperties OnRequestAvatarProperties;
81 public event SetAlwaysRun OnSetAlwaysRun;
82
83 public event DeRezObject OnDeRezObject;
84 public event Action<IClientAPI> OnRegionHandShakeReply;
85 public event GenericCall1 OnRequestWearables;
86 public event Action<IClientAPI, bool> OnCompleteMovementToRegion;
87 public event UpdateAgent OnPreAgentUpdate;
88 public event UpdateAgent OnAgentUpdate;
89 public event AgentRequestSit OnAgentRequestSit;
90 public event AgentSit OnAgentSit;
91 public event AvatarPickerRequest OnAvatarPickerRequest;
92 public event Action<IClientAPI> OnRequestAvatarsData;
93 public event AddNewPrim OnAddPrim;
94 public event RequestGodlikePowers OnRequestGodlikePowers;
95 public event GodKickUser OnGodKickUser;
96 public event ObjectDuplicate OnObjectDuplicate;
97 public event GrabObject OnGrabObject;
98 public event DeGrabObject OnDeGrabObject;
99 public event MoveObject OnGrabUpdate;
100 public event SpinStart OnSpinStart;
101 public event SpinObject OnSpinUpdate;
102 public event SpinStop OnSpinStop;
103 public event ViewerEffectEventHandler OnViewerEffect;
104
105 public event FetchInventory OnAgentDataUpdateRequest;
106 public event TeleportLocationRequest OnSetStartLocationRequest;
107
108 public event UpdateShape OnUpdatePrimShape;
109 public event ObjectExtraParams OnUpdateExtraParams;
110 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
111 public event ObjectRequest OnObjectRequest;
112 public event ObjectSelect OnObjectSelect;
113 public event GenericCall7 OnObjectDescription;
114 public event GenericCall7 OnObjectName;
115 public event GenericCall7 OnObjectClickAction;
116 public event GenericCall7 OnObjectMaterial;
117 public event UpdatePrimFlags OnUpdatePrimFlags;
118 public event UpdatePrimTexture OnUpdatePrimTexture;
119 public event UpdateVector OnUpdatePrimGroupPosition;
120 public event UpdateVector OnUpdatePrimSinglePosition;
121 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
122 public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition;
123 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
124 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
125 public event UpdateVector OnUpdatePrimScale;
126 public event UpdateVector OnUpdatePrimGroupScale;
127 public event StatusChange OnChildAgentStatus;
128 public event GenericCall2 OnStopMovement;
129 public event Action<UUID> OnRemoveAvatar;
130
131 public event CreateNewInventoryItem OnCreateNewInventoryItem;
132 public event LinkInventoryItem OnLinkInventoryItem;
133 public event CreateInventoryFolder OnCreateNewInventoryFolder;
134 public event UpdateInventoryFolder OnUpdateInventoryFolder;
135 public event MoveInventoryFolder OnMoveInventoryFolder;
136 public event RemoveInventoryFolder OnRemoveInventoryFolder;
137 public event RemoveInventoryItem OnRemoveInventoryItem;
138 public event FetchInventoryDescendents OnFetchInventoryDescendents;
139 public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
140 public event FetchInventory OnFetchInventory;
141 public event RequestTaskInventory OnRequestTaskInventory;
142 public event UpdateInventoryItem OnUpdateInventoryItem;
143 public event CopyInventoryItem OnCopyInventoryItem;
144 public event MoveInventoryItem OnMoveInventoryItem;
145 public event UDPAssetUploadRequest OnAssetUploadRequest;
146 public event RequestTerrain OnRequestTerrain;
147 public event RequestTerrain OnUploadTerrain;
148 public event XferReceive OnXferReceive;
149 public event RequestXfer OnRequestXfer;
150 public event ConfirmXfer OnConfirmXfer;
151 public event AbortXfer OnAbortXfer;
152 public event RezScript OnRezScript;
153 public event UpdateTaskInventory OnUpdateTaskInventory;
154 public event MoveTaskInventory OnMoveTaskItem;
155 public event RemoveTaskInventory OnRemoveTaskItem;
156 public event RequestAsset OnRequestAsset;
157 public event GenericMessage OnGenericMessage;
158 public event UUIDNameRequest OnNameFromUUIDRequest;
159 public event UUIDNameRequest OnUUIDGroupNameRequest;
160
161 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
162 public event ParcelDivideRequest OnParcelDivideRequest;
163 public event ParcelJoinRequest OnParcelJoinRequest;
164 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
165 public event ParcelAbandonRequest OnParcelAbandonRequest;
166 public event ParcelGodForceOwner OnParcelGodForceOwner;
167 public event ParcelReclaim OnParcelReclaim;
168 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
169 public event ParcelAccessListRequest OnParcelAccessListRequest;
170 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
171 public event ParcelSelectObjects OnParcelSelectObjects;
172 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
173 public event ParcelDeedToGroup OnParcelDeedToGroup;
174 public event ObjectDeselect OnObjectDeselect;
175 public event RegionInfoRequest OnRegionInfoRequest;
176 public event EstateCovenantRequest OnEstateCovenantRequest;
177 public event EstateChangeInfo OnEstateChangeInfo;
178
179 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
180
181 public event FriendActionDelegate OnApproveFriendRequest;
182 public event FriendActionDelegate OnDenyFriendRequest;
183 public event FriendshipTermination OnTerminateFriendship;
184 public event GrantUserFriendRights OnGrantUserRights;
185
186 public event EconomyDataRequest OnEconomyDataRequest;
187 public event MoneyBalanceRequest OnMoneyBalanceRequest;
188 public event UpdateAvatarProperties OnUpdateAvatarProperties;
189
190 public event ObjectIncludeInSearch OnObjectIncludeInSearch;
191 public event UUIDNameRequest OnTeleportHomeRequest;
192
193 public event ScriptAnswer OnScriptAnswer;
194 public event RequestPayPrice OnRequestPayPrice;
195 public event ObjectSaleInfo OnObjectSaleInfo;
196 public event ObjectBuy OnObjectBuy;
197 public event BuyObjectInventory OnBuyObjectInventory;
198 public event AgentSit OnUndo;
199 public event AgentSit OnRedo;
200 public event LandUndo OnLandUndo;
201
202 public event ForceReleaseControls OnForceReleaseControls;
203
204 public event GodLandStatRequest OnLandStatRequest;
205 public event RequestObjectPropertiesFamily OnObjectGroupRequest;
206
207 public event DetailedEstateDataRequest OnDetailedEstateDataRequest;
208 public event SetEstateFlagsRequest OnSetEstateFlagsRequest;
209 public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
210 public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
211 public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
212 public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
213 public event SetRegionTerrainSettings OnSetRegionTerrainSettings;
214 public event EstateRestartSimRequest OnEstateRestartSimRequest;
215 public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
216 public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
217 public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
218 public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
219 public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
220 public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
221 public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
222 public event ScriptReset OnScriptReset;
223 public event GetScriptRunning OnGetScriptRunning;
224 public event SetScriptRunning OnSetScriptRunning;
225 public event Action<Vector3, bool, bool> OnAutoPilotGo;
226
227 public event TerrainUnacked OnUnackedTerrain;
228
229 public event RegionHandleRequest OnRegionHandleRequest;
230 public event ParcelInfoRequest OnParcelInfoRequest;
231
232 public event ActivateGesture OnActivateGesture;
233 public event DeactivateGesture OnDeactivateGesture;
234 public event ObjectOwner OnObjectOwner;
235
236 public event DirPlacesQuery OnDirPlacesQuery;
237 public event DirFindQuery OnDirFindQuery;
238 public event DirLandQuery OnDirLandQuery;
239 public event DirPopularQuery OnDirPopularQuery;
240 public event DirClassifiedQuery OnDirClassifiedQuery;
241 public event EventInfoRequest OnEventInfoRequest;
242 public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
243
244 public event MapItemRequest OnMapItemRequest;
245
246 public event OfferCallingCard OnOfferCallingCard;
247 public event AcceptCallingCard OnAcceptCallingCard;
248 public event DeclineCallingCard OnDeclineCallingCard;
249 public event SoundTrigger OnSoundTrigger;
250
251 public event StartLure OnStartLure;
252 public event TeleportLureRequest OnTeleportLureRequest;
253 public event NetworkStats OnNetworkStatsUpdate;
254
255 public event ClassifiedInfoRequest OnClassifiedInfoRequest;
256 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
257 public event ClassifiedDelete OnClassifiedDelete;
258 public event ClassifiedDelete OnClassifiedGodDelete;
259
260 public event EventNotificationAddRequest OnEventNotificationAddRequest;
261 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
262 public event EventGodDelete OnEventGodDelete;
263
264 public event ParcelDwellRequest OnParcelDwellRequest;
265 public event UserInfoRequest OnUserInfoRequest;
266 public event UpdateUserInfo OnUpdateUserInfo;
267
268 public event RetrieveInstantMessages OnRetrieveInstantMessages;
269
270 public event PickDelete OnPickDelete;
271 public event PickGodDelete OnPickGodDelete;
272 public event PickInfoUpdate OnPickInfoUpdate;
273 public event AvatarNotesUpdate OnAvatarNotesUpdate;
274
275 public event MuteListRequest OnMuteListRequest;
276
277 public event AvatarInterestUpdate OnAvatarInterestUpdate;
278
279 public event PlacesQuery OnPlacesQuery;
280
281 public event FindAgentUpdate OnFindAgent;
282 public event TrackAgentUpdate OnTrackAgent;
283 public event NewUserReport OnUserReport;
284 public event SaveStateHandler OnSaveState;
285 public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
286 public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
287 public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
288 public event FreezeUserUpdate OnParcelFreezeUser;
289 public event EjectUserUpdate OnParcelEjectUser;
290 public event ParcelBuyPass OnParcelBuyPass;
291 public event ParcelGodMark OnParcelGodMark;
292 public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
293 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
294 public event SimWideDeletesDelegate OnSimWideDeletes;
295 public event SendPostcard OnSendPostcard;
296 public event MuteListEntryUpdate OnUpdateMuteListEntry;
297 public event MuteListEntryRemove OnRemoveMuteListEntry;
298 public event GodlikeMessage onGodlikeMessage;
299 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
300
301#pragma warning restore 67
302
303 private UUID myID = UUID.Random();
304
305 public MyNpcCharacter(Scene scene)
306 {
307
308 // startPos = new Vector3(128, (float)(Util.RandomClass.NextDouble()*100), 2);
309 m_scene = scene;
310 m_scene.EventManager.OnFrame += Update;
311 }
312
313 private Vector3 startPos = new Vector3(128, 128, 30);
314
315 public virtual Vector3 StartPos
316 {
317 get { return startPos; }
318 set { }
319 }
320
321 public virtual UUID AgentId
322 {
323 get { return myID; }
324 }
325
326 public UUID SessionId
327 {
328 get { return UUID.Zero; }
329 }
330
331 public UUID SecureSessionId
332 {
333 get { return UUID.Zero; }
334 }
335
336 public virtual string FirstName
337 {
338 get { return "Only"; }
339 }
340
341 private string lastName = "Today" + Util.RandomClass.Next(1, 1000);
342
343 public virtual string LastName
344 {
345 get { return lastName; }
346 }
347
348 public virtual String Name
349 {
350 get { return FirstName + LastName; }
351 }
352
353 public bool IsActive
354 {
355 get { return true; }
356 set { }
357 }
358 public bool IsLoggingOut
359 {
360 get { return false; }
361 set { }
362 }
363 public UUID ActiveGroupId
364 {
365 get { return UUID.Zero; }
366 }
367
368 public string ActiveGroupName
369 {
370 get { return String.Empty; }
371 }
372
373 public ulong ActiveGroupPowers
374 {
375 get { return 0; }
376 }
377
378 public bool IsGroupMember(UUID groupID)
379 {
380 return false;
381 }
382
383 public ulong GetGroupPowers(UUID groupID)
384 {
385 return 0;
386 }
387
388 public virtual int NextAnimationSequenceNumber
389 {
390 get { return 1; }
391 }
392
393 public IScene Scene
394 {
395 get { return m_scene; }
396 }
397
398 public bool SendLogoutPacketWhenClosing
399 {
400 set { }
401 }
402
403 public virtual void ActivateGesture(UUID assetId, UUID gestureId)
404 {
405 }
406
407 public virtual void SendWearables(AvatarWearable[] wearables, int serial)
408 {
409 }
410
411 public virtual void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
412 {
413 }
414
415 public virtual void Kick(string message)
416 {
417 }
418
419 public virtual void SendStartPingCheck(byte seq)
420 {
421 }
422
423 public virtual void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
424 {
425 }
426
427 public virtual void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
428 {
429
430 }
431
432 public virtual void SendKillObject(ulong regionHandle, uint localID)
433 {
434 }
435
436 public virtual void SetChildAgentThrottle(byte[] throttle)
437 {
438 }
439 public byte[] GetThrottlesPacked(float multiplier)
440 {
441 return new byte[0];
442 }
443
444
445 public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
446 {
447 }
448
449 public virtual void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName,
450 UUID fromAgentID, byte source, byte audible)
451 {
452 }
453
454 public virtual void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName,
455 UUID fromAgentID, byte source, byte audible)
456 {
457 }
458
459 public void SendInstantMessage(GridInstantMessage im)
460 {
461
462 }
463
464 public void SendGenericMessage(string method, List<string> message)
465 {
466 }
467
468 public void SendGenericMessage(string method, List<byte[]> message)
469 {
470
471 }
472
473 public virtual void SendLayerData(float[] map)
474 {
475 }
476
477 public virtual void SendLayerData(int px, int py, float[] map)
478 {
479 }
480 public virtual void SendLayerData(int px, int py, float[] map, bool track)
481 {
482 }
483
484 public virtual void SendWindData(Vector2[] windSpeeds) { }
485
486 public virtual void SendCloudData(float[] cloudCover) { }
487
488 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
489 {
490 }
491
492 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
493 {
494 }
495
496 public virtual AgentCircuitData RequestClientInfo()
497 {
498 return new AgentCircuitData();
499 }
500
501 public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,
502 IPEndPoint newRegionExternalEndPoint, string capsURL)
503 {
504 }
505
506 public virtual void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
507 {
508 }
509
510 public virtual void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
511 {
512 }
513
514 public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
515 uint locationID, uint flags, string capsURL)
516 {
517 }
518
519 public virtual void SendTeleportFailed(string reason)
520 {
521 }
522
523 public virtual void SendTeleportStart(uint flags)
524 {
525 }
526
527 public virtual void SendTeleportProgress(uint flags, string message)
528 {
529 }
530
531 public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
532 {
533 }
534
535 public virtual void SendPayPrice(UUID objectID, int[] payPrice)
536 {
537 }
538
539 public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
540 {
541 }
542
543 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
544 {
545 }
546
547 public void SendAvatarDataImmediate(ISceneEntity avatar)
548 {
549 }
550
551 public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
552 {
553 }
554
555 public void ReprioritizeUpdates()
556 {
557 }
558
559 public void FlushPrimUpdates()
560 {
561 }
562
563 public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
564 List<InventoryItemBase> items,
565 List<InventoryFolderBase> folders,
566 int version,
567 bool fetchFolders,
568 bool fetchItems)
569 {
570 }
571
572 public virtual void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
573 {
574 }
575
576 public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackID)
577 {
578 }
579
580 public virtual void SendRemoveInventoryItem(UUID itemID)
581 {
582 }
583
584 public virtual void SendBulkUpdateInventory(InventoryNodeBase node)
585 {
586 }
587
588 public UUID GetDefaultAnimation(string name)
589 {
590 return UUID.Zero;
591 }
592
593 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
594 {
595 }
596
597 public virtual void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
598 {
599 }
600
601 public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data)
602 {
603 }
604
605 public virtual void SendAbortXferPacket(ulong xferID)
606 {
607
608 }
609
610
611 public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
612 int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
613 int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
614 int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
615 {
616
617 }
618 public virtual void SendNameReply(UUID profileId, string firstname, string lastname)
619 {
620 }
621
622 public virtual void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
623 {
624 }
625
626 public virtual void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain,
627 byte flags)
628 {
629 }
630
631 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
632 {
633 }
634
635 public void SendAttachedSoundGainChange(UUID objectID, float gain)
636 {
637
638 }
639
640 public void SendAlertMessage(string message)
641 {
642 }
643
644 public void SendAgentAlertMessage(string message, bool modal)
645 {
646 }
647
648 public void SendSystemAlertMessage(string message)
649 {
650 }
651
652 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message,
653 string url)
654 {
655 }
656
657 public virtual void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
658 {
659 if (OnRegionHandShakeReply != null)
660 {
661 OnRegionHandShakeReply(this);
662 }
663
664 if (OnCompleteMovementToRegion != null)
665 {
666 OnCompleteMovementToRegion(this, true);
667 }
668 }
669 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
670 {
671 }
672
673 public void SendConfirmXfer(ulong xferID, uint PacketID)
674 {
675 }
676
677 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
678 {
679 }
680
681 public void SendInitiateDownload(string simFileName, string clientFileName)
682 {
683 }
684
685 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
686 {
687 }
688
689 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
690 {
691 }
692
693 public void SendImageNotFound(UUID imageid)
694 {
695 }
696
697 public void SendShutdownConnectionNotice()
698 {
699 }
700
701 public void SendSimStats(SimStats stats)
702 {
703 }
704
705 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags)
706 {
707
708 }
709
710 public void SendObjectPropertiesReply(ISceneEntity entity)
711 {
712 }
713
714 public void SendAgentOffline(UUID[] agentIDs)
715 {
716
717 }
718
719 public void SendAgentOnline(UUID[] agentIDs)
720 {
721
722 }
723
724 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
725 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
726 {
727 }
728
729 public void SendAdminResponse(UUID Token, uint AdminLevel)
730 {
731
732 }
733
734 public void SendGroupMembership(GroupMembershipData[] GroupMembership)
735 {
736
737 }
738
739 private void Update()
740 {
741 frame++;
742 if (frame > 20)
743 {
744 frame = 0;
745 if (OnAgentUpdate != null)
746 {
747 AgentUpdateArgs pack = new AgentUpdateArgs();
748 pack.ControlFlags = movementFlag;
749 pack.BodyRotation = bodyDirection;
750
751 OnAgentUpdate(this, pack);
752 }
753 if (flyState == 0)
754 {
755 movementFlag = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY |
756 (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG;
757 flyState = 1;
758 }
759 else if (flyState == 1)
760 {
761 movementFlag = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY |
762 (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS;
763 flyState = 2;
764 }
765 else
766 {
767 movementFlag = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
768 flyState = 0;
769 }
770
771 if (count >= 10)
772 {
773 if (OnChatFromClient != null)
774 {
775 OSChatMessage args = new OSChatMessage();
776 args.Message = "Hey You! Get out of my Home. This is my Region";
777 args.Channel = 0;
778 args.From = FirstName + " " + LastName;
779 args.Scene = m_scene;
780 args.Position = new Vector3(128, 128, 26);
781 args.Sender = this;
782 args.Type = ChatTypeEnum.Shout;
783
784 OnChatFromClient(this, args);
785 }
786 count = -1;
787 }
788
789 count++;
790 }
791 }
792
793 public bool AddMoney(int debit)
794 {
795 return false;
796 }
797
798 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
799 {
800 }
801
802 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
803 {
804 }
805
806 public void SendViewerTime(int phase)
807 {
808 }
809
810 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
811 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
812 UUID partnerID)
813 {
814 }
815
816 public void SetDebugPacketLevel(int newDebug)
817 {
818 }
819
820 public void InPacket(object NewPack)
821 {
822 }
823
824 public void ProcessInPacket(Packet NewPack)
825 {
826 }
827
828 public void Close()
829 {
830 }
831
832 public void Start()
833 {
834 }
835
836 public void Stop()
837 {
838 }
839
840 private uint m_circuitCode;
841
842 public uint CircuitCode
843 {
844 get { return m_circuitCode; }
845 set { m_circuitCode = value; }
846 }
847
848 public IPEndPoint RemoteEndPoint
849 {
850 get { return new IPEndPoint(IPAddress.Loopback, (ushort)m_circuitCode); }
851 }
852
853 public void SendBlueBoxMessage(UUID FromAvatarID, String FromAvatarName, String Message)
854 {
855
856 }
857 public void SendLogoutPacket()
858 {
859 }
860
861 public void Terminate()
862 {
863 }
864
865 public EndPoint GetClientEP()
866 {
867 return null;
868 }
869
870 public ClientInfo GetClientInfo()
871 {
872 return null;
873 }
874
875 public void SetClientInfo(ClientInfo info)
876 {
877 }
878
879 public void SendScriptQuestion(UUID objectID, string taskName, string ownerName, UUID itemID, int question)
880 {
881 }
882 public void SendHealth(float health)
883 {
884 }
885
886 public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID)
887 {
888 }
889
890 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
891 {
892 }
893
894 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
895 {
896 }
897
898 public void SendEstateCovenantInformation(UUID covenant)
899 {
900 }
901
902 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner)
903 {
904 }
905
906 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
907 {
908 }
909
910 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
911 {
912 }
913
914 public void SendForceClientSelectObjects(List<uint> objectIDs)
915 {
916 }
917
918 public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount)
919 {
920 }
921
922 public void SendCameraConstraint(Vector4 ConstraintPlane)
923 {
924
925 }
926
927 public void SendLandParcelOverlay(byte[] data, int sequence_id)
928 {
929 }
930
931 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
932 {
933 }
934
935 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType,
936 string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
937 {
938 }
939
940 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
941 {
942 }
943
944 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
945 {
946 }
947
948 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
949 {
950 }
951
952 public void SendAsset(AssetRequestToClient req)
953 {
954 }
955
956 public void SendTexture(AssetBase TextureAsset)
957 {
958
959 }
960
961 public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
962 {
963 }
964
965 public void SendClearFollowCamProperties (UUID objectID)
966 {
967 }
968
969 public void SendRegionHandle (UUID regoinID, ulong handle)
970 {
971 }
972
973 public void SendParcelInfo (RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
974 {
975 }
976
977 public void SetClientOption(string option, string value)
978 {
979 }
980
981 public string GetClientOption(string option)
982 {
983 return string.Empty;
984 }
985
986 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
987 {
988 }
989
990 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
991 {
992 }
993
994 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
995 {
996 }
997
998 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
999 {
1000 }
1001
1002 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
1003 {
1004 }
1005
1006 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
1007 {
1008 }
1009
1010 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
1011 {
1012 }
1013
1014 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
1015 {
1016 }
1017
1018 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
1019 {
1020 }
1021
1022 public void KillEndDone()
1023 {
1024 }
1025
1026 public void SendEventInfoReply (EventData info)
1027 {
1028 }
1029
1030 public void SendOfferCallingCard (UUID destID, UUID transactionID)
1031 {
1032 }
1033
1034 public void SendAcceptCallingCard (UUID transactionID)
1035 {
1036 }
1037
1038 public void SendDeclineCallingCard (UUID transactionID)
1039 {
1040 }
1041
1042 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
1043 {
1044 }
1045
1046 public void SendJoinGroupReply(UUID groupID, bool success)
1047 {
1048 }
1049
1050 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool succss)
1051 {
1052 }
1053
1054 public void SendLeaveGroupReply(UUID groupID, bool success)
1055 {
1056 }
1057
1058 public void SendTerminateFriend(UUID exFriendID)
1059 {
1060 }
1061
1062 #region IClientAPI Members
1063
1064
1065 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
1066 {
1067 return true;
1068 }
1069
1070 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
1071 {
1072 }
1073
1074 public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price)
1075 {
1076 }
1077
1078 public void SendAgentDropGroup(UUID groupID)
1079 {
1080 }
1081
1082 public void SendAvatarNotesReply(UUID targetID, string text)
1083 {
1084 }
1085
1086 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks)
1087 {
1088 }
1089
1090 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds)
1091 {
1092 }
1093
1094 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell)
1095 {
1096 }
1097
1098 public void SendUserInfoReply(bool imViaEmail, bool visible, string email)
1099 {
1100 }
1101
1102 public void SendCreateGroupReply(UUID groupID, bool success, string message)
1103 {
1104 }
1105
1106 public void RefreshGroupMembership()
1107 {
1108 }
1109
1110 public void SendUseCachedMuteList()
1111 {
1112 }
1113
1114 public void SendMuteListUpdate(string filename)
1115 {
1116 }
1117
1118 public void SendPickInfoReply(UUID pickID,UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled)
1119 {
1120 }
1121 #endregion
1122
1123 public void SendRebakeAvatarTextures(UUID textureID)
1124 {
1125 }
1126
1127 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1128 {
1129 }
1130
1131 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
1132 {
1133 }
1134
1135 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
1136 {
1137 }
1138
1139 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
1140 {
1141 }
1142
1143 public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes)
1144 {
1145 }
1146
1147 public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
1148 {
1149 }
1150
1151 public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
1152 {
1153 }
1154
1155 public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId)
1156 {
1157 }
1158
1159 public void StopFlying(ISceneEntity presence)
1160 {
1161 }
1162
1163 public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
1164 {
1165 }
1166 }
1167}
diff --git a/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs b/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs
deleted file mode 100644
index 5e09adb..0000000
--- a/OpenSim/Region/Examples/SimpleModule/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Reflection;
29using System.Runtime.InteropServices;
30
31// General information about an assembly is controlled through the following
32// set of attributes. Change these attribute values to modify the information
33// associated with an assembly.
34[assembly: AssemblyTitle("OpenSim.Region.Examples.SimpleModule")]
35[assembly: AssemblyDescription("")]
36[assembly: AssemblyConfiguration("")]
37[assembly: AssemblyCompany("http://opensimulator.org")]
38[assembly: AssemblyProduct("OpenSim.Region.Examples.SimpleModule")]
39[assembly: AssemblyCopyright("Copyright (c) 2008")]
40[assembly: AssemblyTrademark("")]
41[assembly: AssemblyCulture("")]
42
43// Setting ComVisible to false makes the types in this assembly not visible
44// to COM components. If you need to access a type in this assembly from
45// COM, set the ComVisible attribute to true on that type.
46[assembly: ComVisible(false)]
47
48// The following GUID is for the ID of the typelib if this project is exposed to COM
49[assembly: Guid("f0caca77-7818-4a43-9200-0a8548009a05")]
50
51// Version information for an assembly consists of the following four values:
52//
53// Major Version
54// Minor Version
55// Build Number
56// Revision
57//
58// You can specify all the values or you can default the Build and Revision Numbers
59// by using the '*' as shown below:
60// [assembly: AssemblyVersion("0.6.5.*")]
61[assembly: AssemblyVersion("0.6.5.*")]
62[assembly: AssemblyFileVersion("0.6.5.0")]
diff --git a/OpenSim/Region/Examples/SimpleModule/README.txt b/OpenSim/Region/Examples/SimpleModule/README.txt
deleted file mode 100644
index 025e33d..0000000
--- a/OpenSim/Region/Examples/SimpleModule/README.txt
+++ /dev/null
@@ -1,9 +0,0 @@
1!!!IMPORTANT NOTE!!!
2
3This code snippet provided as an example of coding functional content with region modules.
4
5As of 13/3 2008 this module actually renders all regions within the instance unusable if enabled by dragging the dll from ./bin to global /bin.
6
7So, use at own peril and in dedicated instance.
8
9Peace.
diff --git a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
deleted file mode 100644
index 3b8ce37..0000000
--- a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs
+++ /dev/null
@@ -1,147 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections.Generic;
29using Nini.Config;
30using OpenMetaverse;
31using OpenSim.Framework;
32using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes;
34
35namespace OpenSim.Region.Examples.SimpleModule
36{
37 /// <summary>
38 /// Example region module.
39 /// </summary>
40 /// <remarks>
41 /// This is an old and unmaintained region module which uses the old style module interface. It is not loaded into
42 /// OpenSim by default. If you want to try enabling it, look in the bin folder of this project.
43 /// Please see the README.txt in this project on the filesystem for some more information.
44 /// Nonetheless, it may contain some useful example code so has been left here for now.
45 ///
46 /// You can see bare bones examples of the more modern region module system in OpenSim/Region/OptionalModules/Example
47 /// </remarks>
48 public class RegionModule : IRegionModule
49 {
50 #region IRegionModule Members
51
52 private Scene m_scene;
53
54 public void Initialise(Scene scene, IConfigSource source)
55 {
56 m_scene = scene;
57 }
58
59 public void PostInitialise()
60 {
61 // RegionInfo regionInfo = m_scene.RegionInfo;
62
63 // Vector3 pos = new Vector3(110, 129, 27);
64
65 //AddCpuCounter(regionInfo, pos);
66 // AddComplexObjects(regionInfo, pos);
67 AddAvatars();
68 // AddFileSystemObjects();
69 }
70
71 // private void AddFileSystemObjects()
72 // {
73 // DirectoryInfo dirInfo = new DirectoryInfo(".");
74
75 // float x = 0;
76 // float z = 0;
77
78 // foreach (FileInfo fileInfo in dirInfo.GetFiles())
79 // {
80 // Vector3 filePos = new Vector3(100 + x, 129, 27 + z);
81 // x = x + 2;
82 // if (x > 50)
83 // {
84 // x = 0;
85 // z = z + 2;
86 // }
87
88 // FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos);
89 // m_scene.AddNewSceneObject(fileObject, true);
90 // }
91 // }
92
93 private void AddAvatars()
94 {
95 for (int i = 0; i < 1; i++)
96 {
97 MyNpcCharacter m_character = new MyNpcCharacter(m_scene);
98 m_scene.AddNewClient(m_character, PresenceType.Npc);
99 m_scene.AgentCrossing(m_character.AgentId, Vector3.Zero, false);
100 }
101
102 m_scene.ForEachScenePresence(delegate(ScenePresence sp)
103 {
104 if (!sp.IsChildAgent)
105 sp.AbsolutePosition =
106 new Vector3((float)Util.RandomClass.Next(100, 200), (float)Util.RandomClass.Next(30, 200), 2);
107 });
108 }
109
110 // private void AddComplexObjects(RegionInfo regionInfo, Vector3 pos)
111 // {
112 // int objs = 3;
113
114 // for (int i = 0; i < (objs*objs*objs); i++)
115 // {
116 // Vector3 posOffset = new Vector3((i % objs) * 4, ((i % (objs*objs)) / (objs)) * 4, (i / (objs*objs)) * 4);
117 // ComplexObject complexObject =
118 // new ComplexObject(m_scene, regionInfo.RegionHandle, UUID.Zero, pos + posOffset);
119 // m_scene.AddNewSceneObject(complexObject, true);
120 // }
121 // }
122
123 // private void AddCpuCounter(RegionInfo regionInfo, Vector3 pos)
124 // {
125 // SceneObjectGroup sceneObject =
126 // new CpuCounterObject(m_scene, regionInfo.RegionHandle, UUID.Zero, pos + new Vector3(1f, 1f, 1f));
127 // m_scene.AddNewSceneObject(sceneObject, true);
128 // }
129
130 public void Close()
131 {
132 m_scene = null;
133 }
134
135 public string Name
136 {
137 get { return GetType().AssemblyQualifiedName; }
138 }
139
140 public bool IsSharedModule
141 {
142 get { return false; }
143 }
144
145 #endregion
146 }
147}