diff options
author | Revolution | 2010-01-06 19:52:10 -0600 |
---|---|---|
committer | Melanie | 2010-01-07 15:09:13 +0000 |
commit | b67470af9106da24ed67db75cfe4787e58759385 (patch) | |
tree | 9d380ab2fd8106a1157b13833bfb4688e4f2be56 /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-b67470af9106da24ed67db75cfe4787e58759385.zip opensim-SC-b67470af9106da24ed67db75cfe4787e58759385.tar.gz opensim-SC-b67470af9106da24ed67db75cfe4787e58759385.tar.bz2 opensim-SC-b67470af9106da24ed67db75cfe4787e58759385.tar.xz |
Fixes the newly added packets as per Melanie's request.
Provisionally applied to fix the naming. Signatures are still subject to change.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 126 |
1 files changed, 65 insertions, 61 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 9944852..5eaaf12 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -298,25 +298,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
298 | public event AvatarInterestUpdate OnAvatarInterestUpdate; | 298 | public event AvatarInterestUpdate OnAvatarInterestUpdate; |
299 | public event PlacesQuery OnPlacesQuery; | 299 | public event PlacesQuery OnPlacesQuery; |
300 | public event AgentFOV OnAgentFOV; | 300 | public event AgentFOV OnAgentFOV; |
301 | public event FindAgentUpdate OnFindAgentEvent; | 301 | public event FindAgentUpdate OnFindAgent; |
302 | public event TrackAgentUpdate OnTrackAgentEvent; | 302 | public event TrackAgentUpdate OnTrackAgent; |
303 | public event NewUserReport OnUserReportEvent; | 303 | public event NewUserReport OnUserReport; |
304 | public event SaveStateHandler OnSaveStateEvent; | 304 | public event SaveStateHandler OnSaveState; |
305 | public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; | 305 | public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; |
306 | public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; | 306 | public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; |
307 | public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; | 307 | public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; |
308 | public event FreezeUserUpdate OnParcelFreezeUserEvent; | 308 | public event FreezeUserUpdate OnParcelFreezeUser; |
309 | public event EjectUserUpdate OnParcelEjectUserEvent; | 309 | public event EjectUserUpdate OnParcelEjectUser; |
310 | public event ParcelBuyPass OnParcelBuyPass; | 310 | public event ParcelBuyPass OnParcelBuyPass; |
311 | public event ParcelGodMark OnParcelGodMark; | 311 | public event ParcelGodMark OnParcelGodMark; |
312 | public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; | 312 | public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; |
313 | public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; | 313 | public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; |
314 | public event SimWideDeletesDelegate OnSimWideDeletes; | 314 | public event SimWideDeletesDelegate OnSimWideDeletes; |
315 | public event SendPostcard OnSendPostcard; | 315 | public event SendPostcard OnSendPostcard; |
316 | public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; | 316 | public event MuteListEntryUpdate OnUpdateMuteListEntry; |
317 | public event MuteListEntryRemove OnRemoveMuteListEntryEvent; | 317 | public event MuteListEntryRemove OnRemoveMuteListEntry; |
318 | public event GodlikeMessage onGodlikeMessageEvent; | 318 | public event GodlikeMessage onGodlikeMessage; |
319 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; | 319 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; |
320 | 320 | ||
321 | 321 | ||
322 | #endregion Events | 322 | #endregion Events |
@@ -826,32 +826,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
826 | OutPacket(gmp, ThrottleOutPacketType.Task); | 826 | OutPacket(gmp, ThrottleOutPacketType.Task); |
827 | } | 827 | } |
828 | 828 | ||
829 | public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary<int, string> VoteID, Dictionary<int, string> VoteInitiator, Dictionary<int, string> Majority, Dictionary<int, string> Quorum, Dictionary<int, string> TerseDateID, Dictionary<int, string> StartDateTime, Dictionary<int, string> EndDateTime, Dictionary<int, string> ProposalText) | 829 | public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, string[] VoteID, string[] VoteInitiator, string[] Majority, string[] Quorum, string[] TerseDateID, string[] StartDateTime, string[] EndDateTime, string[] ProposalText) |
830 | { | 830 | { |
831 | foreach (KeyValuePair<int, string> Blank in VoteID) | 831 | int i = 0; |
832 | foreach (string voteID in VoteID) | ||
832 | { | 833 | { |
833 | GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); | 834 | GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); |
834 | 835 | ||
835 | GAPIRP.AgentData.AgentID = agentID; | 836 | GAPIRP.AgentData.AgentID = agentID; |
836 | GAPIRP.AgentData.GroupID = groupID; | 837 | GAPIRP.AgentData.GroupID = groupID; |
837 | GAPIRP.TransactionData.TransactionID = transactionID; | 838 | GAPIRP.TransactionData.TransactionID = transactionID; |
838 | GAPIRP.TransactionData.TotalNumItems = 1; | 839 | GAPIRP.TransactionData.TotalNumItems = ((uint)i+1); |
839 | GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); | 840 | GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); |
840 | GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; | 841 | GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; |
841 | ProposalData.VoteCast = Utils.StringToBytes("false"); | 842 | ProposalData.VoteCast = Utils.StringToBytes("false"); |
842 | ProposalData.VoteID = new UUID(VoteID[Blank.Key]); | 843 | ProposalData.VoteID = new UUID(VoteID[i]); |
843 | ProposalData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]); | 844 | ProposalData.VoteInitiator = new UUID(VoteInitiator[i]); |
844 | ProposalData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]); | 845 | ProposalData.Majority = (float)Convert.ToInt32(Majority[i]); |
845 | ProposalData.Quorum = Convert.ToInt32(Quorum[Blank.Key]); | 846 | ProposalData.Quorum = Convert.ToInt32(Quorum[i]); |
846 | ProposalData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]); | 847 | ProposalData.TerseDateID = Utils.StringToBytes(TerseDateID[i]); |
847 | ProposalData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]); | 848 | ProposalData.StartDateTime = Utils.StringToBytes(StartDateTime[i]); |
848 | ProposalData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]); | 849 | ProposalData.EndDateTime = Utils.StringToBytes(EndDateTime[i]); |
849 | ProposalData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]); | 850 | ProposalData.ProposalText = Utils.StringToBytes(ProposalText[i]); |
850 | ProposalData.AlreadyVoted = false; | 851 | ProposalData.AlreadyVoted = false; |
851 | GAPIRP.ProposalData[0] = ProposalData; | 852 | GAPIRP.ProposalData[i] = ProposalData; |
852 | OutPacket(GAPIRP, ThrottleOutPacketType.Task); | 853 | OutPacket(GAPIRP, ThrottleOutPacketType.Task); |
854 | i++; | ||
853 | } | 855 | } |
854 | if (VoteID.Count == 0) | 856 | if (VoteID.Length == 0) |
855 | { | 857 | { |
856 | GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); | 858 | GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); |
857 | 859 | ||
@@ -876,35 +878,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
876 | } | 878 | } |
877 | } | 879 | } |
878 | 880 | ||
879 | public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary<int, string> VoteID, Dictionary<int, string> VoteInitiator, Dictionary<int, string> Majority, Dictionary<int, string> Quorum, Dictionary<int, string> TerseDateID, Dictionary<int, string> StartDateTime, Dictionary<int, string> EndDateTime, Dictionary<int, string> VoteType, Dictionary<int, string> VoteResult, Dictionary<int, string> ProposalText) | 881 | public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, string[] VoteID, string[] VoteInitiator, string[] Majority, string[] Quorum, string[] TerseDateID, string[] StartDateTime, string[] EndDateTime, string[] VoteType, string[] VoteResult, string[] ProposalText) |
880 | { | 882 | { |
881 | foreach (KeyValuePair<int, string> Blank in VoteID) | 883 | int i = 0; |
884 | foreach (string voteID in VoteID) | ||
882 | { | 885 | { |
883 | GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); | 886 | GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); |
884 | 887 | ||
885 | GVHIRP.AgentData.AgentID = agentID; | 888 | GVHIRP.AgentData.AgentID = agentID; |
886 | GVHIRP.AgentData.GroupID = groupID; | 889 | GVHIRP.AgentData.GroupID = groupID; |
887 | GVHIRP.TransactionData.TransactionID = transactionID; | 890 | GVHIRP.TransactionData.TransactionID = transactionID; |
888 | GVHIRP.TransactionData.TotalNumItems = 1; | 891 | GVHIRP.TransactionData.TotalNumItems = ((uint)i+1); |
889 | GVHIRP.HistoryItemData.VoteID = new UUID(VoteID[Blank.Key]); | 892 | GVHIRP.HistoryItemData.VoteID = new UUID(VoteID[i]); |
890 | GVHIRP.HistoryItemData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]); | 893 | GVHIRP.HistoryItemData.VoteInitiator = new UUID(VoteInitiator[i]); |
891 | GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]); | 894 | GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Majority[i]); |
892 | GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Quorum[Blank.Key]); | 895 | GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Quorum[i]); |
893 | GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]); | 896 | GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(TerseDateID[i]); |
894 | GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]); | 897 | GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(StartDateTime[i]); |
895 | GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]); | 898 | GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(EndDateTime[i]); |
896 | GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(VoteType[Blank.Key]); | 899 | GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(VoteType[i]); |
897 | GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(VoteResult[Blank.Key]); | 900 | GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(VoteResult[i]); |
898 | GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]); | 901 | GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(ProposalText[i]); |
899 | GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); | 902 | GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); |
900 | GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; | 903 | GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; |
901 | VoteItem.CandidateID = UUID.Zero; | 904 | VoteItem.CandidateID = UUID.Zero; |
902 | VoteItem.NumVotes = 0; //TODO: FIX THIS!!! | 905 | VoteItem.NumVotes = 0; //TODO: FIX THIS!!! |
903 | VoteItem.VoteCast = Utils.StringToBytes("Yes"); | 906 | VoteItem.VoteCast = Utils.StringToBytes("Yes"); |
904 | GVHIRP.VoteItem[0] = VoteItem; | 907 | GVHIRP.VoteItem[i] = VoteItem; |
905 | OutPacket(GVHIRP, ThrottleOutPacketType.Task); | 908 | OutPacket(GVHIRP, ThrottleOutPacketType.Task); |
906 | } | 909 | i++; |
907 | if (VoteID.Count == 0) | 910 | } |
911 | if (VoteID.Length == 0) | ||
908 | { | 912 | { |
909 | GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); | 913 | GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); |
910 | 914 | ||
@@ -4892,7 +4896,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4892 | { | 4896 | { |
4893 | FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; | 4897 | FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; |
4894 | 4898 | ||
4895 | FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUserEvent; | 4899 | FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUser; |
4896 | if (FreezeUserHandler != null) | 4900 | if (FreezeUserHandler != null) |
4897 | { | 4901 | { |
4898 | FreezeUserHandler(this, | 4902 | FreezeUserHandler(this, |
@@ -4909,7 +4913,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4909 | EjectUserPacket EjectUser = | 4913 | EjectUserPacket EjectUser = |
4910 | (EjectUserPacket)Packet; | 4914 | (EjectUserPacket)Packet; |
4911 | 4915 | ||
4912 | EjectUserUpdate EjectUserHandler = OnParcelEjectUserEvent; | 4916 | EjectUserUpdate EjectUserHandler = OnParcelEjectUser; |
4913 | if (EjectUserHandler != null) | 4917 | if (EjectUserHandler != null) |
4914 | { | 4918 | { |
4915 | EjectUserHandler(this, | 4919 | EjectUserHandler(this, |
@@ -5308,7 +5312,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5308 | FindAgentPacket FindAgent = | 5312 | FindAgentPacket FindAgent = |
5309 | (FindAgentPacket)Packet; | 5313 | (FindAgentPacket)Packet; |
5310 | 5314 | ||
5311 | FindAgentUpdate FindAgentHandler = OnFindAgentEvent; | 5315 | FindAgentUpdate FindAgentHandler = OnFindAgent; |
5312 | if (FindAgentHandler != null) | 5316 | if (FindAgentHandler != null) |
5313 | { | 5317 | { |
5314 | FindAgentHandler(this,FindAgent.AgentBlock.Hunter,FindAgent.AgentBlock.Prey); | 5318 | FindAgentHandler(this,FindAgent.AgentBlock.Hunter,FindAgent.AgentBlock.Prey); |
@@ -5322,7 +5326,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5322 | TrackAgentPacket TrackAgent = | 5326 | TrackAgentPacket TrackAgent = |
5323 | (TrackAgentPacket)Packet; | 5327 | (TrackAgentPacket)Packet; |
5324 | 5328 | ||
5325 | TrackAgentUpdate TrackAgentHandler = OnTrackAgentEvent; | 5329 | TrackAgentUpdate TrackAgentHandler = OnTrackAgent; |
5326 | if (TrackAgentHandler != null) | 5330 | if (TrackAgentHandler != null) |
5327 | { | 5331 | { |
5328 | TrackAgentHandler(this, | 5332 | TrackAgentHandler(this, |
@@ -8608,7 +8612,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8608 | GodUpdateRegionInfoPacket GodUpdateRegionInfo = | 8612 | GodUpdateRegionInfoPacket GodUpdateRegionInfo = |
8609 | (GodUpdateRegionInfoPacket)Packet; | 8613 | (GodUpdateRegionInfoPacket)Packet; |
8610 | 8614 | ||
8611 | GodUpdateRegionInfoUpdate handlerGodUpdateRegionInfo = OnGodUpdateRegionInfoUpdateEvent; | 8615 | GodUpdateRegionInfoUpdate handlerGodUpdateRegionInfo = OnGodUpdateRegionInfoUpdate; |
8612 | if (handlerGodUpdateRegionInfo != null) | 8616 | if (handlerGodUpdateRegionInfo != null) |
8613 | { | 8617 | { |
8614 | handlerGodUpdateRegionInfo(this, | 8618 | handlerGodUpdateRegionInfo(this, |
@@ -8641,7 +8645,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8641 | GodlikeMessagePacket GodlikeMessage = | 8645 | GodlikeMessagePacket GodlikeMessage = |
8642 | (GodlikeMessagePacket)Packet; | 8646 | (GodlikeMessagePacket)Packet; |
8643 | 8647 | ||
8644 | GodlikeMessage handlerGodlikeMessage = onGodlikeMessageEvent; | 8648 | GodlikeMessage handlerGodlikeMessage = onGodlikeMessage; |
8645 | if (handlerGodlikeMessage != null) | 8649 | if (handlerGodlikeMessage != null) |
8646 | { | 8650 | { |
8647 | handlerGodlikeMessage(this, | 8651 | handlerGodlikeMessage(this, |
@@ -8657,7 +8661,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8657 | { | 8661 | { |
8658 | StateSavePacket SaveStateMessage = | 8662 | StateSavePacket SaveStateMessage = |
8659 | (StateSavePacket)Packet; | 8663 | (StateSavePacket)Packet; |
8660 | SaveStateHandler handlerSaveStatePacket = OnSaveStateEvent; | 8664 | SaveStateHandler handlerSaveStatePacket = OnSaveState; |
8661 | if (handlerSaveStatePacket != null) | 8665 | if (handlerSaveStatePacket != null) |
8662 | { | 8666 | { |
8663 | handlerSaveStatePacket(this,SaveStateMessage.AgentData.AgentID); | 8667 | handlerSaveStatePacket(this,SaveStateMessage.AgentData.AgentID); |
@@ -9021,7 +9025,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9021 | { | 9025 | { |
9022 | UpdateMuteListEntryPacket UpdateMuteListEntry = | 9026 | UpdateMuteListEntryPacket UpdateMuteListEntry = |
9023 | (UpdateMuteListEntryPacket)Packet; | 9027 | (UpdateMuteListEntryPacket)Packet; |
9024 | MuteListEntryUpdate handlerUpdateMuteListEntry = OnUpdateMuteListEntryEvent; | 9028 | MuteListEntryUpdate handlerUpdateMuteListEntry = OnUpdateMuteListEntry; |
9025 | if (handlerUpdateMuteListEntry != null) | 9029 | if (handlerUpdateMuteListEntry != null) |
9026 | { | 9030 | { |
9027 | handlerUpdateMuteListEntry(this, UpdateMuteListEntry.MuteData.MuteID, | 9031 | handlerUpdateMuteListEntry(this, UpdateMuteListEntry.MuteData.MuteID, |
@@ -9037,7 +9041,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9037 | { | 9041 | { |
9038 | RemoveMuteListEntryPacket RemoveMuteListEntry = | 9042 | RemoveMuteListEntryPacket RemoveMuteListEntry = |
9039 | (RemoveMuteListEntryPacket)Packet; | 9043 | (RemoveMuteListEntryPacket)Packet; |
9040 | MuteListEntryRemove handlerRemoveMuteListEntry = OnRemoveMuteListEntryEvent; | 9044 | MuteListEntryRemove handlerRemoveMuteListEntry = OnRemoveMuteListEntry; |
9041 | if (handlerRemoveMuteListEntry != null) | 9045 | if (handlerRemoveMuteListEntry != null) |
9042 | { | 9046 | { |
9043 | handlerRemoveMuteListEntry(this, | 9047 | handlerRemoveMuteListEntry(this, |
@@ -9054,7 +9058,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9054 | UserReportPacket UserReport = | 9058 | UserReportPacket UserReport = |
9055 | (UserReportPacket)Packet; | 9059 | (UserReportPacket)Packet; |
9056 | 9060 | ||
9057 | NewUserReport handlerUserReport = OnUserReportEvent; | 9061 | NewUserReport handlerUserReport = OnUserReport; |
9058 | if (handlerUserReport != null) | 9062 | if (handlerUserReport != null) |
9059 | { | 9063 | { |
9060 | handlerUserReport(this, | 9064 | handlerUserReport(this, |