aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
authorAdam Frisby2008-05-01 16:35:00 +0000
committerAdam Frisby2008-05-01 16:35:00 +0000
commit13526097f24b7a8ad63b1d482c44b44397fa055f (patch)
tree7a82c20ed7c63e2aea5ad3863325e37f64e1cbea /OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
parent* Breaking all the code, breaking all the code..! (diff)
downloadopensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.zip
opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.gz
opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.bz2
opensim-SC-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.xz
* Spring cleaning on Region.Environment.
* Converted a large number of read-only fields to be actually, readonly. * Reformatted code sections. * Removed redundant code.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index dccc09a..b052096 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -78,11 +78,12 @@ namespace OpenSim.Region.Environment.Scenes
78 foreach (EntityBase ent in EntitieList) 78 foreach (EntityBase ent in EntitieList)
79 { 79 {
80 if (ent is SceneObjectGroup) 80 if (ent is SceneObjectGroup)
81 { 81 {
82 if (((SceneObjectGroup) ent).LocalId == primLocalID) 82 if ((ent).LocalId == primLocalID)
83 { 83 {
84 // A prim is only tainted if it's allowed to be edited by the person clicking it. 84 // A prim is only tainted if it's allowed to be edited by the person clicking it.
85 if (m_permissionManager.CanEditObjectPosition(remoteClient.AgentId, ((SceneObjectGroup)ent).UUID) || m_permissionManager.CanEditObject(remoteClient.AgentId, ((SceneObjectGroup)ent).UUID)) 85 if (m_permissionManager.CanEditObjectPosition(remoteClient.AgentId, (ent).UUID) ||
86 m_permissionManager.CanEditObject(remoteClient.AgentId, (ent).UUID))
86 { 87 {
87 ((SceneObjectGroup) ent).GetProperties(remoteClient); 88 ((SceneObjectGroup) ent).GetProperties(remoteClient);
88 ((SceneObjectGroup) ent).IsSelected = true; 89 ((SceneObjectGroup) ent).IsSelected = true;
@@ -107,9 +108,10 @@ namespace OpenSim.Region.Environment.Scenes
107 { 108 {
108 if (ent is SceneObjectGroup) 109 if (ent is SceneObjectGroup)
109 { 110 {
110 if (((SceneObjectGroup) ent).LocalId == primLocalID) 111 if ((ent).LocalId == primLocalID)
111 { 112 {
112 if (m_permissionManager.CanEditObjectPosition(remoteClient.AgentId, ((SceneObjectGroup)ent).UUID) || m_permissionManager.CanEditObject(remoteClient.AgentId, ((SceneObjectGroup)ent).UUID)) 113 if (m_permissionManager.CanEditObjectPosition(remoteClient.AgentId, (ent).UUID) ||
114 m_permissionManager.CanEditObject(remoteClient.AgentId, (ent).UUID))
113 { 115 {
114 ((SceneObjectGroup) ent).IsSelected = false; 116 ((SceneObjectGroup) ent).IsSelected = false;
115 LandChannel.setPrimsTainted(); 117 LandChannel.setPrimsTainted();
@@ -129,21 +131,20 @@ namespace OpenSim.Region.Environment.Scenes
129 } 131 }
130 132
131 public virtual void ProcessParcelBuy(LLUUID agentId, LLUUID groupId, bool final, bool groupOwned, 133 public virtual void ProcessParcelBuy(LLUUID agentId, LLUUID groupId, bool final, bool groupOwned,
132 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated) 134 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated)
133 { 135 {
134 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs( 136 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(
135 agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated); 137 agentId, groupId, final, groupOwned, removeContribution, parcelLocalID, parcelArea, parcelPrice, authenticated);
136 138
137 // First, allow all validators a stab at it 139 // First, allow all validators a stab at it
138 m_eventManager.TriggerValidateLandBuy(this, args); 140 m_eventManager.TriggerValidateLandBuy(this, args);
139 141
140 // Then, check validation and transfer 142 // Then, check validation and transfer
141 m_eventManager.TriggerLandBuy(this, args); 143 m_eventManager.TriggerLandBuy(this, args);
142 } 144 }
143 145
144 public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) 146 public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
145 { 147 {
146
147 List<EntityBase> EntitieList = GetEntities(); 148 List<EntityBase> EntitieList = GetEntities();
148 149
149 foreach (EntityBase ent in EntitieList) 150 foreach (EntityBase ent in EntitieList)
@@ -178,7 +179,6 @@ namespace OpenSim.Region.Environment.Scenes
178 179
179 public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient) 180 public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient)
180 { 181 {
181
182 List<EntityBase> EntitieList = GetEntities(); 182 List<EntityBase> EntitieList = GetEntities();
183 183
184 foreach (EntityBase ent in EntitieList) 184 foreach (EntityBase ent in EntitieList)
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Environment.Scenes
190 // Is this prim part of the group 190 // Is this prim part of the group
191 if (obj.HasChildPrim(localID)) 191 if (obj.HasChildPrim(localID))
192 { 192 {
193 SceneObjectPart part=obj.GetChildPart(localID); 193 SceneObjectPart part = obj.GetChildPart(localID);
194 if (part != null) 194 if (part != null)
195 { 195 {
196 // If the touched prim handles touches, deliver it 196 // If the touched prim handles touches, deliver it
@@ -233,8 +233,8 @@ namespace OpenSim.Region.Environment.Scenes
233 LLUUID translatedIDtem = item.AvatarID; 233 LLUUID translatedIDtem = item.AvatarID;
234 searchData[i] = new AvatarPickerReplyPacket.DataBlock(); 234 searchData[i] = new AvatarPickerReplyPacket.DataBlock();
235 searchData[i].AvatarID = translatedIDtem; 235 searchData[i].AvatarID = translatedIDtem;
236 searchData[i].FirstName = Helpers.StringToField((string) item.firstName); 236 searchData[i].FirstName = Helpers.StringToField(item.firstName);
237 searchData[i].LastName = Helpers.StringToField((string) item.lastName); 237 searchData[i].LastName = Helpers.StringToField(item.lastName);
238 i++; 238 i++;
239 } 239 }
240 if (AvatarResponses.Count == 0) 240 if (AvatarResponses.Count == 0)
@@ -245,4 +245,4 @@ namespace OpenSim.Region.Environment.Scenes
245 client.SendAvatarPickerReply(replyPacket); 245 client.SendAvatarPickerReply(replyPacket);
246 } 246 }
247 } 247 }
248} 248} \ No newline at end of file