public void TestRemove() { TestHelpers.InMethod(); // log4net.Config.XmlConfigurator.Configure(); SetUpScene(); ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1)); // ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId); Vector3 startPos = new Vector3(128, 128, 30); UUID npcId = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance); m_npcMod.DeleteNPC(npcId, m_scene); ScenePresence deletedNpc = m_scene.GetScenePresence(npcId); Assert.That(deletedNpc, Is.Null); IClientAPI client; Assert.That(m_scene.TryGetClient(npcId, out client), Is.False); // Have to account for SP still present. Assert.That(m_scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); }
public void TestRemove() { TestHelpers.InMethod(); // log4net.Config.XmlConfigurator.Configure(); ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1)); // ScenePresence originalAvatar = scene.GetScenePresence(originalClient.AgentId); Vector3 startPos = new Vector3(128, 128, 30); UUID npcId = m_npcMod.CreateNPC("John", "Smith", startPos, UUID.Zero, true, m_scene, sp.Appearance); m_npcMod.DeleteNPC(npcId, m_scene); ScenePresence deletedNpc = m_scene.GetScenePresence(npcId); Assert.That(deletedNpc, Is.Null); }
private void deleteActor(UUID uuid) { npc.DeleteNPC(actors[uuid].UUID, m_scene); actors.Remove(uuid); }