MyNpcCharacter.cs 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  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 OpenSim 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. using System;
  28. using System.Collections.Generic;
  29. using System.Net;
  30. using libsecondlife;
  31. using libsecondlife.Packets;
  32. using OpenSim.Framework;
  33. using OpenSim.Region.Environment.Scenes;
  34. namespace OpenSim.Region.Examples.SimpleModule
  35. {
  36. public class MyNpcCharacter : IClientAPI
  37. {
  38. private uint movementFlag = 0;
  39. private short flyState = 0;
  40. private LLQuaternion bodyDirection = LLQuaternion.Identity;
  41. private short count = 0;
  42. private short frame = 0;
  43. #pragma warning disable 67
  44. public event Action<IClientAPI> OnLogout;
  45. public event ObjectPermissions OnObjectPermissions;
  46. public event MoneyTransferRequest OnMoneyTransferRequest;
  47. public event ParcelBuy OnParcelBuy;
  48. public event Action<IClientAPI> OnConnectionClosed;
  49. public event ImprovedInstantMessage OnInstantMessage;
  50. public event ChatFromViewer OnChatFromViewer;
  51. public event TextureRequest OnRequestTexture;
  52. public event RezObject OnRezObject;
  53. public event ModifyTerrain OnModifyTerrain;
  54. public event SetAppearance OnSetAppearance;
  55. public event AvatarNowWearing OnAvatarNowWearing;
  56. public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  57. public event UUIDNameRequest OnDetachAttachmentIntoInv;
  58. public event ObjectAttach OnObjectAttach;
  59. public event ObjectDeselect OnObjectDetach;
  60. public event StartAnim OnStartAnim;
  61. public event StopAnim OnStopAnim;
  62. public event LinkObjects OnLinkObjects;
  63. public event DelinkObjects OnDelinkObjects;
  64. public event RequestMapBlocks OnRequestMapBlocks;
  65. public event RequestMapName OnMapNameRequest;
  66. public event TeleportLocationRequest OnTeleportLocationRequest;
  67. public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
  68. public event DisconnectUser OnDisconnectUser;
  69. public event RequestAvatarProperties OnRequestAvatarProperties;
  70. public event SetAlwaysRun OnSetAlwaysRun;
  71. public event GenericCall4 OnDeRezObject;
  72. public event Action<IClientAPI> OnRegionHandShakeReply;
  73. public event GenericCall2 OnRequestWearables;
  74. public event GenericCall2 OnCompleteMovementToRegion;
  75. public event UpdateAgent OnAgentUpdate;
  76. public event AgentRequestSit OnAgentRequestSit;
  77. public event AgentSit OnAgentSit;
  78. public event AvatarPickerRequest OnAvatarPickerRequest;
  79. public event Action<IClientAPI> OnRequestAvatarsData;
  80. public event AddNewPrim OnAddPrim;
  81. public event RequestGodlikePowers OnRequestGodlikePowers;
  82. public event GodKickUser OnGodKickUser;
  83. public event ObjectDuplicate OnObjectDuplicate;
  84. public event UpdateVector OnGrabObject;
  85. public event ObjectSelect OnDeGrabObject;
  86. public event MoveObject OnGrabUpdate;
  87. public event ViewerEffectEventHandler OnViewerEffect;
  88. public event FetchInventory OnAgentDataUpdateRequest;
  89. public event FetchInventory OnUserInfoRequest;
  90. public event TeleportLocationRequest OnSetStartLocationRequest;
  91. public event UpdateShape OnUpdatePrimShape;
  92. public event ObjectExtraParams OnUpdateExtraParams;
  93. public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
  94. public event ObjectSelect OnObjectSelect;
  95. public event GenericCall7 OnObjectDescription;
  96. public event GenericCall7 OnObjectName;
  97. public event UpdatePrimFlags OnUpdatePrimFlags;
  98. public event UpdatePrimTexture OnUpdatePrimTexture;
  99. public event UpdateVector OnUpdatePrimGroupPosition;
  100. public event UpdateVector OnUpdatePrimSinglePosition;
  101. public event UpdatePrimRotation OnUpdatePrimGroupRotation;
  102. public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
  103. public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
  104. public event UpdateVector OnUpdatePrimScale;
  105. public event UpdateVector OnUpdatePrimGroupScale;
  106. public event StatusChange OnChildAgentStatus;
  107. public event GenericCall2 OnStopMovement;
  108. public event Action<LLUUID> OnRemoveAvatar;
  109. public event CreateNewInventoryItem OnCreateNewInventoryItem;
  110. public event CreateInventoryFolder OnCreateNewInventoryFolder;
  111. public event UpdateInventoryFolder OnUpdateInventoryFolder;
  112. public event MoveInventoryFolder OnMoveInventoryFolder;
  113. public event RemoveInventoryFolder OnRemoveInventoryFolder;
  114. public event RemoveInventoryItem OnRemoveInventoryItem;
  115. public event FetchInventoryDescendents OnFetchInventoryDescendents;
  116. public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
  117. public event FetchInventory OnFetchInventory;
  118. public event RequestTaskInventory OnRequestTaskInventory;
  119. public event UpdateInventoryItem OnUpdateInventoryItem;
  120. public event CopyInventoryItem OnCopyInventoryItem;
  121. public event MoveInventoryItem OnMoveInventoryItem;
  122. public event UDPAssetUploadRequest OnAssetUploadRequest;
  123. public event XferReceive OnXferReceive;
  124. public event RequestXfer OnRequestXfer;
  125. public event ConfirmXfer OnConfirmXfer;
  126. public event RezScript OnRezScript;
  127. public event UpdateTaskInventory OnUpdateTaskInventory;
  128. public event MoveTaskInventory OnMoveTaskItem;
  129. public event RemoveTaskInventory OnRemoveTaskItem;
  130. public event RequestAsset OnRequestAsset;
  131. public event UUIDNameRequest OnNameFromUUIDRequest;
  132. public event UUIDNameRequest OnUUIDGroupNameRequest;
  133. public event ParcelPropertiesRequest OnParcelPropertiesRequest;
  134. public event ParcelDivideRequest OnParcelDivideRequest;
  135. public event ParcelJoinRequest OnParcelJoinRequest;
  136. public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
  137. public event ParcelAbandonRequest OnParcelAbandonRequest;
  138. public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
  139. public event ParcelAccessListRequest OnParcelAccessListRequest;
  140. public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
  141. public event ParcelSelectObjects OnParcelSelectObjects;
  142. public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
  143. public event ObjectDeselect OnObjectDeselect;
  144. public event RegionInfoRequest OnRegionInfoRequest;
  145. public event EstateCovenantRequest OnEstateCovenantRequest;
  146. public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
  147. public event FriendActionDelegate OnApproveFriendRequest;
  148. public event FriendActionDelegate OnDenyFriendRequest;
  149. public event FriendshipTermination OnTerminateFriendship;
  150. public event PacketStats OnPacketStats;
  151. public event EconomyDataRequest OnEconomyDataRequest;
  152. public event MoneyBalanceRequest OnMoneyBalanceRequest;
  153. public event UpdateAvatarProperties OnUpdateAvatarProperties;
  154. public event ObjectIncludeInSearch OnObjectIncludeInSearch;
  155. public event UUIDNameRequest OnTeleportHomeRequest;
  156. public event ScriptAnswer OnScriptAnswer;
  157. public event RequestPayPrice OnRequestPayPrice;
  158. public event AgentSit OnUndo;
  159. public event ForceReleaseControls OnForceReleaseControls;
  160. public event GodLandStatRequest OnLandStatRequest;
  161. public event RequestObjectPropertiesFamily OnObjectGroupRequest;
  162. public event DetailedEstateDataRequest OnDetailedEstateDataRequest;
  163. public event SetEstateFlagsRequest OnSetEstateFlagsRequest;
  164. public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
  165. public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
  166. public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
  167. public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
  168. public event SetRegionTerrainSettings OnSetRegionTerrainSettings;
  169. public event EstateRestartSimRequest OnEstateRestartSimRequest;
  170. public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
  171. public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
  172. public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
  173. public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
  174. public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
  175. public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
  176. public event ScriptReset OnScriptReset;
  177. #pragma warning restore 67
  178. private LLUUID myID = LLUUID.Random();
  179. public MyNpcCharacter(EventManager eventManager)
  180. {
  181. // startPos = new LLVector3(128, (float)(Util.RandomClass.NextDouble()*100), 2);
  182. eventManager.OnFrame += Update;
  183. }
  184. private LLVector3 startPos = new LLVector3(128, 128, 2);
  185. public virtual LLVector3 StartPos
  186. {
  187. get { return startPos; }
  188. set { }
  189. }
  190. public virtual LLUUID AgentId
  191. {
  192. get { return myID; }
  193. }
  194. public LLUUID SessionId
  195. {
  196. get { return LLUUID.Zero; }
  197. }
  198. public LLUUID SecureSessionId
  199. {
  200. get { return LLUUID.Zero; }
  201. }
  202. public virtual string FirstName
  203. {
  204. get { return "Only"; }
  205. }
  206. private string lastName = "Today" + Util.RandomClass.Next(1, 1000);
  207. public virtual string LastName
  208. {
  209. get { return lastName; }
  210. }
  211. public virtual String Name
  212. {
  213. get { return FirstName + LastName; }
  214. }
  215. public bool IsActive
  216. {
  217. get { return true; }
  218. set { }
  219. }
  220. public LLUUID ActiveGroupId
  221. {
  222. get { return LLUUID.Zero; }
  223. }
  224. public string ActiveGroupName
  225. {
  226. get { return String.Empty; }
  227. }
  228. public ulong ActiveGroupPowers
  229. {
  230. get { return 0; }
  231. }
  232. public virtual int NextAnimationSequenceNumber
  233. {
  234. get { return 1; }
  235. }
  236. public virtual void OutPacket(Packet newPack, ThrottleOutPacketType packType)
  237. {
  238. }
  239. public virtual void SendWearables(AvatarWearable[] wearables, int serial)
  240. {
  241. }
  242. public virtual void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry)
  243. {
  244. }
  245. public virtual void Kick(string message)
  246. {
  247. }
  248. public virtual void SendStartPingCheck(byte seq)
  249. {
  250. }
  251. public virtual void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
  252. {
  253. }
  254. public virtual void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
  255. {
  256. }
  257. public virtual void SendKillObject(ulong regionHandle, uint localID)
  258. {
  259. }
  260. public virtual void SetChildAgentThrottle(byte[] throttle)
  261. {
  262. }
  263. public byte[] GetThrottlesPacked(float multiplier)
  264. {
  265. return new byte[0];
  266. }
  267. public virtual void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId)
  268. {
  269. }
  270. public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName,
  271. LLUUID fromAgentID, byte source, byte audible)
  272. {
  273. }
  274. public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName,
  275. LLUUID fromAgentID, byte source, byte audible)
  276. {
  277. }
  278. public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
  279. LLUUID imSessionID, string fromName, byte dialog, uint timeStamp)
  280. {
  281. }
  282. public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
  283. LLUUID imSessionID, string fromName, byte dialog, uint timeStamp,
  284. byte[] binaryBucket)
  285. {
  286. }
  287. public virtual void SendLayerData(float[] map)
  288. {
  289. }
  290. public virtual void SendLayerData(int px, int py, float[] map)
  291. {
  292. }
  293. public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look)
  294. {
  295. }
  296. public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
  297. {
  298. }
  299. public virtual AgentCircuitData RequestClientInfo()
  300. {
  301. return new AgentCircuitData();
  302. }
  303. public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt,
  304. IPEndPoint newRegionExternalEndPoint, string capsURL)
  305. {
  306. }
  307. public virtual void SendMapBlock(List<MapBlockData> mapBlocks)
  308. {
  309. }
  310. public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags)
  311. {
  312. }
  313. public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
  314. uint locationID, uint flags, string capsURL)
  315. {
  316. }
  317. public virtual void SendTeleportFailed(string reason)
  318. {
  319. }
  320. public virtual void SendTeleportLocationStart()
  321. {
  322. }
  323. public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance)
  324. {
  325. }
  326. public virtual void SendPayPrice(LLUUID objectID, int[] payPrice)
  327. {
  328. }
  329. public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID,
  330. uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID)
  331. {
  332. }
  333. public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
  334. LLVector3 position, LLVector3 velocity, LLQuaternion rotation)
  335. {
  336. }
  337. public virtual void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations)
  338. {
  339. }
  340. public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint)
  341. {
  342. }
  343. public virtual void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels)
  344. {
  345. }
  346. public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
  347. PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel,
  348. LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags,
  349. LLUUID objectID, LLUUID ownerID, string text, byte[] color,
  350. uint parentID,
  351. byte[] particleSystem, byte clickAction)
  352. {
  353. }
  354. public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
  355. PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel,
  356. LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags,
  357. LLUUID objectID, LLUUID ownerID, string text, byte[] color,
  358. uint parentID,
  359. byte[] particleSystem, byte clickAction, byte[] textureanimation,
  360. bool attachment, uint AttachmentPoint, LLUUID AssetId, LLUUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
  361. {
  362. }
  363. public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
  364. LLVector3 position, LLQuaternion rotation, LLVector3 velocity,
  365. LLVector3 rotationalvelocity, byte state, LLUUID AssetId)
  366. {
  367. }
  368. public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
  369. LLVector3 position, LLQuaternion rotation, LLVector3 velocity,
  370. LLVector3 rotationalvelocity)
  371. {
  372. }
  373. public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID,
  374. List<InventoryItemBase> items,
  375. List<InventoryFolderBase> folders,
  376. bool fetchFolders,
  377. bool fetchItems)
  378. {
  379. }
  380. public virtual void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item)
  381. {
  382. }
  383. public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item)
  384. {
  385. }
  386. public virtual void SendRemoveInventoryItem(LLUUID itemID)
  387. {
  388. }
  389. /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see>
  390. public virtual void SendBulkUpdateInventory(InventoryItemBase item)
  391. {
  392. }
  393. public LLUUID GetDefaultAnimation(string name)
  394. {
  395. return LLUUID.Zero;
  396. }
  397. public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
  398. {
  399. }
  400. public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName)
  401. {
  402. }
  403. public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data)
  404. {
  405. }
  406. public virtual void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
  407. int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
  408. int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
  409. int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
  410. {
  411. }
  412. public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname)
  413. {
  414. }
  415. public virtual void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID)
  416. {
  417. }
  418. public virtual void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain,
  419. byte flags)
  420. {
  421. }
  422. public void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain)
  423. {
  424. }
  425. public void SendAttachedSoundGainChange(LLUUID objectID, float gain)
  426. {
  427. }
  428. public void SendAlertMessage(string message)
  429. {
  430. }
  431. public void SendAgentAlertMessage(string message, bool modal)
  432. {
  433. }
  434. public void SendSystemAlertMessage(string message)
  435. {
  436. }
  437. public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message,
  438. string url)
  439. {
  440. }
  441. public virtual void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
  442. {
  443. if (OnRegionHandShakeReply != null)
  444. {
  445. OnRegionHandShakeReply(this);
  446. }
  447. if (OnCompleteMovementToRegion != null)
  448. {
  449. OnCompleteMovementToRegion();
  450. }
  451. }
  452. public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID)
  453. {
  454. }
  455. public void SendConfirmXfer(ulong xferID, uint PacketID)
  456. {
  457. }
  458. public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName)
  459. {
  460. }
  461. public void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
  462. {
  463. }
  464. public void SendShutdownConnectionNotice()
  465. {
  466. }
  467. public void SendSimStats(Packet pack)
  468. {
  469. }
  470. public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID,
  471. uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
  472. uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category,
  473. LLUUID LastOwnerID, string ObjectName, string Description)
  474. {
  475. }
  476. public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID,
  477. LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID,
  478. LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
  479. string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
  480. uint BaseMask)
  481. {
  482. }
  483. public void SendAgentOffline(LLUUID[] agentIDs)
  484. {
  485. }
  486. public void SendAgentOnline(LLUUID[] agentIDs)
  487. {
  488. }
  489. public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot,
  490. LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook)
  491. {
  492. }
  493. public void SendAdminResponse(LLUUID Token, uint AdminLevel)
  494. {
  495. }
  496. public void SendGroupMembership(GroupData[] GroupMembership)
  497. {
  498. }
  499. private void Update()
  500. {
  501. frame++;
  502. if (frame > 20)
  503. {
  504. frame = 0;
  505. if (OnAgentUpdate != null)
  506. {
  507. AgentUpdateArgs pack = new AgentUpdateArgs();
  508. pack.ControlFlags = movementFlag;
  509. pack.BodyRotation = bodyDirection;
  510. OnAgentUpdate(this, pack);
  511. }
  512. if (flyState == 0)
  513. {
  514. movementFlag = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY |
  515. (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG;
  516. flyState = 1;
  517. }
  518. else if (flyState == 1)
  519. {
  520. movementFlag = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY |
  521. (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS;
  522. flyState = 2;
  523. }
  524. else
  525. {
  526. movementFlag = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
  527. flyState = 0;
  528. }
  529. if (count >= 10)
  530. {
  531. if (OnChatFromViewer != null)
  532. {
  533. ChatFromViewerArgs args = new ChatFromViewerArgs();
  534. args.Message = "Hey You! Get out of my Home. This is my Region";
  535. args.Channel = 0;
  536. args.From = FirstName + " " + LastName;
  537. args.Position = new LLVector3(128, 128, 26);
  538. args.Sender = this;
  539. args.Type = ChatTypeEnum.Shout;
  540. OnChatFromViewer(this, args);
  541. }
  542. count = -1;
  543. }
  544. count++;
  545. }
  546. }
  547. public bool AddMoney(int debit)
  548. {
  549. return false;
  550. }
  551. public void SendSunPos(LLVector3 sunPos, LLVector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
  552. {
  553. }
  554. public void SendViewerTime(int phase)
  555. {
  556. }
  557. public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember,
  558. string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL,
  559. LLUUID partnerID)
  560. {
  561. }
  562. public void SetDebug(int newDebug)
  563. {
  564. }
  565. public void InPacket(Packet NewPack)
  566. {
  567. }
  568. public void Close(bool ShutdownCircuit)
  569. {
  570. }
  571. public void Stop()
  572. {
  573. }
  574. private uint m_circuitCode;
  575. public uint CircuitCode
  576. {
  577. get { return m_circuitCode; }
  578. set { m_circuitCode = value; }
  579. }
  580. public void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message)
  581. {
  582. }
  583. public void SendLogoutPacket()
  584. {
  585. }
  586. public void Terminate()
  587. {
  588. }
  589. public ClientInfo GetClientInfo()
  590. {
  591. return null;
  592. }
  593. public void SetClientInfo(ClientInfo info)
  594. {
  595. }
  596. public void SendScriptQuestion(LLUUID objectID, string taskName, string ownerName, LLUUID itemID, int question)
  597. {
  598. }
  599. public void SendHealth(float health)
  600. {
  601. }
  602. public void sendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID)
  603. {
  604. }
  605. public void sendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
  606. {
  607. }
  608. public void sendEstateCovenantInformation()
  609. {
  610. }
  611. public void sendDetailedEstateData(LLUUID invoice, string estateName, uint estateID)
  612. {
  613. }
  614. public void sendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int simObjectCapacity, uint regionFlags)
  615. {
  616. }
  617. public void sendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID)
  618. {
  619. }
  620. public void sendForceClientSelectObjects(List<uint> objectIDs)
  621. {
  622. }
  623. public void sendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount)
  624. {
  625. }
  626. public void sendLandParcelOverlay(byte[] data, int sequence_id)
  627. {
  628. }
  629. public void SendGroupNameReply(LLUUID groupLLUID, string GroupName)
  630. {
  631. }
  632. public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
  633. {
  634. }
  635. }
  636. }