aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2009-03-27 18:51:45 +0000
committerMelanie Thielker2009-03-27 18:51:45 +0000
commit37e81c7d54db5b775550db9455bcd9cdce046bc7 (patch)
tree0f44e0b459ba0f74aa6b9798d820e1341a70cff6 /OpenSim/Region
parent* minor: move RegionSettingsSerializer into OpenSim.Framework.Serialization (diff)
downloadopensim-SC-37e81c7d54db5b775550db9455bcd9cdce046bc7.zip
opensim-SC-37e81c7d54db5b775550db9455bcd9cdce046bc7.tar.gz
opensim-SC-37e81c7d54db5b775550db9455bcd9cdce046bc7.tar.bz2
opensim-SC-37e81c7d54db5b775550db9455bcd9cdce046bc7.tar.xz
Remove a hardcoded flow/dependency on the money module from LLCLientView
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs56
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs4
3 files changed, 25 insertions, 39 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index e69f373..84a32ff 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -7194,25 +7194,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7194 7194
7195 if (m_GroupsModule != null) 7195 if (m_GroupsModule != null)
7196 { 7196 {
7197 CreateGroupReplyPacket createGroupReply = (CreateGroupReplyPacket)PacketPool.Instance.GetPacket(PacketType.CreateGroupReply);
7198
7199 createGroupReply.AgentData =
7200 new CreateGroupReplyPacket.AgentDataBlock();
7201 createGroupReply.ReplyData =
7202 new CreateGroupReplyPacket.ReplyDataBlock();
7203
7204 createGroupReply.AgentData.AgentID = AgentId;
7205 createGroupReply.ReplyData.GroupID = UUID.Zero;
7206
7207 IMoneyModule money = m_scene.RequestModuleInterface<IMoneyModule>();
7208 if (money != null && !money.GroupCreationCovered(this))
7209 {
7210 createGroupReply.ReplyData.Success = false;
7211 createGroupReply.ReplyData.Message = Utils.StringToBytes("You do not have sufficient funds to create a group");
7212 OutPacket(createGroupReply, ThrottleOutPacketType.Task);
7213 break;
7214 }
7215
7216 UUID groupID = m_GroupsModule.CreateGroup(this, 7197 UUID groupID = m_GroupsModule.CreateGroup(this,
7217 Utils.BytesToString(createGroupRequest.GroupData.Name), 7198 Utils.BytesToString(createGroupRequest.GroupData.Name),
7218 Utils.BytesToString(createGroupRequest.GroupData.Charter), 7199 Utils.BytesToString(createGroupRequest.GroupData.Charter),
@@ -7222,26 +7203,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7222 createGroupRequest.GroupData.OpenEnrollment, 7203 createGroupRequest.GroupData.OpenEnrollment,
7223 createGroupRequest.GroupData.AllowPublish, 7204 createGroupRequest.GroupData.AllowPublish,
7224 createGroupRequest.GroupData.MaturePublish); 7205 createGroupRequest.GroupData.MaturePublish);
7225 if (groupID == UUID.Zero)
7226 {
7227 createGroupReply.ReplyData.Success = false;
7228 createGroupReply.ReplyData.Message = Utils.StringToBytes("We're sorry, but we could not create the requested group. Please try another name");
7229 OutPacket(createGroupReply, ThrottleOutPacketType.Task);
7230 break;
7231 }
7232
7233 if (money != null)
7234 money.ApplyGroupCreationCharge(AgentId);
7235
7236 createGroupReply.ReplyData.Success = true;
7237 createGroupReply.ReplyData.GroupID = groupID;
7238 createGroupReply.ReplyData.Message = Utils.StringToBytes("Group created");
7239 OutPacket(createGroupReply, ThrottleOutPacketType.Task);
7240
7241 // Sync with event queue
7242 Thread.Sleep(1000);
7243
7244 m_GroupsModule.SendAgentGroupDataUpdate(this);
7245 } 7206 }
7246 break; 7207 break;
7247 7208
@@ -8638,6 +8599,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8638 } 8599 }
8639 } 8600 }
8640 8601
8602 public void SendCreateGroupReply(UUID groupID, bool success, string message)
8603 {
8604 CreateGroupReplyPacket createGroupReply = (CreateGroupReplyPacket)PacketPool.Instance.GetPacket(PacketType.CreateGroupReply);
8605
8606 createGroupReply.AgentData =
8607 new CreateGroupReplyPacket.AgentDataBlock();
8608 createGroupReply.ReplyData =
8609 new CreateGroupReplyPacket.ReplyDataBlock();
8610
8611 createGroupReply.AgentData.AgentID = AgentId;
8612 createGroupReply.ReplyData.GroupID = groupID;
8613
8614 createGroupReply.ReplyData.Success = success;
8615 createGroupReply.ReplyData.Message = Utils.StringToBytes(message);
8616 OutPacket(createGroupReply, ThrottleOutPacketType.Task);
8617 }
8618
8641 public string Report() 8619 public string Report()
8642 { 8620 {
8643 LLPacketHandler handler = (LLPacketHandler) m_PacketHandler; 8621 LLPacketHandler handler = (LLPacketHandler) m_PacketHandler;
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 9828d68..803eeb4 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -1053,6 +1053,10 @@ namespace OpenSim.Region.Examples.SimpleModule
1053 { 1053 {
1054 } 1054 }
1055 1055
1056 public void SendCreateGroupReply(UUID groupID, bool success, string message)
1057 {
1058 }
1059
1056 #endregion 1060 #endregion
1057 } 1061 }
1058} 1062}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index da2d781..71f7cc0 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -1053,6 +1053,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1053 { 1053 {
1054 } 1054 }
1055 1055
1056 public void SendCreateGroupReply(UUID groupID, bool success, string message)
1057 {
1058 }
1059
1056 #endregion 1060 #endregion
1057 } 1061 }
1058} 1062}