diff options
author | Teravus Ovares | 2008-02-05 05:26:18 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-05 05:26:18 +0000 |
commit | ca5aadfbff63e03b7ca081e753204d8da040c9bb (patch) | |
tree | e2d19e01678c27cff57bc26257cec7385c3df274 /OpenSim/Region/ClientStack/ClientView.cs | |
parent | Added copyright statements. (diff) | |
download | opensim-SC-ca5aadfbff63e03b7ca081e753204d8da040c9bb.zip opensim-SC-ca5aadfbff63e03b7ca081e753204d8da040c9bb.tar.gz opensim-SC-ca5aadfbff63e03b7ca081e753204d8da040c9bb.tar.bz2 opensim-SC-ca5aadfbff63e03b7ca081e753204d8da040c9bb.tar.xz |
* Refactored the sound calls to SceneObjectPart
* Fixed a few bugs
* Wrote an example module to make certain event systems more mature.
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index e89b722..5fdb9b3 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -581,6 +581,8 @@ namespace OpenSim.Region.ClientStack | |||
581 | 581 | ||
582 | public event MoneyTransferRequest OnMoneyTransferRequest; | 582 | public event MoneyTransferRequest OnMoneyTransferRequest; |
583 | 583 | ||
584 | public event MoneyBalanceRequest OnMoneyBalanceRequest; | ||
585 | |||
584 | 586 | ||
585 | #region Scene/Avatar to Client | 587 | #region Scene/Avatar to Client |
586 | 588 | ||
@@ -2067,15 +2069,23 @@ namespace OpenSim.Region.ClientStack | |||
2067 | private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack) | 2069 | private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack) |
2068 | { | 2070 | { |
2069 | MoneyTransferRequestPacket money = (MoneyTransferRequestPacket)Pack; | 2071 | MoneyTransferRequestPacket money = (MoneyTransferRequestPacket)Pack; |
2072 | // validate the agent owns the agentID and sessionID | ||
2073 | if (money.MoneyData.SourceID == sender.AgentId && money.AgentData.AgentID == sender.AgentId && money.AgentData.SessionID == sender.SessionId) | ||
2074 | { | ||
2070 | 2075 | ||
2071 | if (OnMoneyTransferRequest != null) | 2076 | if (OnMoneyTransferRequest != null) |
2077 | { | ||
2078 | OnMoneyTransferRequest(money.MoneyData.SourceID, money.MoneyData.DestID, | ||
2079 | money.MoneyData.Amount, money.MoneyData.TransactionType, | ||
2080 | Util.FieldToString(money.MoneyData.Description)); | ||
2081 | } | ||
2082 | |||
2083 | return true; | ||
2084 | } | ||
2085 | else | ||
2072 | { | 2086 | { |
2073 | OnMoneyTransferRequest(money.MoneyData.SourceID, money.MoneyData.DestID, | 2087 | return false; |
2074 | money.MoneyData.Amount, money.MoneyData.TransactionType, | ||
2075 | Util.FieldToString(money.MoneyData.Description)); | ||
2076 | } | 2088 | } |
2077 | |||
2078 | return true; | ||
2079 | } | 2089 | } |
2080 | 2090 | ||
2081 | private bool HandleViewerEffect(IClientAPI sender, Packet Pack) | 2091 | private bool HandleViewerEffect(IClientAPI sender, Packet Pack) |
@@ -3434,7 +3444,13 @@ namespace OpenSim.Region.ClientStack | |||
3434 | #endregion | 3444 | #endregion |
3435 | 3445 | ||
3436 | case PacketType.MoneyBalanceRequest: | 3446 | case PacketType.MoneyBalanceRequest: |
3437 | SendMoneyBalance(LLUUID.Zero, true, new byte[0], MoneyBalance); | 3447 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; |
3448 | if (OnMoneyBalanceRequest != null) | ||
3449 | { | ||
3450 | OnMoneyBalanceRequest(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID); | ||
3451 | } | ||
3452 | |||
3453 | |||
3438 | break; | 3454 | break; |
3439 | case PacketType.UUIDNameRequest: | 3455 | case PacketType.UUIDNameRequest: |
3440 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; | 3456 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; |