diff options
author | Teravus Ovares | 2008-04-23 22:44:59 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-23 22:44:59 +0000 |
commit | 1909d74d5fa8e6cea151bb5ff6b8e40b197b9f90 (patch) | |
tree | e2f37410f60a2b038c7ced800008491c7d0f1d88 /OpenSim/Region/ClientStack/ClientView.cs | |
parent | * Add NUnit to CONTRIBUTORS file (diff) | |
download | opensim-SC_OLD-1909d74d5fa8e6cea151bb5ff6b8e40b197b9f90.zip opensim-SC_OLD-1909d74d5fa8e6cea151bb5ff6b8e40b197b9f90.tar.gz opensim-SC_OLD-1909d74d5fa8e6cea151bb5ff6b8e40b197b9f90.tar.bz2 opensim-SC_OLD-1909d74d5fa8e6cea151bb5ff6b8e40b197b9f90.tar.xz |
* Patch from Melanie. Mantis 0001037: Add various internal plumbing to the example economy module, implements llSetPayPrice(), money() and llGiveMoney() in scripts. Thanks Melanie!
* Moves module loading before the script engine so the script engine can pick up events from modules registering interfaces with scene.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 9e8830f..216633f 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -234,6 +234,7 @@ namespace OpenSim.Region.ClientStack | |||
234 | private UUIDNameRequest handlerTeleportHomeRequest = null; | 234 | private UUIDNameRequest handlerTeleportHomeRequest = null; |
235 | 235 | ||
236 | private ScriptAnswer handlerScriptAnswer = null; | 236 | private ScriptAnswer handlerScriptAnswer = null; |
237 | private RequestPayPrice handlerRequestPayPrice = null; | ||
237 | 238 | ||
238 | /* Properties */ | 239 | /* Properties */ |
239 | 240 | ||
@@ -791,6 +792,7 @@ namespace OpenSim.Region.ClientStack | |||
791 | public event UUIDNameRequest OnTeleportHomeRequest; | 792 | public event UUIDNameRequest OnTeleportHomeRequest; |
792 | 793 | ||
793 | public event ScriptAnswer OnScriptAnswer; | 794 | public event ScriptAnswer OnScriptAnswer; |
795 | public event RequestPayPrice OnRequestPayPrice; | ||
794 | 796 | ||
795 | #region Scene/Avatar to Client | 797 | #region Scene/Avatar to Client |
796 | 798 | ||
@@ -1167,6 +1169,32 @@ namespace OpenSim.Region.ClientStack | |||
1167 | OutPacket(money, ThrottleOutPacketType.Task); | 1169 | OutPacket(money, ThrottleOutPacketType.Task); |
1168 | } | 1170 | } |
1169 | 1171 | ||
1172 | public void SendPayPrice(LLUUID objectID, int[] payPrice) | ||
1173 | { | ||
1174 | if(payPrice[0] == 0 && | ||
1175 | payPrice[1] == 0 && | ||
1176 | payPrice[2] == 0 && | ||
1177 | payPrice[3] == 0 && | ||
1178 | payPrice[4] == 0) | ||
1179 | return; | ||
1180 | |||
1181 | PayPriceReplyPacket payPriceReply = (PayPriceReplyPacket)PacketPool.Instance.GetPacket(PacketType.PayPriceReply); | ||
1182 | payPriceReply.ObjectData.ObjectID = objectID; | ||
1183 | payPriceReply.ObjectData.DefaultPayPrice = payPrice[0]; | ||
1184 | |||
1185 | payPriceReply.ButtonData=new PayPriceReplyPacket.ButtonDataBlock[4]; | ||
1186 | payPriceReply.ButtonData[0]=new PayPriceReplyPacket.ButtonDataBlock(); | ||
1187 | payPriceReply.ButtonData[0].PayButton = payPrice[1]; | ||
1188 | payPriceReply.ButtonData[1]=new PayPriceReplyPacket.ButtonDataBlock(); | ||
1189 | payPriceReply.ButtonData[1].PayButton = payPrice[2]; | ||
1190 | payPriceReply.ButtonData[2]=new PayPriceReplyPacket.ButtonDataBlock(); | ||
1191 | payPriceReply.ButtonData[2].PayButton = payPrice[3]; | ||
1192 | payPriceReply.ButtonData[3]=new PayPriceReplyPacket.ButtonDataBlock(); | ||
1193 | payPriceReply.ButtonData[3].PayButton = payPrice[4]; | ||
1194 | |||
1195 | OutPacket(payPriceReply, ThrottleOutPacketType.Task); | ||
1196 | } | ||
1197 | |||
1170 | public void SendStartPingCheck(byte seq) | 1198 | public void SendStartPingCheck(byte seq) |
1171 | { | 1199 | { |
1172 | StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck); | 1200 | StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck); |
@@ -4555,6 +4583,14 @@ namespace OpenSim.Region.ClientStack | |||
4555 | // TODO: handle this packet | 4583 | // TODO: handle this packet |
4556 | //m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet"); | 4584 | //m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet"); |
4557 | break; | 4585 | break; |
4586 | case PacketType.RequestPayPrice: | ||
4587 | RequestPayPricePacket requestPayPricePacket = (RequestPayPricePacket)Pack; | ||
4588 | handlerRequestPayPrice = OnRequestPayPrice; | ||
4589 | if (handlerRequestPayPrice != null) | ||
4590 | { | ||
4591 | handlerRequestPayPrice(this, requestPayPricePacket.ObjectData.ObjectID); | ||
4592 | } | ||
4593 | break; | ||
4558 | 4594 | ||
4559 | #endregion | 4595 | #endregion |
4560 | 4596 | ||