diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 32 |
2 files changed, 25 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 343cdb5..66325b4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -182,6 +182,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
182 | try | 182 | try |
183 | { | 183 | { |
184 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 184 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
185 | |||
186 | if (obj == null) | ||
187 | return; | ||
188 | |||
185 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 | 189 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 |
186 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) | 190 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) |
187 | { | 191 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index f3e757a..bb2a258 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -657,9 +657,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
657 | /// Enabled. | 657 | /// Enabled. |
658 | /// </param> | 658 | /// </param> |
659 | public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled) | 659 | public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled) |
660 | { | 660 | { |
661 | |||
662 | m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString()); | 661 | m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString()); |
662 | |||
663 | UserProfilePick pick = new UserProfilePick(); | 663 | UserProfilePick pick = new UserProfilePick(); |
664 | string serverURI = string.Empty; | 664 | string serverURI = string.Empty; |
665 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 665 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
@@ -672,19 +672,29 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
672 | avaPos.Z); | 672 | avaPos.Z); |
673 | 673 | ||
674 | string landOwnerName = string.Empty; | 674 | string landOwnerName = string.Empty; |
675 | ILandObject land = p.Scene.LandChannel.GetLandObject(avaPos.X, avaPos.Y); | 675 | ILandObject land = p.Scene.LandChannel.GetLandObject(avaPos.X, avaPos.Y); |
676 | if(land.LandData.IsGroupOwned) | 676 | |
677 | if (land != null) | ||
677 | { | 678 | { |
678 | IGroupsModule groupMod = p.Scene.RequestModuleInterface<IGroupsModule>(); | 679 | if (land.LandData.IsGroupOwned) |
679 | UUID groupId = land.LandData.GroupID; | 680 | { |
680 | GroupRecord groupRecord = groupMod.GetGroupRecord(groupId); | 681 | IGroupsModule groupMod = p.Scene.RequestModuleInterface<IGroupsModule>(); |
681 | landOwnerName = groupRecord.GroupName; | 682 | UUID groupId = land.LandData.GroupID; |
683 | GroupRecord groupRecord = groupMod.GetGroupRecord(groupId); | ||
684 | landOwnerName = groupRecord.GroupName; | ||
685 | } | ||
686 | else | ||
687 | { | ||
688 | IUserAccountService accounts = p.Scene.RequestModuleInterface<IUserAccountService>(); | ||
689 | UserAccount user = accounts.GetUserAccount(p.Scene.RegionInfo.ScopeID, land.LandData.OwnerID); | ||
690 | landOwnerName = user.Name; | ||
691 | } | ||
682 | } | 692 | } |
683 | else | 693 | else |
684 | { | 694 | { |
685 | IUserAccountService accounts = p.Scene.RequestModuleInterface<IUserAccountService>(); | 695 | m_log.WarnFormat( |
686 | UserAccount user = accounts.GetUserAccount(p.Scene.RegionInfo.ScopeID, land.LandData.OwnerID); | 696 | "[PROFILES]: PickInfoUpdate found no parcel info at {0},{1} in {2}", |
687 | landOwnerName = user.Name; | 697 | avaPos.X, avaPos.Y, p.Scene.Name); |
688 | } | 698 | } |
689 | 699 | ||
690 | pick.PickId = pickID; | 700 | pick.PickId = pickID; |