diff options
author | Adam Frisby | 2008-04-23 12:21:54 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-23 12:21:54 +0000 |
commit | 3370d581e1c5297721a05db857a016e1d728018f (patch) | |
tree | f5e7721843e649a9cf6e760c0a61b7331f227118 /OpenSim/Region/ClientStack | |
parent | * Another bamboo fix (diff) | |
download | opensim-SC_OLD-3370d581e1c5297721a05db857a016e1d728018f.zip opensim-SC_OLD-3370d581e1c5297721a05db857a016e1d728018f.tar.gz opensim-SC_OLD-3370d581e1c5297721a05db857a016e1d728018f.tar.bz2 opensim-SC_OLD-3370d581e1c5297721a05db857a016e1d728018f.tar.xz |
* Patch #1026 - llDialog support -- Thanks Melanie!
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index a58f88f..9e8830f 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -233,6 +233,7 @@ namespace OpenSim.Region.ClientStack | |||
233 | private RequestAsset handlerRequestAsset = null; // OnRequestAsset; | 233 | private RequestAsset handlerRequestAsset = null; // OnRequestAsset; |
234 | private UUIDNameRequest handlerTeleportHomeRequest = null; | 234 | private UUIDNameRequest handlerTeleportHomeRequest = null; |
235 | 235 | ||
236 | private ScriptAnswer handlerScriptAnswer = null; | ||
236 | 237 | ||
237 | /* Properties */ | 238 | /* Properties */ |
238 | 239 | ||
@@ -789,6 +790,8 @@ namespace OpenSim.Region.ClientStack | |||
789 | 790 | ||
790 | public event UUIDNameRequest OnTeleportHomeRequest; | 791 | public event UUIDNameRequest OnTeleportHomeRequest; |
791 | 792 | ||
793 | public event ScriptAnswer OnScriptAnswer; | ||
794 | |||
792 | #region Scene/Avatar to Client | 795 | #region Scene/Avatar to Client |
793 | 796 | ||
794 | /// <summary> | 797 | /// <summary> |
@@ -2484,6 +2487,20 @@ namespace OpenSim.Region.ClientStack | |||
2484 | return true; | 2487 | return true; |
2485 | } | 2488 | } |
2486 | 2489 | ||
2490 | public void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question) | ||
2491 | { | ||
2492 | ScriptQuestionPacket scriptQuestion = (ScriptQuestionPacket)PacketPool.Instance.GetPacket(PacketType.ScriptQuestion); | ||
2493 | scriptQuestion.Data = new ScriptQuestionPacket.DataBlock(); | ||
2494 | // TODO: don't create new blocks if recycling an old packet | ||
2495 | scriptQuestion.Data.TaskID = taskID; | ||
2496 | scriptQuestion.Data.ItemID = itemID; | ||
2497 | scriptQuestion.Data.Questions = question; | ||
2498 | scriptQuestion.Data.ObjectName = Helpers.StringToField(taskName); | ||
2499 | scriptQuestion.Data.ObjectOwner = Helpers.StringToField(ownerName); | ||
2500 | |||
2501 | OutPacket(scriptQuestion, ThrottleOutPacketType.Task); | ||
2502 | } | ||
2503 | |||
2487 | protected virtual bool Logout(IClientAPI client, Packet packet) | 2504 | protected virtual bool Logout(IClientAPI client, Packet packet) |
2488 | { | 2505 | { |
2489 | m_log.Info("[CLIENT]: Got a logout request"); | 2506 | m_log.Info("[CLIENT]: Got a logout request"); |
@@ -3840,6 +3857,16 @@ namespace OpenSim.Region.ClientStack | |||
3840 | } | 3857 | } |
3841 | break; | 3858 | break; |
3842 | 3859 | ||
3860 | case PacketType.ScriptAnswerYes: | ||
3861 | ScriptAnswerYesPacket scriptAnswer = (ScriptAnswerYesPacket)Pack; | ||
3862 | |||
3863 | handlerScriptAnswer = OnScriptAnswer; | ||
3864 | if (handlerScriptAnswer != null) | ||
3865 | { | ||
3866 | handlerScriptAnswer(this, scriptAnswer.Data.TaskID, scriptAnswer.Data.ItemID, scriptAnswer.Data.Questions); | ||
3867 | } | ||
3868 | break; | ||
3869 | |||
3843 | #endregion | 3870 | #endregion |
3844 | 3871 | ||
3845 | #region Inventory/Asset/Other related packets | 3872 | #region Inventory/Asset/Other related packets |