diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 1e3685b..f380c25 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -38,6 +38,27 @@ namespace OpenSim.Region.ClientStack | |||
38 | { | 38 | { |
39 | public partial class ClientView | 39 | public partial class ClientView |
40 | { | 40 | { |
41 | private int m_moneyBalance; | ||
42 | |||
43 | public int MoneyBalance | ||
44 | { | ||
45 | get { return m_moneyBalance; } | ||
46 | } | ||
47 | |||
48 | public bool AddMoney( int debit ) | ||
49 | { | ||
50 | if( m_moneyBalance + debit >= 0 ) | ||
51 | { | ||
52 | m_moneyBalance += debit; | ||
53 | SendMoneyBalance( LLUUID.Zero, true, Helpers.StringToField("Poof Poof!"), m_moneyBalance ); | ||
54 | return true; | ||
55 | } | ||
56 | else | ||
57 | { | ||
58 | return false; | ||
59 | } | ||
60 | } | ||
61 | |||
41 | protected override void ProcessInPacket(Packet Pack) | 62 | protected override void ProcessInPacket(Packet Pack) |
42 | { | 63 | { |
43 | ack_pack(Pack); | 64 | ack_pack(Pack); |
@@ -521,7 +542,7 @@ namespace OpenSim.Region.ClientStack | |||
521 | #endregion | 542 | #endregion |
522 | 543 | ||
523 | case PacketType.MoneyBalanceRequest: | 544 | case PacketType.MoneyBalanceRequest: |
524 | this.SendMoneyBalance(LLUUID.Zero, true, new byte[0], 1000); | 545 | SendMoneyBalance(LLUUID.Zero, true, new byte[0], MoneyBalance); |
525 | break; | 546 | break; |
526 | case PacketType.UUIDNameRequest: | 547 | case PacketType.UUIDNameRequest: |
527 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; | 548 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; |