diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules')
11 files changed, 53 insertions, 62 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 009dd37..f54733d 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -627,6 +627,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
627 | set { if (!value) Disconnect("IsActive Disconnected?"); } | 627 | set { if (!value) Disconnect("IsActive Disconnected?"); } |
628 | } | 628 | } |
629 | 629 | ||
630 | public bool IsLoggingOut | ||
631 | { | ||
632 | get { return false; } | ||
633 | set { } | ||
634 | } | ||
635 | |||
630 | public bool SendLogoutPacketWhenClosing | 636 | public bool SendLogoutPacketWhenClosing |
631 | { | 637 | { |
632 | set { } | 638 | set { } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs index b3fa07f..66265d8 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs | |||
@@ -483,12 +483,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
483 | case "%host" : | 483 | case "%host" : |
484 | result = result.Replace(vvar, rs.Host); | 484 | result = result.Replace(vvar, rs.Host); |
485 | break; | 485 | break; |
486 | case "%master1" : | ||
487 | result = result.Replace(vvar, rs.MA1); | ||
488 | break; | ||
489 | case "%master2" : | ||
490 | result = result.Replace(vvar, rs.MA2); | ||
491 | break; | ||
492 | case "%locx" : | 486 | case "%locx" : |
493 | result = result.Replace(vvar, rs.LocX); | 487 | result = result.Replace(vvar, rs.LocX); |
494 | break; | 488 | break; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs index 773507c..53b103e 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs | |||
@@ -57,8 +57,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
57 | internal string Host = String.Empty; | 57 | internal string Host = String.Empty; |
58 | internal string LocX = String.Empty; | 58 | internal string LocX = String.Empty; |
59 | internal string LocY = String.Empty; | 59 | internal string LocY = String.Empty; |
60 | internal string MA1 = String.Empty; | ||
61 | internal string MA2 = String.Empty; | ||
62 | internal string IDK = String.Empty; | 60 | internal string IDK = String.Empty; |
63 | 61 | ||
64 | // System values - used only be the IRC classes themselves | 62 | // System values - used only be the IRC classes themselves |
@@ -85,8 +83,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
85 | Host = scene.RegionInfo.ExternalHostName; | 83 | Host = scene.RegionInfo.ExternalHostName; |
86 | LocX = Convert.ToString(scene.RegionInfo.RegionLocX); | 84 | LocX = Convert.ToString(scene.RegionInfo.RegionLocX); |
87 | LocY = Convert.ToString(scene.RegionInfo.RegionLocY); | 85 | LocY = Convert.ToString(scene.RegionInfo.RegionLocY); |
88 | MA1 = scene.RegionInfo.MasterAvatarFirstName; | ||
89 | MA2 = scene.RegionInfo.MasterAvatarLastName; | ||
90 | IDK = Convert.ToString(_idk_++); | 86 | IDK = Convert.ToString(_idk_++); |
91 | 87 | ||
92 | // OpenChannel conditionally establishes a connection to the | 88 | // OpenChannel conditionally establishes a connection to the |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 35819a6..242bc3f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -41,7 +41,7 @@ using log4net; | |||
41 | using Nini.Config; | 41 | using Nini.Config; |
42 | using Nwc.XmlRpc; | 42 | using Nwc.XmlRpc; |
43 | using OpenSim.Framework; | 43 | using OpenSim.Framework; |
44 | using OpenSim.Framework.Communications.Cache; | 44 | |
45 | using OpenSim.Framework.Capabilities; | 45 | using OpenSim.Framework.Capabilities; |
46 | using OpenSim.Framework.Servers; | 46 | using OpenSim.Framework.Servers; |
47 | using OpenSim.Framework.Servers.HttpServer; | 47 | using OpenSim.Framework.Servers.HttpServer; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index cb76200..34d0e24 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -39,7 +39,7 @@ using log4net; | |||
39 | using Nini.Config; | 39 | using Nini.Config; |
40 | using Nwc.XmlRpc; | 40 | using Nwc.XmlRpc; |
41 | using OpenSim.Framework; | 41 | using OpenSim.Framework; |
42 | using OpenSim.Framework.Communications.Cache; | 42 | |
43 | using OpenSim.Framework.Capabilities; | 43 | using OpenSim.Framework.Capabilities; |
44 | using OpenSim.Framework.Servers; | 44 | using OpenSim.Framework.Servers; |
45 | using OpenSim.Framework.Servers.HttpServer; | 45 | using OpenSim.Framework.Servers.HttpServer; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 8d32e66..68e6497 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -43,6 +43,8 @@ using OpenSim.Region.CoreModules.Framework.EventQueue; | |||
43 | using OpenSim.Region.Framework.Interfaces; | 43 | using OpenSim.Region.Framework.Interfaces; |
44 | using OpenSim.Region.Framework.Scenes; | 44 | using OpenSim.Region.Framework.Scenes; |
45 | 45 | ||
46 | using OpenSim.Services.Interfaces; | ||
47 | |||
46 | using Caps = OpenSim.Framework.Capabilities.Caps; | 48 | using Caps = OpenSim.Framework.Capabilities.Caps; |
47 | using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags; | 49 | using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags; |
48 | 50 | ||
@@ -507,10 +509,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
507 | { | 509 | { |
508 | if (m_debugEnabled) | 510 | if (m_debugEnabled) |
509 | { | 511 | { |
510 | UserProfileData targetUserProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(member.AgentID); | 512 | UserAccount targetUser = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, member.AgentID); |
511 | if (targetUserProfile != null) | 513 | if (targetUser != null) |
512 | { | 514 | { |
513 | m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUserProfile.Name, member.AcceptNotices); | 515 | m_log.DebugFormat("[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices); |
514 | } | 516 | } |
515 | else | 517 | else |
516 | { | 518 | { |
@@ -990,9 +992,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
990 | remoteClient.SendEjectGroupMemberReply(remoteClient.AgentId, groupID, true); | 992 | remoteClient.SendEjectGroupMemberReply(remoteClient.AgentId, groupID, true); |
991 | 993 | ||
992 | GroupRecord groupInfo = m_groupData.GetGroupRecord(grID, groupID, null); | 994 | GroupRecord groupInfo = m_groupData.GetGroupRecord(grID, groupID, null); |
993 | UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(ejecteeID); | 995 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, ejecteeID); |
994 | 996 | if ((groupInfo == null) || (account == null)) | |
995 | if ((groupInfo == null) || (userProfile == null)) | ||
996 | { | 997 | { |
997 | return; | 998 | return; |
998 | } | 999 | } |
@@ -1032,9 +1033,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1032 | msg.toAgentID = remoteClient.AgentId.Guid; | 1033 | msg.toAgentID = remoteClient.AgentId.Guid; |
1033 | msg.timestamp = 0; | 1034 | msg.timestamp = 0; |
1034 | msg.fromAgentName = remoteClient.Name; | 1035 | msg.fromAgentName = remoteClient.Name; |
1035 | if (userProfile != null) | 1036 | if (account != null) |
1036 | { | 1037 | { |
1037 | msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, userProfile.Name); | 1038 | msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, account.FirstName + " " + account.LastName); |
1038 | } | 1039 | } |
1039 | else | 1040 | else |
1040 | { | 1041 | { |
@@ -1147,8 +1148,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1147 | info.RequestID.AgentID = client.AgentId; | 1148 | info.RequestID.AgentID = client.AgentId; |
1148 | info.RequestID.SessionID = client.SessionId; | 1149 | info.RequestID.SessionID = client.SessionId; |
1149 | 1150 | ||
1150 | UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(client.AgentId); | 1151 | //UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(client.AgentId); |
1151 | if (userProfile == null) | 1152 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(client.Scene.RegionInfo.ScopeID, client.AgentId); |
1153 | if (account == null) | ||
1152 | { | 1154 | { |
1153 | // This should be impossible. If I've been passed a reference to a client | 1155 | // This should be impossible. If I've been passed a reference to a client |
1154 | // that client should be registered with the UserService. So something | 1156 | // that client should be registered with the UserService. So something |
@@ -1157,19 +1159,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1157 | m_log.WarnFormat("[GROUPS]: Could not find a user profile for {0} / {1}", client.Name, client.AgentId); | 1159 | m_log.WarnFormat("[GROUPS]: Could not find a user profile for {0} / {1}", client.Name, client.AgentId); |
1158 | 1160 | ||
1159 | // Default to local user service and hope for the best? | 1161 | // Default to local user service and hope for the best? |
1160 | info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; | 1162 | // REFACTORING PROBLEM |
1163 | //info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; | ||
1161 | 1164 | ||
1162 | } | 1165 | } |
1163 | else if (userProfile is ForeignUserProfileData) | ||
1164 | { | ||
1165 | // They aren't from around here | ||
1166 | ForeignUserProfileData fupd = (ForeignUserProfileData)userProfile; | ||
1167 | info.RequestID.UserServiceURL = fupd.UserServerURI; | ||
1168 | } | ||
1169 | else | 1166 | else |
1170 | { | 1167 | { |
1168 | string domain = string.Empty; //m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; | ||
1169 | if (account.ServiceURLs["HomeURI"] != null) | ||
1170 | domain = account.ServiceURLs["HomeURI"].ToString(); | ||
1171 | // They're a local user, use this: | 1171 | // They're a local user, use this: |
1172 | info.RequestID.UserServiceURL = m_sceneList[0].CommsManager.NetworkServersInfo.UserURL; | 1172 | info.RequestID.UserServiceURL = domain; |
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | m_clientRequestIDInfo.Add(client.AgentId, info); | 1175 | m_clientRequestIDInfo.Add(client.AgentId, info); |
@@ -1342,12 +1342,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1342 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 1342 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
1343 | 1343 | ||
1344 | // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff | 1344 | // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff |
1345 | UserProfileData userProfile = m_sceneList[0].CommsManager.UserService.GetUserProfile(dataForAgentID); | 1345 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID); |
1346 | string firstname, lastname; | 1346 | string firstname, lastname; |
1347 | if (userProfile != null) | 1347 | if (account != null) |
1348 | { | 1348 | { |
1349 | firstname = userProfile.FirstName; | 1349 | firstname = account.FirstName; |
1350 | lastname = userProfile.SurName; | 1350 | lastname = account.LastName; |
1351 | } | 1351 | } |
1352 | else | 1352 | else |
1353 | { | 1353 | { |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs index f2adcb7..2ddc31b 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MRMModule.cs | |||
@@ -212,8 +212,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
212 | if (script.StartsWith("//MRM:C#")) | 212 | if (script.StartsWith("//MRM:C#")) |
213 | { | 213 | { |
214 | if (m_config.GetBoolean("OwnerOnly", true)) | 214 | if (m_config.GetBoolean("OwnerOnly", true)) |
215 | if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.MasterAvatarAssignedUUID | 215 | if (m_scene.GetSceneObjectPart(localID).OwnerID != m_scene.RegionInfo.EstateSettings.EstateOwner |
216 | || m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.MasterAvatarAssignedUUID) | 216 | || m_scene.GetSceneObjectPart(localID).CreatorID != m_scene.RegionInfo.EstateSettings.EstateOwner) |
217 | return; | 217 | return; |
218 | 218 | ||
219 | script = ConvertMRMKeywords(script); | 219 | script = ConvertMRMKeywords(script); |
@@ -280,7 +280,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
280 | public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host) | 280 | public void GetGlobalEnvironment(uint localID, out IWorld world, out IHost host) |
281 | { | 281 | { |
282 | // UUID should be changed to object owner. | 282 | // UUID should be changed to object owner. |
283 | UUID owner = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 283 | UUID owner = m_scene.RegionInfo.EstateSettings.EstateOwner; |
284 | SEUser securityUser = new SEUser(owner, "Name Unassigned"); | 284 | SEUser securityUser = new SEUser(owner, "Name Unassigned"); |
285 | SecurityCredential creds = new SecurityCredential(securityUser, m_scene); | 285 | SecurityCredential creds = new SecurityCredential(securityUser, m_scene); |
286 | 286 | ||
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 3160cd3..b9a75cc 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -36,10 +36,11 @@ using Nwc.XmlRpc; | |||
36 | using Mono.Addins; | 36 | using Mono.Addins; |
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Communications.Cache; | 39 | |
40 | using OpenSim.Framework.Servers.HttpServer; | 40 | using OpenSim.Framework.Servers.HttpServer; |
41 | using OpenSim.Region.Framework.Interfaces; | 41 | using OpenSim.Region.Framework.Interfaces; |
42 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
43 | using OpenSim.Services.Interfaces; | ||
43 | 44 | ||
44 | namespace OpenSim.Region.OptionalModules.World.MoneyModule | 45 | namespace OpenSim.Region.OptionalModules.World.MoneyModule |
45 | { | 46 | { |
@@ -65,7 +66,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
65 | // private UUID EconomyBaseAccount = UUID.Zero; | 66 | // private UUID EconomyBaseAccount = UUID.Zero; |
66 | 67 | ||
67 | private float EnergyEfficiency = 0f; | 68 | private float EnergyEfficiency = 0f; |
68 | private bool gridmode = false; | ||
69 | // private ObjectPaid handerOnObjectPaid; | 69 | // private ObjectPaid handerOnObjectPaid; |
70 | private bool m_enabled = true; | 70 | private bool m_enabled = true; |
71 | private bool m_sellEnabled = false; | 71 | private bool m_sellEnabled = false; |
@@ -242,7 +242,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
242 | { | 242 | { |
243 | if (config == "Startup" && startupConfig != null) | 243 | if (config == "Startup" && startupConfig != null) |
244 | { | 244 | { |
245 | gridmode = startupConfig.GetBoolean("gridmode", false); | ||
246 | m_enabled = (startupConfig.GetString("economymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule"); | 245 | m_enabled = (startupConfig.GetString("economymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule"); |
247 | } | 246 | } |
248 | 247 | ||
@@ -292,18 +291,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
292 | 291 | ||
293 | private void GetClientFunds(IClientAPI client) | 292 | private void GetClientFunds(IClientAPI client) |
294 | { | 293 | { |
295 | // Here we check if we're in grid mode | 294 | CheckExistAndRefreshFunds(client.AgentId); |
296 | // I imagine that the 'check balance' | ||
297 | // function for the client should be here or shortly after | ||
298 | |||
299 | if (gridmode) | ||
300 | { | ||
301 | CheckExistAndRefreshFunds(client.AgentId); | ||
302 | } | ||
303 | else | ||
304 | { | ||
305 | CheckExistAndRefreshFunds(client.AgentId); | ||
306 | } | ||
307 | 295 | ||
308 | } | 296 | } |
309 | 297 | ||
@@ -398,10 +386,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
398 | { | 386 | { |
399 | // try avatar username surname | 387 | // try avatar username surname |
400 | Scene scene = GetRandomScene(); | 388 | Scene scene = GetRandomScene(); |
401 | CachedUserInfo profile = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentID); | 389 | UserAccount account = scene.UserAccountService.GetUserAccount(scene.RegionInfo.ScopeID, agentID); |
402 | if (profile != null && profile.UserProfile != null) | 390 | if (account != null) |
403 | { | 391 | { |
404 | string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; | 392 | string avatarname = account.FirstName + " " + account.LastName; |
405 | return avatarname; | 393 | return avatarname; |
406 | } | 394 | } |
407 | else | 395 | else |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index b331001..ea46945 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -457,6 +457,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
457 | set { } | 457 | set { } |
458 | } | 458 | } |
459 | 459 | ||
460 | public bool IsLoggingOut | ||
461 | { | ||
462 | get { return false; } | ||
463 | set { } | ||
464 | } | ||
460 | public UUID ActiveGroupId | 465 | public UUID ActiveGroupId |
461 | { | 466 | { |
462 | get { return UUID.Zero; } | 467 | get { return UUID.Zero; } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index ac39a53..6e742f1 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -34,6 +34,7 @@ using OpenSim.Region.Framework.Scenes; | |||
34 | using OpenSim.Region.CoreModules.Avatar.NPC; | 34 | using OpenSim.Region.CoreModules.Avatar.NPC; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using Timer=System.Timers.Timer; | 36 | using Timer=System.Timers.Timer; |
37 | using OpenSim.Services.Interfaces; | ||
37 | 38 | ||
38 | namespace OpenSim.Region.OptionalModules.World.NPC | 39 | namespace OpenSim.Region.OptionalModules.World.NPC |
39 | { | 40 | { |
@@ -63,11 +64,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
63 | if (m_appearanceCache.ContainsKey(target)) | 64 | if (m_appearanceCache.ContainsKey(target)) |
64 | return m_appearanceCache[target]; | 65 | return m_appearanceCache[target]; |
65 | 66 | ||
66 | AvatarAppearance x = scene.CommsManager.AvatarService.GetUserAppearance(target); | 67 | AvatarData adata = scene.AvatarService.GetAvatar(target); |
68 | if (adata != null) | ||
69 | { | ||
70 | AvatarAppearance x = adata.ToAvatarAppearance(target); | ||
67 | 71 | ||
68 | m_appearanceCache.Add(target, x); | 72 | m_appearanceCache.Add(target, x); |
69 | 73 | ||
70 | return x; | 74 | return x; |
75 | } | ||
76 | return new AvatarAppearance(); | ||
71 | } | 77 | } |
72 | 78 | ||
73 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) | 79 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) |
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index c8e6e4b..3ed338b 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | |||
@@ -306,8 +306,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
306 | 306 | ||
307 | m_log.InfoFormat("[TREES]: New tree planting for copse {0}", copsename); | 307 | m_log.InfoFormat("[TREES]: New tree planting for copse {0}", copsename); |
308 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; | 308 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; |
309 | if (uuid == UUID.Zero) | ||
310 | uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
311 | 309 | ||
312 | foreach (Copse copse in m_copse) | 310 | foreach (Copse copse in m_copse) |
313 | { | 311 | { |
@@ -760,8 +758,6 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
760 | Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) | 758 | Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) |
761 | { | 759 | { |
762 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; | 760 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; |
763 | if (uuid == UUID.Zero) | ||
764 | uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
765 | 761 | ||
766 | CreateTree(uuid, copse, position); | 762 | CreateTree(uuid, copse, position); |
767 | } | 763 | } |