diff options
author | Melanie | 2010-03-03 02:07:03 +0000 |
---|---|---|
committer | Melanie | 2010-03-03 02:07:03 +0000 |
commit | 028a87fe37002e7a0611f66babf1deee46c83804 (patch) | |
tree | 387aec499fd60c2012bed8148e6a2ddc847c3d95 /OpenSim/Region/OptionalModules/World | |
parent | Revert "test" (diff) | |
parent | Fixes Region.Framework tests. Although these tests don't fail, they need to b... (diff) | |
download | opensim-SC_OLD-028a87fe37002e7a0611f66babf1deee46c83804.zip opensim-SC_OLD-028a87fe37002e7a0611f66babf1deee46c83804.tar.gz opensim-SC_OLD-028a87fe37002e7a0611f66babf1deee46c83804.tar.bz2 opensim-SC_OLD-028a87fe37002e7a0611f66babf1deee46c83804.tar.xz |
Merge branch 'master' into careminster-presence-refactor
This brings careminster on the level of master. To be tested
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
4 files changed, 28 insertions, 27 deletions
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 3135cdc..15473d8 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -189,7 +189,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
189 | public event DeRezObject OnDeRezObject; | 189 | public event DeRezObject OnDeRezObject; |
190 | public event Action<IClientAPI> OnRegionHandShakeReply; | 190 | public event Action<IClientAPI> OnRegionHandShakeReply; |
191 | public event GenericCall2 OnRequestWearables; | 191 | public event GenericCall2 OnRequestWearables; |
192 | public event GenericCall2 OnCompleteMovementToRegion; | 192 | public event GenericCall1 OnCompleteMovementToRegion; |
193 | public event UpdateAgent OnAgentUpdate; | 193 | public event UpdateAgent OnAgentUpdate; |
194 | public event AgentRequestSit OnAgentRequestSit; | 194 | public event AgentRequestSit OnAgentRequestSit; |
195 | public event AgentSit OnAgentSit; | 195 | public event AgentSit OnAgentSit; |
@@ -298,6 +298,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
298 | public event ObjectBuy OnObjectBuy; | 298 | public event ObjectBuy OnObjectBuy; |
299 | public event BuyObjectInventory OnBuyObjectInventory; | 299 | public event BuyObjectInventory OnBuyObjectInventory; |
300 | public event AgentSit OnUndo; | 300 | public event AgentSit OnUndo; |
301 | public event AgentSit OnRedo; | ||
302 | public event LandUndo OnLandUndo; | ||
301 | 303 | ||
302 | public event ForceReleaseControls OnForceReleaseControls; | 304 | public event ForceReleaseControls OnForceReleaseControls; |
303 | public event GodLandStatRequest OnLandStatRequest; | 305 | public event GodLandStatRequest OnLandStatRequest; |
@@ -455,6 +457,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
455 | set { } | 457 | set { } |
456 | } | 458 | } |
457 | 459 | ||
460 | public bool IsLoggingOut | ||
461 | { | ||
462 | get { return false; } | ||
463 | set { } | ||
464 | } | ||
458 | public UUID ActiveGroupId | 465 | public UUID ActiveGroupId |
459 | { | 466 | { |
460 | get { return UUID.Zero; } | 467 | get { return UUID.Zero; } |
@@ -737,7 +744,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
737 | 744 | ||
738 | if (OnCompleteMovementToRegion != null) | 745 | if (OnCompleteMovementToRegion != null) |
739 | { | 746 | { |
740 | OnCompleteMovementToRegion(); | 747 | OnCompleteMovementToRegion(this); |
741 | } | 748 | } |
742 | } | 749 | } |
743 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) | 750 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) |
@@ -1148,5 +1155,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1148 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | 1155 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) |
1149 | { | 1156 | { |
1150 | } | 1157 | } |
1158 | |||
1159 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | ||
1160 | { | ||
1161 | } | ||
1151 | } | 1162 | } |
1152 | } | 1163 | } |
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 | } |