diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
4 files changed, 34 insertions, 29 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 cf2076f..6360c99 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -189,7 +189,8 @@ 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 OnPreAgentUpdate; | ||
193 | public event UpdateAgent OnAgentUpdate; | 194 | public event UpdateAgent OnAgentUpdate; |
194 | public event AgentRequestSit OnAgentRequestSit; | 195 | public event AgentRequestSit OnAgentRequestSit; |
195 | public event AgentSit OnAgentSit; | 196 | public event AgentSit OnAgentSit; |
@@ -234,6 +235,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
234 | public event Action<UUID> OnRemoveAvatar; | 235 | public event Action<UUID> OnRemoveAvatar; |
235 | 236 | ||
236 | public event CreateNewInventoryItem OnCreateNewInventoryItem; | 237 | public event CreateNewInventoryItem OnCreateNewInventoryItem; |
238 | public event LinkInventoryItem OnLinkInventoryItem; | ||
237 | public event CreateInventoryFolder OnCreateNewInventoryFolder; | 239 | public event CreateInventoryFolder OnCreateNewInventoryFolder; |
238 | public event UpdateInventoryFolder OnUpdateInventoryFolder; | 240 | public event UpdateInventoryFolder OnUpdateInventoryFolder; |
239 | public event MoveInventoryFolder OnMoveInventoryFolder; | 241 | public event MoveInventoryFolder OnMoveInventoryFolder; |
@@ -457,6 +459,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
457 | set { } | 459 | set { } |
458 | } | 460 | } |
459 | 461 | ||
462 | public bool IsLoggingOut | ||
463 | { | ||
464 | get { return false; } | ||
465 | set { } | ||
466 | } | ||
460 | public UUID ActiveGroupId | 467 | public UUID ActiveGroupId |
461 | { | 468 | { |
462 | get { return UUID.Zero; } | 469 | get { return UUID.Zero; } |
@@ -739,7 +746,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
739 | 746 | ||
740 | if (OnCompleteMovementToRegion != null) | 747 | if (OnCompleteMovementToRegion != null) |
741 | { | 748 | { |
742 | OnCompleteMovementToRegion(); | 749 | OnCompleteMovementToRegion(this); |
743 | } | 750 | } |
744 | } | 751 | } |
745 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) | 752 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) |
@@ -1150,5 +1157,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1150 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | 1157 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) |
1151 | { | 1158 | { |
1152 | } | 1159 | } |
1160 | |||
1161 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | ||
1162 | { | ||
1163 | } | ||
1164 | |||
1165 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1166 | { | ||
1167 | } | ||
1153 | } | 1168 | } |
1154 | } | 1169 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index ac39a53..ab0be77 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) |
@@ -104,7 +110,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
104 | if (m_avatars.ContainsKey(agentID)) | 110 | if (m_avatars.ContainsKey(agentID)) |
105 | { | 111 | { |
106 | ScenePresence sp; | 112 | ScenePresence sp; |
107 | scene.TryGetAvatar(agentID, out sp); | 113 | scene.TryGetScenePresence(agentID, out sp); |
108 | sp.DoAutoPilot(0, pos, m_avatars[agentID]); | 114 | sp.DoAutoPilot(0, pos, m_avatars[agentID]); |
109 | } | 115 | } |
110 | } | 116 | } |
@@ -159,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
159 | p_scene.AddNewClient(npcAvatar); | 165 | p_scene.AddNewClient(npcAvatar); |
160 | 166 | ||
161 | ScenePresence sp; | 167 | ScenePresence sp; |
162 | if (p_scene.TryGetAvatar(npcAvatar.AgentId, out sp)) | 168 | if (p_scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) |
163 | { | 169 | { |
164 | AvatarAppearance x = GetAppearance(p_cloneAppearanceFrom, p_scene); | 170 | AvatarAppearance x = GetAppearance(p_cloneAppearanceFrom, p_scene); |
165 | 171 | ||
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 | } |