aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.World/ParcelManager.cs
diff options
context:
space:
mode:
authormingchen2007-06-08 21:30:51 +0000
committermingchen2007-06-08 21:30:51 +0000
commit2c04171990df9e01cd4c5aa600a6eaa1487f9605 (patch)
treec5664038ce624fb0f6edb63db6c62587e45518a3 /OpenSim/OpenSim.World/ParcelManager.cs
parent*Moved SendRegionHandshake back to IClientAPI and modded sendRegionHandshakeT... (diff)
downloadopensim-SC-2c04171990df9e01cd4c5aa600a6eaa1487f9605.zip
opensim-SC-2c04171990df9e01cd4c5aa600a6eaa1487f9605.tar.gz
opensim-SC-2c04171990df9e01cd4c5aa600a6eaa1487f9605.tar.bz2
opensim-SC-2c04171990df9e01cd4c5aa600a6eaa1487f9605.tar.xz
*Added delegates and events for parcel and estate management
*Only thing left is to get the master user setup in both sandbox and grid mode
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.World/ParcelManager.cs58
1 files changed, 55 insertions, 3 deletions
diff --git a/OpenSim/OpenSim.World/ParcelManager.cs b/OpenSim/OpenSim.World/ParcelManager.cs
index 9fbacd6..4a9bfb1 100644
--- a/OpenSim/OpenSim.World/ParcelManager.cs
+++ b/OpenSim/OpenSim.World/ParcelManager.cs
@@ -166,7 +166,7 @@ namespace OpenSim.world
166 parcelList.Remove(local_id); 166 parcelList.Remove(local_id);
167 } 167 }
168 168
169 public void performFinalParcelJoin(Parcel master, Parcel slave) 169 private void performFinalParcelJoin(Parcel master, Parcel slave)
170 { 170 {
171 int x, y; 171 int x, y;
172 bool[,] parcelBitmapSlave = slave.getParcelBitmap(); 172 bool[,] parcelBitmapSlave = slave.getParcelBitmap();
@@ -212,7 +212,7 @@ namespace OpenSim.world
212 /// <param name="end_y">North Point</param> 212 /// <param name="end_y">North Point</param>
213 /// <param name="attempting_user_id">LLUUID of user who is trying to subdivide</param> 213 /// <param name="attempting_user_id">LLUUID of user who is trying to subdivide</param>
214 /// <returns>Returns true if successful</returns> 214 /// <returns>Returns true if successful</returns>
215 public bool subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) 215 private bool subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id)
216 { 216 {
217 //First, lets loop through the points and make sure they are all in the same parcel 217 //First, lets loop through the points and make sure they are all in the same parcel
218 //Get the parcel at start 218 //Get the parcel at start
@@ -278,7 +278,7 @@ namespace OpenSim.world
278 /// <param name="end_y">y value in second parcel</param> 278 /// <param name="end_y">y value in second parcel</param>
279 /// <param name="attempting_user_id">LLUUID of the avatar trying to join the parcels</param> 279 /// <param name="attempting_user_id">LLUUID of the avatar trying to join the parcels</param>
280 /// <returns>Returns true if successful</returns> 280 /// <returns>Returns true if successful</returns>
281 public bool join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) 281 private bool join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id)
282 { 282 {
283 end_x -= 4; 283 end_x -= 4;
284 end_y -= 4; 284 end_y -= 4;
@@ -406,6 +406,58 @@ namespace OpenSim.world
406 packet.ParcelData.SequenceID = sequenceID; //Eh? 406 packet.ParcelData.SequenceID = sequenceID; //Eh?
407 remote_client.OutPacket((Packet)packet); 407 remote_client.OutPacket((Packet)packet);
408 } 408 }
409
410 public void handleParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client)
411 {
412 //Get the parcels within the bounds
413 List<Parcel> temp = new List<Parcel>();
414 int x, y, i;
415 int inc_x = end_x - start_x;
416 int inc_y = end_y - start_y;
417 for (x = 0; x < inc_x; x++)
418 {
419 for (y = 0; y < inc_y; y++)
420 {
421 OpenSim.world.Parcel currentParcel = getParcel(start_x + x, start_y + y);
422 if (!temp.Contains(currentParcel))
423 {
424 currentParcel.forceUpdateParcelInfo();
425 temp.Add(currentParcel);
426 }
427 }
428 }
429
430 int requestResult = ParcelManager.PARCEL_RESULT_ONE_PARCEL;
431 if (temp.Count > 1)
432 {
433 requestResult = ParcelManager.PARCEL_RESULT_MULTIPLE_PARCELS;
434 }
435
436 for (i = 0; i < temp.Count; i++)
437 {
438 temp[i].sendParcelProperties(sequence_id, snap_selection, requestResult, remote_client);
439 }
440
441
442 sendParcelOverlay(remote_client);
443 }
444
445 public void handleParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client)
446 {
447 if (parcelList.ContainsKey(packet.ParcelData.LocalID))
448 {
449 parcelList[packet.ParcelData.LocalID].updateParcelProperties(packet, remote_client);
450 }
451 }
452 public void handleParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client)
453 {
454 subdivide(west, south, east, north, remote_client.AgentId);
455 }
456 public void handleParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client)
457 {
458 join(west, south, east, north, remote_client.AgentId);
459
460 }
409 #endregion 461 #endregion
410 462
411 /// <summary> 463 /// <summary>