diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 30 |
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 d5b7ec8..7208f08 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -354,7 +354,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
354 | 354 | ||
355 | // protected HashSet<uint> m_attachmentsSent; | 355 | // protected HashSet<uint> m_attachmentsSent; |
356 | 356 | ||
357 | private int m_moneyBalance; | ||
358 | private bool m_deliverPackets = true; | 357 | private bool m_deliverPackets = true; |
359 | private int m_animationSequenceNumber = 1; | 358 | private int m_animationSequenceNumber = 1; |
360 | private bool m_SendLogoutPacketWhenClosing = true; | 359 | private bool m_SendLogoutPacketWhenClosing = true; |
@@ -438,7 +437,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
438 | public string Name { get { return FirstName + " " + LastName; } } | 437 | public string Name { get { return FirstName + " " + LastName; } } |
439 | 438 | ||
440 | public uint CircuitCode { get { return m_circuitCode; } } | 439 | public uint CircuitCode { get { return m_circuitCode; } } |
441 | public int MoneyBalance { get { return m_moneyBalance; } } | ||
442 | public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } | 440 | public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } |
443 | 441 | ||
444 | /// <summary> | 442 | /// <summary> |
@@ -502,7 +500,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
502 | m_firstName = sessionInfo.LoginInfo.First; | 500 | m_firstName = sessionInfo.LoginInfo.First; |
503 | m_lastName = sessionInfo.LoginInfo.Last; | 501 | m_lastName = sessionInfo.LoginInfo.Last; |
504 | m_startpos = sessionInfo.LoginInfo.StartPos; | 502 | m_startpos = sessionInfo.LoginInfo.StartPos; |
505 | m_moneyBalance = 1000; | ||
506 | 503 | ||
507 | m_udpServer = udpServer; | 504 | m_udpServer = udpServer; |
508 | m_udpClient = udpClient; | 505 | m_udpClient = udpClient; |
@@ -1526,7 +1523,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1526 | OutPacket(tpProgress, ThrottleOutPacketType.Unknown); | 1523 | OutPacket(tpProgress, ThrottleOutPacketType.Unknown); |
1527 | } | 1524 | } |
1528 | 1525 | ||
1529 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | 1526 | 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) |
1530 | { | 1527 | { |
1531 | MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); | 1528 | MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); |
1532 | money.MoneyData.AgentID = AgentId; | 1529 | money.MoneyData.AgentID = AgentId; |
@@ -1534,7 +1531,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1534 | money.MoneyData.TransactionSuccess = success; | 1531 | money.MoneyData.TransactionSuccess = success; |
1535 | money.MoneyData.Description = description; | 1532 | money.MoneyData.Description = description; |
1536 | money.MoneyData.MoneyBalance = balance; | 1533 | money.MoneyData.MoneyBalance = balance; |
1537 | money.TransactionInfo.ItemDescription = Util.StringToBytes256("NONE"); | 1534 | money.TransactionInfo.TransactionType = transactionType; |
1535 | money.TransactionInfo.SourceID = sourceID; | ||
1536 | money.TransactionInfo.IsSourceGroup = sourceIsGroup; | ||
1537 | money.TransactionInfo.DestID = destID; | ||
1538 | money.TransactionInfo.IsDestGroup = destIsGroup; | ||
1539 | money.TransactionInfo.Amount = amount; | ||
1540 | money.TransactionInfo.ItemDescription = Util.StringToBytes256(item); | ||
1541 | |||
1538 | OutPacket(money, ThrottleOutPacketType.Task); | 1542 | OutPacket(money, ThrottleOutPacketType.Task); |
1539 | } | 1543 | } |
1540 | 1544 | ||
@@ -2278,6 +2282,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2278 | /// <returns></returns> | 2282 | /// <returns></returns> |
2279 | public AgentAlertMessagePacket BuildAgentAlertPacket(string message, bool modal) | 2283 | public AgentAlertMessagePacket BuildAgentAlertPacket(string message, bool modal) |
2280 | { | 2284 | { |
2285 | // Prepend a slash to make the message come up in the top right | ||
2286 | // again. | ||
2287 | // Allow special formats to be sent from aware modules. | ||
2288 | if (!modal && !message.StartsWith("ALERT: ") && !message.StartsWith("NOTIFY: ") && message != "Home position set." && message != "You died and have been teleported to your home location") | ||
2289 | message = "/" + message; | ||
2281 | AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); | 2290 | AgentAlertMessagePacket alertPack = (AgentAlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AgentAlertMessage); |
2282 | alertPack.AgentData.AgentID = AgentId; | 2291 | alertPack.AgentData.AgentID = AgentId; |
2283 | alertPack.AlertData.Message = Util.StringToBytes256(message); | 2292 | alertPack.AlertData.Message = Util.StringToBytes256(message); |
@@ -12217,17 +12226,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12217 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); | 12226 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); |
12218 | } | 12227 | } |
12219 | 12228 | ||
12220 | public bool AddMoney(int debit) | ||
12221 | { | ||
12222 | if (m_moneyBalance + debit >= 0) | ||
12223 | { | ||
12224 | m_moneyBalance += debit; | ||
12225 | SendMoneyBalance(UUID.Zero, true, Util.StringToBytes256("Poof Poof!"), m_moneyBalance); | ||
12226 | return true; | ||
12227 | } | ||
12228 | return false; | ||
12229 | } | ||
12230 | |||
12231 | protected void HandleAutopilot(Object sender, string method, List<String> args) | 12229 | protected void HandleAutopilot(Object sender, string method, List<String> args) |
12232 | { | 12230 | { |
12233 | float locx = 0; | 12231 | float locx = 0; |