diff options
author | UbitUmarov | 2012-04-01 11:20:11 +0100 |
---|---|---|
committer | UbitUmarov | 2012-04-01 11:20:11 +0100 |
commit | d5e123c1064df424f377ed7511e7dd3721c7be8b (patch) | |
tree | e0fb702dc1d5e3d26e6a108d47d2e7c898cd1907 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |
parent | reduced instability in vertical atractor with eficiency of 1 and banking (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-d5e123c1064df424f377ed7511e7dd3721c7be8b.zip opensim-SC_OLD-d5e123c1064df424f377ed7511e7dd3721c7be8b.tar.gz opensim-SC_OLD-d5e123c1064df424f377ed7511e7dd3721c7be8b.tar.bz2 opensim-SC_OLD-d5e123c1064df424f377ed7511e7dd3721c7be8b.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 65 |
1 files changed, 55 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index d0920d2..3118613 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -396,7 +396,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
396 | } | 396 | } |
397 | } | 397 | } |
398 | public UUID AgentId { get { return m_agentId; } } | 398 | public UUID AgentId { get { return m_agentId; } } |
399 | public ISceneAgent SceneAgent { get; private set; } | 399 | public ISceneAgent SceneAgent { get; set; } |
400 | public UUID ActiveGroupId { get { return m_activeGroupID; } } | 400 | public UUID ActiveGroupId { get { return m_activeGroupID; } } |
401 | public string ActiveGroupName { get { return m_activeGroupName; } } | 401 | public string ActiveGroupName { get { return m_activeGroupName; } } |
402 | public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } | 402 | public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } |
@@ -719,7 +719,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
719 | 719 | ||
720 | public virtual void Start() | 720 | public virtual void Start() |
721 | { | 721 | { |
722 | SceneAgent = m_scene.AddNewClient(this, PresenceType.User); | 722 | m_scene.AddNewClient(this, PresenceType.User); |
723 | 723 | ||
724 | RefreshGroupMembership(); | 724 | RefreshGroupMembership(); |
725 | } | 725 | } |
@@ -5913,7 +5913,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5913 | // My guess is this is the folder to stick the calling card into | 5913 | // My guess is this is the folder to stick the calling card into |
5914 | List<UUID> callingCardFolders = new List<UUID>(); | 5914 | List<UUID> callingCardFolders = new List<UUID>(); |
5915 | 5915 | ||
5916 | UUID agentID = afriendpack.AgentData.AgentID; | ||
5917 | UUID transactionID = afriendpack.TransactionBlock.TransactionID; | 5916 | UUID transactionID = afriendpack.TransactionBlock.TransactionID; |
5918 | 5917 | ||
5919 | for (int fi = 0; fi < afriendpack.FolderData.Length; fi++) | 5918 | for (int fi = 0; fi < afriendpack.FolderData.Length; fi++) |
@@ -5924,10 +5923,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5924 | FriendActionDelegate handlerApproveFriendRequest = OnApproveFriendRequest; | 5923 | FriendActionDelegate handlerApproveFriendRequest = OnApproveFriendRequest; |
5925 | if (handlerApproveFriendRequest != null) | 5924 | if (handlerApproveFriendRequest != null) |
5926 | { | 5925 | { |
5927 | handlerApproveFriendRequest(this, agentID, transactionID, callingCardFolders); | 5926 | handlerApproveFriendRequest(this, transactionID, callingCardFolders); |
5928 | } | 5927 | } |
5929 | return true; | ||
5930 | 5928 | ||
5929 | return true; | ||
5931 | } | 5930 | } |
5932 | 5931 | ||
5933 | private bool HandlerDeclineFriendship(IClientAPI sender, Packet Pack) | 5932 | private bool HandlerDeclineFriendship(IClientAPI sender, Packet Pack) |
@@ -5946,7 +5945,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5946 | if (OnDenyFriendRequest != null) | 5945 | if (OnDenyFriendRequest != null) |
5947 | { | 5946 | { |
5948 | OnDenyFriendRequest(this, | 5947 | OnDenyFriendRequest(this, |
5949 | dfriendpack.AgentData.AgentID, | ||
5950 | dfriendpack.TransactionBlock.TransactionID, | 5948 | dfriendpack.TransactionBlock.TransactionID, |
5951 | null); | 5949 | null); |
5952 | } | 5950 | } |
@@ -5966,14 +5964,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5966 | } | 5964 | } |
5967 | #endregion | 5965 | #endregion |
5968 | 5966 | ||
5969 | UUID listOwnerAgentID = tfriendpack.AgentData.AgentID; | ||
5970 | UUID exFriendID = tfriendpack.ExBlock.OtherID; | 5967 | UUID exFriendID = tfriendpack.ExBlock.OtherID; |
5971 | FriendshipTermination TerminateFriendshipHandler = OnTerminateFriendship; | 5968 | FriendshipTermination TerminateFriendshipHandler = OnTerminateFriendship; |
5972 | if (TerminateFriendshipHandler != null) | 5969 | if (TerminateFriendshipHandler != null) |
5973 | { | 5970 | { |
5974 | TerminateFriendshipHandler(this, listOwnerAgentID, exFriendID); | 5971 | TerminateFriendshipHandler(this, exFriendID); |
5975 | return true; | 5972 | return true; |
5976 | } | 5973 | } |
5974 | |||
5977 | return false; | 5975 | return false; |
5978 | } | 5976 | } |
5979 | 5977 | ||
@@ -11378,12 +11376,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11378 | return true; | 11376 | return true; |
11379 | } | 11377 | } |
11380 | #endregion | 11378 | #endregion |
11379 | |||
11381 | GrantUserFriendRights GrantUserRightsHandler = OnGrantUserRights; | 11380 | GrantUserFriendRights GrantUserRightsHandler = OnGrantUserRights; |
11382 | if (GrantUserRightsHandler != null) | 11381 | if (GrantUserRightsHandler != null) |
11383 | GrantUserRightsHandler(this, | 11382 | GrantUserRightsHandler(this, |
11384 | GrantUserRights.AgentData.AgentID, | ||
11385 | GrantUserRights.Rights[0].AgentRelated, | 11383 | GrantUserRights.Rights[0].AgentRelated, |
11386 | GrantUserRights.Rights[0].RelatedRights); | 11384 | GrantUserRights.Rights[0].RelatedRights); |
11385 | |||
11387 | return true; | 11386 | return true; |
11388 | } | 11387 | } |
11389 | 11388 | ||
@@ -12455,7 +12454,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12455 | ItemData.Add(ItemDataMap); | 12454 | ItemData.Add(ItemDataMap); |
12456 | } | 12455 | } |
12457 | 12456 | ||
12458 | llsd.Add("ItemData", ItemData); | 12457 | llsd.Add("InventoryData", ItemData); |
12459 | 12458 | ||
12460 | eq.Enqueue(BuildEvent("RemoveInventoryItem", | 12459 | eq.Enqueue(BuildEvent("RemoveInventoryItem", |
12461 | llsd), AgentId); | 12460 | llsd), AgentId); |
@@ -12499,6 +12498,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12499 | llsd), AgentId); | 12498 | llsd), AgentId); |
12500 | } | 12499 | } |
12501 | 12500 | ||
12501 | private byte[] EncodeU32(uint val) | ||
12502 | { | ||
12503 | byte[] ret = BitConverter.GetBytes(val); | ||
12504 | if (BitConverter.IsLittleEndian) | ||
12505 | Array.Reverse(ret); | ||
12506 | return ret; | ||
12507 | } | ||
12508 | |||
12502 | public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items) | 12509 | public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items) |
12503 | { | 12510 | { |
12504 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); | 12511 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); |
@@ -12514,6 +12521,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12514 | OSDMap AgentDataMap = new OSDMap(1); | 12521 | OSDMap AgentDataMap = new OSDMap(1); |
12515 | AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId)); | 12522 | AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId)); |
12516 | AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId)); | 12523 | AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId)); |
12524 | AgentDataMap.Add("TransactionID", OSD.FromUUID(UUID.Random())); | ||
12517 | 12525 | ||
12518 | OSDArray AgentData = new OSDArray(1); | 12526 | OSDArray AgentData = new OSDArray(1); |
12519 | AgentData.Add(AgentDataMap); | 12527 | AgentData.Add(AgentDataMap); |
@@ -12541,10 +12549,47 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12541 | foreach (InventoryItemBase item in items) | 12549 | foreach (InventoryItemBase item in items) |
12542 | { | 12550 | { |
12543 | OSDMap ItemDataMap = new OSDMap(); | 12551 | OSDMap ItemDataMap = new OSDMap(); |
12552 | |||
12553 | ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID)); | ||
12554 | ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder)); | ||
12555 | |||
12556 | ItemDataMap.Add("CreatorID", OSD.FromUUID(item.CreatorIdAsUuid)); | ||
12557 | ItemDataMap.Add("OwnerID", OSD.FromUUID(item.Owner)); | ||
12558 | ItemDataMap.Add("GroupID", OSD.FromUUID(item.GroupID)); | ||
12559 | ItemDataMap.Add("BaseMask", OSD.FromBinary(EncodeU32((uint)item.BasePermissions))); | ||
12560 | ItemDataMap.Add("OwnerMask", OSD.FromBinary(EncodeU32((uint)item.CurrentPermissions))); | ||
12561 | ItemDataMap.Add("GroupMask", OSD.FromBinary(EncodeU32((uint)item.GroupPermissions))); | ||
12562 | ItemDataMap.Add("EveryoneMask", OSD.FromBinary(EncodeU32((uint)item.EveryOnePermissions))); | ||
12563 | ItemDataMap.Add("NextOwnerMask", OSD.FromBinary(EncodeU32((uint)item.NextPermissions))); | ||
12564 | ItemDataMap.Add("GroupOwned", OSD.FromBoolean(item.GroupOwned)); | ||
12565 | ItemDataMap.Add("AssetID", OSD.FromUUID(item.AssetID)); | ||
12566 | ItemDataMap.Add("Type", OSD.FromInteger(item.AssetType)); | ||
12567 | ItemDataMap.Add("InvType", OSD.FromInteger(item.InvType)); | ||
12568 | ItemDataMap.Add("Flags", OSD.FromBinary(EncodeU32((uint)item.Flags))); | ||
12569 | ItemDataMap.Add("SaleType", OSD.FromInteger((byte)item.SaleType)); | ||
12570 | ItemDataMap.Add("SalePrice", OSD.FromInteger(item.SalePrice)); | ||
12571 | ItemDataMap.Add("Name", OSD.FromString(item.Name)); | ||
12572 | ItemDataMap.Add("Description", OSD.FromString(item.Description)); | ||
12573 | ItemDataMap.Add("CreationDate", OSD.FromInteger(item.CreationDate)); | ||
12574 | |||
12575 | ItemDataMap.Add("CRC", OSD.FromBinary(EncodeU32( | ||
12576 | Helpers.InventoryCRC(1000, 0, (sbyte)item.InvType, | ||
12577 | (sbyte)item.AssetType, item.AssetID, | ||
12578 | item.GroupID, 100, | ||
12579 | item.Owner, item.CreatorIdAsUuid, | ||
12580 | item.ID, item.Folder, | ||
12581 | (uint)PermissionMask.All, 1, (uint)PermissionMask.All, (uint)PermissionMask.All, | ||
12582 | (uint)PermissionMask.All) | ||
12583 | ))); | ||
12584 | ItemDataMap.Add("CallbackID", 0); | ||
12585 | |||
12544 | ItemData.Add(ItemDataMap); | 12586 | ItemData.Add(ItemDataMap); |
12545 | } | 12587 | } |
12546 | 12588 | ||
12547 | llsd.Add("ItemData", ItemData); | 12589 | llsd.Add("ItemData", ItemData); |
12590 | |||
12591 | eq.Enqueue(BuildEvent("BulkUpdateInventory", | ||
12592 | llsd), AgentId); | ||
12548 | } | 12593 | } |
12549 | } | 12594 | } |
12550 | } | 12595 | } |