ParcelData.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /*
  2. * Copyright (c) Contributors, http://www.openmetaverse.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. */
  28. using libsecondlife;
  29. namespace OpenSim.Framework.Types
  30. {
  31. public class ParcelData
  32. {
  33. public byte[] parcelBitmapByteArray = new byte[512];
  34. public string parcelName = "Your Parcel";
  35. public string parcelDesc = "";
  36. public LLUUID ownerID = new LLUUID();
  37. public bool isGroupOwned = false;
  38. public LLVector3 AABBMin = new LLVector3();
  39. public LLVector3 AABBMax = new LLVector3();
  40. public int area = 0;
  41. public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
  42. public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID
  43. public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
  44. public int claimDate = 0; //Unemplemented
  45. public int claimPrice = 0; //Unemplemented
  46. public LLUUID groupID = new LLUUID(); //Unemplemented
  47. public int groupPrims = 0;
  48. public int otherPrims = 0;
  49. public int ownerPrims = 0;
  50. public int selectedPrims = 0;
  51. public int simwidePrims = 0;
  52. public int simwideArea = 0;
  53. public int salePrice = 0; //Unemeplemented. Parcels price.
  54. public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.Leased;
  55. public uint parcelFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts;
  56. public byte landingType = 0;
  57. public byte mediaAutoScale = 0;
  58. public LLUUID mediaID = LLUUID.Zero;
  59. public int localID = 0;
  60. public LLUUID globalID = new LLUUID();
  61. public string mediaURL = "";
  62. public string musicURL = "";
  63. public float passHours = 0;
  64. public int passPrice = 0;
  65. public LLUUID snapshotID = LLUUID.Zero;
  66. public LLVector3 userLocation = new LLVector3();
  67. public LLVector3 userLookAt = new LLVector3();
  68. public ParcelData()
  69. {
  70. globalID = LLUUID.Random();
  71. }
  72. public ParcelData Copy()
  73. {
  74. ParcelData parcelData = new ParcelData();
  75. parcelData.AABBMax = this.AABBMax;
  76. parcelData.AABBMin = this.AABBMin;
  77. parcelData.area = this.area;
  78. parcelData.auctionID = this.auctionID;
  79. parcelData.authBuyerID = this.authBuyerID;
  80. parcelData.category = this.category;
  81. parcelData.claimDate = this.claimDate;
  82. parcelData.claimPrice = this.claimPrice;
  83. parcelData.globalID = this.globalID;
  84. parcelData.groupID = this.groupID;
  85. parcelData.groupPrims = this.groupPrims;
  86. parcelData.otherPrims = this.otherPrims;
  87. parcelData.ownerPrims = this.ownerPrims;
  88. parcelData.selectedPrims = this.selectedPrims;
  89. parcelData.isGroupOwned = this.isGroupOwned;
  90. parcelData.localID = this.localID;
  91. parcelData.landingType = this.landingType;
  92. parcelData.mediaAutoScale = this.mediaAutoScale;
  93. parcelData.mediaID = this.mediaID;
  94. parcelData.mediaURL = this.mediaURL;
  95. parcelData.musicURL = this.musicURL;
  96. parcelData.ownerID = this.ownerID;
  97. parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone();
  98. parcelData.parcelDesc = this.parcelDesc;
  99. parcelData.parcelFlags = this.parcelFlags;
  100. parcelData.parcelName = this.parcelName;
  101. parcelData.parcelStatus = this.parcelStatus;
  102. parcelData.passHours = this.passHours;
  103. parcelData.passPrice = this.passPrice;
  104. parcelData.salePrice = this.salePrice;
  105. parcelData.snapshotID = this.snapshotID;
  106. parcelData.userLocation = this.userLocation;
  107. parcelData.userLookAt = this.userLookAt;
  108. return parcelData;
  109. }
  110. }
  111. }