diff options
author | lbsa71 | 2007-08-15 21:24:25 +0000 |
---|---|---|
committer | lbsa71 | 2007-08-15 21:24:25 +0000 |
commit | 94af93874226bf4441a35bfd4cf498e9ed83ccf5 (patch) | |
tree | 4fd6498ca8384f375bfc1365e74469af13954ae0 /OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |
parent | compile error removed :) (diff) | |
download | opensim-SC_OLD-94af93874226bf4441a35bfd4cf498e9ed83ccf5.zip opensim-SC_OLD-94af93874226bf4441a35bfd4cf498e9ed83ccf5.tar.gz opensim-SC_OLD-94af93874226bf4441a35bfd4cf498e9ed83ccf5.tar.bz2 opensim-SC_OLD-94af93874226bf4441a35bfd4cf498e9ed83ccf5.tar.xz |
The 'Party Party Groupie Groupie Life is a game' commit:
* Added prototypical MoneyBalance support
* Finalized konceptual touch wiring
* Turned SimpleApp into a tedious harvesting game.
Diffstat (limited to '')
-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; |