aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs30
1 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index dd8ef9c..e47397d 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -345,7 +345,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
345 345
346// protected HashSet<uint> m_attachmentsSent; 346// protected HashSet<uint> m_attachmentsSent;
347 347
348 private int m_moneyBalance;
349 private int m_animationSequenceNumber = 1; 348 private int m_animationSequenceNumber = 1;
350 private bool m_SendLogoutPacketWhenClosing = true; 349 private bool m_SendLogoutPacketWhenClosing = true;
351 350
@@ -420,7 +419,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
420 public string Name { get { return FirstName + " " + LastName; } } 419 public string Name { get { return FirstName + " " + LastName; } }
421 420
422 public uint CircuitCode { get { return m_circuitCode; } } 421 public uint CircuitCode { get { return m_circuitCode; } }
423 public int MoneyBalance { get { return m_moneyBalance; } }
424 public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } 422 public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } }
425 423
426 /// <summary> 424 /// <summary>
@@ -483,7 +481,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
483 m_firstName = sessionInfo.LoginInfo.First; 481 m_firstName = sessionInfo.LoginInfo.First;
484 m_lastName = sessionInfo.LoginInfo.Last; 482 m_lastName = sessionInfo.LoginInfo.Last;
485 m_startpos = sessionInfo.LoginInfo.StartPos; 483 m_startpos = sessionInfo.LoginInfo.StartPos;
486 m_moneyBalance = 1000;
487 484
488 m_udpServer = udpServer; 485 m_udpServer = udpServer;
489 m_udpClient = udpClient; 486 m_udpClient = udpClient;
@@ -1538,7 +1535,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1538 OutPacket(tpProgress, ThrottleOutPacketType.Unknown); 1535 OutPacket(tpProgress, ThrottleOutPacketType.Unknown);
1539 } 1536 }
1540 1537
1541 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) 1538 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item)
1542 { 1539 {
1543 MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); 1540 MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply);
1544 money.MoneyData.AgentID = AgentId; 1541 money.MoneyData.AgentID = AgentId;
@@ -1546,7 +1543,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1546 money.MoneyData.TransactionSuccess = success; 1543 money.MoneyData.TransactionSuccess = success;
1547 money.MoneyData.Description = description; 1544 money.MoneyData.Description = description;
1548 money.MoneyData.MoneyBalance = balance; 1545 money.MoneyData.MoneyBalance = balance;
1549 money.TransactionInfo.ItemDescription = Util.StringToBytes256("NONE"); 1546 money.TransactionInfo.TransactionType = transactionType;
1547 money.TransactionInfo.SourceID = sourceID;
1548 money.TransactionInfo.IsSourceGroup = sourceIsGroup;
1549 money.TransactionInfo.DestID = destID;
1550 money.TransactionInfo.IsDestGroup = destIsGroup;
1551 money.TransactionInfo.Amount = amount;
1552 money.TransactionInfo.ItemDescription = Util.StringToBytes256(item);
1553
1550 OutPacket(money, ThrottleOutPacketType.Task); 1554 OutPacket(money, ThrottleOutPacketType.Task);
1551 } 1555 }
1552 1556
@@ -2279,6 +2283,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2279 /// <returns></returns> 2283 /// <returns></returns>
2280 public AgentAlertMessagePacket BuildAgentAlertPacket(string message, bool modal) 2284 public AgentAlertMessagePacket BuildAgentAlertPacket(string message, bool modal)
2281 { 2285 {
2286 // Prepend a slash to make the message come up in the top right
2287 // again.
2288 // Allow special formats to be sent from aware modules.
2289 if (!modal && !message.StartsWith("ALERT: ") && !message.StartsWith("NOTIFY: ") && message != "Home position set." && message != "You died and have been teleported to your home location")
2290 message = "/" + message;
2282 AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); 2291 AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage);
2283 alertPack.AgentData.AgentID = AgentId; 2292 alertPack.AgentData.AgentID = AgentId;
2284 alertPack.AlertData.Message = Util.StringToBytes256(message); 2293 alertPack.AlertData.Message = Util.StringToBytes256(message);
@@ -11933,17 +11942,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11933 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); 11942 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method);
11934 } 11943 }
11935 11944
11936 public bool AddMoney(int debit)
11937 {
11938 if (m_moneyBalance + debit >= 0)
11939 {
11940 m_moneyBalance += debit;
11941 SendMoneyBalance(UUID.Zero, true, Util.StringToBytes256("Poof Poof!"), m_moneyBalance);
11942 return true;
11943 }
11944 return false;
11945 }
11946
11947 protected void HandleAutopilot(Object sender, string method, List<String> args) 11945 protected void HandleAutopilot(Object sender, string method, List<String> args)
11948 { 11946 {
11949 float locx = 0; 11947 float locx = 0;