diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e014471..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); |
@@ -6214,7 +6223,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6214 | if (appear.ObjectData.TextureEntry.Length > 1) | 6223 | if (appear.ObjectData.TextureEntry.Length > 1) |
6215 | te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); | 6224 | te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); |
6216 | 6225 | ||
6217 | handlerSetAppearance(sender, te, visualparams); | 6226 | List<CachedTextureRequestArg> hashes = new List<CachedTextureRequestArg>(); |
6227 | for (int i = 0; i < appear.WearableData.Length; i++) | ||
6228 | { | ||
6229 | CachedTextureRequestArg arg = new CachedTextureRequestArg(); | ||
6230 | arg.BakedTextureIndex = appear.WearableData[i].TextureIndex; | ||
6231 | arg.WearableHashID = appear.WearableData[i].CacheID; | ||
6232 | hashes.Add(arg); | ||
6233 | } | ||
6234 | |||
6235 | handlerSetAppearance(sender, te, visualparams, hashes); | ||
6218 | } | 6236 | } |
6219 | catch (Exception e) | 6237 | catch (Exception e) |
6220 | { | 6238 | { |
@@ -11487,12 +11505,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11487 | requestArgs.Add(arg); | 11505 | requestArgs.Add(arg); |
11488 | } | 11506 | } |
11489 | 11507 | ||
11490 | CachedTextureRequest handlerCachedTextureRequest = OnCachedTextureRequest; | 11508 | try |
11491 | if (handlerCachedTextureRequest != null) | ||
11492 | { | 11509 | { |
11493 | handlerCachedTextureRequest(simclient,cachedtex.AgentData.SerialNum,requestArgs); | 11510 | CachedTextureRequest handlerCachedTextureRequest = OnCachedTextureRequest; |
11511 | if (handlerCachedTextureRequest != null) | ||
11512 | { | ||
11513 | handlerCachedTextureRequest(simclient,cachedtex.AgentData.SerialNum,requestArgs); | ||
11514 | } | ||
11494 | } | 11515 | } |
11495 | 11516 | catch (Exception e) | |
11517 | { | ||
11518 | m_log.ErrorFormat("[CLIENT VIEW]: AgentTextureCached packet handler threw an exception, {0}", e); | ||
11519 | return false; | ||
11520 | } | ||
11521 | |||
11496 | return true; | 11522 | return true; |
11497 | } | 11523 | } |
11498 | 11524 | ||
@@ -11916,17 +11942,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11916 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); | 11942 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); |
11917 | } | 11943 | } |
11918 | 11944 | ||
11919 | public bool AddMoney(int debit) | ||
11920 | { | ||
11921 | if (m_moneyBalance + debit >= 0) | ||
11922 | { | ||
11923 | m_moneyBalance += debit; | ||
11924 | SendMoneyBalance(UUID.Zero, true, Util.StringToBytes256("Poof Poof!"), m_moneyBalance); | ||
11925 | return true; | ||
11926 | } | ||
11927 | return false; | ||
11928 | } | ||
11929 | |||
11930 | protected void HandleAutopilot(Object sender, string method, List<String> args) | 11945 | protected void HandleAutopilot(Object sender, string method, List<String> args) |
11931 | { | 11946 | { |
11932 | float locx = 0; | 11947 | float locx = 0; |