aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorlbsa712007-08-15 21:24:25 +0000
committerlbsa712007-08-15 21:24:25 +0000
commit94af93874226bf4441a35bfd4cf498e9ed83ccf5 (patch)
tree4fd6498ca8384f375bfc1365e74469af13954ae0 /OpenSim/Region/ClientStack
parentcompile error removed :) (diff)
downloadopensim-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.cs23
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs2
2 files changed, 24 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;
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 1375f6c..5a60096 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -87,6 +87,8 @@ namespace OpenSim.Region.ClientStack
87 87
88 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions ) 88 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions )
89 { 89 {
90 m_moneyBalance = 1000;
91
90 m_scene = scene; 92 m_scene = scene;
91 m_clientThreads = clientThreads; 93 m_clientThreads = clientThreads;
92 m_assetCache = assetCache; 94 m_assetCache = assetCache;