* Fixed mapgenerator bug caused by types name change

* Fixed mapgenerator bug causing all packets to default to Unencoded
* Added Helpers.BytesToInt()
* Fixed endian problem in Helpers.BytesToUIntBig()
* Fixed LoginResponseData.ToXmlRpc() to return non-broken inventory skeleton
* Added EstateAssetType and TransferError enums
* Changed an Asset constructor to also take an AssetID

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2124 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2008-08-20 22:46:28 +00:00
parent 967da500c1
commit cfb75b85b0
8 changed files with 319 additions and 115 deletions

View File

@@ -111,17 +111,17 @@ namespace OpenMetaverse
}
/// <summary>
///
/// Assigns this UUID from 16 bytes out of a byte array
/// </summary>
/// <param name="source"></param>
/// <param name="pos"></param>
/// <param name="source">Byte array containing the UUID to assign this UUID to</param>
/// <param name="pos">Starting position of the UUID in the byte array</param>
public void FromBytes(byte[] source, int pos)
{
Guid = new Guid(
(source[pos + 0] << 24) | (source[pos + 1] << 16) | (source[pos + 2] << 8) | source[pos + 3],
(short)((source[pos + 4] << 8) | source[pos + 5]),
(short)((source[pos + 6] << 8) | source[pos + 7]),
source[pos + 8], source[pos + 9], source[pos + 10], source[pos + 11],
int a = (source[pos + 0] << 24) | (source[pos + 1] << 16) | (source[pos + 2] << 8) | source[pos + 3];
short b = (short)((source[pos + 4] << 8) | source[pos + 5]);
short c = (short)((source[pos + 6] << 8) | source[pos + 7]);
Guid = new Guid(a, b, c, source[pos + 8], source[pos + 9], source[pos + 10], source[pos + 11],
source[pos + 12], source[pos + 13], source[pos + 14], source[pos + 15]);
}