diff options
author | Dahlia Trimble | 2009-01-26 20:06:31 +0000 |
---|---|---|
committer | Dahlia Trimble | 2009-01-26 20:06:31 +0000 |
commit | b112109d2cd11742d0f81600409d26c3f37f1edb (patch) | |
tree | 13cb8714d705a66b13a59f75cb85181bb2ba60b8 /OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs | |
parent | * Providing a way for the rest of the simulator to get at the economy setting... (diff) | |
download | opensim-SC_OLD-b112109d2cd11742d0f81600409d26c3f37f1edb.zip opensim-SC_OLD-b112109d2cd11742d0f81600409d26c3f37f1edb.tar.gz opensim-SC_OLD-b112109d2cd11742d0f81600409d26c3f37f1edb.tar.bz2 opensim-SC_OLD-b112109d2cd11742d0f81600409d26c3f37f1edb.tar.xz |
swap endianness of parcel flags in event queue message
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs index e9303af..b6a6ac1 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs | |||
@@ -53,6 +53,19 @@ namespace OpenSim.Region.Environment | |||
53 | }; | 53 | }; |
54 | } | 54 | } |
55 | 55 | ||
56 | private static byte[] uintToByteArray(uint uIntValue) | ||
57 | { | ||
58 | // Reverse endianness of a uint | ||
59 | return new byte[] | ||
60 | { | ||
61 | (byte)((uIntValue >> 24) % 256), | ||
62 | (byte)((uIntValue >> 16) % 256), | ||
63 | (byte)((uIntValue >> 8) % 256), | ||
64 | (byte)(uIntValue % 256) | ||
65 | |||
66 | }; | ||
67 | } | ||
68 | |||
56 | public static OSD buildEvent(string eventName, OSD eventBody) | 69 | public static OSD buildEvent(string eventName, OSD eventBody) |
57 | { | 70 | { |
58 | OSDMap llsdEvent = new OSDMap(2); | 71 | OSDMap llsdEvent = new OSDMap(2); |
@@ -363,7 +376,7 @@ namespace OpenSim.Region.Environment | |||
363 | parcelDataMap.Add("OtherPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OtherPrims)); | 376 | parcelDataMap.Add("OtherPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OtherPrims)); |
364 | parcelDataMap.Add("OwnerID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.OwnerID)); | 377 | parcelDataMap.Add("OwnerID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.OwnerID)); |
365 | parcelDataMap.Add("OwnerPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OwnerPrims)); | 378 | parcelDataMap.Add("OwnerPrims", OSD.FromInteger(parcelPropertiesPacket.ParcelData.OwnerPrims)); |
366 | parcelDataMap.Add("ParcelFlags", OSD.FromBinary(parcelPropertiesPacket.ParcelData.ParcelFlags)); | 379 | parcelDataMap.Add("ParcelFlags", OSD.FromBinary(uintToByteArray(parcelPropertiesPacket.ParcelData.ParcelFlags))); |
367 | parcelDataMap.Add("ParcelPrimBonus", OSD.FromReal(parcelPropertiesPacket.ParcelData.ParcelPrimBonus)); | 380 | parcelDataMap.Add("ParcelPrimBonus", OSD.FromReal(parcelPropertiesPacket.ParcelData.ParcelPrimBonus)); |
368 | parcelDataMap.Add("PassHours", OSD.FromReal(parcelPropertiesPacket.ParcelData.PassHours)); | 381 | parcelDataMap.Add("PassHours", OSD.FromReal(parcelPropertiesPacket.ParcelData.PassHours)); |
369 | parcelDataMap.Add("PassPrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.PassPrice)); | 382 | parcelDataMap.Add("PassPrice", OSD.FromInteger(parcelPropertiesPacket.ParcelData.PassPrice)); |