diff options
author | AliciaRaven | 2015-03-31 12:35:55 +0100 |
---|---|---|
committer | Michael Cerquoni | 2015-04-12 15:36:22 -0400 |
commit | 1e444b1449ffad4969709c039f7c606c9f8f484d (patch) | |
tree | 51187c4212cc2397a9b6c1af9a657cba0335a734 /OpenSim/Region/CoreModules/Avatar/UserProfiles | |
parent | Fix llTargetOmega non-physical gain. (diff) | |
download | opensim-SC-1e444b1449ffad4969709c039f7c606c9f8f484d.zip opensim-SC-1e444b1449ffad4969709c039f7c606c9f8f484d.tar.gz opensim-SC-1e444b1449ffad4969709c039f7c606c9f8f484d.tar.bz2 opensim-SC-1e444b1449ffad4969709c039f7c606c9f8f484d.tar.xz |
Change UserProfiles so that the parcel name is used for a ProfilePick and not the parcel owners name. This change also fixes a bug where if the avatar enters and does not move, creating or editing a ProfilePick would set the parcelId as an empty UUID. This is because ScenePresence.currentParcelUUID is not set until the avatar moves.
Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/UserProfiles')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 48bb2df..5a648a3 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -671,7 +671,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
671 | 671 | ||
672 | // Pull the rabbit out of the hat | 672 | // Pull the rabbit out of the hat |
673 | remoteClient.SendPickInfoReply(pick.PickId,pick.CreatorId,pick.TopPick,pick.ParcelId,pick.Name, | 673 | remoteClient.SendPickInfoReply(pick.PickId,pick.CreatorId,pick.TopPick,pick.ParcelId,pick.Name, |
674 | pick.Desc,pick.SnapshotId,pick.User,pick.OriginalName,pick.SimName, | 674 | pick.Desc,pick.SnapshotId,pick.ParcelName,pick.OriginalName,pick.SimName, |
675 | globalPos,pick.SortOrder,pick.Enabled); | 675 | globalPos,pick.SortOrder,pick.Enabled); |
676 | } | 676 | } |
677 | 677 | ||
@@ -721,24 +721,16 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
721 | remoteClient.Scene.RegionInfo.WorldLocY + avaPos.Y, | 721 | remoteClient.Scene.RegionInfo.WorldLocY + avaPos.Y, |
722 | avaPos.Z); | 722 | avaPos.Z); |
723 | 723 | ||
724 | string landOwnerName = string.Empty; | 724 | string landParcelName = "My Parcel"; |
725 | UUID landParcelID = p.currentParcelUUID; | ||
726 | |||
725 | ILandObject land = p.Scene.LandChannel.GetLandObject(avaPos.X, avaPos.Y); | 727 | ILandObject land = p.Scene.LandChannel.GetLandObject(avaPos.X, avaPos.Y); |
726 | 728 | ||
727 | if (land != null) | 729 | if (land != null) |
728 | { | 730 | { |
729 | if (land.LandData.IsGroupOwned) | 731 | // If land found, use parcel uuid from here because the value from SP will be blank if the avatar hasnt moved |
730 | { | 732 | landParcelName = land.LandData.Name; |
731 | IGroupsModule groupMod = p.Scene.RequestModuleInterface<IGroupsModule>(); | 733 | landParcelID = land.LandData.GlobalID; |
732 | UUID groupId = land.LandData.GroupID; | ||
733 | GroupRecord groupRecord = groupMod.GetGroupRecord(groupId); | ||
734 | landOwnerName = groupRecord.GroupName; | ||
735 | } | ||
736 | else | ||
737 | { | ||
738 | IUserAccountService accounts = p.Scene.RequestModuleInterface<IUserAccountService>(); | ||
739 | UserAccount user = accounts.GetUserAccount(p.Scene.RegionInfo.ScopeID, land.LandData.OwnerID); | ||
740 | landOwnerName = user.Name; | ||
741 | } | ||
742 | } | 734 | } |
743 | else | 735 | else |
744 | { | 736 | { |
@@ -753,9 +745,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
753 | pick.TopPick = topPick; | 745 | pick.TopPick = topPick; |
754 | pick.Name = name; | 746 | pick.Name = name; |
755 | pick.Desc = desc; | 747 | pick.Desc = desc; |
756 | pick.ParcelId = p.currentParcelUUID; | 748 | pick.ParcelId = landParcelID; |
757 | pick.SnapshotId = snapshotID; | 749 | pick.SnapshotId = snapshotID; |
758 | pick.User = landOwnerName; | 750 | pick.ParcelName = landParcelName; |
759 | pick.SimName = remoteClient.Scene.RegionInfo.RegionName; | 751 | pick.SimName = remoteClient.Scene.RegionInfo.RegionName; |
760 | pick.Gatekeeper = MyGatekeeper; | 752 | pick.Gatekeeper = MyGatekeeper; |
761 | pick.GlobalPos = posGlobal.ToString(); | 753 | pick.GlobalPos = posGlobal.ToString(); |