aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs30
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs7
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs13
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs7
5 files changed, 26 insertions, 33 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;
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 686c605..dd72cfb 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1055,7 +1055,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1055 { 1055 {
1056 } 1056 }
1057 1057
1058 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) 1058 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)
1059 { 1059 {
1060 1060
1061 } 1061 }
@@ -1200,11 +1200,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1200 1200
1201 } 1201 }
1202 1202
1203 public bool AddMoney(int debit)
1204 {
1205 return true;
1206 }
1207
1208 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) 1203 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition)
1209 { 1204 {
1210 1205
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index d764936..d0a5989 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -764,7 +764,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
764 remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got insufficient funds to create a group."); 764 remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got insufficient funds to create a group.");
765 return UUID.Zero; 765 return UUID.Zero;
766 } 766 }
767 money.ApplyCharge(GetRequestingAgentID(remoteClient), money.GroupCreationCharge, "Group Creation"); 767 money.ApplyCharge(GetRequestingAgentID(remoteClient), money.GroupCreationCharge, MoneyTransactionType.GroupCreate);
768 } 768 }
769 UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient)); 769 UUID groupID = m_groupData.CreateGroup(GetRequestingAgentID(remoteClient), name, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish, GetRequestingAgentID(remoteClient));
770 770
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index be020e4..0c9fdb9 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -191,9 +191,14 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
191 // Please do not refactor these to be just one method 191 // Please do not refactor these to be just one method
192 // Existing implementations need the distinction 192 // Existing implementations need the distinction
193 // 193 //
194 public void ApplyCharge(UUID agentID, int amount, string text) 194 public void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type, string extraData)
195 { 195 {
196 } 196 }
197
198 public void ApplyCharge(UUID agentID, int amount, MoneyTransactionType type)
199 {
200 }
201
197 public void ApplyUploadCharge(UUID agentID, int amount, string text) 202 public void ApplyUploadCharge(UUID agentID, int amount, string text)
198 { 203 {
199 } 204 }
@@ -322,7 +327,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
322 client.SendAlertMessage(e.Message + " "); 327 client.SendAlertMessage(e.Message + " ");
323 } 328 }
324 329
325 client.SendMoneyBalance(TransactionID, true, new byte[0], returnfunds); 330 client.SendMoneyBalance(TransactionID, true, new byte[0], returnfunds, 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty);
326 } 331 }
327 else 332 else
328 { 333 {
@@ -385,12 +390,12 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
385 { 390 {
386 if (sender != null) 391 if (sender != null)
387 { 392 {
388 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID)); 393 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID), 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty);
389 } 394 }
390 395
391 if (receiver != null) 396 if (receiver != null)
392 { 397 {
393 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID)); 398 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID), 0, UUID.Zero, false, UUID.Zero, false, 0, String.Empty);
394 } 399 }
395 } 400 }
396 } 401 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 7918c22..4674489 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -698,7 +698,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
698 { 698 {
699 } 699 }
700 700
701 public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) 701 public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item)
702 { 702 {
703 } 703 }
704 704
@@ -874,11 +874,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC
874 { 874 {
875 } 875 }
876 876
877 public bool AddMoney(int debit)
878 {
879 return false;
880 }
881
882 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) 877 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
883 { 878 {
884 } 879 }