aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs70
1 files changed, 45 insertions, 25 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index 54870d8..98f3a3a 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -596,23 +596,32 @@ namespace OpenSim.Region.Environment.Modules.World.Land
596 if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) 596 if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this))
597 { 597 {
598 List<uint> resultLocalIDs = new List<uint>(); 598 List<uint> resultLocalIDs = new List<uint>();
599 foreach (SceneObjectGroup obj in primsOverMe) 599 try
600 { 600 {
601 if (obj.LocalId > 0) 601 lock (primsOverMe)
602 { 602 {
603 if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.ownerID) 603 foreach (SceneObjectGroup obj in primsOverMe)
604 {
605 resultLocalIDs.Add(obj.LocalId);
606 }
607 // else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && ...) // TODO: group support
608 // {
609 // }
610 else if (request_type == LandChannel.LAND_SELECT_OBJECTS_OTHER &&
611 obj.OwnerID != remote_client.AgentId)
612 { 604 {
613 resultLocalIDs.Add(obj.LocalId); 605 if (obj.LocalId > 0)
606 {
607 if (request_type == LandChannel.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == landData.ownerID)
608 {
609 resultLocalIDs.Add(obj.LocalId);
610 }
611 // else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && ...) // TODO: group support
612 // {
613 // }
614 else if (request_type == LandChannel.LAND_SELECT_OBJECTS_OTHER &&
615 obj.OwnerID != remote_client.AgentId)
616 {
617 resultLocalIDs.Add(obj.LocalId);
618 }
619 }
614 } 620 }
615 } 621 }
622 } catch (InvalidOperationException)
623 {
624 m_log.Error("[LAND]: Unable to force select the parcel objects. Arr.");
616 } 625 }
617 626
618 remote_client.sendForceClientSelectObjects(resultLocalIDs); 627 remote_client.sendForceClientSelectObjects(resultLocalIDs);
@@ -633,26 +642,37 @@ namespace OpenSim.Region.Environment.Modules.World.Land
633 { 642 {
634 Dictionary<LLUUID, int> primCount = new Dictionary<LLUUID, int>(); 643 Dictionary<LLUUID, int> primCount = new Dictionary<LLUUID, int>();
635 644
636 foreach (SceneObjectGroup obj in primsOverMe) 645 lock (primsOverMe)
637 { 646 {
638 try 647 try
639 { 648 {
640 if (!primCount.ContainsKey(obj.OwnerID)) 649
650 foreach (SceneObjectGroup obj in primsOverMe)
641 { 651 {
642 primCount.Add(obj.OwnerID, 0); 652 try
653 {
654 if (!primCount.ContainsKey(obj.OwnerID))
655 {
656 primCount.Add(obj.OwnerID, 0);
657 }
658 }
659 catch (NullReferenceException)
660 {
661 m_log.Info("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel");
662 }
663 try
664 {
665 primCount[obj.OwnerID] += obj.PrimCount;
666 }
667 catch (KeyNotFoundException)
668 {
669 m_log.Error("[LAND]: Unable to match a prim with it's owner.");
670 }
643 } 671 }
644 } 672 }
645 catch (NullReferenceException) 673 catch (InvalidOperationException)
646 {
647 m_log.Info("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel");
648 }
649 try
650 {
651 primCount[obj.OwnerID] += obj.PrimCount;
652 }
653 catch (KeyNotFoundException)
654 { 674 {
655 m_log.Error("[LAND]: Unable to match a prim with it's owner."); 675 m_log.Error("[LAND]: Unable to Enumerate Land object arr.");
656 } 676 }
657 } 677 }
658 678