aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-19 00:45:22 +0100
committerJustin Clark-Casey (justincc)2011-08-19 00:45:22 +0100
commitc9e6b7bd10b2cdaa917e41259ae0d612f2171f7a (patch)
treeca0e224639979b65c36c0d169d900ed707a6f991 /OpenSim/Region/OptionalModules/World/NPC
parentDon't need to try both AssetService.Get and GetCached in GetMesh since Get al... (diff)
downloadopensim-SC_OLD-c9e6b7bd10b2cdaa917e41259ae0d612f2171f7a.zip
opensim-SC_OLD-c9e6b7bd10b2cdaa917e41259ae0d612f2171f7a.tar.gz
opensim-SC_OLD-c9e6b7bd10b2cdaa917e41259ae0d612f2171f7a.tar.bz2
opensim-SC_OLD-c9e6b7bd10b2cdaa917e41259ae0d612f2171f7a.tar.xz
Stop NPC's getting hypergrid like names in some circumstances.
This meant punching in another AddUser() method in IUserManagement to do a direct name to UUID associated without the account check (since NPCs don't have accounts). May address http://opensimulator.org/mantis/view.php?id=5645
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index f8afc5a..78296a4 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -34,6 +34,7 @@ using OpenMetaverse;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications; 35using OpenSim.Framework.Communications;
36using OpenSim.Region.CoreModules.Avatar.AvatarFactory; 36using OpenSim.Region.CoreModules.Avatar.AvatarFactory;
37using OpenSim.Region.CoreModules.Framework.UserManagement;
37using OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar; 38using OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar;
38using OpenSim.Region.Framework.Interfaces; 39using OpenSim.Region.Framework.Interfaces;
39using OpenSim.Region.Framework.Scenes; 40using OpenSim.Region.Framework.Scenes;
@@ -57,8 +58,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
57 config.Configs["NPC"].Set("Enabled", "true"); 58 config.Configs["NPC"].Set("Enabled", "true");
58 59
59 AvatarFactoryModule afm = new AvatarFactoryModule(); 60 AvatarFactoryModule afm = new AvatarFactoryModule();
61 UserManagementModule umm = new UserManagementModule();
62
60 TestScene scene = SceneHelpers.SetupScene(); 63 TestScene scene = SceneHelpers.SetupScene();
61 SceneHelpers.SetupSceneModules(scene, config, afm, new NPCModule()); 64 SceneHelpers.SetupSceneModules(scene, config, afm, umm, new NPCModule());
62 ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); 65 ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1));
63// ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId); 66// ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId);
64 67
@@ -81,6 +84,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
81 84
82 Assert.That(npc, Is.Not.Null); 85 Assert.That(npc, Is.Not.Null);
83 Assert.That(npc.Appearance.Texture.FaceTextures[8].TextureID, Is.EqualTo(originalFace8TextureId)); 86 Assert.That(npc.Appearance.Texture.FaceTextures[8].TextureID, Is.EqualTo(originalFace8TextureId));
87 Assert.That(umm.GetUserName(npc.UUID), Is.EqualTo(string.Format("{0} {1}", npc.Firstname, npc.Lastname)));
84 } 88 }
85 89
86 [Test] 90 [Test]