diff options
author | Melanie Thielker | 2008-10-24 14:53:13 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-10-24 14:53:13 +0000 |
commit | 6775b7d02d01f42439e2b3cfa8fd862e0a586599 (patch) | |
tree | c0d5ea2fbbc50257950d563daff958afe54abe26 /OpenSim/Region/ClientStack | |
parent | Fixed a floating point error accumulation that was causing missing end faces ... (diff) | |
download | opensim-SC_OLD-6775b7d02d01f42439e2b3cfa8fd862e0a586599.zip opensim-SC_OLD-6775b7d02d01f42439e2b3cfa8fd862e0a586599.tar.gz opensim-SC_OLD-6775b7d02d01f42439e2b3cfa8fd862e0a586599.tar.bz2 opensim-SC_OLD-6775b7d02d01f42439e2b3cfa8fd862e0a586599.tar.xz |
Lotsa plumming :)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 255 |
1 files changed, 255 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 6801310..207f221 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -41,6 +41,7 @@ using OpenSim.Framework; | |||
41 | using OpenSim.Framework.Communications.Cache; | 41 | using OpenSim.Framework.Communications.Cache; |
42 | using OpenSim.Framework.Statistics; | 42 | using OpenSim.Framework.Statistics; |
43 | using OpenSim.Region.ClientStack.LindenUDP; | 43 | using OpenSim.Region.ClientStack.LindenUDP; |
44 | using OpenSim.Region.Interfaces; | ||
44 | using OpenSim.Region.Environment.Scenes; | 45 | using OpenSim.Region.Environment.Scenes; |
45 | using Timer = System.Timers.Timer; | 46 | using Timer = System.Timers.Timer; |
46 | 47 | ||
@@ -6483,6 +6484,260 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6483 | } | 6484 | } |
6484 | break; | 6485 | break; |
6485 | 6486 | ||
6487 | case PacketType.ActivateGroup: | ||
6488 | ActivateGroupPacket activateGroupPacket = (ActivateGroupPacket)Pack; | ||
6489 | IGroupsModule grps = m_scene.RequestModuleInterface<IGroupsModule>(); | ||
6490 | if (grps != null) | ||
6491 | { | ||
6492 | grps.ActivateGroup(this, activateGroupPacket.AgentData.GroupID); | ||
6493 | } | ||
6494 | break; | ||
6495 | |||
6496 | case PacketType.GroupTitlesRequest: | ||
6497 | GroupTitlesRequestPacket groupTitlesRequest = | ||
6498 | (GroupTitlesRequestPacket)Pack; | ||
6499 | |||
6500 | IGroupsModule grps2 = m_scene.RequestModuleInterface<IGroupsModule>(); | ||
6501 | if (grps2 != null) | ||
6502 | { | ||
6503 | GroupTitlesReplyPacket groupTitlesReply = (GroupTitlesReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupTitlesReply); | ||
6504 | |||
6505 | groupTitlesReply.AgentData = | ||
6506 | new GroupTitlesReplyPacket.AgentDataBlock(); | ||
6507 | |||
6508 | groupTitlesReply.AgentData.AgentID = AgentId; | ||
6509 | groupTitlesReply.AgentData.GroupID = | ||
6510 | groupTitlesRequest.AgentData.GroupID; | ||
6511 | |||
6512 | groupTitlesReply.AgentData.RequestID = | ||
6513 | groupTitlesRequest.AgentData.RequestID; | ||
6514 | |||
6515 | List<GroupTitlesData> titles = | ||
6516 | grps2.GroupTitlesRequest(this, | ||
6517 | groupTitlesRequest.AgentData.GroupID); | ||
6518 | |||
6519 | groupTitlesReply.GroupData = | ||
6520 | new GroupTitlesReplyPacket. | ||
6521 | GroupDataBlock[titles.Count]; | ||
6522 | |||
6523 | int i = 0; | ||
6524 | foreach (GroupTitlesData d in titles) | ||
6525 | { | ||
6526 | groupTitlesReply.GroupData[i] = | ||
6527 | new GroupTitlesReplyPacket. | ||
6528 | GroupDataBlock(); | ||
6529 | |||
6530 | groupTitlesReply.GroupData[i].Title = | ||
6531 | Utils.StringToBytes(d.Name); | ||
6532 | groupTitlesReply.GroupData[i].RoleID = | ||
6533 | d.UUID; | ||
6534 | groupTitlesReply.GroupData[i].Selected = | ||
6535 | d.Selected; | ||
6536 | i++; | ||
6537 | } | ||
6538 | |||
6539 | OutPacket(groupTitlesReply, ThrottleOutPacketType.Task); | ||
6540 | } | ||
6541 | break; | ||
6542 | |||
6543 | case PacketType.GroupProfileRequest: | ||
6544 | GroupProfileRequestPacket groupProfileRequest = | ||
6545 | (GroupProfileRequestPacket)Pack; | ||
6546 | |||
6547 | IGroupsModule grps3 = m_scene.RequestModuleInterface<IGroupsModule>(); | ||
6548 | if (grps3 != null) | ||
6549 | { | ||
6550 | GroupProfileReplyPacket groupProfileReply = (GroupProfileReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupProfileReply); | ||
6551 | |||
6552 | groupProfileReply.AgentData = new GroupProfileReplyPacket.AgentDataBlock(); | ||
6553 | groupProfileReply.GroupData = new GroupProfileReplyPacket.GroupDataBlock(); | ||
6554 | groupProfileReply.AgentData.AgentID = AgentId; | ||
6555 | |||
6556 | GroupProfileData d = grps3.GroupProfileRequest(this, | ||
6557 | groupProfileRequest.GroupData.GroupID); | ||
6558 | |||
6559 | groupProfileReply.GroupData.GroupID = d.GroupID; | ||
6560 | groupProfileReply.GroupData.Name = Utils.StringToBytes(d.Name); | ||
6561 | groupProfileReply.GroupData.Charter = Utils.StringToBytes(d.Charter); | ||
6562 | groupProfileReply.GroupData.ShowInList = d.ShowInList; | ||
6563 | groupProfileReply.GroupData.MemberTitle = Utils.StringToBytes(d.MemberTitle); | ||
6564 | groupProfileReply.GroupData.PowersMask = d.PowersMask; | ||
6565 | groupProfileReply.GroupData.InsigniaID = d.InsigniaID; | ||
6566 | groupProfileReply.GroupData.FounderID = d.FounderID; | ||
6567 | groupProfileReply.GroupData.MembershipFee = d.MembershipFee; | ||
6568 | groupProfileReply.GroupData.OpenEnrollment = d.OpenEnrollment; | ||
6569 | groupProfileReply.GroupData.Money = d.Money; | ||
6570 | groupProfileReply.GroupData.GroupMembershipCount = d.GroupMembershipCount; | ||
6571 | groupProfileReply.GroupData.GroupRolesCount = d.GroupRolesCount; | ||
6572 | groupProfileReply.GroupData.AllowPublish = d.AllowPublish; | ||
6573 | groupProfileReply.GroupData.MaturePublish = d.MaturePublish; | ||
6574 | groupProfileReply.GroupData.OwnerRole = d.OwnerRole; | ||
6575 | |||
6576 | OutPacket(groupProfileReply, ThrottleOutPacketType.Task); | ||
6577 | } | ||
6578 | break; | ||
6579 | |||
6580 | case PacketType.GroupMembersRequest: | ||
6581 | GroupMembersRequestPacket groupMembersRequestPacket = | ||
6582 | (GroupMembersRequestPacket)Pack; | ||
6583 | |||
6584 | IGroupsModule grps4 = m_scene.RequestModuleInterface<IGroupsModule>(); | ||
6585 | List<GroupMembersData> members = | ||
6586 | grps4.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID); | ||
6587 | |||
6588 | if (grps4 != null) | ||
6589 | { | ||
6590 | GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply); | ||
6591 | |||
6592 | groupMembersReply.AgentData = | ||
6593 | new GroupMembersReplyPacket.AgentDataBlock(); | ||
6594 | groupMembersReply.GroupData = | ||
6595 | new GroupMembersReplyPacket.GroupDataBlock(); | ||
6596 | groupMembersReply.MemberData = | ||
6597 | new GroupMembersReplyPacket.MemberDataBlock[ | ||
6598 | members.Count]; | ||
6599 | |||
6600 | groupMembersReply.AgentData.AgentID = AgentId; | ||
6601 | groupMembersReply.GroupData.GroupID = | ||
6602 | groupMembersRequestPacket.GroupData.GroupID; | ||
6603 | groupMembersReply.GroupData.RequestID = | ||
6604 | groupMembersRequestPacket.GroupData.RequestID; | ||
6605 | groupMembersReply.GroupData.MemberCount = members.Count; | ||
6606 | |||
6607 | int i = 0; | ||
6608 | foreach (GroupMembersData m in members) | ||
6609 | { | ||
6610 | groupMembersReply.MemberData[i] = | ||
6611 | new GroupMembersReplyPacket.MemberDataBlock(); | ||
6612 | groupMembersReply.MemberData[i].AgentID = | ||
6613 | m.AgentID; | ||
6614 | groupMembersReply.MemberData[i].Contribution = | ||
6615 | m.Contribution; | ||
6616 | groupMembersReply.MemberData[i].OnlineStatus = | ||
6617 | Utils.StringToBytes(m.OnlineStatus); | ||
6618 | groupMembersReply.MemberData[i].AgentPowers = | ||
6619 | m.AgentPowers; | ||
6620 | groupMembersReply.MemberData[i].Title = | ||
6621 | Utils.StringToBytes(m.Title); | ||
6622 | groupMembersReply.MemberData[i].IsOwner = | ||
6623 | m.IsOwner; | ||
6624 | i++; | ||
6625 | } | ||
6626 | |||
6627 | OutPacket(groupMembersReply, ThrottleOutPacketType.Task); | ||
6628 | } | ||
6629 | break; | ||
6630 | |||
6631 | case PacketType.GroupRoleDataRequest: | ||
6632 | GroupRoleDataRequestPacket groupRolesRequest = | ||
6633 | (GroupRoleDataRequestPacket)Pack; | ||
6634 | |||
6635 | IGroupsModule grps5 = m_scene.RequestModuleInterface<IGroupsModule>(); | ||
6636 | if (grps5 != null) | ||
6637 | { | ||
6638 | GroupRoleDataReplyPacket groupRolesReply = (GroupRoleDataReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleDataReply); | ||
6639 | |||
6640 | groupRolesReply.AgentData = | ||
6641 | new GroupRoleDataReplyPacket.AgentDataBlock(); | ||
6642 | |||
6643 | groupRolesReply.AgentData.AgentID = AgentId; | ||
6644 | |||
6645 | groupRolesReply.GroupData = | ||
6646 | new GroupRoleDataReplyPacket. | ||
6647 | GroupDataBlock(); | ||
6648 | |||
6649 | groupRolesReply.GroupData.GroupID = | ||
6650 | groupRolesRequest.GroupData.GroupID; | ||
6651 | |||
6652 | groupRolesReply.GroupData.RequestID = | ||
6653 | groupRolesRequest.GroupData.RequestID; | ||
6654 | |||
6655 | List<GroupRolesData> titles = | ||
6656 | grps5.GroupRoleDataRequest(this, | ||
6657 | groupRolesRequest.GroupData.GroupID); | ||
6658 | |||
6659 | groupRolesReply.GroupData.RoleCount = | ||
6660 | titles.Count; | ||
6661 | |||
6662 | groupRolesReply.RoleData = | ||
6663 | new GroupRoleDataReplyPacket. | ||
6664 | RoleDataBlock[titles.Count]; | ||
6665 | |||
6666 | int i = 0; | ||
6667 | foreach (GroupRolesData d in titles) | ||
6668 | { | ||
6669 | groupRolesReply.RoleData[i] = | ||
6670 | new GroupRoleDataReplyPacket. | ||
6671 | RoleDataBlock(); | ||
6672 | |||
6673 | groupRolesReply.RoleData[i].RoleID = | ||
6674 | d.RoleID; | ||
6675 | groupRolesReply.RoleData[i].Name = | ||
6676 | Utils.StringToBytes(d.Name); | ||
6677 | groupRolesReply.RoleData[i].Title = | ||
6678 | Utils.StringToBytes(d.Title); | ||
6679 | groupRolesReply.RoleData[i].Description = | ||
6680 | Utils.StringToBytes(d.Description); | ||
6681 | groupRolesReply.RoleData[i].Powers = | ||
6682 | d.Powers; | ||
6683 | groupRolesReply.RoleData[i].Members = | ||
6684 | (uint)d.Members; | ||
6685 | |||
6686 | i++; | ||
6687 | } | ||
6688 | |||
6689 | Console.WriteLine(groupRolesReply.ToString()); | ||
6690 | OutPacket(groupRolesReply, ThrottleOutPacketType.Task); | ||
6691 | } | ||
6692 | break; | ||
6693 | |||
6694 | case PacketType.GroupRoleMembersRequest: | ||
6695 | GroupRoleMembersRequestPacket groupRoleMembersRequest = | ||
6696 | (GroupRoleMembersRequestPacket)Pack; | ||
6697 | |||
6698 | IGroupsModule grps6 = m_scene.RequestModuleInterface<IGroupsModule>(); | ||
6699 | if (grps6 != null) | ||
6700 | { | ||
6701 | GroupRoleMembersReplyPacket groupRoleMembersReply = (GroupRoleMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleMembersReply); | ||
6702 | groupRoleMembersReply.AgentData = | ||
6703 | new GroupRoleMembersReplyPacket.AgentDataBlock(); | ||
6704 | groupRoleMembersReply.AgentData.AgentID = | ||
6705 | AgentId; | ||
6706 | groupRoleMembersReply.AgentData.GroupID = | ||
6707 | groupRoleMembersRequest.GroupData.GroupID; | ||
6708 | groupRoleMembersReply.AgentData.RequestID = | ||
6709 | groupRoleMembersRequest.GroupData.RequestID; | ||
6710 | |||
6711 | List<GroupRoleMembersData> mappings = | ||
6712 | grps6.GroupRoleMembersRequest(this, | ||
6713 | groupRoleMembersRequest.GroupData.GroupID); | ||
6714 | |||
6715 | groupRoleMembersReply.AgentData.TotalPairs = | ||
6716 | (uint)mappings.Count; | ||
6717 | |||
6718 | groupRoleMembersReply.MemberData = | ||
6719 | new GroupRoleMembersReplyPacket. | ||
6720 | MemberDataBlock[mappings.Count]; | ||
6721 | |||
6722 | int i = 0; | ||
6723 | foreach (GroupRoleMembersData d in mappings) | ||
6724 | { | ||
6725 | groupRoleMembersReply.MemberData[i] = | ||
6726 | new GroupRoleMembersReplyPacket. | ||
6727 | MemberDataBlock(); | ||
6728 | |||
6729 | groupRoleMembersReply.MemberData[i].RoleID = | ||
6730 | d.RoleID; | ||
6731 | groupRoleMembersReply.MemberData[i].MemberID = | ||
6732 | d.MemberID; | ||
6733 | i++; | ||
6734 | } | ||
6735 | |||
6736 | |||
6737 | OutPacket(groupRoleMembersReply, ThrottleOutPacketType.Task); | ||
6738 | } | ||
6739 | break; | ||
6740 | |||
6486 | default: | 6741 | default: |
6487 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); | 6742 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); |
6488 | break; | 6743 | break; |