aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-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 9de564b..ef1d803 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -355,7 +355,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
355 355
356// protected HashSet<uint> m_attachmentsSent; 356// protected HashSet<uint> m_attachmentsSent;
357 357
358 private int m_moneyBalance;
359 private bool m_deliverPackets = true; 358 private bool m_deliverPackets = true;
360 private int m_animationSequenceNumber = 1; 359 private int m_animationSequenceNumber = 1;
361 private bool m_SendLogoutPacketWhenClosing = true; 360 private bool m_SendLogoutPacketWhenClosing = true;
@@ -439,7 +438,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
439 public string Name { get { return FirstName + " " + LastName; } } 438 public string Name { get { return FirstName + " " + LastName; } }
440 439
441 public uint CircuitCode { get { return m_circuitCode; } } 440 public uint CircuitCode { get { return m_circuitCode; } }
442 public int MoneyBalance { get { return m_moneyBalance; } }
443 public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } 441 public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } }
444 442
445 /// <summary> 443 /// <summary>
@@ -503,7 +501,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
503 m_firstName = sessionInfo.LoginInfo.First; 501 m_firstName = sessionInfo.LoginInfo.First;
504 m_lastName = sessionInfo.LoginInfo.Last; 502 m_lastName = sessionInfo.LoginInfo.Last;
505 m_startpos = sessionInfo.LoginInfo.StartPos; 503 m_startpos = sessionInfo.LoginInfo.StartPos;
506 m_moneyBalance = 1000;
507 504
508 m_udpServer = udpServer; 505 m_udpServer = udpServer;
509 m_udpClient = udpClient; 506 m_udpClient = udpClient;
@@ -1530,7 +1527,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1530 OutPacket(tpProgress, ThrottleOutPacketType.Unknown); 1527 OutPacket(tpProgress, ThrottleOutPacketType.Unknown);
1531 } 1528 }
1532 1529
1533 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) 1530 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)
1534 { 1531 {
1535 MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); 1532 MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply);
1536 money.MoneyData.AgentID = AgentId; 1533 money.MoneyData.AgentID = AgentId;
@@ -1538,7 +1535,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1538 money.MoneyData.TransactionSuccess = success; 1535 money.MoneyData.TransactionSuccess = success;
1539 money.MoneyData.Description = description; 1536 money.MoneyData.Description = description;
1540 money.MoneyData.MoneyBalance = balance; 1537 money.MoneyData.MoneyBalance = balance;
1541 money.TransactionInfo.ItemDescription = Util.StringToBytes256("NONE"); 1538 money.TransactionInfo.TransactionType = transactionType;
1539 money.TransactionInfo.SourceID = sourceID;
1540 money.TransactionInfo.IsSourceGroup = sourceIsGroup;
1541 money.TransactionInfo.DestID = destID;
1542 money.TransactionInfo.IsDestGroup = destIsGroup;
1543 money.TransactionInfo.Amount = amount;
1544 money.TransactionInfo.ItemDescription = Util.StringToBytes256(item);
1545
1542 OutPacket(money, ThrottleOutPacketType.Task); 1546 OutPacket(money, ThrottleOutPacketType.Task);
1543 } 1547 }
1544 1548
@@ -2282,6 +2286,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2282 /// <returns></returns> 2286 /// <returns></returns>
2283 public AgentAlertMessagePacket BuildAgentAlertPacket(string message, bool modal) 2287 public AgentAlertMessagePacket BuildAgentAlertPacket(string message, bool modal)
2284 { 2288 {
2289 // Prepend a slash to make the message come up in the top right
2290 // again.
2291 // Allow special formats to be sent from aware modules.
2292 if (!modal && !message.StartsWith("ALERT: ") && !message.StartsWith("NOTIFY: ") && message != "Home position set." && message != "You died and have been teleported to your home location")
2293 message = "/" + message;
2285 AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); 2294 AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage);
2286 alertPack.AgentData.AgentID = AgentId; 2295 alertPack.AgentData.AgentID = AgentId;
2287 alertPack.AlertData.Message = Util.StringToBytes256(message); 2296 alertPack.AlertData.Message = Util.StringToBytes256(message);
@@ -12277,17 +12286,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12277 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); 12286 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method);
12278 } 12287 }
12279 12288
12280 public bool AddMoney(int debit)
12281 {
12282 if (m_moneyBalance + debit >= 0)
12283 {
12284 m_moneyBalance += debit;
12285 SendMoneyBalance(UUID.Zero, true, Util.StringToBytes256("Poof Poof!"), m_moneyBalance);
12286 return true;
12287 }
12288 return false;
12289 }
12290
12291 protected void HandleAutopilot(Object sender, string method, List<String> args) 12289 protected void HandleAutopilot(Object sender, string method, List<String> args)
12292 { 12290 {
12293 float locx = 0; 12291 float locx = 0;