diff options
author | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
commit | 7d89e122930be39e84a6d174548fa2d12ac0484a (patch) | |
tree | e5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/ClientStack | |
parent | * minor: speculatively try a change to bamboo.build to see if this generates ... (diff) | |
download | opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.zip opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2 opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz |
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle.
* This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big!
* Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Region/ClientStack')
8 files changed, 403 insertions, 407 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs index d7d9128..8197ec7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/KillPacket.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using libsecondlife.Packets; | 31 | using OpenMetaverse.Packets; |
32 | 32 | ||
33 | namespace OpenSim.Region.ClientStack.LindenUDP | 33 | namespace OpenSim.Region.ClientStack.LindenUDP |
34 | { | 34 | { |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 2a0190b..5e22e2d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -33,9 +33,8 @@ using System.Reflection; | |||
33 | using System.Text; | 33 | using System.Text; |
34 | using System.Threading; | 34 | using System.Threading; |
35 | using System.Timers; | 35 | using System.Timers; |
36 | using Axiom.Math; | 36 | using OpenMetaverse; |
37 | using libsecondlife; | 37 | using OpenMetaverse.Packets; |
38 | using libsecondlife.Packets; | ||
39 | using log4net; | 38 | using log4net; |
40 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
41 | using OpenSim.Framework.Communications.Cache; | 40 | using OpenSim.Framework.Communications.Cache; |
@@ -62,12 +61,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
62 | // } | 61 | // } |
63 | 62 | ||
64 | /* static variables */ | 63 | /* static variables */ |
65 | public static TerrainManager TerrainManager = new TerrainManager(new SecondLife()); | ||
66 | |||
67 | public static SynchronizeClientHandler SynchronizeClient = null; | 64 | public static SynchronizeClientHandler SynchronizeClient = null; |
68 | /* private variables */ | 65 | /* private variables */ |
69 | private readonly LLUUID m_sessionId; | 66 | private readonly UUID m_sessionId; |
70 | private LLUUID m_secureSessionId = LLUUID.Zero; | 67 | private UUID m_secureSessionId = UUID.Zero; |
71 | //private AgentAssetUpload UploadAssets; | 68 | //private AgentAssetUpload UploadAssets; |
72 | private int m_debug = 0; | 69 | private int m_debug = 0; |
73 | private readonly AssetCache m_assetCache; | 70 | private readonly AssetCache m_assetCache; |
@@ -81,16 +78,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
81 | //private int m_lastPacketsReceived = 0; | 78 | //private int m_lastPacketsReceived = 0; |
82 | //private byte[] ZeroOutBuffer = new byte[4096]; | 79 | //private byte[] ZeroOutBuffer = new byte[4096]; |
83 | 80 | ||
84 | private readonly LLUUID m_agentId; | 81 | private readonly UUID m_agentId; |
85 | private readonly uint m_circuitCode; | 82 | private readonly uint m_circuitCode; |
86 | private int m_moneyBalance; | 83 | private int m_moneyBalance; |
87 | private IPacketHandler m_PacketHandler; | 84 | private IPacketHandler m_PacketHandler; |
88 | 85 | ||
89 | private int m_animationSequenceNumber = 1; | 86 | private int m_animationSequenceNumber = 1; |
90 | 87 | ||
91 | private byte[] m_channelVersion = Helpers.StringToField("OpenSimulator 0.5"); // Dummy value needed by libSL | 88 | private byte[] m_channelVersion = Utils.StringToBytes("OpenSimulator 0.5"); // Dummy value needed by libSL |
92 | 89 | ||
93 | private Dictionary<string, LLUUID> m_defaultAnimations = new Dictionary<string, LLUUID>(); | 90 | private Dictionary<string, UUID> m_defaultAnimations = new Dictionary<string, UUID>(); |
94 | 91 | ||
95 | private bool m_SendLogoutPacketWhenClosing = true; | 92 | private bool m_SendLogoutPacketWhenClosing = true; |
96 | 93 | ||
@@ -112,13 +109,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
112 | protected string m_firstName; | 109 | protected string m_firstName; |
113 | protected string m_lastName; | 110 | protected string m_lastName; |
114 | protected Thread m_clientThread; | 111 | protected Thread m_clientThread; |
115 | protected LLVector3 m_startpos; | 112 | protected Vector3 m_startpos; |
116 | protected EndPoint m_userEndPoint; | 113 | protected EndPoint m_userEndPoint; |
117 | protected EndPoint m_proxyEndPoint; | 114 | protected EndPoint m_proxyEndPoint; |
118 | protected LLUUID m_activeGroupID = LLUUID.Zero; | 115 | protected UUID m_activeGroupID = UUID.Zero; |
119 | protected string m_activeGroupName = String.Empty; | 116 | protected string m_activeGroupName = String.Empty; |
120 | protected ulong m_activeGroupPowers = 0; | 117 | protected ulong m_activeGroupPowers = 0; |
121 | protected Dictionary<LLUUID,ulong> m_groupPowers = new Dictionary<LLUUID, ulong>(); | 118 | protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>(); |
122 | 119 | ||
123 | /* Instantiated Designated Event Delegates */ | 120 | /* Instantiated Designated Event Delegates */ |
124 | //- used so we don't create new objects for each incoming packet and then toss it out later */ | 121 | //- used so we don't create new objects for each incoming packet and then toss it out later */ |
@@ -264,7 +261,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
264 | 261 | ||
265 | /* Properties */ | 262 | /* Properties */ |
266 | 263 | ||
267 | public LLUUID SecureSessionId | 264 | public UUID SecureSessionId |
268 | { | 265 | { |
269 | get { return m_secureSessionId; } | 266 | get { return m_secureSessionId; } |
270 | } | 267 | } |
@@ -274,23 +271,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
274 | get { return m_scene; } | 271 | get { return m_scene; } |
275 | } | 272 | } |
276 | 273 | ||
277 | public LLUUID SessionId | 274 | public UUID SessionId |
278 | { | 275 | { |
279 | get { return m_sessionId; } | 276 | get { return m_sessionId; } |
280 | } | 277 | } |
281 | 278 | ||
282 | public LLVector3 StartPos | 279 | public Vector3 StartPos |
283 | { | 280 | { |
284 | get { return m_startpos; } | 281 | get { return m_startpos; } |
285 | set { m_startpos = value; } | 282 | set { m_startpos = value; } |
286 | } | 283 | } |
287 | 284 | ||
288 | public LLUUID AgentId | 285 | public UUID AgentId |
289 | { | 286 | { |
290 | get { return m_agentId; } | 287 | get { return m_agentId; } |
291 | } | 288 | } |
292 | 289 | ||
293 | public LLUUID ActiveGroupId | 290 | public UUID ActiveGroupId |
294 | { | 291 | { |
295 | get { return m_activeGroupID; } | 292 | get { return m_activeGroupID; } |
296 | } | 293 | } |
@@ -305,7 +302,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
305 | get { return m_activeGroupPowers; } | 302 | get { return m_activeGroupPowers; } |
306 | } | 303 | } |
307 | 304 | ||
308 | public ulong GetGroupPowers(LLUUID groupID) | 305 | public ulong GetGroupPowers(UUID groupID) |
309 | { | 306 | { |
310 | if (m_groupPowers.ContainsKey(groupID)) | 307 | if (m_groupPowers.ContainsKey(groupID)) |
311 | return m_groupPowers[groupID]; | 308 | return m_groupPowers[groupID]; |
@@ -380,11 +377,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
380 | /* METHODS */ | 377 | /* METHODS */ |
381 | 378 | ||
382 | public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, | 379 | public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, |
383 | AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) | 380 | AgentCircuitManager authenSessions, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP) |
384 | { | 381 | { |
385 | m_moneyBalance = 1000; | 382 | m_moneyBalance = 1000; |
386 | 383 | ||
387 | m_channelVersion = Helpers.StringToField(scene.GetSimulatorVersion()); | 384 | m_channelVersion = Utils.StringToBytes(scene.GetSimulatorVersion()); |
388 | 385 | ||
389 | InitDefaultAnimations(); | 386 | InitDefaultAnimations(); |
390 | 387 | ||
@@ -509,7 +506,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
509 | kupack.UserInfo.SessionID = SessionId; | 506 | kupack.UserInfo.SessionID = SessionId; |
510 | kupack.TargetBlock.TargetIP = (uint)0; | 507 | kupack.TargetBlock.TargetIP = (uint)0; |
511 | kupack.TargetBlock.TargetPort = (ushort)0; | 508 | kupack.TargetBlock.TargetPort = (ushort)0; |
512 | kupack.UserInfo.Reason = Helpers.StringToField(message); | 509 | kupack.UserInfo.Reason = Utils.StringToBytes(message); |
513 | OutPacket(kupack, ThrottleOutPacketType.Task); | 510 | OutPacket(kupack, ThrottleOutPacketType.Task); |
514 | // You must sleep here or users get no message! | 511 | // You must sleep here or users get no message! |
515 | Thread.Sleep(500); | 512 | Thread.Sleep(500); |
@@ -760,7 +757,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
760 | m_firstName = sessionInfo.LoginInfo.First; | 757 | m_firstName = sessionInfo.LoginInfo.First; |
761 | m_lastName = sessionInfo.LoginInfo.Last; | 758 | m_lastName = sessionInfo.LoginInfo.Last; |
762 | 759 | ||
763 | if (sessionInfo.LoginInfo.SecureSession != LLUUID.Zero) | 760 | if (sessionInfo.LoginInfo.SecureSession != UUID.Zero) |
764 | { | 761 | { |
765 | m_secureSessionId = sessionInfo.LoginInfo.SecureSession; | 762 | m_secureSessionId = sessionInfo.LoginInfo.SecureSession; |
766 | } | 763 | } |
@@ -868,7 +865,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
868 | public event UpdateVector OnUpdatePrimGroupScale; | 865 | public event UpdateVector OnUpdatePrimGroupScale; |
869 | public event StatusChange OnChildAgentStatus; | 866 | public event StatusChange OnChildAgentStatus; |
870 | public event GenericCall2 OnStopMovement; | 867 | public event GenericCall2 OnStopMovement; |
871 | public event Action<LLUUID> OnRemoveAvatar; | 868 | public event Action<UUID> OnRemoveAvatar; |
872 | public event RequestMapBlocks OnRequestMapBlocks; | 869 | public event RequestMapBlocks OnRequestMapBlocks; |
873 | public event RequestMapName OnMapNameRequest; | 870 | public event RequestMapName OnMapNameRequest; |
874 | public event TeleportLocationRequest OnTeleportLocationRequest; | 871 | public event TeleportLocationRequest OnTeleportLocationRequest; |
@@ -964,10 +961,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
964 | 961 | ||
965 | 962 | ||
966 | // voire si c'est necessaire | 963 | // voire si c'est necessaire |
967 | public void ActivateGesture(LLUUID assetId, LLUUID gestureId) | 964 | public void ActivateGesture(UUID assetId, UUID gestureId) |
968 | { | 965 | { |
969 | } | 966 | } |
970 | public void DeactivateGesture(LLUUID assetId, LLUUID gestureId) | 967 | public void DeactivateGesture(UUID assetId, UUID gestureId) |
971 | { | 968 | { |
972 | } | 969 | } |
973 | #region Scene/Avatar to Client | 970 | #region Scene/Avatar to Client |
@@ -994,7 +991,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
994 | handshake.RegionInfo.WaterHeight = args.waterHeight; | 991 | handshake.RegionInfo.WaterHeight = args.waterHeight; |
995 | 992 | ||
996 | handshake.RegionInfo.RegionFlags = args.regionFlags; | 993 | handshake.RegionInfo.RegionFlags = args.regionFlags; |
997 | handshake.RegionInfo.SimName = Helpers.StringToField(args.regionName); | 994 | handshake.RegionInfo.SimName = Utils.StringToBytes(args.regionName); |
998 | handshake.RegionInfo.SimOwner = args.SimOwner; | 995 | handshake.RegionInfo.SimOwner = args.SimOwner; |
999 | handshake.RegionInfo.TerrainBase0 = args.terrainBase0; | 996 | handshake.RegionInfo.TerrainBase0 = args.terrainBase0; |
1000 | handshake.RegionInfo.TerrainBase1 = args.terrainBase1; | 997 | handshake.RegionInfo.TerrainBase1 = args.terrainBase1; |
@@ -1004,7 +1001,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1004 | handshake.RegionInfo.TerrainDetail1 = args.terrainDetail1; | 1001 | handshake.RegionInfo.TerrainDetail1 = args.terrainDetail1; |
1005 | handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2; | 1002 | handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2; |
1006 | handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3; | 1003 | handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3; |
1007 | handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting? | 1004 | handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting? |
1008 | 1005 | ||
1009 | OutPacket(handshake, ThrottleOutPacketType.Task); | 1006 | OutPacket(handshake, ThrottleOutPacketType.Task); |
1010 | } | 1007 | } |
@@ -1013,7 +1010,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1013 | /// | 1010 | /// |
1014 | /// </summary> | 1011 | /// </summary> |
1015 | /// <param name="regInfo"></param> | 1012 | /// <param name="regInfo"></param> |
1016 | public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) | 1013 | public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) |
1017 | { | 1014 | { |
1018 | AgentMovementCompletePacket mov = (AgentMovementCompletePacket)PacketPool.Instance.GetPacket(PacketType.AgentMovementComplete); | 1015 | AgentMovementCompletePacket mov = (AgentMovementCompletePacket)PacketPool.Instance.GetPacket(PacketType.AgentMovementComplete); |
1019 | mov.SimData.ChannelVersion = m_channelVersion; | 1016 | mov.SimData.ChannelVersion = m_channelVersion; |
@@ -1044,14 +1041,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1044 | /// <param name="fromPos"></param> | 1041 | /// <param name="fromPos"></param> |
1045 | /// <param name="fromName"></param> | 1042 | /// <param name="fromName"></param> |
1046 | /// <param name="fromAgentID"></param> | 1043 | /// <param name="fromAgentID"></param> |
1047 | public void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, | 1044 | public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, |
1048 | LLUUID fromAgentID, byte source, byte audible) | 1045 | UUID fromAgentID, byte source, byte audible) |
1049 | { | 1046 | { |
1050 | SendChatMessage(Helpers.StringToField(message), type, fromPos, fromName, fromAgentID, source, audible); | 1047 | SendChatMessage(Utils.StringToBytes(message), type, fromPos, fromName, fromAgentID, source, audible); |
1051 | } | 1048 | } |
1052 | 1049 | ||
1053 | public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, | 1050 | public void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName, |
1054 | LLUUID fromAgentID, byte source, byte audible) | 1051 | UUID fromAgentID, byte source, byte audible) |
1055 | { | 1052 | { |
1056 | ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator); | 1053 | ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator); |
1057 | reply.ChatData.Audible = audible; | 1054 | reply.ChatData.Audible = audible; |
@@ -1059,7 +1056,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1059 | reply.ChatData.ChatType = type; | 1056 | reply.ChatData.ChatType = type; |
1060 | reply.ChatData.SourceType = source; | 1057 | reply.ChatData.SourceType = source; |
1061 | reply.ChatData.Position = fromPos; | 1058 | reply.ChatData.Position = fromPos; |
1062 | reply.ChatData.FromName = Helpers.StringToField(fromName); | 1059 | reply.ChatData.FromName = Utils.StringToBytes(fromName); |
1063 | reply.ChatData.OwnerID = fromAgentID; | 1060 | reply.ChatData.OwnerID = fromAgentID; |
1064 | reply.ChatData.SourceID = fromAgentID; | 1061 | reply.ChatData.SourceID = fromAgentID; |
1065 | 1062 | ||
@@ -1071,8 +1068,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1071 | /// </summary> | 1068 | /// </summary> |
1072 | /// <param name="message"></param> | 1069 | /// <param name="message"></param> |
1073 | /// <param name="target"></param> | 1070 | /// <param name="target"></param> |
1074 | public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, | 1071 | public void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, |
1075 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) | 1072 | UUID imSessionID, string fromName, byte dialog, uint timeStamp) |
1076 | { | 1073 | { |
1077 | SendInstantMessage( | 1074 | SendInstantMessage( |
1078 | fromAgent, fromAgentSession, message, toAgent, | 1075 | fromAgent, fromAgentSession, message, toAgent, |
@@ -1084,8 +1081,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1084 | /// </summary> | 1081 | /// </summary> |
1085 | /// <param name="message"></param> | 1082 | /// <param name="message"></param> |
1086 | /// <param name="target"></param> | 1083 | /// <param name="target"></param> |
1087 | public void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, | 1084 | public void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent, |
1088 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, | 1085 | UUID imSessionID, string fromName, byte dialog, uint timeStamp, |
1089 | byte[] binaryBucket) | 1086 | byte[] binaryBucket) |
1090 | { | 1087 | { |
1091 | if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) | 1088 | if (((Scene)(this.m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) |
@@ -1095,17 +1092,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1095 | 1092 | ||
1096 | msg.AgentData.AgentID = fromAgent; | 1093 | msg.AgentData.AgentID = fromAgent; |
1097 | msg.AgentData.SessionID = fromAgentSession; | 1094 | msg.AgentData.SessionID = fromAgentSession; |
1098 | msg.MessageBlock.FromAgentName = Helpers.StringToField(fromName); | 1095 | msg.MessageBlock.FromAgentName = Utils.StringToBytes(fromName); |
1099 | msg.MessageBlock.Dialog = dialog; | 1096 | msg.MessageBlock.Dialog = dialog; |
1100 | msg.MessageBlock.FromGroup = false; | 1097 | msg.MessageBlock.FromGroup = false; |
1101 | msg.MessageBlock.ID = imSessionID; | 1098 | msg.MessageBlock.ID = imSessionID; |
1102 | msg.MessageBlock.Offline = 0; | 1099 | msg.MessageBlock.Offline = 0; |
1103 | msg.MessageBlock.ParentEstateID = 0; | 1100 | msg.MessageBlock.ParentEstateID = 0; |
1104 | msg.MessageBlock.Position = new LLVector3(); | 1101 | msg.MessageBlock.Position = new Vector3(); |
1105 | msg.MessageBlock.RegionID = LLUUID.Random(); | 1102 | msg.MessageBlock.RegionID = UUID.Random(); |
1106 | msg.MessageBlock.Timestamp = timeStamp; | 1103 | msg.MessageBlock.Timestamp = timeStamp; |
1107 | msg.MessageBlock.ToAgentID = toAgent; | 1104 | msg.MessageBlock.ToAgentID = toAgent; |
1108 | msg.MessageBlock.Message = Helpers.StringToField(message); | 1105 | msg.MessageBlock.Message = Utils.StringToBytes(message); |
1109 | msg.MessageBlock.BinaryBucket = binaryBucket; | 1106 | msg.MessageBlock.BinaryBucket = binaryBucket; |
1110 | 1107 | ||
1111 | OutPacket(msg, ThrottleOutPacketType.Task); | 1108 | OutPacket(msg, ThrottleOutPacketType.Task); |
@@ -1188,7 +1185,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1188 | 1185 | ||
1189 | patches[0] = patchx + 0 + patchy * 16; | 1186 | patches[0] = patchx + 0 + patchy * 16; |
1190 | 1187 | ||
1191 | LayerDataPacket layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches); | 1188 | LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(map, patches); |
1192 | layerpack.Header.Zerocoded = true; | 1189 | layerpack.Header.Zerocoded = true; |
1193 | 1190 | ||
1194 | OutPacket(layerpack, ThrottleOutPacketType.Land); | 1191 | OutPacket(layerpack, ThrottleOutPacketType.Land); |
@@ -1242,10 +1239,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1242 | return agentData; | 1239 | return agentData; |
1243 | } | 1240 | } |
1244 | 1241 | ||
1245 | public void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint externalIPEndPoint, | 1242 | public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint externalIPEndPoint, |
1246 | string capsURL) | 1243 | string capsURL) |
1247 | { | 1244 | { |
1248 | LLVector3 look = new LLVector3(lookAt.X * 10, lookAt.Y * 10, lookAt.Z * 10); | 1245 | Vector3 look = new Vector3(lookAt.X * 10, lookAt.Y * 10, lookAt.Z * 10); |
1249 | 1246 | ||
1250 | //CrossedRegionPacket newSimPack = (CrossedRegionPacket)PacketPool.Instance.GetPacket(PacketType.CrossedRegion); | 1247 | //CrossedRegionPacket newSimPack = (CrossedRegionPacket)PacketPool.Instance.GetPacket(PacketType.CrossedRegion); |
1251 | CrossedRegionPacket newSimPack = new CrossedRegionPacket(); | 1248 | CrossedRegionPacket newSimPack = new CrossedRegionPacket(); |
@@ -1264,7 +1261,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1264 | newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8; | 1261 | newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8; |
1265 | newSimPack.RegionData.SimIP += (uint)byteIP[0]; | 1262 | newSimPack.RegionData.SimIP += (uint)byteIP[0]; |
1266 | newSimPack.RegionData.SimPort = (ushort)externalIPEndPoint.Port; | 1263 | newSimPack.RegionData.SimPort = (ushort)externalIPEndPoint.Port; |
1267 | newSimPack.RegionData.SeedCapability = Helpers.StringToField(capsURL); | 1264 | newSimPack.RegionData.SeedCapability = Utils.StringToBytes(capsURL); |
1268 | 1265 | ||
1269 | // Hack to get this out immediately and skip throttles | 1266 | // Hack to get this out immediately and skip throttles |
1270 | OutPacket(newSimPack, ThrottleOutPacketType.Unknown); | 1267 | OutPacket(newSimPack, ThrottleOutPacketType.Unknown); |
@@ -1289,7 +1286,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1289 | mapReply.Data[i].X = mapBlocks2[i].X; | 1286 | mapReply.Data[i].X = mapBlocks2[i].X; |
1290 | mapReply.Data[i].Y = mapBlocks2[i].Y; | 1287 | mapReply.Data[i].Y = mapBlocks2[i].Y; |
1291 | mapReply.Data[i].WaterHeight = mapBlocks2[i].WaterHeight; | 1288 | mapReply.Data[i].WaterHeight = mapBlocks2[i].WaterHeight; |
1292 | mapReply.Data[i].Name = Helpers.StringToField(mapBlocks2[i].Name); | 1289 | mapReply.Data[i].Name = Utils.StringToBytes(mapBlocks2[i].Name); |
1293 | mapReply.Data[i].RegionFlags = mapBlocks2[i].RegionFlags; | 1290 | mapReply.Data[i].RegionFlags = mapBlocks2[i].RegionFlags; |
1294 | mapReply.Data[i].Access = mapBlocks2[i].Access; | 1291 | mapReply.Data[i].Access = mapBlocks2[i].Access; |
1295 | mapReply.Data[i].Agents = mapBlocks2[i].Agents; | 1292 | mapReply.Data[i].Agents = mapBlocks2[i].Agents; |
@@ -1319,7 +1316,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1319 | } | 1316 | } |
1320 | } | 1317 | } |
1321 | 1318 | ||
1322 | public void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) | 1319 | public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) |
1323 | { | 1320 | { |
1324 | TeleportLocalPacket tpLocal = (TeleportLocalPacket)PacketPool.Instance.GetPacket(PacketType.TeleportLocal); | 1321 | TeleportLocalPacket tpLocal = (TeleportLocalPacket)PacketPool.Instance.GetPacket(PacketType.TeleportLocal); |
1325 | tpLocal.Info.AgentID = AgentId; | 1322 | tpLocal.Info.AgentID = AgentId; |
@@ -1342,7 +1339,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1342 | teleport.Info.RegionHandle = regionHandle; | 1339 | teleport.Info.RegionHandle = regionHandle; |
1343 | teleport.Info.SimAccess = simAccess; | 1340 | teleport.Info.SimAccess = simAccess; |
1344 | 1341 | ||
1345 | teleport.Info.SeedCapability = Helpers.StringToField(capsURL); | 1342 | teleport.Info.SeedCapability = Utils.StringToBytes(capsURL); |
1346 | 1343 | ||
1347 | IPAddress oIP = newRegionEndPoint.Address; | 1344 | IPAddress oIP = newRegionEndPoint.Address; |
1348 | byte[] byteIP = oIP.GetAddressBytes(); | 1345 | byte[] byteIP = oIP.GetAddressBytes(); |
@@ -1367,7 +1364,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1367 | { | 1364 | { |
1368 | TeleportFailedPacket tpFailed = (TeleportFailedPacket)PacketPool.Instance.GetPacket(PacketType.TeleportFailed); | 1365 | TeleportFailedPacket tpFailed = (TeleportFailedPacket)PacketPool.Instance.GetPacket(PacketType.TeleportFailed); |
1369 | tpFailed.Info.AgentID = AgentId; | 1366 | tpFailed.Info.AgentID = AgentId; |
1370 | tpFailed.Info.Reason = Helpers.StringToField(reason); | 1367 | tpFailed.Info.Reason = Utils.StringToBytes(reason); |
1371 | 1368 | ||
1372 | // Hack to get this out immediately and skip throttles | 1369 | // Hack to get this out immediately and skip throttles |
1373 | OutPacket(tpFailed, ThrottleOutPacketType.Unknown); | 1370 | OutPacket(tpFailed, ThrottleOutPacketType.Unknown); |
@@ -1386,7 +1383,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1386 | OutPacket(tpStart, ThrottleOutPacketType.Unknown); | 1383 | OutPacket(tpStart, ThrottleOutPacketType.Unknown); |
1387 | } | 1384 | } |
1388 | 1385 | ||
1389 | public void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) | 1386 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) |
1390 | { | 1387 | { |
1391 | MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); | 1388 | MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); |
1392 | money.MoneyData.AgentID = AgentId; | 1389 | money.MoneyData.AgentID = AgentId; |
@@ -1397,7 +1394,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1397 | OutPacket(money, ThrottleOutPacketType.Task); | 1394 | OutPacket(money, ThrottleOutPacketType.Task); |
1398 | } | 1395 | } |
1399 | 1396 | ||
1400 | public void SendPayPrice(LLUUID objectID, int[] payPrice) | 1397 | public void SendPayPrice(UUID objectID, int[] payPrice) |
1401 | { | 1398 | { |
1402 | if (payPrice[0] == 0 && | 1399 | if (payPrice[0] == 0 && |
1403 | payPrice[1] == 0 && | 1400 | payPrice[1] == 0 && |
@@ -1431,7 +1428,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1431 | OutPacket(pc, ThrottleOutPacketType.Unknown); | 1428 | OutPacket(pc, ThrottleOutPacketType.Unknown); |
1432 | } | 1429 | } |
1433 | 1430 | ||
1434 | public void SendKillObject(ulong regionHandle, uint localID) | 1431 | public void SendKiPrimitive(ulong regionHandle, uint localID) |
1435 | { | 1432 | { |
1436 | KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); | 1433 | KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); |
1437 | // TODO: don't create new blocks if recycling an old packet | 1434 | // TODO: don't create new blocks if recycling an old packet |
@@ -1453,7 +1450,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1453 | /// <param name="items">The items contained in the folder identified by folderID</param> | 1450 | /// <param name="items">The items contained in the folder identified by folderID</param> |
1454 | /// <param name="fetchFolders">Do we need to send folder information?</param> | 1451 | /// <param name="fetchFolders">Do we need to send folder information?</param> |
1455 | /// <param name="fetchItems">Do we need to send item information?</param> | 1452 | /// <param name="fetchItems">Do we need to send item information?</param> |
1456 | public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, | 1453 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, |
1457 | List<InventoryFolderBase> folders, | 1454 | List<InventoryFolderBase> folders, |
1458 | bool fetchFolders, bool fetchItems) | 1455 | bool fetchFolders, bool fetchItems) |
1459 | { | 1456 | { |
@@ -1501,17 +1498,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1501 | descend.ItemData[i].AssetID = item.AssetID; | 1498 | descend.ItemData[i].AssetID = item.AssetID; |
1502 | descend.ItemData[i].CreatorID = item.Creator; | 1499 | descend.ItemData[i].CreatorID = item.Creator; |
1503 | descend.ItemData[i].BaseMask = item.BasePermissions; | 1500 | descend.ItemData[i].BaseMask = item.BasePermissions; |
1504 | descend.ItemData[i].Description = Helpers.StringToField(item.Description); | 1501 | descend.ItemData[i].Description = Utils.StringToBytes(item.Description); |
1505 | descend.ItemData[i].EveryoneMask = item.EveryOnePermissions; | 1502 | descend.ItemData[i].EveryoneMask = item.EveryOnePermissions; |
1506 | descend.ItemData[i].OwnerMask = item.CurrentPermissions; | 1503 | descend.ItemData[i].OwnerMask = item.CurrentPermissions; |
1507 | descend.ItemData[i].FolderID = item.Folder; | 1504 | descend.ItemData[i].FolderID = item.Folder; |
1508 | descend.ItemData[i].InvType = (sbyte)item.InvType; | 1505 | descend.ItemData[i].InvType = (sbyte)item.InvType; |
1509 | descend.ItemData[i].Name = Helpers.StringToField(item.Name); | 1506 | descend.ItemData[i].Name = Utils.StringToBytes(item.Name); |
1510 | descend.ItemData[i].NextOwnerMask = item.NextPermissions; | 1507 | descend.ItemData[i].NextOwnerMask = item.NextPermissions; |
1511 | descend.ItemData[i].OwnerID = item.Owner; | 1508 | descend.ItemData[i].OwnerID = item.Owner; |
1512 | descend.ItemData[i].Type = (sbyte)item.AssetType; | 1509 | descend.ItemData[i].Type = (sbyte)item.AssetType; |
1513 | 1510 | ||
1514 | //descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 1511 | //descend.ItemData[i].GroupID = new UUID("00000000-0000-0000-0000-000000000000"); |
1515 | descend.ItemData[i].GroupID = item.GroupID; | 1512 | descend.ItemData[i].GroupID = item.GroupID; |
1516 | descend.ItemData[i].GroupOwned = item.GroupOwned; | 1513 | descend.ItemData[i].GroupOwned = item.GroupOwned; |
1517 | descend.ItemData[i].GroupMask = 0; | 1514 | descend.ItemData[i].GroupMask = 0; |
@@ -1585,7 +1582,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1585 | { | 1582 | { |
1586 | descend.FolderData[i] = new InventoryDescendentsPacket.FolderDataBlock(); | 1583 | descend.FolderData[i] = new InventoryDescendentsPacket.FolderDataBlock(); |
1587 | descend.FolderData[i].FolderID = folder.ID; | 1584 | descend.FolderData[i].FolderID = folder.ID; |
1588 | descend.FolderData[i].Name = Helpers.StringToField(folder.Name); | 1585 | descend.FolderData[i].Name = Utils.StringToBytes(folder.Name); |
1589 | descend.FolderData[i].ParentID = folder.ParentID; | 1586 | descend.FolderData[i].ParentID = folder.ParentID; |
1590 | descend.FolderData[i].Type = (sbyte)folder.Type; | 1587 | descend.FolderData[i].Type = (sbyte)folder.Type; |
1591 | 1588 | ||
@@ -1621,7 +1618,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1621 | } | 1618 | } |
1622 | } | 1619 | } |
1623 | 1620 | ||
1624 | private InventoryDescendentsPacket CreateInventoryDescendentsPacket(LLUUID ownerID, LLUUID folderID) | 1621 | private InventoryDescendentsPacket CreateInventoryDescendentsPacket(UUID ownerID, UUID folderID) |
1625 | { | 1622 | { |
1626 | InventoryDescendentsPacket descend = (InventoryDescendentsPacket)PacketPool.Instance.GetPacket(PacketType.InventoryDescendents); | 1623 | InventoryDescendentsPacket descend = (InventoryDescendentsPacket)PacketPool.Instance.GetPacket(PacketType.InventoryDescendents); |
1627 | descend.Header.Zerocoded = true; | 1624 | descend.Header.Zerocoded = true; |
@@ -1633,7 +1630,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1633 | return descend; | 1630 | return descend; |
1634 | } | 1631 | } |
1635 | 1632 | ||
1636 | public void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) | 1633 | public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) |
1637 | { | 1634 | { |
1638 | uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; | 1635 | uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; |
1639 | FetchInventoryReplyPacket inventoryReply = (FetchInventoryReplyPacket)PacketPool.Instance.GetPacket(PacketType.FetchInventoryReply); | 1636 | FetchInventoryReplyPacket inventoryReply = (FetchInventoryReplyPacket)PacketPool.Instance.GetPacket(PacketType.FetchInventoryReply); |
@@ -1647,17 +1644,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1647 | inventoryReply.InventoryData[0].BaseMask = item.BasePermissions; | 1644 | inventoryReply.InventoryData[0].BaseMask = item.BasePermissions; |
1648 | inventoryReply.InventoryData[0].CreationDate = | 1645 | inventoryReply.InventoryData[0].CreationDate = |
1649 | (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; | 1646 | (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; |
1650 | inventoryReply.InventoryData[0].Description = Helpers.StringToField(item.Description); | 1647 | inventoryReply.InventoryData[0].Description = Utils.StringToBytes(item.Description); |
1651 | inventoryReply.InventoryData[0].EveryoneMask = item.EveryOnePermissions; | 1648 | inventoryReply.InventoryData[0].EveryoneMask = item.EveryOnePermissions; |
1652 | inventoryReply.InventoryData[0].FolderID = item.Folder; | 1649 | inventoryReply.InventoryData[0].FolderID = item.Folder; |
1653 | inventoryReply.InventoryData[0].InvType = (sbyte)item.InvType; | 1650 | inventoryReply.InventoryData[0].InvType = (sbyte)item.InvType; |
1654 | inventoryReply.InventoryData[0].Name = Helpers.StringToField(item.Name); | 1651 | inventoryReply.InventoryData[0].Name = Utils.StringToBytes(item.Name); |
1655 | inventoryReply.InventoryData[0].NextOwnerMask = item.NextPermissions; | 1652 | inventoryReply.InventoryData[0].NextOwnerMask = item.NextPermissions; |
1656 | inventoryReply.InventoryData[0].OwnerID = item.Owner; | 1653 | inventoryReply.InventoryData[0].OwnerID = item.Owner; |
1657 | inventoryReply.InventoryData[0].OwnerMask = item.CurrentPermissions; | 1654 | inventoryReply.InventoryData[0].OwnerMask = item.CurrentPermissions; |
1658 | inventoryReply.InventoryData[0].Type = (sbyte)item.AssetType; | 1655 | inventoryReply.InventoryData[0].Type = (sbyte)item.AssetType; |
1659 | 1656 | ||
1660 | //inventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 1657 | //inventoryReply.InventoryData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000"); |
1661 | inventoryReply.InventoryData[0].GroupID = item.GroupID; | 1658 | inventoryReply.InventoryData[0].GroupID = item.GroupID; |
1662 | inventoryReply.InventoryData[0].GroupOwned = item.GroupOwned; | 1659 | inventoryReply.InventoryData[0].GroupOwned = item.GroupOwned; |
1663 | inventoryReply.InventoryData[0].GroupMask = 0; | 1660 | inventoryReply.InventoryData[0].GroupMask = 0; |
@@ -1686,12 +1683,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1686 | = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory); | 1683 | = (BulkUpdateInventoryPacket)PacketPool.Instance.GetPacket(PacketType.BulkUpdateInventory); |
1687 | 1684 | ||
1688 | bulkUpdate.AgentData.AgentID = AgentId; | 1685 | bulkUpdate.AgentData.AgentID = AgentId; |
1689 | bulkUpdate.AgentData.TransactionID = LLUUID.Random(); | 1686 | bulkUpdate.AgentData.TransactionID = UUID.Random(); |
1690 | 1687 | ||
1691 | bulkUpdate.FolderData = new BulkUpdateInventoryPacket.FolderDataBlock[1]; | 1688 | bulkUpdate.FolderData = new BulkUpdateInventoryPacket.FolderDataBlock[1]; |
1692 | bulkUpdate.FolderData[0] = new BulkUpdateInventoryPacket.FolderDataBlock(); | 1689 | bulkUpdate.FolderData[0] = new BulkUpdateInventoryPacket.FolderDataBlock(); |
1693 | bulkUpdate.FolderData[0].FolderID = LLUUID.Zero; | 1690 | bulkUpdate.FolderData[0].FolderID = UUID.Zero; |
1694 | bulkUpdate.FolderData[0].ParentID = LLUUID.Zero; | 1691 | bulkUpdate.FolderData[0].ParentID = UUID.Zero; |
1695 | bulkUpdate.FolderData[0].Type = -1; | 1692 | bulkUpdate.FolderData[0].Type = -1; |
1696 | bulkUpdate.FolderData[0].Name = new byte[0]; | 1693 | bulkUpdate.FolderData[0].Name = new byte[0]; |
1697 | 1694 | ||
@@ -1702,17 +1699,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1702 | bulkUpdate.ItemData[0].CreatorID = item.Creator; | 1699 | bulkUpdate.ItemData[0].CreatorID = item.Creator; |
1703 | bulkUpdate.ItemData[0].BaseMask = item.BasePermissions; | 1700 | bulkUpdate.ItemData[0].BaseMask = item.BasePermissions; |
1704 | bulkUpdate.ItemData[0].CreationDate = 1000; | 1701 | bulkUpdate.ItemData[0].CreationDate = 1000; |
1705 | bulkUpdate.ItemData[0].Description = Helpers.StringToField(item.Description); | 1702 | bulkUpdate.ItemData[0].Description = Utils.StringToBytes(item.Description); |
1706 | bulkUpdate.ItemData[0].EveryoneMask = item.EveryOnePermissions; | 1703 | bulkUpdate.ItemData[0].EveryoneMask = item.EveryOnePermissions; |
1707 | bulkUpdate.ItemData[0].FolderID = item.Folder; | 1704 | bulkUpdate.ItemData[0].FolderID = item.Folder; |
1708 | bulkUpdate.ItemData[0].InvType = (sbyte)item.InvType; | 1705 | bulkUpdate.ItemData[0].InvType = (sbyte)item.InvType; |
1709 | bulkUpdate.ItemData[0].Name = Helpers.StringToField(item.Name); | 1706 | bulkUpdate.ItemData[0].Name = Utils.StringToBytes(item.Name); |
1710 | bulkUpdate.ItemData[0].NextOwnerMask = item.NextPermissions; | 1707 | bulkUpdate.ItemData[0].NextOwnerMask = item.NextPermissions; |
1711 | bulkUpdate.ItemData[0].OwnerID = item.Owner; | 1708 | bulkUpdate.ItemData[0].OwnerID = item.Owner; |
1712 | bulkUpdate.ItemData[0].OwnerMask = item.CurrentPermissions; | 1709 | bulkUpdate.ItemData[0].OwnerMask = item.CurrentPermissions; |
1713 | bulkUpdate.ItemData[0].Type = (sbyte)item.AssetType; | 1710 | bulkUpdate.ItemData[0].Type = (sbyte)item.AssetType; |
1714 | 1711 | ||
1715 | //bulkUpdate.ItemData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 1712 | //bulkUpdate.ItemData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000"); |
1716 | bulkUpdate.ItemData[0].GroupID = item.GroupID; | 1713 | bulkUpdate.ItemData[0].GroupID = item.GroupID; |
1717 | bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned; | 1714 | bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned; |
1718 | bulkUpdate.ItemData[0].GroupMask = 0; | 1715 | bulkUpdate.ItemData[0].GroupMask = 0; |
@@ -1750,17 +1747,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1750 | InventoryReply.InventoryData[0].AssetID = Item.AssetID; | 1747 | InventoryReply.InventoryData[0].AssetID = Item.AssetID; |
1751 | InventoryReply.InventoryData[0].CreatorID = Item.Creator; | 1748 | InventoryReply.InventoryData[0].CreatorID = Item.Creator; |
1752 | InventoryReply.InventoryData[0].BaseMask = Item.BasePermissions; | 1749 | InventoryReply.InventoryData[0].BaseMask = Item.BasePermissions; |
1753 | InventoryReply.InventoryData[0].Description = Helpers.StringToField(Item.Description); | 1750 | InventoryReply.InventoryData[0].Description = Utils.StringToBytes(Item.Description); |
1754 | InventoryReply.InventoryData[0].EveryoneMask = Item.EveryOnePermissions; | 1751 | InventoryReply.InventoryData[0].EveryoneMask = Item.EveryOnePermissions; |
1755 | InventoryReply.InventoryData[0].FolderID = Item.Folder; | 1752 | InventoryReply.InventoryData[0].FolderID = Item.Folder; |
1756 | InventoryReply.InventoryData[0].InvType = (sbyte)Item.InvType; | 1753 | InventoryReply.InventoryData[0].InvType = (sbyte)Item.InvType; |
1757 | InventoryReply.InventoryData[0].Name = Helpers.StringToField(Item.Name); | 1754 | InventoryReply.InventoryData[0].Name = Utils.StringToBytes(Item.Name); |
1758 | InventoryReply.InventoryData[0].NextOwnerMask = Item.NextPermissions; | 1755 | InventoryReply.InventoryData[0].NextOwnerMask = Item.NextPermissions; |
1759 | InventoryReply.InventoryData[0].OwnerID = Item.Owner; | 1756 | InventoryReply.InventoryData[0].OwnerID = Item.Owner; |
1760 | InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions; | 1757 | InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions; |
1761 | InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType; | 1758 | InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType; |
1762 | 1759 | ||
1763 | //InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 1760 | //InventoryReply.InventoryData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000"); |
1764 | InventoryReply.InventoryData[0].GroupID = Item.GroupID; | 1761 | InventoryReply.InventoryData[0].GroupID = Item.GroupID; |
1765 | InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned; | 1762 | InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned; |
1766 | InventoryReply.InventoryData[0].GroupMask = 0; | 1763 | InventoryReply.InventoryData[0].GroupMask = 0; |
@@ -1781,7 +1778,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1781 | OutPacket(InventoryReply, ThrottleOutPacketType.Asset); | 1778 | OutPacket(InventoryReply, ThrottleOutPacketType.Asset); |
1782 | } | 1779 | } |
1783 | 1780 | ||
1784 | public void SendRemoveInventoryItem(LLUUID itemID) | 1781 | public void SendRemoveInventoryItem(UUID itemID) |
1785 | { | 1782 | { |
1786 | RemoveInventoryItemPacket remove = (RemoveInventoryItemPacket)PacketPool.Instance.GetPacket(PacketType.RemoveInventoryItem); | 1783 | RemoveInventoryItemPacket remove = (RemoveInventoryItemPacket)PacketPool.Instance.GetPacket(PacketType.RemoveInventoryItem); |
1787 | // TODO: don't create new blocks if recycling an old packet | 1784 | // TODO: don't create new blocks if recycling an old packet |
@@ -1807,7 +1804,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1807 | OutPacket(scriptcontrol, ThrottleOutPacketType.Task); | 1804 | OutPacket(scriptcontrol, ThrottleOutPacketType.Task); |
1808 | } | 1805 | } |
1809 | 1806 | ||
1810 | public void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) | 1807 | public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) |
1811 | { | 1808 | { |
1812 | ReplyTaskInventoryPacket replytask = (ReplyTaskInventoryPacket)PacketPool.Instance.GetPacket(PacketType.ReplyTaskInventory); | 1809 | ReplyTaskInventoryPacket replytask = (ReplyTaskInventoryPacket)PacketPool.Instance.GetPacket(PacketType.ReplyTaskInventory); |
1813 | replytask.InventoryData.TaskID = taskID; | 1810 | replytask.InventoryData.TaskID = taskID; |
@@ -1872,7 +1869,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1872 | OutPacket(replyPacket, ThrottleOutPacketType.Task); | 1869 | OutPacket(replyPacket, ThrottleOutPacketType.Task); |
1873 | } | 1870 | } |
1874 | 1871 | ||
1875 | public void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) | 1872 | public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) |
1876 | { | 1873 | { |
1877 | 1874 | ||
1878 | m_activeGroupID = activegroupid; | 1875 | m_activeGroupID = activegroupid; |
@@ -1882,11 +1879,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1882 | AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); | 1879 | AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); |
1883 | sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; | 1880 | sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; |
1884 | sendAgentDataUpdate.AgentData.AgentID = agentid; | 1881 | sendAgentDataUpdate.AgentData.AgentID = agentid; |
1885 | sendAgentDataUpdate.AgentData.FirstName = Helpers.StringToField(firstname); | 1882 | sendAgentDataUpdate.AgentData.FirstName = Utils.StringToBytes(firstname); |
1886 | sendAgentDataUpdate.AgentData.GroupName = Helpers.StringToField(groupname); | 1883 | sendAgentDataUpdate.AgentData.GroupName = Utils.StringToBytes(groupname); |
1887 | sendAgentDataUpdate.AgentData.GroupPowers = grouppowers; | 1884 | sendAgentDataUpdate.AgentData.GroupPowers = grouppowers; |
1888 | sendAgentDataUpdate.AgentData.GroupTitle = Helpers.StringToField(grouptitle); | 1885 | sendAgentDataUpdate.AgentData.GroupTitle = Utils.StringToBytes(grouptitle); |
1889 | sendAgentDataUpdate.AgentData.LastName = Helpers.StringToField(lastname); | 1886 | sendAgentDataUpdate.AgentData.LastName = Utils.StringToBytes(lastname); |
1890 | OutPacket(sendAgentDataUpdate, ThrottleOutPacketType.Task); | 1887 | OutPacket(sendAgentDataUpdate, ThrottleOutPacketType.Task); |
1891 | } | 1888 | } |
1892 | 1889 | ||
@@ -1898,7 +1895,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1898 | public void SendAlertMessage(string message) | 1895 | public void SendAlertMessage(string message) |
1899 | { | 1896 | { |
1900 | AlertMessagePacket alertPack = (AlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AlertMessage); | 1897 | AlertMessagePacket alertPack = (AlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AlertMessage); |
1901 | alertPack.AlertData.Message = Helpers.StringToField(message); | 1898 | alertPack.AlertData.Message = Utils.StringToBytes(message); |
1902 | OutPacket(alertPack, ThrottleOutPacketType.Task); | 1899 | OutPacket(alertPack, ThrottleOutPacketType.Task); |
1903 | } | 1900 | } |
1904 | 1901 | ||
@@ -1924,46 +1921,46 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1924 | { | 1921 | { |
1925 | AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); | 1922 | AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); |
1926 | alertPack.AgentData.AgentID = AgentId; | 1923 | alertPack.AgentData.AgentID = AgentId; |
1927 | alertPack.AlertData.Message = Helpers.StringToField(message); | 1924 | alertPack.AlertData.Message = Utils.StringToBytes(message); |
1928 | alertPack.AlertData.Modal = modal; | 1925 | alertPack.AlertData.Modal = modal; |
1929 | 1926 | ||
1930 | return alertPack; | 1927 | return alertPack; |
1931 | } | 1928 | } |
1932 | 1929 | ||
1933 | public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, | 1930 | public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, |
1934 | string url) | 1931 | string url) |
1935 | { | 1932 | { |
1936 | LoadURLPacket loadURL = (LoadURLPacket)PacketPool.Instance.GetPacket(PacketType.LoadURL); | 1933 | LoadURLPacket loadURL = (LoadURLPacket)PacketPool.Instance.GetPacket(PacketType.LoadURL); |
1937 | loadURL.Data.ObjectName = Helpers.StringToField(objectname); | 1934 | loadURL.Data.ObjectName = Utils.StringToBytes(objectname); |
1938 | loadURL.Data.ObjectID = objectID; | 1935 | loadURL.Data.ObjectID = objectID; |
1939 | loadURL.Data.OwnerID = ownerID; | 1936 | loadURL.Data.OwnerID = ownerID; |
1940 | loadURL.Data.OwnerIsGroup = groupOwned; | 1937 | loadURL.Data.OwnerIsGroup = groupOwned; |
1941 | loadURL.Data.Message = Helpers.StringToField(message); | 1938 | loadURL.Data.Message = Utils.StringToBytes(message); |
1942 | loadURL.Data.URL = Helpers.StringToField(url); | 1939 | loadURL.Data.URL = Utils.StringToBytes(url); |
1943 | OutPacket(loadURL, ThrottleOutPacketType.Task); | 1940 | OutPacket(loadURL, ThrottleOutPacketType.Task); |
1944 | } | 1941 | } |
1945 | 1942 | ||
1946 | public void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels) | 1943 | public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) |
1947 | { | 1944 | { |
1948 | ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog); | 1945 | ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog); |
1949 | dialog.Data.ObjectID = objectID; | 1946 | dialog.Data.ObjectID = objectID; |
1950 | dialog.Data.ObjectName = Helpers.StringToField(objectname); | 1947 | dialog.Data.ObjectName = Utils.StringToBytes(objectname); |
1951 | dialog.Data.FirstName = Helpers.StringToField(this.FirstName); | 1948 | dialog.Data.FirstName = Utils.StringToBytes(this.FirstName); |
1952 | dialog.Data.LastName = Helpers.StringToField(this.LastName); | 1949 | dialog.Data.LastName = Utils.StringToBytes(this.LastName); |
1953 | dialog.Data.Message = Helpers.StringToField(msg); | 1950 | dialog.Data.Message = Utils.StringToBytes(msg); |
1954 | dialog.Data.ImageID = textureID; | 1951 | dialog.Data.ImageID = textureID; |
1955 | dialog.Data.ChatChannel = ch; | 1952 | dialog.Data.ChatChannel = ch; |
1956 | ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[buttonlabels.Length]; | 1953 | ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[buttonlabels.Length]; |
1957 | for (int i = 0; i < buttonlabels.Length; i++) | 1954 | for (int i = 0; i < buttonlabels.Length; i++) |
1958 | { | 1955 | { |
1959 | buttons[i] = new ScriptDialogPacket.ButtonsBlock(); | 1956 | buttons[i] = new ScriptDialogPacket.ButtonsBlock(); |
1960 | buttons[i].ButtonLabel = Helpers.StringToField(buttonlabels[i]); | 1957 | buttons[i].ButtonLabel = Utils.StringToBytes(buttonlabels[i]); |
1961 | } | 1958 | } |
1962 | dialog.Buttons = buttons; | 1959 | dialog.Buttons = buttons; |
1963 | OutPacket(dialog, ThrottleOutPacketType.Task); | 1960 | OutPacket(dialog, ThrottleOutPacketType.Task); |
1964 | } | 1961 | } |
1965 | 1962 | ||
1966 | public void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID) | 1963 | public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) |
1967 | { | 1964 | { |
1968 | PreloadSoundPacket preSound = (PreloadSoundPacket)PacketPool.Instance.GetPacket(PacketType.PreloadSound); | 1965 | PreloadSoundPacket preSound = (PreloadSoundPacket)PacketPool.Instance.GetPacket(PacketType.PreloadSound); |
1969 | // TODO: don't create new blocks if recycling an old packet | 1966 | // TODO: don't create new blocks if recycling an old packet |
@@ -1976,7 +1973,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1976 | OutPacket(preSound, ThrottleOutPacketType.Task); | 1973 | OutPacket(preSound, ThrottleOutPacketType.Task); |
1977 | } | 1974 | } |
1978 | 1975 | ||
1979 | public void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags) | 1976 | public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) |
1980 | { | 1977 | { |
1981 | AttachedSoundPacket sound = (AttachedSoundPacket)PacketPool.Instance.GetPacket(PacketType.AttachedSound); | 1978 | AttachedSoundPacket sound = (AttachedSoundPacket)PacketPool.Instance.GetPacket(PacketType.AttachedSound); |
1982 | sound.DataBlock.SoundID = soundID; | 1979 | sound.DataBlock.SoundID = soundID; |
@@ -1988,7 +1985,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1988 | OutPacket(sound, ThrottleOutPacketType.Task); | 1985 | OutPacket(sound, ThrottleOutPacketType.Task); |
1989 | } | 1986 | } |
1990 | 1987 | ||
1991 | public void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain) | 1988 | public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) |
1992 | { | 1989 | { |
1993 | SoundTriggerPacket sound = (SoundTriggerPacket)PacketPool.Instance.GetPacket(PacketType.SoundTrigger); | 1990 | SoundTriggerPacket sound = (SoundTriggerPacket)PacketPool.Instance.GetPacket(PacketType.SoundTrigger); |
1994 | sound.SoundData.SoundID = soundID; | 1991 | sound.SoundData.SoundID = soundID; |
@@ -2002,7 +1999,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2002 | OutPacket(sound, ThrottleOutPacketType.Task); | 1999 | OutPacket(sound, ThrottleOutPacketType.Task); |
2003 | } | 2000 | } |
2004 | 2001 | ||
2005 | public void SendAttachedSoundGainChange(LLUUID objectID, float gain) | 2002 | public void SendAttachedSoundGainChange(UUID objectID, float gain) |
2006 | { | 2003 | { |
2007 | AttachedSoundGainChangePacket sound = (AttachedSoundGainChangePacket)PacketPool.Instance.GetPacket(PacketType.AttachedSoundGainChange); | 2004 | AttachedSoundGainChangePacket sound = (AttachedSoundGainChangePacket)PacketPool.Instance.GetPacket(PacketType.AttachedSoundGainChange); |
2008 | sound.DataBlock.ObjectID = objectID; | 2005 | sound.DataBlock.ObjectID = objectID; |
@@ -2011,7 +2008,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2011 | OutPacket(sound, ThrottleOutPacketType.Task); | 2008 | OutPacket(sound, ThrottleOutPacketType.Task); |
2012 | } | 2009 | } |
2013 | 2010 | ||
2014 | public void SendSunPos(LLVector3 Position, LLVector3 Velocity, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) | 2011 | public void SendSunPos(Vector3 Position, Vector3 Velocity, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) |
2015 | { | 2012 | { |
2016 | SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage); | 2013 | SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage); |
2017 | viewertime.TimeInfo.SunDirection = Position; | 2014 | viewertime.TimeInfo.SunDirection = Position; |
@@ -2039,7 +2036,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2039 | int sunPhase = (phase + 2) / 2; | 2036 | int sunPhase = (phase + 2) / 2; |
2040 | if ((sunPhase < 6) || (sunPhase > 36)) | 2037 | if ((sunPhase < 6) || (sunPhase > 36)) |
2041 | { | 2038 | { |
2042 | viewertime.TimeInfo.SunDirection = new LLVector3(0f, 0.8f, -0.8f); | 2039 | viewertime.TimeInfo.SunDirection = new Vector3(0f, 0.8f, -0.8f); |
2043 | Console.WriteLine("sending night"); | 2040 | Console.WriteLine("sending night"); |
2044 | } | 2041 | } |
2045 | else | 2042 | else |
@@ -2067,37 +2064,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2067 | { | 2064 | { |
2068 | yValue *= -1; | 2065 | yValue *= -1; |
2069 | } | 2066 | } |
2070 | viewertime.TimeInfo.SunDirection = new LLVector3(0f, yValue, 0.3f); | 2067 | viewertime.TimeInfo.SunDirection = new Vector3(0f, yValue, 0.3f); |
2071 | Console.WriteLine("sending sun update " + yValue); | 2068 | Console.WriteLine("sending sun update " + yValue); |
2072 | } | 2069 | } |
2073 | viewertime.TimeInfo.SunAngVelocity = new LLVector3(0, 0.0f, 10.0f); | 2070 | viewertime.TimeInfo.SunAngVelocity = new Vector3(0, 0.0f, 10.0f); |
2074 | viewertime.TimeInfo.UsecSinceStart = (ulong)Util.UnixTimeSinceEpoch(); | 2071 | viewertime.TimeInfo.UsecSinceStart = (ulong)Util.UnixTimeSinceEpoch(); |
2075 | viewertime.Header.Reliable = false; | 2072 | viewertime.Header.Reliable = false; |
2076 | OutPacket(viewertime, ThrottleOutPacketType.Task); | 2073 | OutPacket(viewertime, ThrottleOutPacketType.Task); |
2077 | */ | 2074 | */ |
2078 | } | 2075 | } |
2079 | 2076 | ||
2080 | public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, Byte[] charterMember, | 2077 | public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, |
2081 | string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, | 2078 | string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, |
2082 | LLUUID partnerID) | 2079 | UUID partnerID) |
2083 | { | 2080 | { |
2084 | AvatarPropertiesReplyPacket avatarReply = (AvatarPropertiesReplyPacket)PacketPool.Instance.GetPacket(PacketType.AvatarPropertiesReply); | 2081 | AvatarPropertiesReplyPacket avatarReply = (AvatarPropertiesReplyPacket)PacketPool.Instance.GetPacket(PacketType.AvatarPropertiesReply); |
2085 | avatarReply.AgentData.AgentID = AgentId; | 2082 | avatarReply.AgentData.AgentID = AgentId; |
2086 | avatarReply.AgentData.AvatarID = avatarID; | 2083 | avatarReply.AgentData.AvatarID = avatarID; |
2087 | if (aboutText != null) | 2084 | if (aboutText != null) |
2088 | avatarReply.PropertiesData.AboutText = Helpers.StringToField(aboutText); | 2085 | avatarReply.PropertiesData.AboutText = Utils.StringToBytes(aboutText); |
2089 | else | 2086 | else |
2090 | avatarReply.PropertiesData.AboutText = Helpers.StringToField(""); | 2087 | avatarReply.PropertiesData.AboutText = Utils.StringToBytes(""); |
2091 | avatarReply.PropertiesData.BornOn = Helpers.StringToField(bornOn); | 2088 | avatarReply.PropertiesData.BornOn = Utils.StringToBytes(bornOn); |
2092 | avatarReply.PropertiesData.CharterMember = charterMember; | 2089 | avatarReply.PropertiesData.CharterMember = charterMember; |
2093 | if (flAbout != null) | 2090 | if (flAbout != null) |
2094 | avatarReply.PropertiesData.FLAboutText = Helpers.StringToField(flAbout); | 2091 | avatarReply.PropertiesData.FLAboutText = Utils.StringToBytes(flAbout); |
2095 | else | 2092 | else |
2096 | avatarReply.PropertiesData.FLAboutText = Helpers.StringToField(""); | 2093 | avatarReply.PropertiesData.FLAboutText = Utils.StringToBytes(""); |
2097 | avatarReply.PropertiesData.Flags = flags; | 2094 | avatarReply.PropertiesData.Flags = flags; |
2098 | avatarReply.PropertiesData.FLImageID = flImageID; | 2095 | avatarReply.PropertiesData.FLImageID = flImageID; |
2099 | avatarReply.PropertiesData.ImageID = imageID; | 2096 | avatarReply.PropertiesData.ImageID = imageID; |
2100 | avatarReply.PropertiesData.ProfileURL = Helpers.StringToField(profileURL); | 2097 | avatarReply.PropertiesData.ProfileURL = Utils.StringToBytes(profileURL); |
2101 | avatarReply.PropertiesData.PartnerID = partnerID; | 2098 | avatarReply.PropertiesData.PartnerID = partnerID; |
2102 | OutPacket(avatarReply, ThrottleOutPacketType.Task); | 2099 | OutPacket(avatarReply, ThrottleOutPacketType.Task); |
2103 | } | 2100 | } |
@@ -2140,7 +2137,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2140 | /// <param name="agentID"></param> | 2137 | /// <param name="agentID"></param> |
2141 | /// <param name="visualParams"></param> | 2138 | /// <param name="visualParams"></param> |
2142 | /// <param name="textureEntry"></param> | 2139 | /// <param name="textureEntry"></param> |
2143 | public void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry) | 2140 | public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) |
2144 | { | 2141 | { |
2145 | AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); | 2142 | AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); |
2146 | // TODO: don't create new blocks if recycling an old packet | 2143 | // TODO: don't create new blocks if recycling an old packet |
@@ -2160,7 +2157,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2160 | OutPacket(avp, ThrottleOutPacketType.Task); | 2157 | OutPacket(avp, ThrottleOutPacketType.Task); |
2161 | } | 2158 | } |
2162 | 2159 | ||
2163 | public void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId) | 2160 | public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId) |
2164 | { | 2161 | { |
2165 | AvatarAnimationPacket ani = (AvatarAnimationPacket)PacketPool.Instance.GetPacket(PacketType.AvatarAnimation); | 2162 | AvatarAnimationPacket ani = (AvatarAnimationPacket)PacketPool.Instance.GetPacket(PacketType.AvatarAnimation); |
2166 | // TODO: don't create new blocks if recycling an old packet | 2163 | // TODO: don't create new blocks if recycling an old packet |
@@ -2194,8 +2191,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2194 | /// <param name="avatarID"></param> | 2191 | /// <param name="avatarID"></param> |
2195 | /// <param name="avatarLocalID"></param> | 2192 | /// <param name="avatarLocalID"></param> |
2196 | /// <param name="Pos"></param> | 2193 | /// <param name="Pos"></param> |
2197 | public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, | 2194 | public void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID, |
2198 | uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID, LLQuaternion rotation) | 2195 | uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) |
2199 | { | 2196 | { |
2200 | ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); | 2197 | ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); |
2201 | // TODO: don't create new blocks if recycling an old packet | 2198 | // TODO: don't create new blocks if recycling an old packet |
@@ -2209,9 +2206,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2209 | objupdate.ObjectData[0].FullID = avatarID; | 2206 | objupdate.ObjectData[0].FullID = avatarID; |
2210 | objupdate.ObjectData[0].ParentID = parentID; | 2207 | objupdate.ObjectData[0].ParentID = parentID; |
2211 | objupdate.ObjectData[0].NameValue = | 2208 | objupdate.ObjectData[0].NameValue = |
2212 | Helpers.StringToField("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName); | 2209 | Utils.StringToBytes("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName); |
2213 | 2210 | ||
2214 | LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); | 2211 | Vector3 pos2 = new Vector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); |
2215 | byte[] pb = pos2.GetBytes(); | 2212 | byte[] pb = pos2.GetBytes(); |
2216 | Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); | 2213 | Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); |
2217 | 2214 | ||
@@ -2230,11 +2227,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2230 | /// <param name="localID"></param> | 2227 | /// <param name="localID"></param> |
2231 | /// <param name="position"></param> | 2228 | /// <param name="position"></param> |
2232 | /// <param name="velocity"></param> | 2229 | /// <param name="velocity"></param> |
2233 | public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 2230 | public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, |
2234 | LLVector3 velocity, LLQuaternion rotation) | 2231 | Vector3 velocity, Quaternion rotation) |
2235 | { | 2232 | { |
2236 | if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) | 2233 | if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) |
2237 | rotation = LLQuaternion.Identity; | 2234 | rotation = Quaternion.Identity; |
2238 | 2235 | ||
2239 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = | 2236 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = |
2240 | CreateAvatarImprovedBlock(localID, position, velocity, rotation); | 2237 | CreateAvatarImprovedBlock(localID, position, velocity, rotation); |
@@ -2251,7 +2248,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2251 | OutPacket(terse, ThrottleOutPacketType.Task); | 2248 | OutPacket(terse, ThrottleOutPacketType.Task); |
2252 | } | 2249 | } |
2253 | 2250 | ||
2254 | public void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations) | 2251 | public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations) |
2255 | { | 2252 | { |
2256 | CoarseLocationUpdatePacket loc = (CoarseLocationUpdatePacket)PacketPool.Instance.GetPacket(PacketType.CoarseLocationUpdate); | 2253 | CoarseLocationUpdatePacket loc = (CoarseLocationUpdatePacket)PacketPool.Instance.GetPacket(PacketType.CoarseLocationUpdate); |
2257 | // TODO: don't create new blocks if recycling an old packet | 2254 | // TODO: don't create new blocks if recycling an old packet |
@@ -2286,7 +2283,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2286 | /// <param name="localID"></param> | 2283 | /// <param name="localID"></param> |
2287 | /// <param name="rotation"></param> | 2284 | /// <param name="rotation"></param> |
2288 | /// <param name="attachPoint"></param> | 2285 | /// <param name="attachPoint"></param> |
2289 | public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) | 2286 | public void AttachObject(uint localID, Quaternion rotation, byte attachPoint) |
2290 | { | 2287 | { |
2291 | 2288 | ||
2292 | ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach); | 2289 | ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach); |
@@ -2305,8 +2302,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2305 | 2302 | ||
2306 | public void SendPrimitiveToClient( | 2303 | public void SendPrimitiveToClient( |
2307 | ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 2304 | ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, |
2308 | LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, | 2305 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, |
2309 | uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, | 2306 | uint flags, UUID objectID, UUID ownerID, string text, byte[] color, |
2310 | uint parentID, byte[] particleSystem, byte clickAction) | 2307 | uint parentID, byte[] particleSystem, byte clickAction) |
2311 | { | 2308 | { |
2312 | byte[] textureanim = new byte[0]; | 2309 | byte[] textureanim = new byte[0]; |
@@ -2314,19 +2311,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2314 | SendPrimitiveToClient(regionHandle, timeDilation, localID, primShape, pos, vel, | 2311 | SendPrimitiveToClient(regionHandle, timeDilation, localID, primShape, pos, vel, |
2315 | acc, rotation, rvel, flags, | 2312 | acc, rotation, rvel, flags, |
2316 | objectID, ownerID, text, color, parentID, particleSystem, | 2313 | objectID, ownerID, text, color, parentID, particleSystem, |
2317 | clickAction, textureanim, false, (uint)0, LLUUID.Zero, LLUUID.Zero, 0, 0, 0); | 2314 | clickAction, textureanim, false, (uint)0, UUID.Zero, UUID.Zero, 0, 0, 0); |
2318 | } | 2315 | } |
2319 | 2316 | ||
2320 | public void SendPrimitiveToClient( | 2317 | public void SendPrimitiveToClient( |
2321 | ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 2318 | ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, |
2322 | LLVector3 pos, LLVector3 velocity, LLVector3 acceleration, LLQuaternion rotation, LLVector3 rotational_velocity, | 2319 | Vector3 pos, Vector3 velocity, Vector3 acceleration, Quaternion rotation, Vector3 rotational_velocity, |
2323 | uint flags, | 2320 | uint flags, |
2324 | LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, | 2321 | UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, |
2325 | byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId, LLUUID SoundId, double SoundGain, byte SoundFlags, double SoundRadius) | 2322 | byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundGain, byte SoundFlags, double SoundRadius) |
2326 | { | 2323 | { |
2327 | 2324 | ||
2328 | if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) | 2325 | if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) |
2329 | rotation = LLQuaternion.Identity; | 2326 | rotation = Quaternion.Identity; |
2330 | 2327 | ||
2331 | ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); | 2328 | ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); |
2332 | 2329 | ||
@@ -2344,13 +2341,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2344 | outPacket.ObjectData[0].OwnerID = ownerID; | 2341 | outPacket.ObjectData[0].OwnerID = ownerID; |
2345 | 2342 | ||
2346 | // Anything more than 254 will cause libsecondlife to barf | 2343 | // Anything more than 254 will cause libsecondlife to barf |
2347 | // (libsl 1550) adds an \0 on the Helpers.StringToField conversion if it isn't present | 2344 | // (libsl 1550) adds an \0 on the Utils.StringToBytes conversion if it isn't present |
2348 | if (text.Length > 254) | 2345 | if (text.Length > 254) |
2349 | { | 2346 | { |
2350 | text = text.Remove(254); | 2347 | text = text.Remove(254); |
2351 | } | 2348 | } |
2352 | 2349 | ||
2353 | outPacket.ObjectData[0].Text = Helpers.StringToField(text); | 2350 | outPacket.ObjectData[0].Text = Utils.StringToBytes(text); |
2354 | 2351 | ||
2355 | outPacket.ObjectData[0].TextColor[0] = color[0]; | 2352 | outPacket.ObjectData[0].TextColor[0] = color[0]; |
2356 | outPacket.ObjectData[0].TextColor[1] = color[1]; | 2353 | outPacket.ObjectData[0].TextColor[1] = color[1]; |
@@ -2364,21 +2361,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2364 | if (attachment) | 2361 | if (attachment) |
2365 | { | 2362 | { |
2366 | // Necessary??? | 2363 | // Necessary??? |
2367 | outPacket.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 2); | 2364 | outPacket.ObjectData[0].JointAxisOrAnchor = new Vector3(0, 0, 2); |
2368 | outPacket.ObjectData[0].JointPivot = new LLVector3(0, 0, 0); | 2365 | outPacket.ObjectData[0].JointPivot = new Vector3(0, 0, 0); |
2369 | 2366 | ||
2370 | // Item from inventory??? | 2367 | // Item from inventory??? |
2371 | outPacket.ObjectData[0].NameValue = | 2368 | outPacket.ObjectData[0].NameValue = |
2372 | Helpers.StringToField("AttachItemID STRING RW SV " + AssetId.UUID); | 2369 | Utils.StringToBytes("AttachItemID STRING RW SV " + AssetId.Guid); |
2373 | outPacket.ObjectData[0].State = (byte)((AttachPoint % 16) * 16 + (AttachPoint / 16)); | 2370 | outPacket.ObjectData[0].State = (byte)((AttachPoint % 16) * 16 + (AttachPoint / 16)); |
2374 | } | 2371 | } |
2375 | 2372 | ||
2376 | // Xantor 20080528: Send sound info as well | 2373 | // Xantor 20080528: Send sound info as well |
2377 | // Xantor 20080530: Zero out everything if there's no SoundId, so zerocompression will work again | 2374 | // Xantor 20080530: Zero out everything if there's no SoundId, so zerocompression will work again |
2378 | outPacket.ObjectData[0].Sound = SoundId; | 2375 | outPacket.ObjectData[0].Sound = SoundId; |
2379 | if (SoundId == LLUUID.Zero) | 2376 | if (SoundId == UUID.Zero) |
2380 | { | 2377 | { |
2381 | outPacket.ObjectData[0].OwnerID = LLUUID.Zero; | 2378 | outPacket.ObjectData[0].OwnerID = UUID.Zero; |
2382 | outPacket.ObjectData[0].Gain = 0.0f; | 2379 | outPacket.ObjectData[0].Gain = 0.0f; |
2383 | outPacket.ObjectData[0].Radius = 0.0f; | 2380 | outPacket.ObjectData[0].Radius = 0.0f; |
2384 | outPacket.ObjectData[0].Flags = 0; | 2381 | outPacket.ObjectData[0].Flags = 0; |
@@ -2420,11 +2417,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2420 | /// <param name="localID"></param> | 2417 | /// <param name="localID"></param> |
2421 | /// <param name="position"></param> | 2418 | /// <param name="position"></param> |
2422 | /// <param name="rotation"></param> | 2419 | /// <param name="rotation"></param> |
2423 | public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 2420 | public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, |
2424 | LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity, byte state, LLUUID AssetId) | 2421 | Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId) |
2425 | { | 2422 | { |
2426 | if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) | 2423 | if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) |
2427 | rotation = LLQuaternion.Identity; | 2424 | rotation = Quaternion.Identity; |
2428 | ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); | 2425 | ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); |
2429 | // TODO: don't create new blocks if recycling an old packet | 2426 | // TODO: don't create new blocks if recycling an old packet |
2430 | terse.RegionData.RegionHandle = regionHandle; | 2427 | terse.RegionData.RegionHandle = regionHandle; |
@@ -2436,11 +2433,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2436 | OutPacket(terse, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); | 2433 | OutPacket(terse, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); |
2437 | } | 2434 | } |
2438 | 2435 | ||
2439 | public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 2436 | public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, |
2440 | LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity) | 2437 | Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity) |
2441 | { | 2438 | { |
2442 | if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) | 2439 | if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) |
2443 | rotation = LLQuaternion.Identity; | 2440 | rotation = Quaternion.Identity; |
2444 | ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); | 2441 | ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); |
2445 | // TODO: don't create new blocks if recycling an old packet | 2442 | // TODO: don't create new blocks if recycling an old packet |
2446 | terse.RegionData.RegionHandle = regionHandle; | 2443 | terse.RegionData.RegionHandle = regionHandle; |
@@ -2452,7 +2449,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2452 | OutPacket(terse, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); | 2449 | OutPacket(terse, ThrottleOutPacketType.Task | ThrottleOutPacketType.LowPriority); |
2453 | } | 2450 | } |
2454 | 2451 | ||
2455 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) | 2452 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) |
2456 | { | 2453 | { |
2457 | AssetUploadCompletePacket newPack = new AssetUploadCompletePacket(); | 2454 | AssetUploadCompletePacket newPack = new AssetUploadCompletePacket(); |
2458 | newPack.AssetBlock.Type = AssetType; | 2455 | newPack.AssetBlock.Type = AssetType; |
@@ -2462,7 +2459,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2462 | OutPacket(newPack, ThrottleOutPacketType.Asset); | 2459 | OutPacket(newPack, ThrottleOutPacketType.Asset); |
2463 | } | 2460 | } |
2464 | 2461 | ||
2465 | public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) | 2462 | public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) |
2466 | { | 2463 | { |
2467 | RequestXferPacket newPack = new RequestXferPacket(); | 2464 | RequestXferPacket newPack = new RequestXferPacket(); |
2468 | newPack.XferID.ID = XferID; | 2465 | newPack.XferID.ID = XferID; |
@@ -2483,7 +2480,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2483 | OutPacket(newPack, ThrottleOutPacketType.Asset); | 2480 | OutPacket(newPack, ThrottleOutPacketType.Asset); |
2484 | } | 2481 | } |
2485 | 2482 | ||
2486 | public void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) | 2483 | public void SendImagePart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) |
2487 | { | 2484 | { |
2488 | ImageDataPacket im = new ImageDataPacket(); | 2485 | ImageDataPacket im = new ImageDataPacket(); |
2489 | im.Header.Reliable = false; | 2486 | im.Header.Reliable = false; |
@@ -2510,10 +2507,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2510 | OutPacket(pack, ThrottleOutPacketType.Task); | 2507 | OutPacket(pack, ThrottleOutPacketType.Task); |
2511 | } | 2508 | } |
2512 | 2509 | ||
2513 | public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, | 2510 | public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, |
2514 | uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, | 2511 | uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, |
2515 | uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, | 2512 | uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, |
2516 | LLUUID LastOwnerID, string ObjectName, string Description) | 2513 | UUID LastOwnerID, string ObjectName, string Description) |
2517 | { | 2514 | { |
2518 | ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); | 2515 | ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); |
2519 | // TODO: don't create new blocks if recycling an old packet | 2516 | // TODO: don't create new blocks if recycling an old packet |
@@ -2535,16 +2532,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2535 | objPropDB.SalePrice = SalePrice; | 2532 | objPropDB.SalePrice = SalePrice; |
2536 | objPropDB.Category = Category; | 2533 | objPropDB.Category = Category; |
2537 | objPropDB.LastOwnerID = LastOwnerID; | 2534 | objPropDB.LastOwnerID = LastOwnerID; |
2538 | objPropDB.Name = Helpers.StringToField(ObjectName); | 2535 | objPropDB.Name = Utils.StringToBytes(ObjectName); |
2539 | objPropDB.Description = Helpers.StringToField(Description); | 2536 | objPropDB.Description = Utils.StringToBytes(Description); |
2540 | objPropFamilyPack.ObjectData = objPropDB; | 2537 | objPropFamilyPack.ObjectData = objPropDB; |
2541 | objPropFamilyPack.Header.Zerocoded = true; | 2538 | objPropFamilyPack.Header.Zerocoded = true; |
2542 | OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task); | 2539 | OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task); |
2543 | } | 2540 | } |
2544 | 2541 | ||
2545 | public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, | 2542 | public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, |
2546 | LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, | 2543 | UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, |
2547 | LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, | 2544 | UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, |
2548 | string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, | 2545 | string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, |
2549 | uint BaseMask, byte saleType, int salePrice) | 2546 | uint BaseMask, byte saleType, int salePrice) |
2550 | { | 2547 | { |
@@ -2562,15 +2559,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2562 | proper.ObjectData[0].InventorySerial = InventorySerial; | 2559 | proper.ObjectData[0].InventorySerial = InventorySerial; |
2563 | 2560 | ||
2564 | proper.ObjectData[0].LastOwnerID = LastOwnerUUID; | 2561 | proper.ObjectData[0].LastOwnerID = LastOwnerUUID; |
2565 | // proper.ObjectData[0].LastOwnerID = LLUUID.Zero; | 2562 | // proper.ObjectData[0].LastOwnerID = UUID.Zero; |
2566 | 2563 | ||
2567 | proper.ObjectData[0].ObjectID = ObjectUUID; | 2564 | proper.ObjectData[0].ObjectID = ObjectUUID; |
2568 | proper.ObjectData[0].OwnerID = OwnerUUID; | 2565 | proper.ObjectData[0].OwnerID = OwnerUUID; |
2569 | proper.ObjectData[0].TouchName = Helpers.StringToField(TouchTitle); | 2566 | proper.ObjectData[0].TouchName = Utils.StringToBytes(TouchTitle); |
2570 | proper.ObjectData[0].TextureID = TextureID; | 2567 | proper.ObjectData[0].TextureID = TextureID; |
2571 | proper.ObjectData[0].SitName = Helpers.StringToField(SitTitle); | 2568 | proper.ObjectData[0].SitName = Utils.StringToBytes(SitTitle); |
2572 | proper.ObjectData[0].Name = Helpers.StringToField(ItemName); | 2569 | proper.ObjectData[0].Name = Utils.StringToBytes(ItemName); |
2573 | proper.ObjectData[0].Description = Helpers.StringToField(ItemDescription); | 2570 | proper.ObjectData[0].Description = Utils.StringToBytes(ItemDescription); |
2574 | proper.ObjectData[0].OwnerMask = OwnerMask; | 2571 | proper.ObjectData[0].OwnerMask = OwnerMask; |
2575 | proper.ObjectData[0].NextOwnerMask = NextOwnerMask; | 2572 | proper.ObjectData[0].NextOwnerMask = NextOwnerMask; |
2576 | proper.ObjectData[0].GroupMask = GroupMask; | 2573 | proper.ObjectData[0].GroupMask = GroupMask; |
@@ -2591,7 +2588,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2591 | 2588 | ||
2592 | private bool convertParamStringToBool(byte[] field) | 2589 | private bool convertParamStringToBool(byte[] field) |
2593 | { | 2590 | { |
2594 | string s = Helpers.FieldToUTF8String(field); | 2591 | string s = Utils.BytesToString(field); |
2595 | if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true") | 2592 | if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true") |
2596 | { | 2593 | { |
2597 | return true; | 2594 | return true; |
@@ -2599,14 +2596,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2599 | return false; | 2596 | return false; |
2600 | } | 2597 | } |
2601 | 2598 | ||
2602 | public void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) | 2599 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) |
2603 | { | 2600 | { |
2604 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | 2601 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); |
2605 | packet.AgentData.TransactionID = LLUUID.Random(); | 2602 | packet.AgentData.TransactionID = UUID.Random(); |
2606 | packet.AgentData.AgentID = this.AgentId; | 2603 | packet.AgentData.AgentID = this.AgentId; |
2607 | packet.AgentData.SessionID = this.SessionId; | 2604 | packet.AgentData.SessionID = this.SessionId; |
2608 | packet.MethodData.Invoice = invoice; | 2605 | packet.MethodData.Invoice = invoice; |
2609 | packet.MethodData.Method = Helpers.StringToField("setaccess"); | 2606 | packet.MethodData.Method = Utils.StringToBytes("setaccess"); |
2610 | 2607 | ||
2611 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; | 2608 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; |
2612 | 2609 | ||
@@ -2616,12 +2613,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2616 | } | 2613 | } |
2617 | int j = 0; | 2614 | int j = 0; |
2618 | 2615 | ||
2619 | returnblock[j].Parameter = Helpers.StringToField(estateID.ToString()); j++; | 2616 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; |
2620 | returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++; | 2617 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++; |
2621 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | 2618 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
2622 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | 2619 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
2623 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | 2620 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
2624 | returnblock[j].Parameter = Helpers.StringToField(EstateManagers.Length.ToString()); j++; | 2621 | returnblock[j].Parameter = Utils.StringToBytes(EstateManagers.Length.ToString()); j++; |
2625 | for (int i = 0; i < EstateManagers.Length; i++) | 2622 | for (int i = 0; i < EstateManagers.Length; i++) |
2626 | { | 2623 | { |
2627 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; | 2624 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; |
@@ -2631,25 +2628,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2631 | this.OutPacket(packet, ThrottleOutPacketType.Task); | 2628 | this.OutPacket(packet, ThrottleOutPacketType.Task); |
2632 | } | 2629 | } |
2633 | 2630 | ||
2634 | public void SendBannedUserList(LLUUID invoice, EstateBan[] bl, uint estateID) | 2631 | public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID) |
2635 | { | 2632 | { |
2636 | List<LLUUID>BannedUsers = new List<LLUUID>(); | 2633 | List<UUID>BannedUsers = new List<UUID>(); |
2637 | 2634 | ||
2638 | for (int i = 0; i < bl.Length; i++) | 2635 | for (int i = 0; i < bl.Length; i++) |
2639 | { | 2636 | { |
2640 | if (bl[i] == null) | 2637 | if (bl[i] == null) |
2641 | continue; | 2638 | continue; |
2642 | if (bl[i].bannedUUID == LLUUID.Zero) | 2639 | if (bl[i].bannedUUID == UUID.Zero) |
2643 | continue; | 2640 | continue; |
2644 | BannedUsers.Add(bl[i].bannedUUID); | 2641 | BannedUsers.Add(bl[i].bannedUUID); |
2645 | } | 2642 | } |
2646 | 2643 | ||
2647 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | 2644 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); |
2648 | packet.AgentData.TransactionID = LLUUID.Random(); | 2645 | packet.AgentData.TransactionID = UUID.Random(); |
2649 | packet.AgentData.AgentID = this.AgentId; | 2646 | packet.AgentData.AgentID = this.AgentId; |
2650 | packet.AgentData.SessionID = this.SessionId; | 2647 | packet.AgentData.SessionID = this.SessionId; |
2651 | packet.MethodData.Invoice = invoice; | 2648 | packet.MethodData.Invoice = invoice; |
2652 | packet.MethodData.Method = Helpers.StringToField("setaccess"); | 2649 | packet.MethodData.Method = Utils.StringToBytes("setaccess"); |
2653 | 2650 | ||
2654 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count]; | 2651 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count]; |
2655 | 2652 | ||
@@ -2659,14 +2656,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2659 | } | 2656 | } |
2660 | int j = 0; | 2657 | int j = 0; |
2661 | 2658 | ||
2662 | returnblock[j].Parameter = Helpers.StringToField(estateID.ToString()); j++; | 2659 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; |
2663 | returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; | 2660 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; |
2664 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | 2661 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
2665 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | 2662 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
2666 | returnblock[j].Parameter = Helpers.StringToField(BannedUsers.Count.ToString()); j++; | 2663 | returnblock[j].Parameter = Utils.StringToBytes(BannedUsers.Count.ToString()); j++; |
2667 | returnblock[j].Parameter = Helpers.StringToField("0"); j++; | 2664 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
2668 | 2665 | ||
2669 | foreach (LLUUID banned in BannedUsers) | 2666 | foreach (UUID banned in BannedUsers) |
2670 | { | 2667 | { |
2671 | returnblock[j].Parameter = banned.GetBytes(); j++; | 2668 | returnblock[j].Parameter = banned.GetBytes(); j++; |
2672 | } | 2669 | } |
@@ -2696,34 +2693,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2696 | rinfoblk.TerrainRaiseLimit = args.terrainRaiseLimit; | 2693 | rinfoblk.TerrainRaiseLimit = args.terrainRaiseLimit; |
2697 | rinfoblk.UseEstateSun = args.useEstateSun; | 2694 | rinfoblk.UseEstateSun = args.useEstateSun; |
2698 | rinfoblk.WaterHeight = args.waterHeight; | 2695 | rinfoblk.WaterHeight = args.waterHeight; |
2699 | rinfoblk.SimName = Helpers.StringToField(args.simName); | 2696 | rinfoblk.SimName = Utils.StringToBytes(args.simName); |
2700 | 2697 | ||
2701 | rinfopack.RegionInfo = rinfoblk; | 2698 | rinfopack.RegionInfo = rinfoblk; |
2702 | 2699 | ||
2703 | this.OutPacket(rinfopack, ThrottleOutPacketType.Task); | 2700 | this.OutPacket(rinfopack, ThrottleOutPacketType.Task); |
2704 | } | 2701 | } |
2705 | 2702 | ||
2706 | public void SendEstateCovenantInformation(LLUUID covenant) | 2703 | public void SendEstateCovenantInformation(UUID covenant) |
2707 | { | 2704 | { |
2708 | EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); | 2705 | EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); |
2709 | EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); | 2706 | EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); |
2710 | edata.CovenantID = covenant; | 2707 | edata.CovenantID = covenant; |
2711 | edata.CovenantTimestamp = 0; | 2708 | edata.CovenantTimestamp = 0; |
2712 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) | 2709 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) |
2713 | edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 2710 | edata.EstateOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
2714 | else | 2711 | else |
2715 | edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 2712 | edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; |
2716 | edata.EstateName = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.EstateName); | 2713 | edata.EstateName = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateName); |
2717 | einfopack.Data = edata; | 2714 | einfopack.Data = edata; |
2718 | this.OutPacket(einfopack, ThrottleOutPacketType.Task); | 2715 | this.OutPacket(einfopack, ThrottleOutPacketType.Task); |
2719 | } | 2716 | } |
2720 | 2717 | ||
2721 | public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail) | 2718 | public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail) |
2722 | { | 2719 | { |
2723 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | 2720 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); |
2724 | packet.MethodData.Invoice = invoice; | 2721 | packet.MethodData.Invoice = invoice; |
2725 | packet.AgentData.TransactionID = LLUUID.Random(); | 2722 | packet.AgentData.TransactionID = UUID.Random(); |
2726 | packet.MethodData.Method = Helpers.StringToField("estateupdateinfo"); | 2723 | packet.MethodData.Method = Utils.StringToBytes("estateupdateinfo"); |
2727 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[10]; | 2724 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[10]; |
2728 | 2725 | ||
2729 | for (int i = 0; i < 10; i++) | 2726 | for (int i = 0; i < 10; i++) |
@@ -2732,22 +2729,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2732 | } | 2729 | } |
2733 | 2730 | ||
2734 | //Sending Estate Settings | 2731 | //Sending Estate Settings |
2735 | returnblock[0].Parameter = Helpers.StringToField(estateName); | 2732 | returnblock[0].Parameter = Utils.StringToBytes(estateName); |
2736 | // TODO: remove this cruft once MasterAvatar is fully deprecated | 2733 | // TODO: remove this cruft once MasterAvatar is fully deprecated |
2737 | // | 2734 | // |
2738 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) | 2735 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) |
2739 | returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.EstateSettings.EstateOwner.ToString()); | 2736 | returnblock[1].Parameter = Utils.StringToBytes(m_scene.RegionInfo.EstateSettings.EstateOwner.ToString()); |
2740 | else | 2737 | else |
2741 | returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); | 2738 | returnblock[1].Parameter = Utils.StringToBytes(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); |
2742 | returnblock[2].Parameter = Helpers.StringToField(estateID.ToString()); | 2739 | returnblock[2].Parameter = Utils.StringToBytes(estateID.ToString()); |
2743 | 2740 | ||
2744 | returnblock[3].Parameter = Helpers.StringToField(estateFlags.ToString()); | 2741 | returnblock[3].Parameter = Utils.StringToBytes(estateFlags.ToString()); |
2745 | returnblock[4].Parameter = Helpers.StringToField(sunPosition.ToString()); | 2742 | returnblock[4].Parameter = Utils.StringToBytes(sunPosition.ToString()); |
2746 | returnblock[5].Parameter = Helpers.StringToField(parentEstate.ToString()); | 2743 | returnblock[5].Parameter = Utils.StringToBytes(parentEstate.ToString()); |
2747 | returnblock[6].Parameter = Helpers.StringToField(covenant.ToString()); | 2744 | returnblock[6].Parameter = Utils.StringToBytes(covenant.ToString()); |
2748 | returnblock[7].Parameter = Helpers.StringToField("1160895077"); // what is this? | 2745 | returnblock[7].Parameter = Utils.StringToBytes("1160895077"); // what is this? |
2749 | returnblock[8].Parameter = Helpers.StringToField("1"); // what is this? | 2746 | returnblock[8].Parameter = Utils.StringToBytes("1"); // what is this? |
2750 | returnblock[9].Parameter = Helpers.StringToField(abuseEmail); | 2747 | returnblock[9].Parameter = Utils.StringToBytes(abuseEmail); |
2751 | 2748 | ||
2752 | packet.ParamList = returnblock; | 2749 | packet.ParamList = returnblock; |
2753 | packet.Header.Reliable = false; | 2750 | packet.Header.Reliable = false; |
@@ -2783,7 +2780,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2783 | 2780 | ||
2784 | updatePacket.ParcelData.Bitmap = landData.Bitmap; | 2781 | updatePacket.ParcelData.Bitmap = landData.Bitmap; |
2785 | 2782 | ||
2786 | updatePacket.ParcelData.Desc = Helpers.StringToField(landData.Description); | 2783 | updatePacket.ParcelData.Desc = Utils.StringToBytes(landData.Description); |
2787 | updatePacket.ParcelData.Category = (byte)landData.Category; | 2784 | updatePacket.ParcelData.Category = (byte)landData.Category; |
2788 | updatePacket.ParcelData.ClaimDate = landData.ClaimDate; | 2785 | updatePacket.ParcelData.ClaimDate = landData.ClaimDate; |
2789 | updatePacket.ParcelData.ClaimPrice = landData.ClaimPrice; | 2786 | updatePacket.ParcelData.ClaimPrice = landData.ClaimPrice; |
@@ -2802,9 +2799,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2802 | } | 2799 | } |
2803 | updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale; | 2800 | updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale; |
2804 | updatePacket.ParcelData.MediaID = landData.MediaID; | 2801 | updatePacket.ParcelData.MediaID = landData.MediaID; |
2805 | updatePacket.ParcelData.MediaURL = Helpers.StringToField(landData.MediaURL); | 2802 | updatePacket.ParcelData.MediaURL = Utils.StringToBytes(landData.MediaURL); |
2806 | updatePacket.ParcelData.MusicURL = Helpers.StringToField(landData.MusicURL); | 2803 | updatePacket.ParcelData.MusicURL = Utils.StringToBytes(landData.MusicURL); |
2807 | updatePacket.ParcelData.Name = Helpers.StringToField(landData.Name); | 2804 | updatePacket.ParcelData.Name = Utils.StringToBytes(landData.Name); |
2808 | updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented | 2805 | updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented |
2809 | updatePacket.ParcelData.OtherCount = 0; //unemplemented | 2806 | updatePacket.ParcelData.OtherCount = 0; //unemplemented |
2810 | updatePacket.ParcelData.OtherPrims = landData.OtherPrims; | 2807 | updatePacket.ParcelData.OtherPrims = landData.OtherPrims; |
@@ -2851,7 +2848,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2851 | remote_client.OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task); | 2848 | remote_client.OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task); |
2852 | } | 2849 | } |
2853 | 2850 | ||
2854 | public void SendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID) | 2851 | public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID) |
2855 | { | 2852 | { |
2856 | ParcelAccessListReplyPacket replyPacket = (ParcelAccessListReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply); | 2853 | ParcelAccessListReplyPacket replyPacket = (ParcelAccessListReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply); |
2857 | replyPacket.Data.AgentID = this.AgentId; | 2854 | replyPacket.Data.AgentID = this.AgentId; |
@@ -2860,7 +2857,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2860 | replyPacket.Data.SequenceID = 0; | 2857 | replyPacket.Data.SequenceID = 0; |
2861 | 2858 | ||
2862 | List<ParcelAccessListReplyPacket.ListBlock> list = new List<ParcelAccessListReplyPacket.ListBlock>(); | 2859 | List<ParcelAccessListReplyPacket.ListBlock> list = new List<ParcelAccessListReplyPacket.ListBlock>(); |
2863 | foreach (LLUUID avatar in avatars) | 2860 | foreach (UUID avatar in avatars) |
2864 | { | 2861 | { |
2865 | ParcelAccessListReplyPacket.ListBlock block = new ParcelAccessListReplyPacket.ListBlock(); | 2862 | ParcelAccessListReplyPacket.ListBlock block = new ParcelAccessListReplyPacket.ListBlock(); |
2866 | block.Flags = accessFlag; | 2863 | block.Flags = accessFlag; |
@@ -2913,7 +2910,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2913 | } | 2910 | } |
2914 | } | 2911 | } |
2915 | 2912 | ||
2916 | public void SendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount) | 2913 | public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount) |
2917 | { | 2914 | { |
2918 | int notifyCount = ownersAndCount.Count; | 2915 | int notifyCount = ownersAndCount.Count; |
2919 | ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply); | 2916 | ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply); |
@@ -2933,7 +2930,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2933 | = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount]; | 2930 | = new ParcelObjectOwnersReplyPacket.DataBlock[notifyCount]; |
2934 | 2931 | ||
2935 | int num = 0; | 2932 | int num = 0; |
2936 | foreach (LLUUID owner in ownersAndCount.Keys) | 2933 | foreach (UUID owner in ownersAndCount.Keys) |
2937 | { | 2934 | { |
2938 | dataBlock[num] = new ParcelObjectOwnersReplyPacket.DataBlock(); | 2935 | dataBlock[num] = new ParcelObjectOwnersReplyPacket.DataBlock(); |
2939 | dataBlock[num].Count = ownersAndCount[owner]; | 2936 | dataBlock[num].Count = ownersAndCount[owner]; |
@@ -2959,9 +2956,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2959 | 2956 | ||
2960 | #region Helper Methods | 2957 | #region Helper Methods |
2961 | 2958 | ||
2962 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, LLVector3 pos, | 2959 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, Vector3 pos, |
2963 | LLVector3 velocity, | 2960 | Vector3 velocity, |
2964 | LLQuaternion rotation) | 2961 | Quaternion rotation) |
2965 | { | 2962 | { |
2966 | byte[] bytes = new byte[60]; | 2963 | byte[] bytes = new byte[60]; |
2967 | int i = 0; | 2964 | int i = 0; |
@@ -2992,13 +2989,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2992 | internDirec = new Vector3(velocity.X, velocity.Y, velocity.Z); | 2989 | internDirec = new Vector3(velocity.X, velocity.Y, velocity.Z); |
2993 | 2990 | ||
2994 | internDirec = internDirec / 128.0f; | 2991 | internDirec = internDirec / 128.0f; |
2995 | internDirec.x += 1; | 2992 | internDirec.X += 1; |
2996 | internDirec.y += 1; | 2993 | internDirec.Y += 1; |
2997 | internDirec.z += 1; | 2994 | internDirec.Z += 1; |
2998 | 2995 | ||
2999 | InternVelocityX = (ushort)(32768 * internDirec.x); | 2996 | InternVelocityX = (ushort)(32768 * internDirec.X); |
3000 | InternVelocityY = (ushort)(32768 * internDirec.y); | 2997 | InternVelocityY = (ushort)(32768 * internDirec.Y); |
3001 | InternVelocityZ = (ushort)(32768 * internDirec.z); | 2998 | InternVelocityZ = (ushort)(32768 * internDirec.Z); |
3002 | 2999 | ||
3003 | ushort ac = 32767; | 3000 | ushort ac = 32767; |
3004 | bytes[i++] = (byte)(InternVelocityX % 256); | 3001 | bytes[i++] = (byte)(InternVelocityX % 256); |
@@ -3054,10 +3051,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3054 | /// <param name="rotation"></param> | 3051 | /// <param name="rotation"></param> |
3055 | /// <returns></returns> | 3052 | /// <returns></returns> |
3056 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID, | 3053 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID, |
3057 | LLVector3 position, | 3054 | Vector3 position, |
3058 | LLQuaternion rotation, | 3055 | Quaternion rotation, |
3059 | LLVector3 velocity, | 3056 | Vector3 velocity, |
3060 | LLVector3 rotationalvelocity, | 3057 | Vector3 rotationalvelocity, |
3061 | byte state) | 3058 | byte state) |
3062 | { | 3059 | { |
3063 | uint ID = localID; | 3060 | uint ID = localID; |
@@ -3082,13 +3079,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3082 | Vector3 vel = new Vector3(velocity.X, velocity.Y, velocity.Z); | 3079 | Vector3 vel = new Vector3(velocity.X, velocity.Y, velocity.Z); |
3083 | 3080 | ||
3084 | vel = vel / 128.0f; | 3081 | vel = vel / 128.0f; |
3085 | vel.x += 1; | 3082 | vel.X += 1; |
3086 | vel.y += 1; | 3083 | vel.Y += 1; |
3087 | vel.z += 1; | 3084 | vel.Z += 1; |
3088 | //vel | 3085 | //vel |
3089 | velx = (ushort)(32768 * (vel.x)); | 3086 | velx = (ushort)(32768 * (vel.X)); |
3090 | vely = (ushort)(32768 * (vel.y)); | 3087 | vely = (ushort)(32768 * (vel.Y)); |
3091 | velz = (ushort)(32768 * (vel.z)); | 3088 | velz = (ushort)(32768 * (vel.Z)); |
3092 | 3089 | ||
3093 | bytes[i++] = (byte)(velx % 256); | 3090 | bytes[i++] = (byte)(velx % 256); |
3094 | bytes[i++] = (byte)((velx >> 8) % 256); | 3091 | bytes[i++] = (byte)((velx >> 8) % 256); |
@@ -3126,13 +3123,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3126 | Vector3 rvel = new Vector3(rotationalvelocity.X, rotationalvelocity.Y, rotationalvelocity.Z); | 3123 | Vector3 rvel = new Vector3(rotationalvelocity.X, rotationalvelocity.Y, rotationalvelocity.Z); |
3127 | 3124 | ||
3128 | rvel = rvel / 128.0f; | 3125 | rvel = rvel / 128.0f; |
3129 | rvel.x += 1; | 3126 | rvel.X += 1; |
3130 | rvel.y += 1; | 3127 | rvel.Y += 1; |
3131 | rvel.z += 1; | 3128 | rvel.Z += 1; |
3132 | //vel | 3129 | //vel |
3133 | rvelx = (ushort)(32768 * (rvel.x)); | 3130 | rvelx = (ushort)(32768 * (rvel.X)); |
3134 | rvely = (ushort)(32768 * (rvel.y)); | 3131 | rvely = (ushort)(32768 * (rvel.Y)); |
3135 | rvelz = (ushort)(32768 * (rvel.z)); | 3132 | rvelz = (ushort)(32768 * (rvel.Z)); |
3136 | 3133 | ||
3137 | bytes[i++] = (byte)(rvelx % 256); | 3134 | bytes[i++] = (byte)(rvelx % 256); |
3138 | bytes[i++] = (byte)((rvelx >> 8) % 256); | 3135 | bytes[i++] = (byte)((rvelx >> 8) % 256); |
@@ -3204,11 +3201,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3204 | objdata.NameValue = new byte[0]; | 3201 | objdata.NameValue = new byte[0]; |
3205 | objdata.Text = new byte[0]; | 3202 | objdata.Text = new byte[0]; |
3206 | objdata.TextColor = new byte[4]; | 3203 | objdata.TextColor = new byte[4]; |
3207 | objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0); | 3204 | objdata.JointAxisOrAnchor = new Vector3(0, 0, 0); |
3208 | objdata.JointPivot = new LLVector3(0, 0, 0); | 3205 | objdata.JointPivot = new Vector3(0, 0, 0); |
3209 | objdata.Material = 3; | 3206 | objdata.Material = 3; |
3210 | objdata.TextureAnim = new byte[0]; | 3207 | objdata.TextureAnim = new byte[0]; |
3211 | objdata.Sound = LLUUID.Zero; | 3208 | objdata.Sound = UUID.Zero; |
3212 | objdata.State = 0; | 3209 | objdata.State = 0; |
3213 | objdata.Data = new byte[0]; | 3210 | objdata.Data = new byte[0]; |
3214 | 3211 | ||
@@ -3224,7 +3221,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3224 | public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) | 3221 | public ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) |
3225 | { | 3222 | { |
3226 | ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); | 3223 | ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); |
3227 | // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); | 3224 | // new OpenMetaverse.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); |
3228 | 3225 | ||
3229 | SetDefaultAvatarPacketValues(ref objdata); | 3226 | SetDefaultAvatarPacketValues(ref objdata); |
3230 | objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); | 3227 | objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); |
@@ -3233,18 +3230,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3233 | objdata.PathScaleX = 100; | 3230 | objdata.PathScaleX = 100; |
3234 | objdata.PathScaleY = 100; | 3231 | objdata.PathScaleY = 100; |
3235 | objdata.ParentID = 0; | 3232 | objdata.ParentID = 0; |
3236 | objdata.OwnerID = LLUUID.Zero; | 3233 | objdata.OwnerID = UUID.Zero; |
3237 | objdata.Scale = new LLVector3(1, 1, 1); | 3234 | objdata.Scale = new Vector3(1, 1, 1); |
3238 | objdata.PCode = (byte)PCode.Avatar; | 3235 | objdata.PCode = (byte)PCode.Avatar; |
3239 | if (textureEntry != null) | 3236 | if (textureEntry != null) |
3240 | { | 3237 | { |
3241 | objdata.TextureEntry = textureEntry; | 3238 | objdata.TextureEntry = textureEntry; |
3242 | } | 3239 | } |
3243 | LLVector3 pos = new LLVector3(objdata.ObjectData, 16); | 3240 | Vector3 pos = new Vector3(objdata.ObjectData, 16); |
3244 | pos.X = 100f; | 3241 | pos.X = 100f; |
3245 | objdata.ID = 8880000; | 3242 | objdata.ID = 8880000; |
3246 | objdata.NameValue = Helpers.StringToField("FirstName STRING RW SV Test \nLastName STRING RW SV User "); | 3243 | objdata.NameValue = Utils.StringToBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User "); |
3247 | //LLVector3 pos2 = new LLVector3(100f, 100f, 23f); | 3244 | //Vector3 pos2 = new Vector3(100f, 100f, 23f); |
3248 | //objdata.FullID=user.AgentId; | 3245 | //objdata.FullID=user.AgentId; |
3249 | byte[] pb = pos.GetBytes(); | 3246 | byte[] pb = pos.GetBytes(); |
3250 | Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length); | 3247 | Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length); |
@@ -3264,12 +3261,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3264 | objdata.NameValue = new byte[0]; | 3261 | objdata.NameValue = new byte[0]; |
3265 | objdata.Text = new byte[0]; | 3262 | objdata.Text = new byte[0]; |
3266 | objdata.TextColor = new byte[4]; | 3263 | objdata.TextColor = new byte[4]; |
3267 | objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0); | 3264 | objdata.JointAxisOrAnchor = new Vector3(0, 0, 0); |
3268 | objdata.JointPivot = new LLVector3(0, 0, 0); | 3265 | objdata.JointPivot = new Vector3(0, 0, 0); |
3269 | objdata.Material = 4; | 3266 | objdata.Material = 4; |
3270 | objdata.TextureAnim = new byte[0]; | 3267 | objdata.TextureAnim = new byte[0]; |
3271 | objdata.Sound = LLUUID.Zero; | 3268 | objdata.Sound = UUID.Zero; |
3272 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); | 3269 | Primitive.TextureEntry ntex = new Primitive.TextureEntry(new UUID("00000000-0000-0000-5005-000000000005")); |
3273 | objdata.TextureEntry = ntex.ToBytes(); | 3270 | objdata.TextureEntry = ntex.ToBytes(); |
3274 | 3271 | ||
3275 | objdata.State = 0; | 3272 | objdata.State = 0; |
@@ -3285,15 +3282,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3285 | objdata.ObjectData[64] = 189; | 3282 | objdata.ObjectData[64] = 189; |
3286 | } | 3283 | } |
3287 | 3284 | ||
3288 | public void SendNameReply(LLUUID profileId, string firstname, string lastname) | 3285 | public void SendNameReply(UUID profileId, string firstname, string lastname) |
3289 | { | 3286 | { |
3290 | UUIDNameReplyPacket packet = (UUIDNameReplyPacket)PacketPool.Instance.GetPacket(PacketType.UUIDNameReply); | 3287 | UUIDNameReplyPacket packet = (UUIDNameReplyPacket)PacketPool.Instance.GetPacket(PacketType.UUIDNameReply); |
3291 | // TODO: don't create new blocks if recycling an old packet | 3288 | // TODO: don't create new blocks if recycling an old packet |
3292 | packet.UUIDNameBlock = new UUIDNameReplyPacket.UUIDNameBlockBlock[1]; | 3289 | packet.UUIDNameBlock = new UUIDNameReplyPacket.UUIDNameBlockBlock[1]; |
3293 | packet.UUIDNameBlock[0] = new UUIDNameReplyPacket.UUIDNameBlockBlock(); | 3290 | packet.UUIDNameBlock[0] = new UUIDNameReplyPacket.UUIDNameBlockBlock(); |
3294 | packet.UUIDNameBlock[0].ID = profileId; | 3291 | packet.UUIDNameBlock[0].ID = profileId; |
3295 | packet.UUIDNameBlock[0].FirstName = Helpers.StringToField(firstname); | 3292 | packet.UUIDNameBlock[0].FirstName = Utils.StringToBytes(firstname); |
3296 | packet.UUIDNameBlock[0].LastName = Helpers.StringToField(lastname); | 3293 | packet.UUIDNameBlock[0].LastName = Utils.StringToBytes(lastname); |
3297 | 3294 | ||
3298 | OutPacket(packet, ThrottleOutPacketType.Task); | 3295 | OutPacket(packet, ThrottleOutPacketType.Task); |
3299 | } | 3296 | } |
@@ -3382,7 +3379,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3382 | { | 3379 | { |
3383 | for (int i = 0; i < ogpack.ObjectData.Length; i++) | 3380 | for (int i = 0; i < ogpack.ObjectData.Length; i++) |
3384 | { | 3381 | { |
3385 | handlerObjectGroupRequest(this, ogpack.AgentData.GroupID, ogpack.ObjectData[i].ObjectLocalID, LLUUID.Zero); | 3382 | handlerObjectGroupRequest(this, ogpack.AgentData.GroupID, ogpack.ObjectData[i].ObjectLocalID, UUID.Zero); |
3386 | } | 3383 | } |
3387 | } | 3384 | } |
3388 | return true; | 3385 | return true; |
@@ -3415,7 +3412,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3415 | return true; | 3412 | return true; |
3416 | } | 3413 | } |
3417 | 3414 | ||
3418 | public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) | 3415 | public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) |
3419 | { | 3416 | { |
3420 | ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); | 3417 | ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); |
3421 | scriptQuestion.Data = new ScriptQuestionPacket.DataBlock(); | 3418 | scriptQuestion.Data = new ScriptQuestionPacket.DataBlock(); |
@@ -3423,8 +3420,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3423 | scriptQuestion.Data.TaskID = taskID; | 3420 | scriptQuestion.Data.TaskID = taskID; |
3424 | scriptQuestion.Data.ItemID = itemID; | 3421 | scriptQuestion.Data.ItemID = itemID; |
3425 | scriptQuestion.Data.Questions = question; | 3422 | scriptQuestion.Data.Questions = question; |
3426 | scriptQuestion.Data.ObjectName = Helpers.StringToField(taskName); | 3423 | scriptQuestion.Data.ObjectName = Utils.StringToBytes(taskName); |
3427 | scriptQuestion.Data.ObjectOwner = Helpers.StringToField(ownerName); | 3424 | scriptQuestion.Data.ObjectOwner = Utils.StringToBytes(ownerName); |
3428 | 3425 | ||
3429 | OutPacket(scriptQuestion, ThrottleOutPacketType.Task); | 3426 | OutPacket(scriptQuestion, ThrottleOutPacketType.Task); |
3430 | } | 3427 | } |
@@ -3433,11 +3430,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3433 | { | 3430 | { |
3434 | } | 3431 | } |
3435 | 3432 | ||
3436 | public LLUUID GetDefaultAnimation(string name) | 3433 | public UUID GetDefaultAnimation(string name) |
3437 | { | 3434 | { |
3438 | if (m_defaultAnimations.ContainsKey(name)) | 3435 | if (m_defaultAnimations.ContainsKey(name)) |
3439 | return m_defaultAnimations[name]; | 3436 | return m_defaultAnimations[name]; |
3440 | return LLUUID.Zero; | 3437 | return UUID.Zero; |
3441 | } | 3438 | } |
3442 | 3439 | ||
3443 | /// <summary> | 3440 | /// <summary> |
@@ -3496,7 +3493,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3496 | { | 3493 | { |
3497 | cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); | 3494 | cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); |
3498 | cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex; | 3495 | cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex; |
3499 | cachedresp.WearableData[i].TextureID = LLUUID.Zero; | 3496 | cachedresp.WearableData[i].TextureID = UUID.Zero; |
3500 | cachedresp.WearableData[i].HostName = new byte[0]; | 3497 | cachedresp.WearableData[i].HostName = new byte[0]; |
3501 | } | 3498 | } |
3502 | 3499 | ||
@@ -3526,19 +3523,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3526 | if (part == null) | 3523 | if (part == null) |
3527 | { | 3524 | { |
3528 | // It's a ghost! tell the client to delete it from view. | 3525 | // It's a ghost! tell the client to delete it from view. |
3529 | simClient.SendKillObject(Scene.RegionInfo.RegionHandle, | 3526 | simClient.SendKiPrimitive(Scene.RegionInfo.RegionHandle, |
3530 | localId); | 3527 | localId); |
3531 | } | 3528 | } |
3532 | else | 3529 | else |
3533 | { | 3530 | { |
3534 | // LLUUID partId = part.UUID; | 3531 | // UUID partId = part.UUID; |
3535 | UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; | 3532 | UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; |
3536 | UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; | 3533 | UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; |
3537 | 3534 | ||
3538 | switch (block.Type) | 3535 | switch (block.Type) |
3539 | { | 3536 | { |
3540 | case 1: | 3537 | case 1: |
3541 | LLVector3 pos1 = new LLVector3(block.Data, 0); | 3538 | Vector3 pos1 = new Vector3(block.Data, 0); |
3542 | 3539 | ||
3543 | handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; | 3540 | handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; |
3544 | if (handlerUpdatePrimSinglePosition != null) | 3541 | if (handlerUpdatePrimSinglePosition != null) |
@@ -3548,7 +3545,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3548 | } | 3545 | } |
3549 | break; | 3546 | break; |
3550 | case 2: | 3547 | case 2: |
3551 | LLQuaternion rot1 = new LLQuaternion(block.Data, 0, true); | 3548 | Quaternion rot1 = new Quaternion(block.Data, 0, true); |
3552 | 3549 | ||
3553 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; | 3550 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; |
3554 | if (handlerUpdatePrimSingleRotation != null) | 3551 | if (handlerUpdatePrimSingleRotation != null) |
@@ -3559,7 +3556,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3559 | break; | 3556 | break; |
3560 | case 3: | 3557 | case 3: |
3561 | 3558 | ||
3562 | LLQuaternion rot2 = new LLQuaternion(block.Data, 12, true); | 3559 | Quaternion rot2 = new Quaternion(block.Data, 12, true); |
3563 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; | 3560 | handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; |
3564 | if (handlerUpdatePrimSingleRotation != null) | 3561 | if (handlerUpdatePrimSingleRotation != null) |
3565 | { | 3562 | { |
@@ -3569,8 +3566,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3569 | break; | 3566 | break; |
3570 | case 5: | 3567 | case 5: |
3571 | 3568 | ||
3572 | LLVector3 scale1 = new LLVector3(block.Data, 12); | 3569 | Vector3 scale1 = new Vector3(block.Data, 12); |
3573 | LLVector3 pos11 = new LLVector3(block.Data, 0); | 3570 | Vector3 pos11 = new Vector3(block.Data, 0); |
3574 | 3571 | ||
3575 | handlerUpdatePrimScale = OnUpdatePrimScale; | 3572 | handlerUpdatePrimScale = OnUpdatePrimScale; |
3576 | if (handlerUpdatePrimScale != null) | 3573 | if (handlerUpdatePrimScale != null) |
@@ -3586,7 +3583,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3586 | } | 3583 | } |
3587 | break; | 3584 | break; |
3588 | case 9: | 3585 | case 9: |
3589 | LLVector3 pos2 = new LLVector3(block.Data, 0); | 3586 | Vector3 pos2 = new Vector3(block.Data, 0); |
3590 | 3587 | ||
3591 | handlerUpdateVector = OnUpdatePrimGroupPosition; | 3588 | handlerUpdateVector = OnUpdatePrimGroupPosition; |
3592 | 3589 | ||
@@ -3597,7 +3594,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3597 | } | 3594 | } |
3598 | break; | 3595 | break; |
3599 | case 10: | 3596 | case 10: |
3600 | LLQuaternion rot3 = new LLQuaternion(block.Data, 0, true); | 3597 | Quaternion rot3 = new Quaternion(block.Data, 0, true); |
3601 | 3598 | ||
3602 | handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; | 3599 | handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; |
3603 | if (handlerUpdatePrimRotation != null) | 3600 | if (handlerUpdatePrimRotation != null) |
@@ -3607,8 +3604,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3607 | } | 3604 | } |
3608 | break; | 3605 | break; |
3609 | case 11: | 3606 | case 11: |
3610 | LLVector3 pos3 = new LLVector3(block.Data, 0); | 3607 | Vector3 pos3 = new Vector3(block.Data, 0); |
3611 | LLQuaternion rot4 = new LLQuaternion(block.Data, 12, true); | 3608 | Quaternion rot4 = new Quaternion(block.Data, 12, true); |
3612 | 3609 | ||
3613 | handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; | 3610 | handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; |
3614 | if (handlerUpdatePrimGroupRotation != null) | 3611 | if (handlerUpdatePrimGroupRotation != null) |
@@ -3619,8 +3616,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3619 | } | 3616 | } |
3620 | break; | 3617 | break; |
3621 | case 13: | 3618 | case 13: |
3622 | LLVector3 scale2 = new LLVector3(block.Data, 12); | 3619 | Vector3 scale2 = new Vector3(block.Data, 12); |
3623 | LLVector3 pos4 = new LLVector3(block.Data, 0); | 3620 | Vector3 pos4 = new Vector3(block.Data, 0); |
3624 | 3621 | ||
3625 | handlerUpdatePrimScale = OnUpdatePrimScale; | 3622 | handlerUpdatePrimScale = OnUpdatePrimScale; |
3626 | if (handlerUpdatePrimScale != null) | 3623 | if (handlerUpdatePrimScale != null) |
@@ -3638,8 +3635,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3638 | } | 3635 | } |
3639 | break; | 3636 | break; |
3640 | case 29: | 3637 | case 29: |
3641 | LLVector3 scale5 = new LLVector3(block.Data, 12); | 3638 | Vector3 scale5 = new Vector3(block.Data, 12); |
3642 | LLVector3 pos5 = new LLVector3(block.Data, 0); | 3639 | Vector3 pos5 = new Vector3(block.Data, 0); |
3643 | 3640 | ||
3644 | handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale; | 3641 | handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale; |
3645 | if (handlerUpdatePrimGroupScale != null) | 3642 | if (handlerUpdatePrimGroupScale != null) |
@@ -3655,8 +3652,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3655 | } | 3652 | } |
3656 | break; | 3653 | break; |
3657 | case 21: | 3654 | case 21: |
3658 | LLVector3 scale6 = new LLVector3(block.Data, 12); | 3655 | Vector3 scale6 = new Vector3(block.Data, 12); |
3659 | LLVector3 pos6 = new LLVector3(block.Data, 0); | 3656 | Vector3 pos6 = new Vector3(block.Data, 0); |
3660 | 3657 | ||
3661 | handlerUpdatePrimScale = OnUpdatePrimScale; | 3658 | handlerUpdatePrimScale = OnUpdatePrimScale; |
3662 | if (handlerUpdatePrimScale != null) | 3659 | if (handlerUpdatePrimScale != null) |
@@ -3691,7 +3688,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3691 | mapReply.LayerData[0].Left = 0; | 3688 | mapReply.LayerData[0].Left = 0; |
3692 | mapReply.LayerData[0].Top = 30000; | 3689 | mapReply.LayerData[0].Top = 30000; |
3693 | mapReply.LayerData[0].Right = 30000; | 3690 | mapReply.LayerData[0].Right = 30000; |
3694 | mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-1111-9999-000000000006"); | 3691 | mapReply.LayerData[0].ImageID = new UUID("00000000-0000-1111-9999-000000000006"); |
3695 | mapReply.Header.Zerocoded = true; | 3692 | mapReply.Header.Zerocoded = true; |
3696 | OutPacket(mapReply, ThrottleOutPacketType.Land); | 3693 | OutPacket(mapReply, ThrottleOutPacketType.Land); |
3697 | } | 3694 | } |
@@ -3717,7 +3714,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3717 | mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]); | 3714 | mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]); |
3718 | mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]); | 3715 | mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]); |
3719 | mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]); | 3716 | mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]); |
3720 | mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]); | 3717 | mbReply.Data[iii].MapImageID = new UUID((string)mp["map-image-id"]); |
3721 | mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]); | 3718 | mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]); |
3722 | mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]); | 3719 | mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]); |
3723 | mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]); | 3720 | mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]); |
@@ -3776,7 +3773,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3776 | if (m_moneyBalance + debit >= 0) | 3773 | if (m_moneyBalance + debit >= 0) |
3777 | { | 3774 | { |
3778 | m_moneyBalance += debit; | 3775 | m_moneyBalance += debit; |
3779 | SendMoneyBalance(LLUUID.Zero, true, Helpers.StringToField("Poof Poof!"), m_moneyBalance); | 3776 | SendMoneyBalance(UUID.Zero, true, Utils.StringToBytes("Poof Poof!"), m_moneyBalance); |
3780 | return true; | 3777 | return true; |
3781 | } | 3778 | } |
3782 | else | 3779 | else |
@@ -3791,7 +3788,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3791 | /// <param name="gmMethod"></param> | 3788 | /// <param name="gmMethod"></param> |
3792 | /// <param name="gmInvoice"></param> | 3789 | /// <param name="gmInvoice"></param> |
3793 | /// <param name="gmParams"></param> | 3790 | /// <param name="gmParams"></param> |
3794 | public void DecipherGenericMessage(string gmMethod, LLUUID gmInvoice, GenericMessagePacket.ParamListBlock[] gmParams) | 3791 | public void DecipherGenericMessage(string gmMethod, UUID gmInvoice, GenericMessagePacket.ParamListBlock[] gmParams) |
3795 | { | 3792 | { |
3796 | switch (gmMethod) | 3793 | switch (gmMethod) |
3797 | { | 3794 | { |
@@ -3804,9 +3801,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3804 | try | 3801 | try |
3805 | { | 3802 | { |
3806 | Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY); | 3803 | Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY); |
3807 | locx = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[0].Parameter)) - (float)regionX; | 3804 | locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - (float)regionX; |
3808 | locy = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[1].Parameter)) - (float)regionY; | 3805 | locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - (float)regionY; |
3809 | locz = Convert.ToSingle(Helpers.FieldToUTF8String(gmParams[2].Parameter)); | 3806 | locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter)); |
3810 | } | 3807 | } |
3811 | catch (InvalidCastException) | 3808 | catch (InvalidCastException) |
3812 | { | 3809 | { |
@@ -3817,7 +3814,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3817 | handlerAutoPilotGo = OnAutoPilotGo; | 3814 | handlerAutoPilotGo = OnAutoPilotGo; |
3818 | if (handlerAutoPilotGo != null) | 3815 | if (handlerAutoPilotGo != null) |
3819 | { | 3816 | { |
3820 | handlerAutoPilotGo(0, new LLVector3(locx, locy, locz), this); | 3817 | handlerAutoPilotGo(0, new Vector3(locx, locy, locz), this); |
3821 | } | 3818 | } |
3822 | m_log.InfoFormat("[CLIENT]: Client Requests autopilot to position <{0},{1},{2}>", locx, locy, locz); | 3819 | m_log.InfoFormat("[CLIENT]: Client Requests autopilot to position <{0},{1},{2}>", locx, locy, locz); |
3823 | 3820 | ||
@@ -3839,7 +3836,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3839 | /// Entryway from the client to the simulator | 3836 | /// Entryway from the client to the simulator |
3840 | /// all UDP packets from the client will end up here | 3837 | /// all UDP packets from the client will end up here |
3841 | /// </summary> | 3838 | /// </summary> |
3842 | /// <param name="Pack">libsecondlife.packet</param> | 3839 | /// <param name="Pack">OpenMetaverse.packet</param> |
3843 | public void ProcessInPacket(Packet Pack) | 3840 | public void ProcessInPacket(Packet Pack) |
3844 | { | 3841 | { |
3845 | // check if we've got a local packet handler for this packet.type. See RegisterLocalPacketHandlers() | 3842 | // check if we've got a local packet handler for this packet.type. See RegisterLocalPacketHandlers() |
@@ -3858,7 +3855,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3858 | case PacketType.GenericMessage: | 3855 | case PacketType.GenericMessage: |
3859 | GenericMessagePacket gmpack = (GenericMessagePacket)Pack; | 3856 | GenericMessagePacket gmpack = (GenericMessagePacket)Pack; |
3860 | 3857 | ||
3861 | DecipherGenericMessage(Helpers.FieldToUTF8String(gmpack.MethodData.Method), gmpack.MethodData.Invoice, gmpack.ParamList); | 3858 | DecipherGenericMessage(Utils.BytesToString(gmpack.MethodData.Method), gmpack.MethodData.Invoice, gmpack.ParamList); |
3862 | 3859 | ||
3863 | break; | 3860 | break; |
3864 | case PacketType.AvatarPropertiesRequest: | 3861 | case PacketType.AvatarPropertiesRequest: |
@@ -3877,8 +3874,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3877 | string fromName = String.Empty; //ClientAvatar.firstname + " " + ClientAvatar.lastname; | 3874 | string fromName = String.Empty; //ClientAvatar.firstname + " " + ClientAvatar.lastname; |
3878 | byte[] message = inchatpack.ChatData.Message; | 3875 | byte[] message = inchatpack.ChatData.Message; |
3879 | byte type = inchatpack.ChatData.Type; | 3876 | byte type = inchatpack.ChatData.Type; |
3880 | LLVector3 fromPos = new LLVector3(); // ClientAvatar.Pos; | 3877 | Vector3 fromPos = new Vector3(); // ClientAvatar.Pos; |
3881 | // LLUUID fromAgentID = AgentId; | 3878 | // UUID fromAgentID = AgentId; |
3882 | 3879 | ||
3883 | int channel = inchatpack.ChatData.Channel; | 3880 | int channel = inchatpack.ChatData.Channel; |
3884 | 3881 | ||
@@ -3887,7 +3884,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3887 | OSChatMessage args = new OSChatMessage(); | 3884 | OSChatMessage args = new OSChatMessage(); |
3888 | args.Channel = channel; | 3885 | args.Channel = channel; |
3889 | args.From = fromName; | 3886 | args.From = fromName; |
3890 | args.Message = Helpers.FieldToUTF8String(message); | 3887 | args.Message = Utils.BytesToString(message); |
3891 | args.Type = (ChatTypeEnum)type; | 3888 | args.Type = (ChatTypeEnum)type; |
3892 | args.Position = fromPos; | 3889 | args.Position = fromPos; |
3893 | 3890 | ||
@@ -3908,8 +3905,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3908 | AvatarPropertiesUpdatePacket.PropertiesDataBlock Properties = Packet.PropertiesData; | 3905 | AvatarPropertiesUpdatePacket.PropertiesDataBlock Properties = Packet.PropertiesData; |
3909 | UserProfileData UserProfile = new UserProfileData(); | 3906 | UserProfileData UserProfile = new UserProfileData(); |
3910 | UserProfile.ID = AgentId; | 3907 | UserProfile.ID = AgentId; |
3911 | UserProfile.AboutText = Helpers.FieldToUTF8String(Properties.AboutText); | 3908 | UserProfile.AboutText = Utils.BytesToString(Properties.AboutText); |
3912 | UserProfile.FirstLifeAboutText = Helpers.FieldToUTF8String(Properties.FLAboutText); | 3909 | UserProfile.FirstLifeAboutText = Utils.BytesToString(Properties.FLAboutText); |
3913 | UserProfile.FirstLifeImage = Properties.FLImageID; | 3910 | UserProfile.FirstLifeImage = Properties.FLImageID; |
3914 | UserProfile.Image = Properties.ImageID; | 3911 | UserProfile.Image = Properties.ImageID; |
3915 | 3912 | ||
@@ -3926,9 +3923,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3926 | OSChatMessage args = new OSChatMessage(); | 3923 | OSChatMessage args = new OSChatMessage(); |
3927 | args.Channel = ch; | 3924 | args.Channel = ch; |
3928 | args.From = String.Empty; | 3925 | args.From = String.Empty; |
3929 | args.Message = Helpers.FieldToUTF8String(msg); | 3926 | args.Message = Utils.BytesToString(msg); |
3930 | args.Type = ChatTypeEnum.Shout; | 3927 | args.Type = ChatTypeEnum.Shout; |
3931 | args.Position = new LLVector3(); | 3928 | args.Position = new Vector3(); |
3932 | args.Scene = Scene; | 3929 | args.Scene = Scene; |
3933 | args.Sender = this; | 3930 | args.Sender = this; |
3934 | handlerChatFromViewer2 = OnChatFromViewer; | 3931 | handlerChatFromViewer2 = OnChatFromViewer; |
@@ -3940,7 +3937,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3940 | case PacketType.ImprovedInstantMessage: | 3937 | case PacketType.ImprovedInstantMessage: |
3941 | ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; | 3938 | ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; |
3942 | string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); | 3939 | string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); |
3943 | string IMmessage = Helpers.FieldToUTF8String(msgpack.MessageBlock.Message); | 3940 | string IMmessage = Utils.BytesToString(msgpack.MessageBlock.Message); |
3944 | handlerInstantMessage = OnInstantMessage; | 3941 | handlerInstantMessage = OnInstantMessage; |
3945 | 3942 | ||
3946 | if (handlerInstantMessage != null) | 3943 | if (handlerInstantMessage != null) |
@@ -3959,10 +3956,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3959 | AcceptFriendshipPacket afriendpack = (AcceptFriendshipPacket)Pack; | 3956 | AcceptFriendshipPacket afriendpack = (AcceptFriendshipPacket)Pack; |
3960 | 3957 | ||
3961 | // My guess is this is the folder to stick the calling card into | 3958 | // My guess is this is the folder to stick the calling card into |
3962 | List<LLUUID> callingCardFolders = new List<LLUUID>(); | 3959 | List<UUID> callingCardFolders = new List<UUID>(); |
3963 | 3960 | ||
3964 | LLUUID agentID = afriendpack.AgentData.AgentID; | 3961 | UUID agentID = afriendpack.AgentData.AgentID; |
3965 | LLUUID transactionID = afriendpack.TransactionBlock.TransactionID; | 3962 | UUID transactionID = afriendpack.TransactionBlock.TransactionID; |
3966 | 3963 | ||
3967 | for (int fi = 0; fi < afriendpack.FolderData.Length; fi++) | 3964 | for (int fi = 0; fi < afriendpack.FolderData.Length; fi++) |
3968 | { | 3965 | { |
@@ -3977,8 +3974,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3977 | break; | 3974 | break; |
3978 | case PacketType.TerminateFriendship: | 3975 | case PacketType.TerminateFriendship: |
3979 | TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack; | 3976 | TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack; |
3980 | LLUUID listOwnerAgentID = tfriendpack.AgentData.AgentID; | 3977 | UUID listOwnerAgentID = tfriendpack.AgentData.AgentID; |
3981 | LLUUID exFriendID = tfriendpack.ExBlock.OtherID; | 3978 | UUID exFriendID = tfriendpack.ExBlock.OtherID; |
3982 | 3979 | ||
3983 | handlerTerminateFriendship = OnTerminateFriendship; | 3980 | handlerTerminateFriendship = OnTerminateFriendship; |
3984 | if (handlerTerminateFriendship != null) | 3981 | if (handlerTerminateFriendship != null) |
@@ -4130,8 +4127,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4130 | { | 4127 | { |
4131 | DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; | 4128 | DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack; |
4132 | 4129 | ||
4133 | LLUUID itemID = detachtoInv.ObjectData.ItemID; | 4130 | UUID itemID = detachtoInv.ObjectData.ItemID; |
4134 | // LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; | 4131 | // UUID ATTACH_agentID = detachtoInv.ObjectData.AgentID; |
4135 | 4132 | ||
4136 | handlerDetachAttachmentIntoInv(itemID, this); | 4133 | handlerDetachAttachmentIntoInv(itemID, this); |
4137 | } | 4134 | } |
@@ -4266,13 +4263,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4266 | AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; | 4263 | AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; |
4267 | AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData; | 4264 | AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData; |
4268 | AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data; | 4265 | AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data; |
4269 | //Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name)); | 4266 | //Console.WriteLine("Agent Sends:" + Utils.BytesToString(querydata.Name)); |
4270 | 4267 | ||
4271 | handlerAvatarPickerRequest = OnAvatarPickerRequest; | 4268 | handlerAvatarPickerRequest = OnAvatarPickerRequest; |
4272 | if (handlerAvatarPickerRequest != null) | 4269 | if (handlerAvatarPickerRequest != null) |
4273 | { | 4270 | { |
4274 | handlerAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID, | 4271 | handlerAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID, |
4275 | Helpers.FieldToUTF8String(querydata.Name)); | 4272 | Utils.BytesToString(querydata.Name)); |
4276 | } | 4273 | } |
4277 | break; | 4274 | break; |
4278 | case PacketType.AgentDataUpdateRequest: | 4275 | case PacketType.AgentDataUpdateRequest: |
@@ -4613,8 +4610,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4613 | { | 4610 | { |
4614 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; | 4611 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; |
4615 | 4612 | ||
4616 | LLUUID AgentID = newobjPerms.AgentData.AgentID; | 4613 | UUID AgentID = newobjPerms.AgentData.AgentID; |
4617 | LLUUID SessionID = newobjPerms.AgentData.SessionID; | 4614 | UUID SessionID = newobjPerms.AgentData.SessionID; |
4618 | 4615 | ||
4619 | handlerObjectPermissions = null; | 4616 | handlerObjectPermissions = null; |
4620 | 4617 | ||
@@ -4654,7 +4651,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4654 | { | 4651 | { |
4655 | for (int i = 0; i < undoitem.ObjectData.Length; i++) | 4652 | for (int i = 0; i < undoitem.ObjectData.Length; i++) |
4656 | { | 4653 | { |
4657 | LLUUID objiD = undoitem.ObjectData[i].ObjectID; | 4654 | UUID objiD = undoitem.ObjectData[i].ObjectID; |
4658 | handlerOnUndo = OnUndo; | 4655 | handlerOnUndo = OnUndo; |
4659 | if (handlerOnUndo != null) | 4656 | if (handlerOnUndo != null) |
4660 | { | 4657 | { |
@@ -4762,15 +4759,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4762 | // | 4759 | // |
4763 | if (transfer.TransferInfo.SourceType == 3) | 4760 | if (transfer.TransferInfo.SourceType == 3) |
4764 | { | 4761 | { |
4765 | LLUUID taskID = null; | 4762 | UUID taskID = null; |
4766 | LLUUID itemID = null; | 4763 | UUID itemID = null; |
4767 | LLUUID requestID = null; | 4764 | UUID requestID = null; |
4768 | taskID = new LLUUID(transfer.TransferInfo.Params, 48); | 4765 | taskID = new UUID(transfer.TransferInfo.Params, 48); |
4769 | itemID = new LLUUID(transfer.TransferInfo.Params, 64); | 4766 | itemID = new UUID(transfer.TransferInfo.Params, 64); |
4770 | requestID = new LLUUID(transfer.TransferInfo.Params, 80); | 4767 | requestID = new UUID(transfer.TransferInfo.Params, 80); |
4771 | if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions())) | 4768 | if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions())) |
4772 | { | 4769 | { |
4773 | if (taskID != LLUUID.Zero) // Prim | 4770 | if (taskID != UUID.Zero) // Prim |
4774 | { | 4771 | { |
4775 | SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); | 4772 | SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); |
4776 | if (part == null) | 4773 | if (part == null) |
@@ -4831,7 +4828,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4831 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; | 4828 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; |
4832 | // Console.WriteLine("upload request " + Pack.ToString()); | 4829 | // Console.WriteLine("upload request " + Pack.ToString()); |
4833 | // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString()); | 4830 | // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString()); |
4834 | LLUUID temp = LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); | 4831 | UUID temp = UUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); |
4835 | 4832 | ||
4836 | handlerAssetUploadRequest = OnAssetUploadRequest; | 4833 | handlerAssetUploadRequest = OnAssetUploadRequest; |
4837 | 4834 | ||
@@ -5019,7 +5016,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5019 | //Console.WriteLine(Pack.ToString()); | 5016 | //Console.WriteLine(Pack.ToString()); |
5020 | /*for (int i = 0; i < update.InventoryData.Length; i++) | 5017 | /*for (int i = 0; i < update.InventoryData.Length; i++) |
5021 | { | 5018 | { |
5022 | if (update.InventoryData[i].TransactionID != LLUUID.Zero) | 5019 | if (update.InventoryData[i].TransactionID != UUID.Zero) |
5023 | { | 5020 | { |
5024 | AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId)); | 5021 | AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionId)); |
5025 | if (asset != null) | 5022 | if (asset != null) |
@@ -5244,9 +5241,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5244 | break; | 5241 | break; |
5245 | case PacketType.TeleportLandmarkRequest: | 5242 | case PacketType.TeleportLandmarkRequest: |
5246 | TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; | 5243 | TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; |
5247 | LLUUID lmid = tpReq.Info.LandmarkID; | 5244 | UUID lmid = tpReq.Info.LandmarkID; |
5248 | AssetLandmark lm; | 5245 | AssetLandmark lm; |
5249 | if (lmid != LLUUID.Zero) | 5246 | if (lmid != UUID.Zero) |
5250 | { | 5247 | { |
5251 | AssetBase lma = m_assetCache.GetAsset(lmid, false); | 5248 | AssetBase lma = m_assetCache.GetAsset(lmid, false); |
5252 | 5249 | ||
@@ -5441,14 +5438,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5441 | 5438 | ||
5442 | args.AuthBuyerID = parcelPropertiesPacket.ParcelData.AuthBuyerID; | 5439 | args.AuthBuyerID = parcelPropertiesPacket.ParcelData.AuthBuyerID; |
5443 | args.Category = (Parcel.ParcelCategory)parcelPropertiesPacket.ParcelData.Category; | 5440 | args.Category = (Parcel.ParcelCategory)parcelPropertiesPacket.ParcelData.Category; |
5444 | args.Desc = Helpers.FieldToUTF8String(parcelPropertiesPacket.ParcelData.Desc); | 5441 | args.Desc = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Desc); |
5445 | args.GroupID = parcelPropertiesPacket.ParcelData.GroupID; | 5442 | args.GroupID = parcelPropertiesPacket.ParcelData.GroupID; |
5446 | args.LandingType = parcelPropertiesPacket.ParcelData.LandingType; | 5443 | args.LandingType = parcelPropertiesPacket.ParcelData.LandingType; |
5447 | args.MediaAutoScale = parcelPropertiesPacket.ParcelData.MediaAutoScale; | 5444 | args.MediaAutoScale = parcelPropertiesPacket.ParcelData.MediaAutoScale; |
5448 | args.MediaID = parcelPropertiesPacket.ParcelData.MediaID; | 5445 | args.MediaID = parcelPropertiesPacket.ParcelData.MediaID; |
5449 | args.MediaURL = Helpers.FieldToUTF8String(parcelPropertiesPacket.ParcelData.MediaURL); | 5446 | args.MediaURL = Utils.BytesToString(parcelPropertiesPacket.ParcelData.MediaURL); |
5450 | args.MusicURL = Helpers.FieldToUTF8String(parcelPropertiesPacket.ParcelData.MusicURL); | 5447 | args.MusicURL = Utils.BytesToString(parcelPropertiesPacket.ParcelData.MusicURL); |
5451 | args.Name = Helpers.FieldToUTF8String(parcelPropertiesPacket.ParcelData.Name); | 5448 | args.Name = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Name); |
5452 | args.ParcelFlags = parcelPropertiesPacket.ParcelData.ParcelFlags; | 5449 | args.ParcelFlags = parcelPropertiesPacket.ParcelData.ParcelFlags; |
5453 | args.PassHours = parcelPropertiesPacket.ParcelData.PassHours; | 5450 | args.PassHours = parcelPropertiesPacket.ParcelData.PassHours; |
5454 | args.PassPrice = parcelPropertiesPacket.ParcelData.PassPrice; | 5451 | args.PassPrice = parcelPropertiesPacket.ParcelData.PassPrice; |
@@ -5504,11 +5501,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5504 | 5501 | ||
5505 | ParcelReturnObjectsPacket parcelReturnObjects = (ParcelReturnObjectsPacket)Pack; | 5502 | ParcelReturnObjectsPacket parcelReturnObjects = (ParcelReturnObjectsPacket)Pack; |
5506 | 5503 | ||
5507 | LLUUID[] puserselectedOwnerIDs = new LLUUID[parcelReturnObjects.OwnerIDs.Length]; | 5504 | UUID[] puserselectedOwnerIDs = new UUID[parcelReturnObjects.OwnerIDs.Length]; |
5508 | for (int parceliterator = 0; parceliterator < parcelReturnObjects.OwnerIDs.Length; parceliterator++) | 5505 | for (int parceliterator = 0; parceliterator < parcelReturnObjects.OwnerIDs.Length; parceliterator++) |
5509 | puserselectedOwnerIDs[parceliterator] = parcelReturnObjects.OwnerIDs[parceliterator].OwnerID; | 5506 | puserselectedOwnerIDs[parceliterator] = parcelReturnObjects.OwnerIDs[parceliterator].OwnerID; |
5510 | 5507 | ||
5511 | LLUUID[] puserselectedTaskIDs = new LLUUID[parcelReturnObjects.TaskIDs.Length]; | 5508 | UUID[] puserselectedTaskIDs = new UUID[parcelReturnObjects.TaskIDs.Length]; |
5512 | 5509 | ||
5513 | for (int parceliterator = 0; parceliterator < parcelReturnObjects.TaskIDs.Length; parceliterator++) | 5510 | for (int parceliterator = 0; parceliterator < parcelReturnObjects.TaskIDs.Length; parceliterator++) |
5514 | puserselectedTaskIDs[parceliterator] = parcelReturnObjects.TaskIDs[parceliterator].TaskID; | 5511 | puserselectedTaskIDs[parceliterator] = parcelReturnObjects.TaskIDs[parceliterator].TaskID; |
@@ -5528,7 +5525,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5528 | case PacketType.EstateOwnerMessage: | 5525 | case PacketType.EstateOwnerMessage: |
5529 | EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; | 5526 | EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; |
5530 | 5527 | ||
5531 | switch (Helpers.FieldToUTF8String(messagePacket.MethodData.Method)) | 5528 | switch (Utils.BytesToString(messagePacket.MethodData.Method)) |
5532 | { | 5529 | { |
5533 | case "getinfo": | 5530 | case "getinfo": |
5534 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) | 5531 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) |
@@ -5541,9 +5538,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5541 | { | 5538 | { |
5542 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), | 5539 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), |
5543 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), | 5540 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), |
5544 | Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[4].Parameter))), | 5541 | Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))), |
5545 | (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter)), | 5542 | (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)), |
5546 | Convert.ToInt16(Helpers.FieldToUTF8String(messagePacket.ParamList[6].Parameter)), | 5543 | Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), |
5547 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); | 5544 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); |
5548 | 5545 | ||
5549 | } | 5546 | } |
@@ -5554,11 +5551,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5554 | // { | 5551 | // { |
5555 | // foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5552 | // foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
5556 | // { | 5553 | // { |
5557 | // string s = Helpers.FieldToUTF8String(block.Parameter); | 5554 | // string s = Utils.BytesToString(block.Parameter); |
5558 | // string[] splitField = s.Split(' '); | 5555 | // string[] splitField = s.Split(' '); |
5559 | // if (splitField.Length == 2) | 5556 | // if (splitField.Length == 2) |
5560 | // { | 5557 | // { |
5561 | // LLUUID tempUUID = new LLUUID(splitField[1]); | 5558 | // UUID tempUUID = new UUID(splitField[1]); |
5562 | // OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID); | 5559 | // OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID); |
5563 | // } | 5560 | // } |
5564 | // } | 5561 | // } |
@@ -5569,12 +5566,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5569 | { | 5566 | { |
5570 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5567 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
5571 | { | 5568 | { |
5572 | string s = Helpers.FieldToUTF8String(block.Parameter); | 5569 | string s = Utils.BytesToString(block.Parameter); |
5573 | string[] splitField = s.Split(' '); | 5570 | string[] splitField = s.Split(' '); |
5574 | if (splitField.Length == 2) | 5571 | if (splitField.Length == 2) |
5575 | { | 5572 | { |
5576 | Int16 corner = Convert.ToInt16(splitField[0]); | 5573 | Int16 corner = Convert.ToInt16(splitField[0]); |
5577 | LLUUID textureUUID = new LLUUID(splitField[1]); | 5574 | UUID textureUUID = new UUID(splitField[1]); |
5578 | 5575 | ||
5579 | OnSetEstateTerrainDetailTexture(this, corner, textureUUID); | 5576 | OnSetEstateTerrainDetailTexture(this, corner, textureUUID); |
5580 | } | 5577 | } |
@@ -5587,7 +5584,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5587 | { | 5584 | { |
5588 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5585 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
5589 | { | 5586 | { |
5590 | string s = Helpers.FieldToUTF8String(block.Parameter); | 5587 | string s = Utils.BytesToString(block.Parameter); |
5591 | string[] splitField = s.Split(' '); | 5588 | string[] splitField = s.Split(' '); |
5592 | if (splitField.Length == 3) | 5589 | if (splitField.Length == 3) |
5593 | { | 5590 | { |
@@ -5615,21 +5612,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5615 | try | 5612 | try |
5616 | { | 5613 | { |
5617 | string tmp; | 5614 | string tmp; |
5618 | tmp = Helpers.FieldToUTF8String(messagePacket.ParamList[0].Parameter); | 5615 | tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); |
5619 | if (!tmp.Contains(".")) tmp += ".00"; | 5616 | if (!tmp.Contains(".")) tmp += ".00"; |
5620 | float WaterHeight = (float)Convert.ToDecimal(tmp); | 5617 | float WaterHeight = (float)Convert.ToDecimal(tmp); |
5621 | tmp = Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter); | 5618 | tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); |
5622 | if (!tmp.Contains(".")) tmp += ".00"; | 5619 | if (!tmp.Contains(".")) tmp += ".00"; |
5623 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); | 5620 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); |
5624 | tmp = Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter); | 5621 | tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); |
5625 | if (!tmp.Contains(".")) tmp += ".00"; | 5622 | if (!tmp.Contains(".")) tmp += ".00"; |
5626 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); | 5623 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); |
5627 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); | 5624 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); |
5628 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); | 5625 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); |
5629 | float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter)); | 5626 | float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)); |
5630 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); | 5627 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); |
5631 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); | 5628 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); |
5632 | float EstateSunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[8].Parameter)); | 5629 | float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter)); |
5633 | 5630 | ||
5634 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); | 5631 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); |
5635 | 5632 | ||
@@ -5649,7 +5646,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5649 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5646 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
5650 | { | 5647 | { |
5651 | float timeSeconds = 0; | 5648 | float timeSeconds = 0; |
5652 | Helpers.TryParse(Helpers.FieldToUTF8String(block.Parameter), out timeSeconds); | 5649 | Utils.TryParseSingle(Utils.BytesToString(block.Parameter), out timeSeconds); |
5653 | timeSeconds = (int)timeSeconds; | 5650 | timeSeconds = (int)timeSeconds; |
5654 | OnEstateRestartSimRequest(this, (int)timeSeconds); | 5651 | OnEstateRestartSimRequest(this, (int)timeSeconds); |
5655 | 5652 | ||
@@ -5661,7 +5658,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5661 | { | 5658 | { |
5662 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5659 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
5663 | { | 5660 | { |
5664 | LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter)); | 5661 | UUID newCovenantID = new UUID(Utils.BytesToString(block.Parameter)); |
5665 | OnEstateChangeCovenantRequest(this, newCovenantID); | 5662 | OnEstateChangeCovenantRequest(this, newCovenantID); |
5666 | } | 5663 | } |
5667 | } | 5664 | } |
@@ -5669,19 +5666,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5669 | case "estateaccessdelta": // Estate access delta manages the banlist and allow list too. | 5666 | case "estateaccessdelta": // Estate access delta manages the banlist and allow list too. |
5670 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) | 5667 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) |
5671 | { | 5668 | { |
5672 | int estateAccessType = Convert.ToInt16(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter)); | 5669 | int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter)); |
5673 | OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter))); | 5670 | OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter))); |
5674 | 5671 | ||
5675 | } | 5672 | } |
5676 | break; | 5673 | break; |
5677 | case "simulatormessage": | 5674 | case "simulatormessage": |
5678 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) | 5675 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) |
5679 | { | 5676 | { |
5680 | LLUUID invoice = messagePacket.MethodData.Invoice; | 5677 | UUID invoice = messagePacket.MethodData.Invoice; |
5681 | LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); | 5678 | UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); |
5682 | string SenderName = Helpers.FieldToUTF8String(messagePacket.ParamList[3].Parameter); | 5679 | string SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter); |
5683 | string Message = Helpers.FieldToUTF8String(messagePacket.ParamList[4].Parameter); | 5680 | string Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter); |
5684 | LLUUID sessionID = messagePacket.AgentData.SessionID; | 5681 | UUID sessionID = messagePacket.AgentData.SessionID; |
5685 | OnSimulatorBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); | 5682 | OnSimulatorBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); |
5686 | } | 5683 | } |
5687 | break; | 5684 | break; |
@@ -5690,19 +5687,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5690 | { | 5687 | { |
5691 | if (messagePacket.ParamList.Length < 5) | 5688 | if (messagePacket.ParamList.Length < 5) |
5692 | break; | 5689 | break; |
5693 | LLUUID invoice = messagePacket.MethodData.Invoice; | 5690 | UUID invoice = messagePacket.MethodData.Invoice; |
5694 | LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); | 5691 | UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); |
5695 | string SenderName = Helpers.FieldToUTF8String(messagePacket.ParamList[3].Parameter); | 5692 | string SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter); |
5696 | string Message = Helpers.FieldToUTF8String(messagePacket.ParamList[4].Parameter); | 5693 | string Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter); |
5697 | LLUUID sessionID = messagePacket.AgentData.SessionID; | 5694 | UUID sessionID = messagePacket.AgentData.SessionID; |
5698 | OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); | 5695 | OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); |
5699 | } | 5696 | } |
5700 | break; | 5697 | break; |
5701 | case "setregiondebug": | 5698 | case "setregiondebug": |
5702 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) | 5699 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) |
5703 | { | 5700 | { |
5704 | LLUUID invoice = messagePacket.MethodData.Invoice; | 5701 | UUID invoice = messagePacket.MethodData.Invoice; |
5705 | LLUUID SenderID = messagePacket.AgentData.AgentID; | 5702 | UUID SenderID = messagePacket.AgentData.AgentID; |
5706 | bool scripted = convertParamStringToBool(messagePacket.ParamList[0].Parameter); | 5703 | bool scripted = convertParamStringToBool(messagePacket.ParamList[0].Parameter); |
5707 | bool collisionEvents = convertParamStringToBool(messagePacket.ParamList[1].Parameter); | 5704 | bool collisionEvents = convertParamStringToBool(messagePacket.ParamList[1].Parameter); |
5708 | bool physics = convertParamStringToBool(messagePacket.ParamList[2].Parameter); | 5705 | bool physics = convertParamStringToBool(messagePacket.ParamList[2].Parameter); |
@@ -5713,11 +5710,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5713 | case "teleporthomeuser": | 5710 | case "teleporthomeuser": |
5714 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) | 5711 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) |
5715 | { | 5712 | { |
5716 | LLUUID invoice = messagePacket.MethodData.Invoice; | 5713 | UUID invoice = messagePacket.MethodData.Invoice; |
5717 | LLUUID SenderID = messagePacket.AgentData.AgentID; | 5714 | UUID SenderID = messagePacket.AgentData.AgentID; |
5718 | LLUUID Prey = LLUUID.Zero; | 5715 | UUID Prey = UUID.Zero; |
5719 | 5716 | ||
5720 | Helpers.TryParse(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter), out Prey); | 5717 | UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[1].Parameter), out Prey); |
5721 | 5718 | ||
5722 | OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey); | 5719 | OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey); |
5723 | } | 5720 | } |
@@ -5750,10 +5747,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5750 | case "estatechangeinfo": | 5747 | case "estatechangeinfo": |
5751 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) | 5748 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) |
5752 | { | 5749 | { |
5753 | LLUUID invoice = messagePacket.MethodData.Invoice; | 5750 | UUID invoice = messagePacket.MethodData.Invoice; |
5754 | LLUUID SenderID = messagePacket.AgentData.AgentID; | 5751 | UUID SenderID = messagePacket.AgentData.AgentID; |
5755 | UInt32 param1 = Convert.ToUInt32(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter)); | 5752 | UInt32 param1 = Convert.ToUInt32(Utils.BytesToString(messagePacket.ParamList[1].Parameter)); |
5756 | UInt32 param2 = Convert.ToUInt32(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); | 5753 | UInt32 param2 = Convert.ToUInt32(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); |
5757 | 5754 | ||
5758 | handlerEstateChangeInfo = OnEstateChangeInfo; | 5755 | handlerEstateChangeInfo = OnEstateChangeInfo; |
5759 | if (handlerEstateChangeInfo != null) | 5756 | if (handlerEstateChangeInfo != null) |
@@ -5774,7 +5771,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5774 | handlerLandStatRequest = OnLandStatRequest; | 5771 | handlerLandStatRequest = OnLandStatRequest; |
5775 | if (handlerLandStatRequest != null) | 5772 | if (handlerLandStatRequest != null) |
5776 | { | 5773 | { |
5777 | handlerLandStatRequest(lsrp.RequestData.ParcelLocalID, lsrp.RequestData.ReportType, lsrp.RequestData.RequestFlags, Helpers.FieldToUTF8String(lsrp.RequestData.Filter), this); | 5774 | handlerLandStatRequest(lsrp.RequestData.ParcelLocalID, lsrp.RequestData.ReportType, lsrp.RequestData.RequestFlags, Utils.BytesToString(lsrp.RequestData.Filter), this); |
5778 | } | 5775 | } |
5779 | //int parcelID, uint reportType, uint requestflags, string filter | 5776 | //int parcelID, uint reportType, uint requestflags, string filter |
5780 | 5777 | ||
@@ -5813,7 +5810,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5813 | case PacketType.RequestGodlikePowers: | 5810 | case PacketType.RequestGodlikePowers: |
5814 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; | 5811 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; |
5815 | RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; | 5812 | RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; |
5816 | LLUUID token = rblock.Token; | 5813 | UUID token = rblock.Token; |
5817 | 5814 | ||
5818 | RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; | 5815 | RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; |
5819 | 5816 | ||
@@ -6086,7 +6083,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6086 | shape.PathTaperY = addPacket.ObjectData.PathTaperY; | 6083 | shape.PathTaperY = addPacket.ObjectData.PathTaperY; |
6087 | shape.PathTwist = addPacket.ObjectData.PathTwist; | 6084 | shape.PathTwist = addPacket.ObjectData.PathTwist; |
6088 | shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; | 6085 | shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; |
6089 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("89556747-24cb-43ed-920b-47caed15465f")); | 6086 | Primitive.TextureEntry ntex = new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f")); |
6090 | shape.TextureEntry = ntex.ToBytes(); | 6087 | shape.TextureEntry = ntex.ToBytes(); |
6091 | //shape.Textures = ntex; | 6088 | //shape.Textures = ntex; |
6092 | return shape; | 6089 | return shape; |
@@ -6099,7 +6096,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6099 | /// <param name="fromSessionID"></param> | 6096 | /// <param name="fromSessionID"></param> |
6100 | /// <param name="FromAvatarName"></param> | 6097 | /// <param name="FromAvatarName"></param> |
6101 | /// <param name="Message"></param> | 6098 | /// <param name="Message"></param> |
6102 | public void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) | 6099 | public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message) |
6103 | { | 6100 | { |
6104 | if (!ChildAgentStatus()) | 6101 | if (!ChildAgentStatus()) |
6105 | SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, (byte)1, (uint)Util.UnixTimeSinceEpoch()); | 6102 | SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, (byte)1, (uint)Util.UnixTimeSinceEpoch()); |
@@ -6122,7 +6119,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6122 | logReply.AgentData.SessionID = SessionId; | 6119 | logReply.AgentData.SessionID = SessionId; |
6123 | logReply.InventoryData = new LogoutReplyPacket.InventoryDataBlock[1]; | 6120 | logReply.InventoryData = new LogoutReplyPacket.InventoryDataBlock[1]; |
6124 | logReply.InventoryData[0] = new LogoutReplyPacket.InventoryDataBlock(); | 6121 | logReply.InventoryData[0] = new LogoutReplyPacket.InventoryDataBlock(); |
6125 | logReply.InventoryData[0].ItemID = LLUUID.Zero; | 6122 | logReply.InventoryData[0].ItemID = UUID.Zero; |
6126 | 6123 | ||
6127 | OutPacket(logReply, ThrottleOutPacketType.Task); | 6124 | OutPacket(logReply, ThrottleOutPacketType.Task); |
6128 | } | 6125 | } |
@@ -6135,7 +6132,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6135 | OutPacket(healthpacket, ThrottleOutPacketType.Task); | 6132 | OutPacket(healthpacket, ThrottleOutPacketType.Task); |
6136 | } | 6133 | } |
6137 | 6134 | ||
6138 | public void SendAgentOnline(LLUUID[] agentIDs) | 6135 | public void SendAgentOnline(UUID[] agentIDs) |
6139 | { | 6136 | { |
6140 | OnlineNotificationPacket onp = new OnlineNotificationPacket(); | 6137 | OnlineNotificationPacket onp = new OnlineNotificationPacket(); |
6141 | OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[agentIDs.Length]; | 6138 | OnlineNotificationPacket.AgentBlockBlock[] onpb = new OnlineNotificationPacket.AgentBlockBlock[agentIDs.Length]; |
@@ -6150,7 +6147,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6150 | OutPacket(onp, ThrottleOutPacketType.Task); | 6147 | OutPacket(onp, ThrottleOutPacketType.Task); |
6151 | } | 6148 | } |
6152 | 6149 | ||
6153 | public void SendAgentOffline(LLUUID[] agentIDs) | 6150 | public void SendAgentOffline(UUID[] agentIDs) |
6154 | { | 6151 | { |
6155 | OfflineNotificationPacket offp = new OfflineNotificationPacket(); | 6152 | OfflineNotificationPacket offp = new OfflineNotificationPacket(); |
6156 | OfflineNotificationPacket.AgentBlockBlock[] offpb = new OfflineNotificationPacket.AgentBlockBlock[agentIDs.Length]; | 6153 | OfflineNotificationPacket.AgentBlockBlock[] offpb = new OfflineNotificationPacket.AgentBlockBlock[agentIDs.Length]; |
@@ -6165,12 +6162,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6165 | OutPacket(offp, ThrottleOutPacketType.Task); | 6162 | OutPacket(offp, ThrottleOutPacketType.Task); |
6166 | } | 6163 | } |
6167 | 6164 | ||
6168 | public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, | 6165 | public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, |
6169 | LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) | 6166 | Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) |
6170 | { | 6167 | { |
6171 | AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); | 6168 | AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); |
6172 | avatarSitResponse.SitObject.ID = TargetID; | 6169 | avatarSitResponse.SitObject.ID = TargetID; |
6173 | if (CameraAtOffset != LLVector3.Zero) | 6170 | if (CameraAtOffset != Vector3.Zero) |
6174 | { | 6171 | { |
6175 | avatarSitResponse.SitTransform.CameraAtOffset = CameraAtOffset; | 6172 | avatarSitResponse.SitTransform.CameraAtOffset = CameraAtOffset; |
6176 | avatarSitResponse.SitTransform.CameraEyeOffset = CameraEyeOffset; | 6173 | avatarSitResponse.SitTransform.CameraEyeOffset = CameraEyeOffset; |
@@ -6183,7 +6180,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6183 | OutPacket(avatarSitResponse, ThrottleOutPacketType.Task); | 6180 | OutPacket(avatarSitResponse, ThrottleOutPacketType.Task); |
6184 | } | 6181 | } |
6185 | 6182 | ||
6186 | public void SendAdminResponse(LLUUID Token, uint AdminLevel) | 6183 | public void SendAdminResponse(UUID Token, uint AdminLevel) |
6187 | { | 6184 | { |
6188 | GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket(); | 6185 | GrantGodlikePowersPacket respondPacket = new GrantGodlikePowersPacket(); |
6189 | GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock(); | 6186 | GrantGodlikePowersPacket.GrantDataBlock gdb = new GrantGodlikePowersPacket.GrantDataBlock(); |
@@ -6210,7 +6207,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6210 | Group.Contribution = GroupMembership[i].contribution; | 6207 | Group.Contribution = GroupMembership[i].contribution; |
6211 | Group.GroupID = GroupMembership[i].GroupID; | 6208 | Group.GroupID = GroupMembership[i].GroupID; |
6212 | Group.GroupInsigniaID = GroupMembership[i].GroupPicture; | 6209 | Group.GroupInsigniaID = GroupMembership[i].GroupPicture; |
6213 | Group.GroupName = Helpers.StringToField(GroupMembership[i].groupName); | 6210 | Group.GroupName = Utils.StringToBytes(GroupMembership[i].groupName); |
6214 | Group.GroupPowers = GroupMembership[i].groupPowers; | 6211 | Group.GroupPowers = GroupMembership[i].groupPowers; |
6215 | Groups[i] = Group; | 6212 | Groups[i] = Group; |
6216 | Groupupdate.GroupData = Groups; | 6213 | Groupupdate.GroupData = Groups; |
@@ -6220,13 +6217,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6220 | OutPacket(Groupupdate, ThrottleOutPacketType.Task); | 6217 | OutPacket(Groupupdate, ThrottleOutPacketType.Task); |
6221 | 6218 | ||
6222 | } | 6219 | } |
6223 | public void SendGroupNameReply(LLUUID groupLLUID, string GroupName) | 6220 | public void SendGroupNameReply(UUID groupLLUID, string GroupName) |
6224 | { | 6221 | { |
6225 | UUIDGroupNameReplyPacket pack = new UUIDGroupNameReplyPacket(); | 6222 | UUIDGroupNameReplyPacket pack = new UUIDGroupNameReplyPacket(); |
6226 | UUIDGroupNameReplyPacket.UUIDNameBlockBlock[] uidnameblock = new UUIDGroupNameReplyPacket.UUIDNameBlockBlock[1]; | 6223 | UUIDGroupNameReplyPacket.UUIDNameBlockBlock[] uidnameblock = new UUIDGroupNameReplyPacket.UUIDNameBlockBlock[1]; |
6227 | UUIDGroupNameReplyPacket.UUIDNameBlockBlock uidnamebloc = new UUIDGroupNameReplyPacket.UUIDNameBlockBlock(); | 6224 | UUIDGroupNameReplyPacket.UUIDNameBlockBlock uidnamebloc = new UUIDGroupNameReplyPacket.UUIDNameBlockBlock(); |
6228 | uidnamebloc.ID = groupLLUID; | 6225 | uidnamebloc.ID = groupLLUID; |
6229 | uidnamebloc.GroupName = Helpers.StringToField(GroupName); | 6226 | uidnamebloc.GroupName = Utils.StringToBytes(GroupName); |
6230 | uidnameblock[0] = uidnamebloc; | 6227 | uidnameblock[0] = uidnamebloc; |
6231 | pack.UUIDNameBlock = uidnameblock; | 6228 | pack.UUIDNameBlock = uidnameblock; |
6232 | OutPacket(pack, ThrottleOutPacketType.Task); | 6229 | OutPacket(pack, ThrottleOutPacketType.Task); |
@@ -6251,15 +6248,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6251 | lsrepdb.Score = lsrpia[i].Score; | 6248 | lsrepdb.Score = lsrpia[i].Score; |
6252 | lsrepdb.TaskID = lsrpia[i].TaskID; | 6249 | lsrepdb.TaskID = lsrpia[i].TaskID; |
6253 | lsrepdb.TaskLocalID = lsrpia[i].TaskLocalID; | 6250 | lsrepdb.TaskLocalID = lsrpia[i].TaskLocalID; |
6254 | lsrepdb.TaskName = Helpers.StringToField(lsrpia[i].TaskName); | 6251 | lsrepdb.TaskName = Utils.StringToBytes(lsrpia[i].TaskName); |
6255 | lsrepdb.OwnerName = Helpers.StringToField(lsrpia[i].OwnerName); | 6252 | lsrepdb.OwnerName = Utils.StringToBytes(lsrpia[i].OwnerName); |
6256 | lsrepdba[i] = lsrepdb; | 6253 | lsrepdba[i] = lsrepdb; |
6257 | } | 6254 | } |
6258 | lsrp.ReportData = lsrepdba; | 6255 | lsrp.ReportData = lsrepdba; |
6259 | OutPacket(lsrp, ThrottleOutPacketType.Task); | 6256 | OutPacket(lsrp, ThrottleOutPacketType.Task); |
6260 | } | 6257 | } |
6261 | 6258 | ||
6262 | public void SendScriptRunningReply(LLUUID objectID, LLUUID itemID, bool running) | 6259 | public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) |
6263 | { | 6260 | { |
6264 | ScriptRunningReplyPacket scriptRunningReply = new ScriptRunningReplyPacket(); | 6261 | ScriptRunningReplyPacket scriptRunningReply = new ScriptRunningReplyPacket(); |
6265 | scriptRunningReply.Script.ObjectID = objectID; | 6262 | scriptRunningReply.Script.ObjectID = objectID; |
@@ -6310,8 +6307,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6310 | else | 6307 | else |
6311 | { | 6308 | { |
6312 | int processedLength = 0; | 6309 | int processedLength = 0; |
6313 | // libsecondlife hardcodes 1500 as the maximum data chunk size | 6310 | int maxChunkSize = Settings.MAX_PACKET_SIZE - 100; |
6314 | int maxChunkSize = 1250; | ||
6315 | int packetNumber = 0; | 6311 | int packetNumber = 0; |
6316 | 6312 | ||
6317 | while (processedLength < req.AssetInf.Data.Length) | 6313 | while (processedLength < req.AssetInf.Data.Length) |
@@ -6378,17 +6374,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6378 | OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown); | 6374 | OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown); |
6379 | } | 6375 | } |
6380 | 6376 | ||
6381 | public void SendParcelMediaUpdate(string mediaUrl, LLUUID mediaTextureID, | 6377 | public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, |
6382 | byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, | 6378 | byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, |
6383 | byte mediaLoop) | 6379 | byte mediaLoop) |
6384 | { | 6380 | { |
6385 | ParcelMediaUpdatePacket updatePacket = new ParcelMediaUpdatePacket(); | 6381 | ParcelMediaUpdatePacket updatePacket = new ParcelMediaUpdatePacket(); |
6386 | updatePacket.DataBlock.MediaURL = Helpers.StringToField(mediaUrl); | 6382 | updatePacket.DataBlock.MediaURL = Utils.StringToBytes(mediaUrl); |
6387 | updatePacket.DataBlock.MediaID = mediaTextureID; | 6383 | updatePacket.DataBlock.MediaID = mediaTextureID; |
6388 | updatePacket.DataBlock.MediaAutoScale = autoScale; | 6384 | updatePacket.DataBlock.MediaAutoScale = autoScale; |
6389 | 6385 | ||
6390 | updatePacket.DataBlockExtended.MediaType = Helpers.StringToField(mediaType); | 6386 | updatePacket.DataBlockExtended.MediaType = Utils.StringToBytes(mediaType); |
6391 | updatePacket.DataBlockExtended.MediaDesc = Helpers.StringToField(mediaDesc); | 6387 | updatePacket.DataBlockExtended.MediaDesc = Utils.StringToBytes(mediaDesc); |
6392 | updatePacket.DataBlockExtended.MediaWidth = mediaWidth; | 6388 | updatePacket.DataBlockExtended.MediaWidth = mediaWidth; |
6393 | updatePacket.DataBlockExtended.MediaWidth = mediaHeight; | 6389 | updatePacket.DataBlockExtended.MediaWidth = mediaHeight; |
6394 | updatePacket.DataBlockExtended.MediaLoop = mediaLoop; | 6390 | updatePacket.DataBlockExtended.MediaLoop = mediaLoop; |
@@ -6401,7 +6397,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6401 | 6397 | ||
6402 | #region Camera | 6398 | #region Camera |
6403 | 6399 | ||
6404 | public void SendSetFollowCamProperties (LLUUID objectID, SortedDictionary<int, float> parameters) | 6400 | public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters) |
6405 | { | 6401 | { |
6406 | SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties); | 6402 | SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties); |
6407 | packet.ObjectData.ObjectID = objectID; | 6403 | packet.ObjectData.ObjectID = objectID; |
@@ -6419,7 +6415,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6419 | OutPacket(packet, ThrottleOutPacketType.Task); | 6415 | OutPacket(packet, ThrottleOutPacketType.Task); |
6420 | } | 6416 | } |
6421 | 6417 | ||
6422 | public void SendClearFollowCamProperties (LLUUID objectID) | 6418 | public void SendClearFollowCamProperties (UUID objectID) |
6423 | { | 6419 | { |
6424 | ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties); | 6420 | ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties); |
6425 | packet.ObjectData.ObjectID = objectID; | 6421 | packet.ObjectData.ObjectID = objectID; |
@@ -6428,21 +6424,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6428 | 6424 | ||
6429 | #endregion | 6425 | #endregion |
6430 | 6426 | ||
6431 | public void SendRegionHandle(LLUUID regionID, ulong handle) { | 6427 | public void SendRegionHandle(UUID regionID, ulong handle) { |
6432 | RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply); | 6428 | RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply); |
6433 | reply.ReplyBlock.RegionID = regionID; | 6429 | reply.ReplyBlock.RegionID = regionID; |
6434 | reply.ReplyBlock.RegionHandle = handle; | 6430 | reply.ReplyBlock.RegionHandle = handle; |
6435 | OutPacket(reply, ThrottleOutPacketType.Land); | 6431 | OutPacket(reply, ThrottleOutPacketType.Land); |
6436 | } | 6432 | } |
6437 | 6433 | ||
6438 | public void SendParcelInfo(RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y) | 6434 | public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) |
6439 | { | 6435 | { |
6440 | ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply); | 6436 | ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply); |
6441 | reply.AgentData.AgentID = m_agentId; | 6437 | reply.AgentData.AgentID = m_agentId; |
6442 | reply.Data.ParcelID = parcelID; | 6438 | reply.Data.ParcelID = parcelID; |
6443 | reply.Data.OwnerID = land.OwnerID; | 6439 | reply.Data.OwnerID = land.OwnerID; |
6444 | reply.Data.Name = Helpers.StringToField(land.Name != null ? land.Name : ""); | 6440 | reply.Data.Name = Utils.StringToBytes(land.Name); |
6445 | reply.Data.Desc = Helpers.StringToField(land.Description != null ? land.Description : ""); | 6441 | reply.Data.Desc = Utils.StringToBytes(land.Description); |
6446 | reply.Data.ActualArea = land.Area; | 6442 | reply.Data.ActualArea = land.Area; |
6447 | reply.Data.BillableArea = land.Area; // TODO: what is this? | 6443 | reply.Data.BillableArea = land.Area; // TODO: what is this? |
6448 | 6444 | ||
@@ -6451,15 +6447,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6451 | ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + | 6447 | ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + |
6452 | ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); | 6448 | ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); |
6453 | 6449 | ||
6454 | LLVector3 pos = land.UserLocation; | 6450 | Vector3 pos = land.UserLocation; |
6455 | if (pos.Equals(LLVector3.Zero)) | 6451 | if (pos.Equals(Vector3.Zero)) |
6456 | { | 6452 | { |
6457 | pos = (land.AABBMax + land.AABBMin) * 0.5f; | 6453 | pos = (land.AABBMax + land.AABBMin) * 0.5f; |
6458 | } | 6454 | } |
6459 | reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x; | 6455 | reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x; |
6460 | reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y; | 6456 | reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y; |
6461 | reply.Data.GlobalZ = pos.Z; | 6457 | reply.Data.GlobalZ = pos.Z; |
6462 | reply.Data.SimName = Helpers.StringToField(info.RegionName != null ? info.RegionName : ""); | 6458 | reply.Data.SimName = Utils.StringToBytes(info.RegionName); |
6463 | reply.Data.SnapshotID = land.SnapshotID; | 6459 | reply.Data.SnapshotID = land.SnapshotID; |
6464 | reply.Data.Dwell = 0; // TODO: not implemented yet | 6460 | reply.Data.Dwell = 0; // TODO: not implemented yet |
6465 | reply.Data.SalePrice = land.SalePrice; | 6461 | reply.Data.SalePrice = land.SalePrice; |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index 551e7ab..eddee10 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | |||
@@ -33,8 +33,8 @@ using System.Net.Sockets; | |||
33 | using System.Threading; | 33 | using System.Threading; |
34 | using System.Timers; | 34 | using System.Timers; |
35 | using System.Reflection; | 35 | using System.Reflection; |
36 | using libsecondlife; | 36 | using OpenMetaverse; |
37 | using libsecondlife.Packets; | 37 | using OpenMetaverse.Packets; |
38 | using Timer = System.Timers.Timer; | 38 | using Timer = System.Timers.Timer; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Region.ClientStack.LindenUDP; | 40 | using OpenSim.Region.ClientStack.LindenUDP; |
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
44 | { | 44 | { |
45 | public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes); | 45 | public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes); |
46 | public delegate void PacketDrop(Packet pack, Object id); | 46 | public delegate void PacketDrop(Packet pack, Object id); |
47 | public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, LLUUID agentID, ThrottleOutPacketType throttlePacketType); | 47 | public delegate bool SynchronizeClientHandler(IScene scene, Packet packet, UUID agentID, ThrottleOutPacketType throttlePacketType); |
48 | 48 | ||
49 | public interface IPacketHandler | 49 | public interface IPacketHandler |
50 | { | 50 | { |
@@ -259,9 +259,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
259 | // acks being appended to the payload, just don't send | 259 | // acks being appended to the payload, just don't send |
260 | // any with them until libsl is fixed. | 260 | // any with them until libsl is fixed. |
261 | // | 261 | // |
262 | if (packet is libsecondlife.Packets.ViewerEffectPacket) | 262 | if (packet is OpenMetaverse.Packets.ViewerEffectPacket) |
263 | return; | 263 | return; |
264 | if (packet is libsecondlife.Packets.SimStatsPacket) | 264 | if (packet is OpenMetaverse.Packets.SimStatsPacket) |
265 | return; | 265 | return; |
266 | 266 | ||
267 | // Add acks to outgoing packets | 267 | // Add acks to outgoing packets |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 94f7214..1e369ec 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -29,8 +29,8 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Threading; | 30 | using System.Threading; |
31 | using System.Timers; | 31 | using System.Timers; |
32 | using libsecondlife; | 32 | using OpenMetaverse; |
33 | using libsecondlife.Packets; | 33 | using OpenMetaverse.Packets; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Statistics; | 35 | using OpenSim.Framework.Statistics; |
36 | using OpenSim.Framework.Statistics.Interfaces; | 36 | using OpenSim.Framework.Statistics.Interfaces; |
@@ -82,9 +82,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
82 | // private long ThrottleInterval; | 82 | // private long ThrottleInterval; |
83 | private Timer throttleTimer; | 83 | private Timer throttleTimer; |
84 | 84 | ||
85 | private LLUUID m_agentId; | 85 | private UUID m_agentId; |
86 | 86 | ||
87 | public LLPacketQueue(LLUUID agentId) | 87 | public LLPacketQueue(UUID agentId) |
88 | { | 88 | { |
89 | // While working on this, the BlockingQueue had me fooled for a bit. | 89 | // While working on this, the BlockingQueue had me fooled for a bit. |
90 | // The Blocking queue causes the thread to stop until there's something | 90 | // The Blocking queue causes the thread to stop until there's something |
@@ -479,7 +479,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
479 | for (int i = 0; i < 7; i++) | 479 | for (int i = 0; i < 7; i++) |
480 | Array.Reverse(throttle, j + i*singlefloat, singlefloat); | 480 | Array.Reverse(throttle, j + i*singlefloat, singlefloat); |
481 | 481 | ||
482 | // values gotten from libsecondlife.org/wiki/Throttle. Thanks MW_ | 482 | // values gotten from OpenMetaverse.org/wiki/Throttle. Thanks MW_ |
483 | // bytes | 483 | // bytes |
484 | // Convert to integer, since.. the full fp space isn't used. | 484 | // Convert to integer, since.. the full fp space isn't used. |
485 | tResend = (int) BitConverter.ToSingle(throttle, j); | 485 | tResend = (int) BitConverter.ToSingle(throttle, j); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs index 2a3f2e1..07d3c45 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs | |||
@@ -27,8 +27,8 @@ | |||
27 | 27 | ||
28 | using System.Net; | 28 | using System.Net; |
29 | using System.Net.Sockets; | 29 | using System.Net.Sockets; |
30 | using libsecondlife; | 30 | using OpenMetaverse; |
31 | using libsecondlife.Packets; | 31 | using OpenMetaverse.Packets; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Communications.Cache; | 33 | using OpenSim.Framework.Communications.Cache; |
34 | using OpenSim.Region.ClientStack.LindenUDP; | 34 | using OpenSim.Region.ClientStack.LindenUDP; |
@@ -73,7 +73,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
73 | protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, | 73 | protected virtual IClientAPI CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, |
74 | ClientManager clientManager, IScene scene, AssetCache assetCache, | 74 | ClientManager clientManager, IScene scene, AssetCache assetCache, |
75 | LLPacketServer packServer, AgentCircuitManager authenSessions, | 75 | LLPacketServer packServer, AgentCircuitManager authenSessions, |
76 | LLUUID agentId, LLUUID sessionId, uint circuitCode, EndPoint proxyEP) | 76 | UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP) |
77 | { | 77 | { |
78 | return | 78 | return |
79 | new LLClientView(remoteEP, scene, assetCache, packServer, authenSessions, agentId, sessionId, circuitCode, proxyEP); | 79 | new LLClientView(remoteEP, scene, assetCache, packServer, authenSessions, agentId, sessionId, circuitCode, proxyEP); |
@@ -147,4 +147,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
147 | client.Close(false); | 147 | client.Close(false); |
148 | } | 148 | } |
149 | } | 149 | } |
150 | } \ No newline at end of file | 150 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLQueItem.cs b/OpenSim/Region/ClientStack/LindenUDP/LLQueItem.cs index e836dd7..3bb0b7a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLQueItem.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLQueItem.cs | |||
@@ -26,7 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using libsecondlife.Packets; | 29 | using OpenMetaverse.Packets; |
30 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
31 | 31 | ||
32 | namespace OpenSim.Region.ClientStack.LindenUDP | 32 | namespace OpenSim.Region.ClientStack.LindenUDP |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 8dec185..2d57d7f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -31,7 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Net.Sockets; | 32 | using System.Net.Sockets; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using libsecondlife.Packets; | 34 | using OpenMetaverse.Packets; |
35 | using log4net; | 35 | using log4net; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Communications.Cache; | 37 | using OpenSim.Framework.Communications.Cache; |
@@ -136,7 +136,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
136 | 136 | ||
137 | // Return new port | 137 | // Return new port |
138 | // This because in Grid mode it is not really important what port the region listens to as long as it is correctly registered. | 138 | // This because in Grid mode it is not really important what port the region listens to as long as it is correctly registered. |
139 | // So the option allow_alternate_ports="true" was added to default.xml | 139 | // So the option allow_alternate_ports="true" was added to default.Xml |
140 | port = (uint)(listenPort - proxyPortOffset); | 140 | port = (uint)(listenPort - proxyPortOffset); |
141 | } | 141 | } |
142 | 142 | ||
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 91f7472..d1572fd 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using System.Net; | 29 | using System.Net; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using libsecondlife; | 31 | using OpenMetaverse; |
32 | using log4net; | 32 | using log4net; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
@@ -138,7 +138,7 @@ namespace OpenSim.Region.ClientStack | |||
138 | // TODO: Remove this cruft once MasterAvatar is fully deprecated | 138 | // TODO: Remove this cruft once MasterAvatar is fully deprecated |
139 | //Master Avatar Setup | 139 | //Master Avatar Setup |
140 | UserProfileData masterAvatar; | 140 | UserProfileData masterAvatar; |
141 | if (scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) | 141 | if (scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero) |
142 | { | 142 | { |
143 | masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID); | 143 | masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID); |
144 | scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName; | 144 | scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName; |
@@ -160,7 +160,7 @@ namespace OpenSim.Region.ClientStack | |||
160 | else | 160 | else |
161 | { | 161 | { |
162 | m_log.Info("[PARCEL]: No master avatar found, using null."); | 162 | m_log.Info("[PARCEL]: No master avatar found, using null."); |
163 | scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; | 163 | scene.RegionInfo.MasterAvatarAssignedUUID = UUID.Zero; |
164 | } | 164 | } |
165 | 165 | ||
166 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); | 166 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); |